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 | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 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 8b7602e..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鏀捐
@@ -141,11 +149,11 @@
if (stationManger.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt())
{
- commonConveyorLine.Communicator.Write("21", (short)256);
+ commonConveyorLine.Communicator.Write("21", new byte[] { 1, 0 });
}
else
{
- commonConveyorLine.Communicator.Write("23", (short)256);
+ commonConveyorLine.Communicator.Write("23", new byte[] { 1, 0 });
}
content.OK();
}
@@ -155,5 +163,14 @@
}
return content;
}
+ /// <summary>
+ /// AGV浣滀笟瀹屾垚
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost, HttpGet, Route("AgvSearchStatus"), AllowAnonymous]
+ public void AgvSearchStatus()
+ {
+ _taskService.AgvSearchStatus();
+ }
}
}
--
Gitblit v1.9.3