From fe2a1e74780259605cd230e6f9c629c3dd7fdf15 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 10 四月 2026 20:19:06 +0800
Subject: [PATCH] feat: 添加消防任务支持并修复堆垛机状态处理

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeFormationStackerCrane.cs   |    4 
 Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs                           |   66 ++++++--
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskSelector.cs         |    6 
 Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json                                   |    4 
 项目资料/设备协议/高常温堆垛机与输送线/堆垛机与上位机交互信息.xlsx                                                           |    0 
 Code/WMS/WIDESEA_WMSServer/.vscode/launch.json                                                  |   35 ++++
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/libman.json                                        |    5 
 项目资料/设备协议/高常温堆垛机与输送线/~$堆垛机与上位机交互信息.xlsx                                                         |    0 
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotTaskProcessor.cs                      |    4 
 /dev/null                                                                                       |  123 ---------------
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs       |    6 
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeTemperatureStackerCrane.cs |    4 
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs          |    1 
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Enum/StackerCraneStatus.cs         |   34 ++-
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs           |    2 
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs      |   33 ++-
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs   |   18 +
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs            |   45 ++--
 Code/WMS/WIDESEA_WMSServer/.vscode/tasks.json                                                   |   41 +++++
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln                                                |    2 
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneCommandBuilder.cs       |   21 +-
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneDBName.cs               |    1 
 22 files changed, 237 insertions(+), 218 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs
index 3fef97c..d940fb7 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs
@@ -225,7 +225,7 @@
                 {
                     return DeviceStatus.Idle;
                 }
-                else if (StackerCraneWorkStatusValue == StackerCraneWorkStatus.Putting || StackerCraneWorkStatusValue == StackerCraneWorkStatus.PickUp || StackerCraneWorkStatusValue == StackerCraneWorkStatus.PickUpCompleted || StackerCraneWorkStatusValue == StackerCraneWorkStatus.PutCompleted)
+                else if (StackerCraneWorkStatusValue == StackerCraneWorkStatus.Putting || StackerCraneWorkStatusValue == StackerCraneWorkStatus.PickUp || StackerCraneWorkStatusValue == StackerCraneWorkStatus.PutMove || StackerCraneWorkStatusValue == StackerCraneWorkStatus.PutCompleted)
                 {
                     return DeviceStatus.Working;
                 }
@@ -315,10 +315,10 @@
                     {
                         return deviceProtocolDetail.ProtocolDetailType;
                     }
-                    return StackerCraneStatus.Unkonw.ToString();
+                    return StackerCraneStatus.Unknown.ToString();
                 }
             }
-            return StackerCraneStatus.Unkonw.ToString();
+            return StackerCraneStatus.Unknown.ToString();
         }
 
         private void CheckConnect()
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Enum/StackerCraneStatus.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Enum/StackerCraneStatus.cs
index ba4c174..5fc0f39 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Enum/StackerCraneStatus.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Enum/StackerCraneStatus.cs
@@ -32,10 +32,10 @@
     public enum StackerCraneStatus
     {
         /// <summary>
-        /// 姝e父
+        /// 绌洪棽&鑱旀満
         /// </summary>
-        [Description("姝e父")]
-        Normal,
+        [Description("绌洪棽&鑱旀満")]
+        Normal = 1,
 
         /// <summary>
         /// 鏁呴殰
@@ -53,7 +53,7 @@
         /// 鏈煡
         /// </summary>
         [Description("鏈煡")]
-        Unkonw
+        Unknown
     }
 
     /// <summary>
@@ -65,7 +65,7 @@
         /// 缁翠慨/缁存姢/淇濆吇
         /// </summary>
         [Description("缁翠慨")]
-        Maintenance,
+        Maintenance = 2,
 
         /// <summary>
         /// 鎵嬪姩
@@ -89,7 +89,7 @@
         /// 鏈煡
         /// </summary>
         [Description("鏈煡")]
-        Unkonw
+        Unknown
     }
 
     /// <summary>
@@ -101,7 +101,19 @@
         /// 寰呮満
         /// </summary>
         [Description("寰呮満")]
-        Standby,
+        Standby = 1,
+
+        /// <summary>
+        /// 鎺ユ敹浠诲姟
+        /// </summary>
+        [Description("鎺ユ敹浠诲姟")]
+        AcceptTask,
+
+        /// <summary>
+        /// 鍙栬揣绉诲姩涓�
+        /// </summary>
+        [Description("鍙栬揣绉诲姩涓�")]
+        PickMove,
 
         /// <summary>
         /// 鍙栬揣涓�
@@ -110,10 +122,10 @@
         PickUp,
 
         /// <summary>
-        /// 鍙栬揣瀹屾垚
+        /// 鏀捐揣绉诲姩涓�
         /// </summary>
-        [Description("鍙栬揣瀹屾垚")]
-        PickUpCompleted,
+        [Description("鏀捐揣绉诲姩涓�")]
+        PutMove,
 
         /// <summary>
         /// 鏀捐揣涓�
@@ -143,7 +155,7 @@
         /// 鏈煡
         /// </summary>
         [Description("鏈煡")]
-        Unkonw
+        Unknown
     }
 
     /// <summary>
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeFormationStackerCrane.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeFormationStackerCrane.cs
index de2633a..b9c3938 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeFormationStackerCrane.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeFormationStackerCrane.cs
@@ -170,7 +170,7 @@
         {
             if (!Communicator.IsConnected)
             {
-                return StackerCraneStatus.Unkonw.ToString();
+                return StackerCraneStatus.Unknown.ToString();
             }
 
             List<DeviceProDTO> devicePros = _deviceProDTOs.Where(x => x.DeviceProParamType == protocolParamType).ToList();
@@ -193,7 +193,7 @@
                 }
             }
 
