From 5f1294d6dea53d286f5e7029839d37bf490e32bb Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 28 四月 2026 00:05:36 +0800
Subject: [PATCH] feat(任务管理): 新增组盘拆盘操作及任务创建功能

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs
index e875238..d3555a1 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs
@@ -172,7 +172,7 @@
 
             QuartzLogHelper.LogInfo(_logger, $"RequestInNextAddress锛氬叆搴撲笅涓�鍦板潃锛屼换鍔″彿: {task.TaskNum}锛屽瓙璁惧: {childDeviceCode}", conveyorLine.DeviceCode);
 
-            bool isEmptyTask = task.TaskType == (int)TaskOutboundTypeEnum.OutEmpty;
+            bool isEmptyTask = task.TaskType == (int)TaskInboundTypeEnum.InEmpty;
 
             // 纭畾鐩爣鍦板潃
             string targetAddress;
@@ -271,18 +271,19 @@
             Thread.Sleep(100); // 纭繚 PLC 鑳芥纭鍙栦换鍔″彿鍚庡啀鍐欏叆鏉$爜
             var isPalletSet = conveyorLine.SetValue(ConveyorLineDBNameNew.Barcode, task.PalletCode, childDeviceCode);
 
-            bool isTargetSet = true;
-            if (targetAddress == "2217" && !isEmptyTask)
-            {
-                QuartzLogHelper.LogDebug(_logger, $"瀛愯澶�: {childDeviceCode}锛屽嚭搴撶洰鏍囧湴鍧�: {targetAddress}", conveyorLine.DeviceCode);
-                Thread.Sleep(100); // 纭繚 PLC 鑳芥纭鍙栦换鍔″彿鍚庡啀鍐欏叆鏉$爜
-                isTargetSet = conveyorLine.SetValue(ConveyorLineDBNameNew.Target, targetAddress, childDeviceCode);
-            }
-            if (!isTargetSet || !isTaskNoSet || !isPalletSet)
-            {
-                QuartzLogHelper.LogError(_logger, $"RequestOutbound锛氫笅鍙戝嚭搴撲换鍔″け璐ワ紝浠诲姟鍙�: {task.TaskNum}锛屽瓙璁惧: {childDeviceCode}", conveyorLine.DeviceCode); 
-                return Task.CompletedTask;
-            }
+            Thread.Sleep(100); // 纭繚 PLC 鑳芥纭鍙栦换鍔″彿鍚庡啀鍐欏叆鏉$爜
+            bool isTargetSet = conveyorLine.SetValue(ConveyorLineDBNameNew.Target, targetAddress, childDeviceCode);
+            //if (targetAddress == "2217" && !isEmptyTask)
+            //{
+            //    QuartzLogHelper.LogDebug(_logger, $"瀛愯澶�: {childDeviceCode}锛屽嚭搴撶洰鏍囧湴鍧�: {targetAddress}", conveyorLine.DeviceCode);
+            //    Thread.Sleep(100); // 纭繚 PLC 鑳芥纭鍙栦换鍔″彿鍚庡啀鍐欏叆鏉$爜
+            //    isTargetSet = conveyorLine.SetValue(ConveyorLineDBNameNew.Target, targetAddress, childDeviceCode);
+            //}
+            //if (!isTargetSet || !isTaskNoSet || !isPalletSet)
+            //{
+            //    QuartzLogHelper.LogError(_logger, $"RequestOutbound锛氫笅鍙戝嚭搴撲换鍔″け璐ワ紝浠诲姟鍙�: {task.TaskNum}锛屽瓙璁惧: {childDeviceCode}", conveyorLine.DeviceCode); 
+            //    return Task.CompletedTask;
+            //}
 
             bool isWmsResult = false;
             // 鏇存柊浠诲姟鐘舵�佹垨浣嶇疆

--
Gitblit v1.9.3