From 733c975cd8647f6d006736f1863bad731e32e6fb Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期日, 26 十月 2025 17:15:52 +0800
Subject: [PATCH] 上传最新代码,ERP接口,MES接口优化,WMS业务优化等

---
 项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPB.cs |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 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 7249c07..f39d75b 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"
@@ -142,6 +142,27 @@
                                 }
                             }
                         }
+                        else if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 2 && conveyorLineInfoRead.TaskNo > 0)
+                        {
+                            Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == conveyorLineInfoRead.TaskNo && x.NextAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
+                            if (task != null)
+                            {
+                                //鍒嗛厤宸烽亾 瀛樺叆鎵樼洏鏁版嵁
+                                List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.NextAddress == x.StartPosi);
+                                Dt_Router router = routers.FirstOrDefault();
+                                if (router == null)
+                                {
+                                    WriteError(item.StationName, $"浠诲姟鍙�:{task.TaskNum}鏈壘鍒拌矾鐢遍厤缃俊鎭�");
+                                    return Task.CompletedTask;
+                                }
+                                //鏇存柊浠诲姟淇℃伅
+                                task.CurrentAddress = router.StartPosi;
+                                task.NextAddress = task.TargetAddress;
+                                task.DeviceCode = router.NextPosi;
+                                _taskService.UpdateTask(task, TaskStatusEnum.AGV_Execute);
+                                WriteInfo(item.StationName, $"浠诲姟鍙穥conveyorLineInfoRead.TaskNo}涓嬩竴姝�");
+                            }
+                        }
                     }
                     else if (item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && deviceProRead != null)
                     {//鍏ュ簱RGV鎺ラ┏浣嶄氦浜�

--
Gitblit v1.9.3