-            return StackerCraneStatus.Unkonw.ToString();
+            return StackerCraneStatus.Unknown.ToString();
         }
 
         /// <summary>
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeTemperatureStackerCrane.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeTemperatureStackerCrane.cs
index 89d18be..0182af8 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeTemperatureStackerCrane.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Spec/SpeTemperatureStackerCrane.cs
@@ -197,7 +197,7 @@
         {
             if (!Communicator.IsConnected)
             {
-                return StackerCraneStatus.Unkonw.ToString();
+                return StackerCraneStatus.Unknown.ToString();
             }
 
             List<DeviceProDTO> devicePros = _deviceProDTOs.Where(x => x.DeviceProParamType == protocolParamType).ToList();
@@ -220,7 +220,7 @@
                 }
             }
 
-            return StackerCraneStatus.Unkonw.ToString();
+            return StackerCraneStatus.Unknown.ToString();
         }
 
         /// <summary>
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln
index acb6e73..1914eab 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln
@@ -1,7 +1,7 @@
 锘�
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 18
-VisualStudioVersion = 18.2.11415.280 d18.0
+VisualStudioVersion = 18.2.11415.280
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WIDESEAWCS_Server", "WIDESEAWCS_Server\WIDESEAWCS_Server.csproj", "{487FA45B-EA1A-4ACA-BB5B-0F6708F462C0}"
 EndProject
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/libman.json b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/libman.json
new file mode 100644
index 0000000..8ed1410
--- /dev/null
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/libman.json
@@ -0,0 +1,5 @@
+{
+  "version": "3.0",
+  "defaultProvider": "cdnjs",
+  "libraries": []
+}
\ No newline at end of file
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs
index 81a5371..7cd6bcc 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs
@@ -100,7 +100,7 @@
                 return content.Error($"閫氱煡WMS绯荤粺鍫嗗灈鏈哄叆搴撳畬鎴愬け璐�,浠诲姟鍙�:銆恵task.TaskNum}銆�,鎵樼洏鍙�:銆恵task.PalletCode}銆�,閿欒淇℃伅:銆恵result.Data?.Message}銆�");
             }
 
-            return content.Error($"閫氱煡WMS绯荤粺鍫嗗灈鏈哄叆搴撳畬鎴愭垚鍔�,浠诲姟鍙�:銆恵task.TaskNum}銆�,鎵樼洏鍙�:銆恵task.PalletCode}銆�");
+            return content.OK($"閫氱煡WMS绯荤粺鍫嗗灈鏈哄叆搴撳畬鎴愭垚鍔�,浠诲姟鍙�:銆恵task.TaskNum}銆�,鎵樼洏鍙�:銆恵task.PalletCode}銆�");
         }
 
         /// <summary>
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
index 3c5271a..5985236 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
@@ -4,8 +4,6 @@
 using Newtonsoft.Json;
 using Quartz;
 using SqlSugar;
-using System.Text;
-using System.Text.Json;
 using WIDESEA_Core;
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
@@ -79,6 +77,13 @@
         private readonly ILogger<CommonConveyorLineNewJob> _logger;
 
         /// <summary>
+        /// 鐩爣鍦板潃鍒拌澶囩被鍨嬬殑鏄犲皠
+        /// </summary>
+        /// <remarks>
+        /// </remarks>
+        private static List<string> AddressToDeviceType = new List<string> { "11020", "11028" };
+
+        /// <summary>
         /// 鏋勯�犲嚱鏁�
         /// </summary>
         /// <param name="taskService">浠诲姟鏈嶅姟</param>
@@ -139,8 +144,8 @@
                     //    MaxDegreeOfParallelism = Math.Min(childDeviceCodes.Count, Environment.ProcessorCount * 2),
                     //};
 
-                    _logger.LogDebug("Execute锛氬紑濮嬪苟琛屽鐞嗚緭閫佺嚎 {DeviceCode}锛屽瓙璁惧鏁伴噺: {Count}", conveyorLine.DeviceCode, childDeviceCodes.Count);
-                    QuartzLogger.Debug($"寮�濮嬪苟琛屽鐞嗚緭閫佺嚎锛屽瓙璁惧鏁伴噺: {childDeviceCodes.Count}", conveyorLine.DeviceCode);
+                    //_logger.LogDebug("Execute锛氬紑濮嬪苟琛屽鐞嗚緭閫佺嚎 {DeviceCode}锛屽瓙璁惧鏁伴噺: {Count}", conveyorLine.DeviceCode, childDeviceCodes.Count);
+                    //QuartzLogger.Debug($"寮�濮嬪苟琛屽鐞嗚緭閫佺嚎锛屽瓙璁惧鏁伴噺: {childDeviceCodes.Count}", conveyorLine.DeviceCode);
 
                     // 骞惰澶勭悊姣忎釜瀛愯澶�
                     //Parallel.For(0, childDeviceCodes.Count, parallelOptions, i =>
@@ -161,9 +166,6 @@
                                 continue;
                             }
 
-                            // 濡傛灉 WCS_ACK 涓� 1锛屽厛娓呴櫎锛堣〃绀哄鐞嗚繃涓婁竴娆¤姹傦級
-                            if (command.WCS_ACK == 1)
-                                conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 0, childDeviceCode);
 
                             // ========== 妫�鏌ョ壒瀹氫綅缃槸鍚︽湁鎵樼洏 ==========
                             // 浠庨厤缃腑璇诲彇闇�瑕佹鏌ユ墭鐩樼殑浣嶇疆鍒楄〃
@@ -207,7 +209,10 @@
                             // 鍙湁褰� PLC_STB 涓� 1 鏃舵墠澶勭悊浠诲姟
                             if (command.PLC_STB != 1)
                             {
-                                return Task.CompletedTask;
+                                // 濡傛灉 WCS_ACK 涓� 1锛屽厛娓呴櫎锛堣〃绀哄鐞嗚繃涓婁竴娆¤姹傦級
+                                if (command.WCS_ACK == 1)
+                                    conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 0, childDeviceCode);
+                                continue;
                             }
 
                             // ========== 澶勭悊鏃犳墭鐩樻潯鐮佺殑鎯呭喌 ==========
