From 9ce6731460179c71f0f2c636b2a1598324d5194e Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期六, 20 九月 2025 15:16:48 +0800
Subject: [PATCH] 最新代码更新

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

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
index bd06e10..0628b3d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Server/Controllers/AGV/AGVController.cs"
@@ -54,6 +54,10 @@
             AgvResponse agvResponse = new AgvResponse();
             try
             {
+                if (secureApplyModel.ReceiveTaskID=="100")
+                {
+                    return agvResponse.OK("鎴愬姛", "0");
+                }
                 var task = _taskRepository.QueryFirst(x => secureApplyModel.ReceiveTaskID.ObjToInt() == x.TaskNum);
                 if (task == null) throw new Exception("鏈壘鍒颁换鍔�");
                 if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
@@ -68,7 +72,7 @@
                     }
                     else//鍑哄簱鏀捐揣璇锋眰
                     {
-                        var content = PutRequest(secureApplyModel.WbCode, task.PalletType);
+                        var content = PutRequest(task.NextAddress, task.PalletType);
                         if (!content.Status)
                         {
                             throw new Exception(content.Message);
@@ -87,7 +91,7 @@
                     }
                     else//鍏ュ簱鏀捐揣璇锋眰
                     {
-                        var content = PutRequest(secureApplyModel.WbCode, task.TaskNum);
+                        var content = PutRequest(task.NextAddress, task.TaskNum);
                         if (!content.Status)
                         {
                             throw new Exception(content.Message);
@@ -239,7 +243,7 @@
                         }
                         else
                         {
-                            if (task.TaskType == TaskTypeEnum.PrintInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintBackInbound.ObjToInt())
+                            if (task.TaskType == TaskTypeEnum.PrintYLInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintYLBackInbound.ObjToInt())
                             {
                                 var content = TakeFinish(task.CurrentAddress);
                                 if (!content.Status)
@@ -257,7 +261,7 @@
                             {
                                 throw new Exception($"{task.NextAddress}AGV绔欏彴鏈畾涔�");
                             }
-                            if (task.TaskType == TaskTypeEnum.PrintInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintBackInbound.ObjToInt())
+                            if (task.TaskType == TaskTypeEnum.PrintYLInbound.ObjToInt() || task.TaskType == TaskTypeEnum.PrintYLBackInbound.ObjToInt())
                             {
                                 List<Dt_Router> routers = _routerRepository.QueryData(x => x.InOutType == task.TaskType && task.NextAddress == x.StartPosi);
                                 Dt_Router router = routers.FirstOrDefault();
@@ -286,7 +290,7 @@
                         else
                         {
                             _taskService.TaskCompleted(task.TaskNum);
-                            if (task.TaskType==TaskTypeEnum.PrintOutbound.ObjToInt())
+                            if (task.TaskType==TaskTypeEnum.PrintYLOutbound.ObjToInt())
                             {
                                 PutFinish(task.NextAddress);
                             }
@@ -315,7 +319,7 @@
             WebResponseContent content = new WebResponseContent();
             try
             {
-                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.AGVStationCode == code);
+                Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == code);
                 if (stationManger == null)
                 {
                     return content.Error($"鏈壘鍒扮珯鍙伴厤缃�");

--
Gitblit v1.9.3