From 7086c88c6c080aa9ff15664c5c97aee7bbcdc55b Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期三, 05 三月 2025 16:56:11 +0800
Subject: [PATCH] 阻焊仓堆垛机对接

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 6a74dc6..0197b6c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -211,6 +211,12 @@
                                 task.DeviceCode = stationManger.StackerCraneCode;
                                 task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                             }
+                            else if (item.TaskType == TaskTypeEnum.MesOutbound.ObjToInt() && item.RoadWay.Contains("ZH"))
+                            {
+                                task.NextAddress = stationManger.StackerCraneStationCode;
+                                task.DeviceCode = stationManger.StackerCraneCode;
+                                task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
+                            }
                             else
                             {
                                 task.NextAddress = taskTypeGroup == TaskTypeGroup.InboundGroup ? task.TargetAddress : router.NextPosi;
@@ -251,7 +257,6 @@
                                 return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�");
                             }
                             router = routers.FirstOrDefault();
-
                             task.NextAddress = router?.StartPosi ?? "";
                             task.DeviceCode = item.RoadWay;
                             task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
@@ -265,8 +270,7 @@
                                 return WebResponseContent.Instance.Error($"鏈壘鍒拌矾鐢遍厤缃俊鎭�");
                             }
                             router = routers.FirstOrDefault();
-                            string stationCode = router?.NextPosi ?? "";
-                            Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == stationCode);
+                            Dt_StationManger? stationManger = _stationMangerRepository.QueryData(x => true).FirstOrDefault(x=>x.StationCode== router?.NextPosi);
                             if (stationManger == null)
                             {
                                 return WebResponseContent.Instance.Error($"鏈壘鍒扮珯鍙伴厤缃俊鎭�");

--
Gitblit v1.9.3