From 67348f250a1b7970059698002949a5e0a5f3c52f Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 14 八月 2025 08:51:04 +0800
Subject: [PATCH] 上传最新代码

---
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPB.cs |   35 +++++++++--------------------------
 1 files changed, 9 insertions(+), 26 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs"
index 73c2e16..0810c02 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\346\210\220\345\223\201\344\273\223/ConveyorLineJob_CPB.cs"
@@ -76,8 +76,10 @@
                     if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && deviceProRead != null && deviceProWrite != null)
                     {
                         R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
+                        //浜屾ゼ鍏ュ簱鎵爜璇锋眰宸ヤ綅
                         if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 5 && conveyorLineInfoRead.TaskNo > 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.PalletCode))
                         {
+                            //鏌ユ壘瀵瑰簲浠诲姟
                             Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.NextAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
                             if (task != null)
                             {
@@ -94,7 +96,6 @@
                                     WriteError(item.StationName, $"璺敱淇℃伅閰嶇疆閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
                                     continue;
                                 }
-
                                 device.SetValue(W_ConveyorLineCPDB.W_TargetAddress, router.NextPosi, item.StationCode);
                                 device.SetValue(W_ConveyorLineCPDB.W_TaskNo, task.TaskNum, item.StationCode);
                                 device.SetValue(W_ConveyorLineCPDB.W_Command, 1, item.StationCode);
@@ -105,20 +106,14 @@
                                 task.Roadway = "SC02_CP";
                                 task.DeviceCode = router.ChildPosiDeviceCode;
                                 _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
-                                WriteError(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}涓嬩竴姝�");
-                                //string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, "AGV_CP");
-                                //if (string.IsNullOrEmpty(locationCode) && task.TaskType != TaskTypeEnum.EmptyProductBack.ObjToInt())
-                                //{
-                                //    WriteError(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
-                                //    continue;
-                                //}
-
+                                WriteInfo(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}涓嬩竴姝�");
                             }
                         }
                     }
                     else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && deviceProRead != null)
                     {
                         R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
+                        //鍏ュ簱RGV鎺ラ┏浣嶄氦浜�
                         if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo > 0)
                         {
                             Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.CurrentAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode);
@@ -139,20 +134,14 @@
                                 device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode);
                                 task.NextAddress = router.NextPosi;
                                 _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing);
-                                WriteError(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}涓嬩竴姝�");
-                                //string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, "AGV_CP");
-                                //if (string.IsNullOrEmpty(locationCode) && task.TaskType != TaskTypeEnum.EmptyProductBack.ObjToInt())
-                                //{
-                                //    WriteError(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
-                                //    continue;
-                                //}
-
+                                WriteInfo(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}涓嬩竴姝�");
                             }
                         }
                     }
                     else if (item.StationType == StationTypeEnum.StationType_StackingPlates.ObjToInt() && deviceProRead != null && deviceProWrite != null)
                     {
                         R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
+                        //鍙犵洏鏈哄伐浣嶅彨鏂�
                         if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 7 && conveyorLineInfoRead.TaskNo <= 0)
                         {
                             Dt_Task task = _taskRepository.QueryFirst(x =>  x.TargetAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType));
@@ -173,17 +162,11 @@
                                     WarehouseId = 1,
                                     PalletType = 1
                                 };
-                                WriteError(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}鐢熸垚锛屼笅涓�姝�");
+                                WriteInfo(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}鐢熸垚锛屼笅涓�姝�");
                                 _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO });
-                                //string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, "AGV_CP");
-                                //if (string.IsNullOrEmpty(locationCode) && task.TaskType != TaskTypeEnum.EmptyProductBack.ObjToInt())
-                                //{
-                                //    WriteError(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
-                                //    continue;
-                                //}
-
                             }
                         }
+                        //鍙犵洏浠诲姟瀹屾垚浜や簰
                         else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 8 && conveyorLineInfoRead.TaskNo > 0)
                         {
                             Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
@@ -191,7 +174,7 @@
                             {
                                 //浠诲姟瀹屾垚
                                 device.SetValue(W_ConveyorLineCPDB.W_Command, 2, item.StationCode);
-                                WriteError(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}鍙犵洏浣嶅嚭搴撳畬鎴�");
+                                WriteInfo(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}鍙犵洏浣嶅嚭搴撳畬鎴�");
                             }
                         }
                     }

--
Gitblit v1.9.3