From 541572199581a80979ec3b62245eb522542a7b15 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 12 一月 2026 10:34:17 +0800
Subject: [PATCH] 更新AGV任务取消

---
 项目代码/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
index ae54415..8207280 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
@@ -65,7 +65,15 @@
                         break;
                     case nameof(AGVStatusEnum.PICKER_SEND):
                         if (task == null) throw new Exception($"鏈壘鍒版枡绠便�恵agvUpdateDTO.ContainerCode}銆戜换鍔�");
-                        _taskService.TaskCompleted(task.TaskNum);
+                        Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x=>x.PickStationCode==task.NextAddress);
+                        if (task.IsCancel>0 && stationManger!=null && stationManger.StationCode!= agvUpdateDTO.CurrentPosition)
+                        {
+                            _taskService.TaskCancelCompleted(task.TaskNum);
+                        }
+                        else
+                        {
+                            _taskService.TaskCompleted(task.TaskNum);
+                        }
                         break;
                     case nameof(AGVStatusEnum.WAITFEEDBACK):
                         //AGV鏀捐

--
Gitblit v1.9.3