From a3a9b9c838e1d825514b9f3f864632f27d4c875c Mon Sep 17 00:00:00 2001 From: hehaibing-1996 Date: Wed, 5 Mar 2025 11:35:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=BB=BB=E5=8A=A1=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=20=E5=8F=96=E6=B6=88=E4=BB=BB=E5=8A=A1=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=B4=A7=E6=9E=B6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WCS.BLL/Manager/AGVManager.cs | 3 ++- .../Controllers/AgvCallbackServiceController.cs | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/WCS.BLL/Manager/AGVManager.cs b/WCS.BLL/Manager/AGVManager.cs index a03bace..8d55cd4 100644 --- a/WCS.BLL/Manager/AGVManager.cs +++ b/WCS.BLL/Manager/AGVManager.cs @@ -68,7 +68,8 @@ namespace WCS.BLL.Manager { var shelf = DbHelp.db.Queryable() .Where(t => t.ShelfCode == tasks[i].ShelfCode) - .Where(t => t.CurrentLocationId == tasks[i].StratLocationId && t.DestinationLocationId == tasks[i].EndLocationId) + .Where(t => t.CurrentTaskCode == tasks[i].TaskCode) + .Where(t => t.DestinationLocationId == tasks[i].EndLocationId) .First(); if (shelf != null) { diff --git a/WCS.WebApi/Controllers/AgvCallbackServiceController.cs b/WCS.WebApi/Controllers/AgvCallbackServiceController.cs index cf4637a..eb6bd44 100644 --- a/WCS.WebApi/Controllers/AgvCallbackServiceController.cs +++ b/WCS.WebApi/Controllers/AgvCallbackServiceController.cs @@ -89,6 +89,20 @@ namespace WCS.WebApi.Controllers DbHelp.db.Updateable(shelf).ExecuteCommand(); } + if (shelf != null && request.method == "cancel" && shelf.TransStatus == TransStatusEnum.运输中) + { + + //shelf.CurrentLocationId = 0; + //shelf.CurrentLocaiotnCode = string.Empty; + + shelf.DestinationLocationId = 0; + shelf.DestinationLocaiotnCode = string.Empty; + shelf.TransStatus = TransStatusEnum.静止; + shelf.CurrentTaskCode = string.Empty; + + DbHelp.db.Updateable(shelf).ExecuteCommand(); + } + if (shelf != null && request.method == "end" && shelf.TransStatus == TransStatusEnum.运输中) { task.TaskStatus = TaskStatusEnum.已结束;