@@ -217,7 +222,7 @@
                                 _logger.LogDebug("Execute锛氬瓙璁惧 {ChildDeviceCode} 鏃犳墭鐩樻潯鐮侊紝璇锋眰鍑哄簱浠诲姟", childDeviceCode);
                                 QuartzLogger.Debug($"瀛愯澶� {childDeviceCode} 鏃犳墭鐩樻潯鐮侊紝璇锋眰鍑哄簱浠诲姟", conveyorLine.DeviceCode);
                                 _conveyorLineDispatch.RequestOutbound(conveyorLine, command, childDeviceCode);
-                                return Task.CompletedTask;
+                                continue;
                             }
 
                             // ========== 澶勭悊宸叉湁浠诲姟鍙风殑鎯呭喌 ==========
@@ -286,7 +291,13 @@
             {
                 case InExecuting:
                     // 鍏ュ簱鎵ц涓紝璋冪敤涓嬩竴鍦板潃澶勭悊
-                    _conveyorLineDispatch.RequestInNextAddress(conveyorLine, command, childDeviceCode);
+
+                    if (AddressToDeviceType.Contains(childDeviceCode))
+                        // 鍒拌揪鐩爣鍦板潃锛岃皟鐢ㄥ叆搴撳畬鎴�
+                        _conveyorLineDispatch.ConveyorLineInFinish(conveyorLine, command, childDeviceCode);
+                    else
+                        // 鏈埌杈剧洰鏍囧湴鍧�锛岃皟鐢ㄥ叆搴撲笅涓�鍦板潃澶勭悊
+                        _conveyorLineDispatch.RequestInNextAddress(conveyorLine, command, childDeviceCode);
                     break;
 
                 case OutExecuting:
@@ -311,4 +322,4 @@
             }
         }
     }
-}
+}
\ No newline at end of file
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs
index 29ae39a..9f8828c 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ConveyorLineDispatchHandler.cs
@@ -187,7 +187,7 @@
             _ = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
 
             // 璁剧疆 WCS_STB 鏍囧織锛岃〃绀� WCS 宸插鐞�
-            conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_STB, 1, childDeviceCode);
+            conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)1, childDeviceCode);
         }
 
         /// <summary>
@@ -206,11 +206,15 @@
             Dt_Task? task = _taskFilter.QueryExecutingTask(command.TaskNo, childDeviceCode);
             if (task != null)
             {
-                // 鍥炲 ACK 纭
-                conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode);
 
                 // 鏇存柊浠诲姟鐘舵�佸埌涓嬩竴闃舵锛堥�氬父鏄畬鎴愶級
-                WebResponseContent content = _taskService.UpdateTaskStatusToNext(task);
+                if (_taskService.UpdateTaskStatusToNext(task).Status)
+                {
+
+                }
+
+                // 鍥炲 ACK 纭
+                conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)1, childDeviceCode);
 
                 _logger.LogInformation("ConveyorLineInFinish锛氬叆搴撳畬鎴愶紝浠诲姟鍙�: {TaskNum}锛屽瓙璁惧: {ChildDeviceCode}", task.TaskNum, childDeviceCode);
                 QuartzLogger.Info($"鍏ュ簱瀹屾垚锛屼换鍔″彿: {task.TaskNum}", conveyorLine.DeviceCode);
@@ -246,7 +250,7 @@
                 conveyorLine.SetValue(ConveyorLineDBNameNew.Target, task.NextAddress, childDeviceCode);
 
                 // 鍥炲 ACK 纭
-                conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode);
+                conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)1, childDeviceCode);
 
                 // 鏇存柊浠诲姟鐘舵��
                 _taskService.UpdateTaskStatusToNext(task);
@@ -290,7 +294,7 @@
             _ = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
 
             // 鍥炲 ACK 纭
-            conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode);
+            conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)1, childDeviceCode);
         }
 
         /// <summary>
@@ -313,7 +317,7 @@
                 WebResponseContent content = _taskService.UpdateTaskStatusToNext(task);
 
                 // 鍥炲 ACK 纭
-                conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, 1, childDeviceCode);
+                conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)1, childDeviceCode);
 
                 _logger.LogInformation("ConveyorLineOutFinish锛氬嚭搴撳畬鎴愶紝浠诲姟鍙�: {TaskNum}锛屽瓙璁惧: {ChildDeviceCode}", task.TaskNum, childDeviceCode);
                 QuartzLogger.Info($"鍑哄簱瀹屾垚锛屼换鍔″彿: {task.TaskNum}", conveyorLine.DeviceCode);
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotTaskProcessor.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotTaskProcessor.cs
index a87a66e..cd89884 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotTaskProcessor.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/RobotJob/RobotTaskProcessor.cs
@@ -337,8 +337,8 @@
                 // 璁剧疆杈撻�佺嚎鐨勪换鍔″彿
                 conveyorLine.SetValue(ConveyorLineDBNameNew.TaskNo, taskInfo.TaskNum, sourceAddress);
 
-                // 瑙﹀彂杈撻�佺嚎寮�濮嬫墽琛岋紙鍐欏叆 WCS_STB = 1锛�
-                conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_STB, 1, sourceAddress);
+                // 瑙﹀彂杈撻�佺嚎寮�濮嬫墽琛岋紙鍐欏叆 WCS_ACK = 1锛�
+                conveyorLine.SetValue(ConveyorLineDBNameNew.WCS_ACK, (short)1, sourceAddress);
 
                 // 鏇存柊浠诲姟鐘舵�佸埌涓嬩竴闃舵
                 if (_taskService.UpdateTaskStatusToNext(taskInfo).Status)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index 4908aae..1370478 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -1,19 +1,16 @@
 using Microsoft.Extensions.Logging;
 using Quartz;
