From 37acb8358f5602a9013ee29c04a45e33483c2329 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期四, 09 四月 2026 15:21:40 +0800
Subject: [PATCH] fix: 修复PLC字符串解析和任务处理逻辑

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
index 5a3b045..0aa7b14 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
@@ -79,7 +79,12 @@
 
             if (task.TaskStatus == (int)TaskOutStatusEnum.Line_OutFinish && task.TaskType == (int)TaskOutboundTypeEnum.OutEmpty)
             {
-                return _robotTaskService.GetWMSRobotTask(task);
+                WebResponseContent content = _robotTaskService.GetWMSRobotTask(task);
+                if (!content.Status)
+                {
+                    return content;
+                }
+                return OutboundFinishTaskTray(task);
             }
 
             if (task.TaskStatus == (int)TaskOutStatusEnum.Line_OutExecuting)
@@ -183,5 +188,22 @@
 
             return WebResponseContent.Instance.OK();
         }
+
+        /// <summary>
+        /// 绌烘墭鐩樺嚭搴撳畬鎴愬悓姝ュ埌WMS銆�
+        /// </summary>
+        /// <param name="task">浠诲姟瀹炰綋銆�</param>
+        /// <returns>鍚屾缁撴灉銆�</returns>
+        private WebResponseContent OutboundFinishTaskTray(Dt_Task task)
+        {
+            var result = _httpClientHelper.Post<WebResponseContent>(
+                nameof(ConfigKey.OutboundFinishTaskTray),
+                new CreateTaskDto { PalletCode = task.PalletCode, SourceAddress = task.SourceAddress }.ToJson());
+
+            if (!result.IsSuccess || !result.Data.Status)
+                return WebResponseContent.Instance.Error($"璋冪敤WMS鎺ュ彛鏇存柊浠诲姟鐘舵�佸け璐�,浠诲姟鍙�:銆恵task.TaskNum}銆�,閿欒淇℃伅:銆恵result.Data?.Message}銆�");
+
+            return WebResponseContent.Instance.OK();
+        }
     }
 }

--
Gitblit v1.9.3