From b45155e1a5d76ca95d138025ab458fe2f3689748 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期三, 28 一月 2026 11:19:54 +0800
Subject: [PATCH] 1

---
 项目代码/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs |   36 ++++++++++++++++++++++++++++++------
 1 files changed, 30 insertions(+), 6 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
index c9c8a7e..bc2a84c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs"
@@ -13,6 +13,7 @@
 using WIDESEAWCS_ITaskInfoService;
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_QuartzJob;
+using WIDESEAWCS_TaskInfoService;
 using WIDESEAWCS_Tasks;
 using WIDESEAWCS_Tasks.DBNames;
 
@@ -91,14 +92,18 @@
                     }
                     else
                     {
+                        Thread.Sleep(500);
                         CommonConveyorLine commonConveyorLine = (CommonConveyorLine)device;
                         string PickBarCode = commonConveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, stationManger.StationCode).Trim();
+
                         if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"浼犲叆鏂欑鐮亄containerFlowDTO.ContainerCode}锛岃緭閫佹枡绠辩爜{PickBarCode}鏁版嵁閿欒");
-                        if (containerFlowDTO.Direction == "100")
+                        int W_PickToHode = commonConveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.W_PickToHode, stationManger.StationDeviceCode);
+                        if (containerFlowDTO.Direction == "100" && W_PickToHode == 300)
                         {
                             WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode);
                             if (!responseContent.Status) throw new Exception(responseContent.Message);
                         }
+                        WriteLog.Write_Log($"瀹瑰櫒娴佸姩{stationManger.StationCode}", $"杈撻�佺嚎淇℃伅", "寮�濮嬪叆搴�", $"鐘舵�亄containerFlowDTO.Direction}锛屾枡绠辩爜{containerFlowDTO.ContainerCode}");
                         commonConveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)containerFlowDTO.Direction.ObjToInt(), stationManger.StationCode);
                     }
                     content.OK();
@@ -116,7 +121,7 @@
         /// <returns></returns>
         [HttpPost, HttpGet, Route("InitLight"), AllowAnonymous]
         public WebResponseContent InitLight()
-        { 
+        {
             return Service.InitLight();
         }
         /// <summary>
@@ -161,16 +166,35 @@
         {
             return Service.TaskCompleted(taskNum);
         }
+        /// <summary>
+        /// 浜哄伐鎵嬪姩鍙栨秷鎸囧畾浠诲姟
+        /// </summary>
+        /// <param name="taskNum">浠诲姟缂栧彿</param>
+        /// <returns>鎿嶄綔缁撴灉</returns>
+        [HttpPost, HttpGet, Route("ManualTaskCancellation"), AllowAnonymous]
+        public WebResponseContent ManualTaskCancellation(int taskNum)
+        {
+            return Service.ManualTaskCancellation(taskNum);
+        }
+        /// WMS浠诲姟鍙栨秷鍚屾
+        /// </summary>
+        /// <param name="taskCancels"></param>
+        /// <returns></returns>
+        [HttpPost, HttpGet, Route("CancelTask"), AllowAnonymous]
+        public WebResponseContent CancelTask([FromBody] List<TaskCancel> taskCancels)
+        {
+            return Service.TaskCancel(taskCancels); ;
+        }
 
         /// <summary>
-        /// WMS浠诲姟鍙栨秷鍚屾
+        /// 鎶婁换鍔″紓甯�900淇敼涓篈GV鎵ц涓�300
         /// </summary>
         /// <param name="taskNum"></param>
         /// <returns></returns>
-        [HttpPost, HttpGet, Route("CancelTask"), AllowAnonymous]
-        public WebResponseContent CancelTask(List<TaskCancel> taskCancels)
+        [HttpPost, HttpGet, Route("ResetAllExceptionTask"), AllowAnonymous]
+        public WebResponseContent ResetAllExceptionTask(int taskNum)
         {
-            return WebResponseContent.Instance.Error();
+            return Service.ResetAllExceptionTask(taskNum);
         }
     }
 }

--
Gitblit v1.9.3