-using System;
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
-using System.Threading.Tasks;
-using WIDESEAWCS_Common.TaskEnum;
+using WIDESEA_Core;
+using WIDESEAWCS_Core;
+using WIDESEAWCS_Core.LogHelper;
 using WIDESEAWCS_ITaskInfoRepository;
 using WIDESEAWCS_ITaskInfoService;
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_QuartzJob;
-using WIDESEAWCS_QuartzJob.StackerCrane;
-using WIDESEAWCS_Tasks.StackerCraneJob;
-using WIDESEA_Core;
-using WIDESEAWCS_Core.LogHelper;
 using WIDESEAWCS_QuartzJob.Service;
+using WIDESEAWCS_QuartzJob.StackerCrane;
+using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
+using WIDESEAWCS_Tasks.StackerCraneJob;
 
 namespace WIDESEAWCS_Tasks
 {
@@ -173,7 +170,7 @@
             {
                 // 浠� JobDataMap 鑾峰彇鍫嗗灈鏈鸿澶囧弬鏁�
                 bool flag = context.JobDetail.JobDataMap.TryGetValue("JobParams", out object? value);
-                if (!flag || value is not IStackerCrane commonStackerCrane)
+                if (!flag || value is not CommonStackerCrane commonStackerCrane)
                 {
                     // 鍙傛暟鏃犳晥锛岀洿鎺ヨ繑鍥�
                     _logger.LogWarning("Execute锛氬弬鏁版棤鏁�");
@@ -194,11 +191,12 @@
 
                 // ========== 妫�鏌ュ爢鍨涙満浠诲姟瀹屾垚鐘舵�� ==========
                 commonStackerCrane.CheckStackerCraneTaskCompleted();
-                _logger.LogDebug("Execute锛氭鏌ヤ换鍔″畬鎴愮姸鎬侊紝璁惧: {DeviceCode}", _deviceCode);
-                QuartzLogger.Debug($"妫�鏌ヤ换鍔″畬鎴愮姸鎬侊紝璁惧: {_deviceCode}", _deviceCode);
+                //_logger.LogDebug("Execute锛氭鏌ヤ换鍔″畬鎴愮姸鎬侊紝璁惧: {DeviceCode}", _deviceCode);
+                //QuartzLogger.Debug($"妫�鏌ヤ换鍔″畬鎴愮姸鎬侊紝璁惧: {_deviceCode}", _deviceCode);
 
                 // ========== 妫�鏌ユ槸鍚﹀彲浠ュ彂閫佹柊浠诲姟 ==========
-                if (!commonStackerCrane.IsCanSendTask(commonStackerCrane.Communicator, commonStackerCrane.DeviceProDTOs, commonStackerCrane.DeviceProtocolDetailDTOs))
+                //if (!commonStackerCrane.IsCanSendTask(commonStackerCrane.Communicator, commonStackerCrane.DeviceProDTOs, commonStackerCrane.DeviceProtocolDetailDTOs))
+                if (commonStackerCrane.StackerCraneStatusValue != StackerCraneStatus.Normal)
                 {
                     // 鍫嗗灈鏈轰笉鍙敤锛堝姝e湪鎵ц涓婁竴浠诲姟锛夛紝鐩存帴杩斿洖
                     _logger.LogDebug("Execute锛氬爢鍨涙満涓嶅彲鐢紝璁惧: {DeviceCode}", _deviceCode);
@@ -212,13 +210,13 @@
                 if (task == null)
                 {
                     // 娌℃湁鍙敤浠诲姟
-                    _logger.LogDebug("Execute锛氭病鏈夊彲鐢ㄤ换鍔★紝璁惧: {DeviceCode}", _deviceCode);
-                    QuartzLogger.Debug($"娌℃湁鍙敤浠诲姟锛岃澶�: {_deviceCode}", _deviceCode);
+                    //_logger.LogDebug("Execute锛氭病鏈夊彲鐢ㄤ换鍔★紝璁惧: {DeviceCode}", _deviceCode);
+                    //QuartzLogger.Debug($"娌℃湁鍙敤浠诲姟锛岃澶�: {_deviceCode}", _deviceCode);
                     return Task.CompletedTask;
                 }
 
-                _logger.LogInformation("Execute锛氶�夋嫨浠诲姟锛岃澶�: {DeviceCode}锛屼换鍔″彿: {TaskNum}", _deviceCode, task.TaskNum);
-                QuartzLogger.Info($"閫夋嫨浠诲姟锛屼换鍔″彿: {task.TaskNum}", _deviceCode);
+                //_logger.LogInformation("Execute锛氶�夋嫨浠诲姟锛岃澶�: {DeviceCode}锛屼换鍔″彿: {TaskNum}", _deviceCode, task.TaskNum);
+                //QuartzLogger.Info($"閫夋嫨浠诲姟锛屼换鍔″彿: {task.TaskNum}", _deviceCode);
 
                 // ========== 鏋勫缓鍛戒护 ==========
                 // 鍛戒护鏋勫缓涓嬫矇鍒颁笓鐢ㄦ瀯寤哄櫒
@@ -235,6 +233,8 @@
                 bool sendFlag = SendStackerCraneCommand(commonStackerCrane, stackerCraneTaskCommand);
                 if (sendFlag)
                 {
+                    Task.Delay(1000).Wait();
+                    commonStackerCrane.SetValue(StackerCraneDBName.WorkAction, (short)1);
                     // 鍙戦�佹垚鍔燂紝鏇存柊鐘舵��
                     commonStackerCrane.LastTaskType = task.TaskType;
                     _taskService.UpdateTaskStatusToNext(task.TaskNum);
@@ -280,10 +280,11 @@
                 QuartzLogger.Info($"浠诲姟瀹屾垚锛屼换鍔″彿: {e.TaskNum}", stackerCrane.DeviceCode);
 
                 // 鏇存柊浠诲姟鐘舵�佷负瀹屾垚
-                _taskService.StackCraneTaskCompleted(e.TaskNum);
-
-                // 娓呴櫎鍫嗗灈鏈虹殑浣滀笟鎸囦护锛堣缃负 2锛岃〃绀虹┖闂诧級
-                stackerCrane.SetValue(StackerCraneDBName.WorkAction, 2);
+                if (_taskService.StackCraneTaskCompleted(e.TaskNum).Status)
+                {
+                    // 娓呴櫎鍫嗗灈鏈虹殑浣滀笟鎸囦护锛堣缃负 2锛岃〃绀虹┖闂诧級
+                    stackerCrane.SetValue(StackerCraneDBName.WorkAction, 2);
+                }
             }
         }
 
@@ -310,4 +311,4 @@
             };
         }
     }
