From 8348893d84ad8b5fbfca95fbb2ca8312ad689d64 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 09 一月 2025 12:57:15 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn

---
 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/测试架仓/GroundStationJob_CSJ.cs |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/GroundStationJob_CSJ.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/GroundStationJob_CSJ.cs"
index 6409cd3..adaece9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/GroundStationJob_CSJ.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\265\213\350\257\225\346\236\266\344\273\223/GroundStationJob_CSJ.cs"
@@ -74,7 +74,7 @@
                         }
                         if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt())
                         {
-                            Dt_Task task = _taskRepository.QueryFirst(x => (x.TargetAddress == item.StackerCraneCode || string.IsNullOrEmpty(x.TargetAddress) || x.NextAddress == item.StackerCraneCode || string.IsNullOrEmpty(x.NextAddress)) && (x.TaskState == TaskStatusEnum.New.ObjToInt() || x.TaskState == TaskStatusEnum.SC_Execute.ObjToInt()) && x.SourceAddress == item.StationCode);
+                            Dt_Task task = _taskRepository.QueryFirst(x => (x.TargetAddress == item.StackerCraneCode || string.IsNullOrEmpty(x.TargetAddress) || x.NextAddress == item.StackerCraneCode || string.IsNullOrEmpty(x.NextAddress)) && (x.TaskState == TaskStatusEnum.New.ObjToInt() || x.TaskState == TaskStatusEnum.AGV_Finish.ObjToInt()) && (x.SourceAddress == item.StationCode || x.CurrentAddress == item.AGVStationCode || x.CurrentAddress == item.StationCode));
                             if (task != null)
                             {
                                 string oldAddress = task.NextAddress;
@@ -83,14 +83,15 @@
                                 if (stationManger == null)
                                 {
                                     WriteInfo(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
-                                    break;
+                                    continue;
                                 }
                                 string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
                                 if (string.IsNullOrEmpty(locationCode))
                                 {
                                     WriteInfo(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
-                                    break;
+                                    continue;
                                 }
+                                task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt();
                                 task.CurrentAddress = stationManger.StackerCraneStationCode;
                                 task.TargetAddress = locationCode;
                                 task.NextAddress = locationCode;
@@ -117,13 +118,13 @@
                             if (stationManger == null)
                             {
                                 WriteInfo(item.StationName, $"鏈壘鍒板搴旂珯鍙颁俊鎭�,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
-                                break;
+                                continue;
                             }
                             string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, stationManger.StackerCraneCode);
                             if (string.IsNullOrEmpty(locationCode))
                             {
                                 WriteInfo(item.StationName, $"璇锋眰鍒嗛厤璐т綅杩斿洖淇℃伅閿欒,璁惧缂栧彿:{item.StationCode},浠诲姟鍙�:{task.TaskNum}");
-                                break;
+                                continue;
                             }
                             string oldAddress = task.NextAddress;
                             int oldStatus = task.TaskState;

--
Gitblit v1.9.3