From 70cbc3af5300fe44b48215f8520f465ffa231df6 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-JIE70N9>
Date: 星期二, 22 七月 2025 09:55:17 +0800
Subject: [PATCH] 修改问题

---
 Admin.NET/WCS.Application/PLC/PLCTaskAction.cs |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Admin.NET/WCS.Application/PLC/PLCTaskAction.cs b/Admin.NET/WCS.Application/PLC/PLCTaskAction.cs
index 4c7b3f9..14cb836 100644
--- a/Admin.NET/WCS.Application/PLC/PLCTaskAction.cs
+++ b/Admin.NET/WCS.Application/PLC/PLCTaskAction.cs
@@ -385,7 +385,7 @@
                     
                     if (waitTask.TaskType == TaskTypeEnum.In )
                     {
-                        //鍏ュ簱浠诲姟璧峰宸烽亾灏辨槸璧峰宸ヤ綅
+                        //鍏ュ簱浠诲姟璧峰宸烽亾灏辨槸鍥涘悜杞﹀彇璐у伐浣�
                         if (string.IsNullOrWhiteSpace(waitTask.StartRoadway) || string.IsNullOrWhiteSpace(waitTask.EndLocate))
                         {
                             continue;
@@ -397,6 +397,7 @@
                     }
                     else if (waitTask.TaskType == TaskTypeEnum.Out)
                     {
+                        //鍑哄簱浠诲姟鐩爣宸烽亾灏辨槸鍥涘悜杞︽斁璐у伐浣�
                         taskceng = int.Parse(waitTask.StartLocate.Substring(4, 2));
                         starLocate = waitTask.StartLocate;
                         endLocate = waitTask.EndRoadway;
@@ -431,7 +432,7 @@
                             if (!plcResult.IsSucceed || Convert.ToInt32(palletVal) != 720)
                             {
                                 continue;//鏀捐揣宸ヤ綅娌℃湁璇诲彇鎴愬姛鎴栦笉鏄┖闂�
-                            } 
+                            }
 
                             var gongwei = carcon.conveyorRuKu[endLocate];
                             //鍒ゆ柇浠诲姟
@@ -497,7 +498,13 @@
                                 }
                                 var modCarPall = plcPosition.FirstOrDefault(s => s.Text == "鎵樼洏妫�娴�");
                                 var (resultPall, valuePall) = modbusUtil.GetDBValue(modCarPall.PosType, modCarPall.PlcPos);
-                                if (resultPall.IsSucceed && valuePall  == 1)  //1鏈夋墭鐩� 2鏃犳墭鐩�
+                                //var modCarju = plcPosition.FirstOrDefault(s => s.Text == "涓惧崌浣嶇疆");
+                                //var (resultju, valueju) = modbusUtil.GetDBValue(modCarju.PosType, modCarju.PlcPos);
+                                //if (resultPall.IsSucceed && valuePall == 1  && resultPall.IsSucceed && valuePall != 1)  //1椤惰揣 2瀛愰�氶亾  3涓婚�氶亾
+                                //{
+                                //    break; //鏆傜紦鍒嗛厤 
+                                //}
+                                if (resultPall.IsSucceed && valuePall == 1)  //1鏈夋墭鐩� 2鏃犳墭鐩�
                                 {
                                     break; //鏆傜紦鍒嗛厤 
                                 }

--
Gitblit v1.8.0