-}
+}
\ No newline at end of file
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/README.md b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/README.md
deleted file mode 100644
index 22b4924..0000000
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/README.md
+++ /dev/null
@@ -1,123 +0,0 @@
-# 鍫嗗灈鏈哄懡浠ら厤缃郴缁�
-
-## 姒傝堪
-
-閫氳繃閰嶇疆鏂囦欢鐏垫椿绠$悊 Roadway 鍒板懡浠ょ被鍨嬬殑鏄犲皠鍏崇郴锛屾敮鎸佸姩鎬佹墿灞曪紝鏃犻渶淇敼浠g爜銆�
-
-## 鏍稿績璁捐
-
-- **绛栫暐妯″紡**: 鏍规嵁 Roadway 鍔ㄦ�侀�夋嫨鍛戒护绫诲瀷
-- **宸ュ巶妯″紡**: 缁熶竴鍒涘缓涓嶅悓绫诲瀷鐨勫懡浠ゅ璞�
-- **娉涘瀷缂栫▼**: 閫氱敤鏂规硶澶勭悊鎵�鏈夊懡浠ょ被鍨�
-- **閰嶇疆椹卞姩**: 鏄犲皠鍏崇郴鐢遍厤缃枃浠剁鐞�
-
-## 閰嶇疆鏂囦欢
-
-### 浣嶇疆
-
-```text
-{搴旂敤绋嬪簭鏍圭洰褰晑/StackerCraneJob/stackercrane-command-config.json
-```
-
-### 鏍煎紡
-
-```json
-{
-  "RoadwayCommandMapping": {
-    "HC": "Formation",
-    "GW": "Standard",
-    "CW": "Standard"
-  },
-  "DefaultCommandType": "Standard"
-}
-```
-
-### 璇存槑
-
-- **RoadwayCommandMapping**: Roadway 鍏抽敭瀛� 鈫� 鍛戒护绫诲瀷鏄犲皠
-- **DefaultCommandType**: 榛樿鍛戒护绫诲瀷锛堜笉鍖归厤鏃朵娇鐢級
-
-## 浣跨敤绀轰緥
-
-```csharp
-// 鑷姩浠庨厤缃枃浠跺姞杞�
-var job = new CommonStackerCraneJob(taskService, taskExecuteDetailService, taskRepository, routerService);
-
-// 鍒涘缓浠诲姟
-var task = new Dt_Task
-{
-    Roadway = "HC-01",  // 鍖呭惈 "HC" 鈫� 浣跨敤 Formation 鍛戒护
-    PalletCode = "P001",
-    TaskNum = 12345
-};
-
-// 杞崲涓哄懡浠�
-var command = job.ConvertToStackerCraneTaskCommand(task);
-```
-
-## 鎵╁睍鏂板懡浠ょ被鍨�
-
-### 1. 鍒涘缓鍛戒护绫�
-
-```csharp
-public class CustomStackerCraneTaskCommand : DeviceCommand
-{
-    public int TaskNum { get; set; }
-    public string Barcode { get; set; }
-}
-```
-
-### 2. 娣诲姞宸ュ巶鏂规硶
-
-鍦� `CommonStackerCraneJob` 涓坊鍔狅細
-
-```csharp
-private static CustomStackerCraneTaskCommand CreateCustomCommand(Dt_Task task)
-{
-    return new CustomStackerCraneTaskCommand
-    {
-        Barcode = task.PalletCode,
-        TaskNum = task.TaskNum
-    };
-}
-```
-
-### 3. 淇敼 ConvertToStackerCraneTaskCommand
-
-鍦� switch 琛ㄨ揪寮忎腑娣诲姞鏂板垎鏀細
-
-```csharp
-return commandType switch
-{
-    "Formation" => BuildCommand(task, CreateFormationCommand(task)),
-    "Custom" => BuildCommand(task, CreateCustomCommand(task)),
-    _ => BuildCommand(task, CreateStandardCommand(task))
-};
-```
-
-### 4. 鏇存柊閰嶇疆鏂囦欢
-
-```json
-{
-  "RoadwayCommandMapping": {
-    "HC": "Formation",
-    "GW": "Standard",
-    "XX": "Custom"
-  }
-}
-```
-
-## 浼樺娍
-
-1. **绠�娲�**: 鏍稿績閫昏緫娓呮櫚锛屾槗浜庣悊瑙�
-2. **鐏垫椿**: 閰嶇疆鏂囦欢绠$悊鏄犲皠鍏崇郴
-3. **鍙墿灞�**: 娣诲姞鏂扮被鍨嬪彧闇� 4 姝�
-4. **鍙淮鎶�**: 浠g爜缁撴瀯绠�鍗曪紝鑱岃矗鏄庣‘
-5. **瀹归敊**: 閰嶇疆鍔犺浇澶辫触鑷姩浣跨敤榛樿鍊�
-
-## 娉ㄦ剰浜嬮」
-
-- Roadway 鍏抽敭瀛楁寜椤哄簭鍖归厤锛屽厛鍖归厤鍏堢敓鏁�
-- 閰嶇疆鏂囦欢蹇呴』鏄湁鏁堢殑 JSON 鏍煎紡
-- 鍛戒护绫诲瀷鍚嶇О鍖哄垎澶у皬鍐�
-- 閰嶇疆鍔犺浇澶辫触浼氳緭鍑鸿鍛婂苟浣跨敤榛樿閰嶇疆
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneCommandBuilder.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneCommandBuilder.cs
index aa463f3..edf399a 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneCommandBuilder.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneCommandBuilder.cs
@@ -74,18 +74,19 @@
         /// <returns>鍫嗗灈鏈哄懡浠ゅ璞★紝杞崲澶辫触杩斿洖 null</returns>
         public object? ConvertToStackerCraneTaskCommand([NotNull] Dt_Task task)
         {
+            return  BuildCommand(task, CreateStandardCommand(task));
             // 鏍规嵁宸烽亾鑾峰彇鍛戒护绫诲瀷
-            string commandType = GetCommandType(task.Roadway);
+            //string commandType = GetCommandType(task.Roadway);
 
-            _logger.LogInformation("ConvertToStackerCraneTaskCommand锛氭瀯寤哄懡浠わ紝浠诲姟鍙�: {TaskNum}锛屽贩閬�: {Roadway}锛屽懡浠ょ被鍨�: {CommandType}", task.TaskNum, task.Roadway, commandType);
-            QuartzLogger.Info($"鏋勫缓鍛戒护锛屼换鍔″彿: {task.TaskNum}锛屽贩閬�: {task.Roadway}锛屽懡浠ょ被鍨�: {commandType}", task.Roadway);
+            //_logger.LogInformation("ConvertToStackerCraneTaskCommand锛氭瀯寤哄懡浠わ紝浠诲姟鍙�: {TaskNum}锛屽贩閬�: {Roadway}锛屽懡浠ょ被鍨�: {CommandType}", task.TaskNum, task.Roadway, commandType);
+            //QuartzLogger.Info($"鏋勫缓鍛戒护锛屼换鍔″彿: {task.TaskNum}锛屽贩閬�: {task.Roadway}锛屽懡浠ょ被鍨�: {commandType}", task.Roadway);
 
-            // 鏍规嵁鍛戒护绫诲瀷璋冪敤鐩稿簲鐨勬瀯寤烘柟娉�
-            return commandType switch
-            {
-                "Formation" => BuildCommand(task, CreateFormationCommand(task)),  // 鎴愬瀷鍛戒护
-                _ => BuildCommand(task, CreateStandardCommand(task))              // 鏍囧噯鍛戒护
-            };
+            //// 鏍规嵁鍛戒护绫诲瀷璋冪敤鐩稿簲鐨勬瀯寤烘柟娉�
+            //return commandType switch
+            //{
+            //    "Formation" => BuildCommand(task, CreateFormationCommand(task)),  // 鎴愬瀷鍛戒护
+            //    _ => BuildCommand(task, CreateStandardCommand(task))              // 鏍囧噯鍛戒护
+            //};
         }
 
         /// <summary>
@@ -128,7 +129,7 @@
             {
                 TaskNum = task.TaskNum,   // 浠诲姟鍙�
                 WorkType = 1,             // 浣滀笟绫诲瀷
-                WorkAction = 1            // 浣滀笟鎸囦护锛氬紑濮嬫墽琛�
+                //WorkAction = 1            // 浣滀笟鎸囦护锛氬紑濮嬫墽琛�
             };
         }
 
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneDBName.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneDBName.cs
index c463416..f6b3848 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneDBName.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneDBName.cs
@@ -95,6 +95,7 @@
         /// 鎺у埗鍫嗗灈鏈虹殑鍔ㄤ綔锛�
         /// - 1: 寮�濮嬫墽琛屼换鍔�
         /// - 2: 浠诲姟瀹屾垚/鍋滄
+        /// - 3: 娑堥槻浠诲姟寮�濮�
         /// </remarks>
         WorkAction,
 
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs
index 7534971..9c1ad18 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs
@@ -20,6 +20,7 @@
         /// 鎺у埗鍫嗗灈鏈虹殑鍔ㄤ綔锛�
         /// - 1: 寮�濮嬫墽琛屼换鍔�
         /// - 2: 浠诲姟瀹屾垚/鍋滄
+        /// - 3: 娑堥槻浠诲姟寮�濮�
         /// </remarks>
         public short WorkAction { get; set; }
 
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskSelector.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskSelector.cs
index d5fb6c4..620b1fa 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskSelector.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskSelector.cs
@@ -100,8 +100,8 @@
             Dt_Task? candidateTask;
             var deviceCode = commonStackerCrane.DeviceCode;
 
-            _logger.LogInformation("SelectTask锛氬紑濮嬮�夋嫨浠诲姟锛岃澶�: {DeviceCode}锛屼笂涓�浠诲姟绫诲瀷: {LastTaskType}", deviceCode, commonStackerCrane.LastTaskType);
-            QuartzLogger.Info($"寮�濮嬮�夋嫨浠诲姟锛岃澶�: {deviceCode}锛屼笂涓�浠诲姟绫诲瀷: {commonStackerCrane.LastTaskType}", deviceCode);
+            //_logger.LogInformation("SelectTask锛氬紑濮嬮�夋嫨浠诲姟锛岃澶�: {DeviceCode}锛屼笂涓�浠诲姟绫诲瀷: {LastTaskType}", deviceCode, commonStackerCrane.LastTaskType);
+            //QuartzLogger.Info($"寮�濮嬮�夋嫨浠诲姟锛岃澶�: {deviceCode}锛屼笂涓�浠诲姟绫诲瀷: {commonStackerCrane.LastTaskType}", deviceCode);
 
             // 鏍规嵁涓婁竴浠诲姟绫诲瀷鍐冲畾鏌ヨ绛栫暐
             if (commonStackerCrane.LastTaskType == null)
@@ -323,7 +323,7 @@
             _logger.LogInformation("IsOutTaskStationAvailable锛氱珯鍙� {ChildPosi}锛屾槸鍚﹁鍗犵敤: {IsOccupied}锛屼换鍔″彿: {TaskNum}", router.ChildPosi, isOccupied, task.TaskNum);
             QuartzLogger.Info($"IsOutTaskStationAvailable锛氱珯鍙� {router.ChildPosi}锛屾槸鍚﹁鍗犵敤: {isOccupied}", task.Roadway);
 
-            return !isOccupied;
+            return isOccupied;
         }
     }
 }
diff --git a/Code/WMS/WIDESEA_WMSServer/.vscode/launch.json b/Code/WMS/WIDESEA_WMSServer/.vscode/launch.json
new file mode 100644
index 0000000..890e583
--- /dev/null
+++ b/Code/WMS/WIDESEA_WMSServer/.vscode/launch.json
@@ -0,0 +1,35 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            // 浣跨敤 IntelliSense 鎵惧嚭 C# 璋冭瘯瀛樺湪鍝簺灞炴��
+            // 灏嗘偓鍋滅敤浜庣幇鏈夊睘鎬х殑璇存槑
+            // 鏈夊叧璇︾粏淇℃伅锛岃璁块棶 https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md銆�
+            "name": ".NET Core Launch (web)",
+            "type": "coreclr",
+            "request": "launch",
+            "preLaunchTask": "build",
+            // 濡傛灉宸叉洿鏀圭洰鏍囨鏋讹紝璇风‘淇濇洿鏂扮▼搴忚矾寰勩��
+            "program": "${workspaceFolder}/WIDESEA_WMSServer/bin/Debug/net8.0/WIDESEA_WMSServer.dll",
+            "args": [],
+            "cwd": "${workspaceFolder}/WIDESEA_WMSServer",
+            "stopAtEntry": false,
+            // 鍚敤鍦ㄥ惎鍔� ASP.NET Core 鏃跺惎鍔� Web 娴忚鍣ㄣ�傛湁鍏宠缁嗕俊鎭�: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
+            "serverReadyAction": {
+                "action": "openExternally",
+                "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
+            },
+            "env": {
+                "ASPNETCORE_ENVIRONMENT": "Development"
+            },
+            "sourceFileMap": {
+                "/Views": "${workspaceFolder}/Views"
+            }
+        },
+        {
+            "name": ".NET Core Attach",
+            "type": "coreclr",
+            "request": "attach"
+        }
+    ]
+}
\ No newline at end of file
diff --git a/Code/WMS/WIDESEA_WMSServer/.vscode/tasks.json b/Code/WMS/WIDESEA_WMSServer/.vscode/tasks.json
new file mode 100644
index 0000000..3f47f3f
--- /dev/null
+++ b/Code/WMS/WIDESEA_WMSServer/.vscode/tasks.json
@@ -0,0 +1,41 @@
+{
+    "version": "2.0.0",
+    "tasks": [
+        {
+            "label": "build",
+            "command": "dotnet",
+            "type": "process",
+            "args": [
+                "build",
+                "${workspaceFolder}/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj",
+                "/property:GenerateFullPaths=true",
+                "/consoleloggerparameters:NoSummary;ForceNoAlign"
+            ],
+            "problemMatcher": "$msCompile"
+        },
+        {
+            "label": "publish",
+            "command": "dotnet",
+            "type": "process",
+            "args": [
+                "publish",
+                "${workspaceFolder}/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj",
+                "/property:GenerateFullPaths=true",
+                "/consoleloggerparameters:NoSummary;ForceNoAlign"
+            ],
+            "problemMatcher": "$msCompile"
+        },
+        {
+            "label": "watch",
+            "command": "dotnet",
+            "type": "process",
+            "args": [
+                "watch",
+                "run",
+                "--project",
+                "${workspaceFolder}/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj"
+            ],
+            "problemMatcher": "$msCompile"
+        }
+    ]
+}
\ No newline at end of file
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs
index 5c80729..8d2a3ac 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs
@@ -193,12 +193,42 @@
                     WebResponseContent content = new WebResponseContent();
                     stockInfo.LocationCode = location.LocationCode;
                     stockInfo.LocationId = location.Id;
-                    stockInfo.OutboundDate = task.Roadway switch
+
+                    var now = DateTime.Now;
+                    if (task.Roadway.Contains("GW"))
                     {
-                        var r when r.Contains("GW") => DateTime.Now.AddHours(2),
-                        var r when r.Contains("CW") => DateTime.Now.AddHours(1),
-                        _ => DateTime.Now
-                    };
+                        if (stockInfo.Remark.IsNullOrEmpty())
+                        {
+                            stockInfo.OutboundDate = now.AddHours(16);
+                            stockInfo.Remark = "GW_1";
+                        }
+                        else if (stockInfo.Remark == "GW_1")
+                        {
+                            stockInfo.OutboundDate = now.AddHours(24);
+                            stockInfo.Remark = "GW_2";
+                        }
+                        else
+                        {
+                            stockInfo.OutboundDate = now.AddHours(16);
+                        }
+                    }
+                    else if (task.Roadway.Contains("CW"))
+                    {
+                        if (stockInfo.Remark == "GW_2")
+                        {
+                            stockInfo.OutboundDate = now.AddHours(12);
+                            stockInfo.Remark = "CW_1";
+                        }
+                        else
+                        {
+                            stockInfo.OutboundDate = now.AddHours(12);
+                        }
+                    }
+                    else
+                    {
+                        stockInfo.OutboundDate = now;
+                    }
+
                     stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.GetHashCode();
 
                     location.LocationStatus = LocationStatusEnum.InStock.GetHashCode();
@@ -208,18 +238,18 @@
                     if (!updateLocationResult || !updateStockResult)
                         return WebResponseContent.Instance.Error("浠诲姟瀹屾垚澶辫触");
                     // 璋冪敤MES鎵樼洏杩涚珯
-                    var inboundRequest = new InboundInContainerRequest
-                    {
-                        EquipmentCode = "STK-GROUP-001",
-                        ResourceCode = "STK-GROUP-001",
-                        LocalTime = DateTime.Now,
-                        ContainerCode = taskDto.PalletCode
-                    };
-                    var inboundResult = _mesService.InboundInContainer(inboundRequest);
-                    if (inboundResult == null || inboundResult.Data == null || !inboundResult.Data.IsSuccess)
-                    {
-                        return content.Error($"浠诲姟瀹屾垚澶辫触锛歁ES杩涚珯澶辫触: {inboundResult?.Data?.Msg ?? inboundResult?.ErrorMessage ?? "鏈煡閿欒"}");
-                    }
+                    //var inboundRequest = new InboundInContainerRequest
+                    //{
+                    //    EquipmentCode = "STK-GROUP-001",
+                    //    ResourceCode = "STK-GROUP-001",
+                    //    LocalTime = DateTime.Now,
+                    //    ContainerCode = taskDto.PalletCode
+                    //};
+                    //var inboundResult = _mesService.InboundInContainer(inboundRequest);
+                    //if (inboundResult == null || inboundResult.Data == null || !inboundResult.Data.IsSuccess)
+                    //{
+                    //    return content.Error($"浠诲姟瀹屾垚澶辫触锛歁ES杩涚珯澶辫触: {inboundResult?.Data?.Msg ?? inboundResult?.ErrorMessage ?? "鏈煡閿欒"}");
+                    //}
                     return await CompleteTaskAsync(task, "鍏ュ簱瀹屾垚");
                 });
             }
@@ -793,7 +823,7 @@
                     if (stockInfo.LocationId > 0 || !string.IsNullOrWhiteSpace(stockInfo.LocationCode))
                         return WebResponseContent.Instance.Error($"鎵樼洏[{stockPalletCode}]搴撳瓨宸茬粦瀹氳揣浣嶏紝涓嶈兘鍒涘缓鏈烘鎵媨taskName}浠诲姟");
                 }
-                var section = App.Configuration.GetSection("RobotTaskAddressRules").GetSection(targetLineNo).GetChildren().Select(c => c.Value).ToArray(); 
+                var section = App.Configuration.GetSection("RobotTaskAddressRules").GetSection(targetLineNo).GetChildren().Select(c => c.Value).ToArray();
 
                 var task = new Dt_Task
                 {
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
index 7b3ffe8..76ee9b4 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -62,8 +62,8 @@
   "DBSeedEnable": false,
   "PDAVersion": "4",
   "WebSocketPort": 9296,
-  "AutoOutboundTask": {
-    "Enable": false, /// 鏄惁鍚敤鑷姩鍑哄簱浠诲姟
+  "AutoOutboundTask": { 
+    "Enable": true, /// 鏄惁鍚敤鑷姩鍑哄簱浠诲姟
     "CheckIntervalSeconds": 300, /// 妫�鏌ラ棿闅旓紙绉掞級
     "TargetAddresses": { /// 鎸夊贩閬撳墠缂�閰嶇疆鐩爣鍦板潃锛堟敮鎸佸鍑哄簱鍙o級
       "GW": [ "11001", "11010", "11068" ],
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\350\256\276\345\244\207\345\215\217\350\256\256/\351\253\230\345\270\270\346\270\251\345\240\206\345\236\233\346\234\272\344\270\216\350\276\223\351\200\201\347\272\277/~$\345\240\206\345\236\233\346\234\272\344\270\216\344\270\212\344\275\215\346\234\272\344\272\244\344\272\222\344\277\241\346\201\257.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\350\256\276\345\244\207\345\215\217\350\256\256/\351\253\230\345\270\270\346\270\251\345\240\206\345\236\233\346\234\272\344\270\216\350\276\223\351\200\201\347\272\277/~$\345\240\206\345\236\233\346\234\272\344\270\216\344\270\212\344\275\215\346\234\272\344\272\244\344\272\222\344\277\241\346\201\257.xlsx"
new file mode 100644
index 0000000..236d63d
--- /dev/null
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\350\256\276\345\244\207\345\215\217\350\256\256/\351\253\230\345\270\270\346\270\251\345\240\206\345\236\233\346\234\272\344\270\216\350\276\223\351\200\201\347\272\277/~$\345\240\206\345\236\233\346\234\272\344\270\216\344\270\212\344\275\215\346\234\272\344\272\244\344\272\222\344\277\241\346\201\257.xlsx"
Binary files differ
diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\350\256\276\345\244\207\345\215\217\350\256\256/\351\253\230\345\270\270\346\270\251\345\240\206\345\236\233\346\234\272\344\270\216\350\276\223\351\200\201\347\272\277/\345\240\206\345\236\233\346\234\272\344\270\216\344\270\212\344\275\215\346\234\272\344\272\244\344\272\222\344\277\241\346\201\257.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\350\256\276\345\244\207\345\215\217\350\256\256/\351\253\230\345\270\270\346\270\251\345\240\206\345\236\233\346\234\272\344\270\216\350\276\223\351\200\201\347\272\277/\345\240\206\345\236\233\346\234\272\344\270\216\344\270\212\344\275\215\346\234\272\344\272\244\344\272\222\344\277\241\346\201\257.xlsx"
index 6d42a93..dae9f06 100644
--- "a/\351\241\271\347\233\256\350\265\204\346\226\231/\350\256\276\345\244\207\345\215\217\350\256\256/\351\253\230\345\270\270\346\270\251\345\240\206\345\236\233\346\234\272\344\270\216\350\276\223\351\200\201\347\272\277/\345\240\206\345\236\233\346\234\272\344\270\216\344\270\212\344\275\215\346\234\272\344\272\244\344\272\222\344\277\241\346\201\257.xlsx"
+++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\350\256\276\345\244\207\345\215\217\350\256\256/\351\253\230\345\270\270\346\270\251\345\240\206\345\236\233\346\234\272\344\270\216\350\276\223\351\200\201\347\272\277/\345\240\206\345\236\233\346\234\272\344\270\216\344\270\212\344\275\215\346\234\272\344\272\244\344\272\222\344\277\241\346\201\257.xlsx"
Binary files differ

--
Gitblit v1.9.3