From f7ec7a32e8cddcb976093c826e3a0d1ed61fb335 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期日, 12 四月 2026 13:09:43 +0800
Subject: [PATCH] feat(任务服务): 扩展任务更新接口以支持地址信息

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs                   |    2 
 Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs                                    |   16 +-
 Code/测试工具/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/protocol-templates.json              |  124 ++++++++++----------
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ManualInbound/ManualInboundTaskHandler.cs |    2 
 Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs                      |    2 
 Code/测试工具/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1002/config.json            |    2 
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/UpdateTaskDto.cs                                      |   11 +
 Code/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/UpdateTaskDto.cs                                             |   10 +
 Code/测试工具/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1001/config.json            |    2 
 Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs                                      |    2 
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs                    |    2 
 Code/CLAUDE.md                                                                                           |  132 ++++++++++++++++++++++
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/RelocationTaskFlowService.cs                 |    2 
 13 files changed, 232 insertions(+), 77 deletions(-)

diff --git a/Code/CLAUDE.md b/Code/CLAUDE.md
new file mode 100644
index 0000000..6f70668
--- /dev/null
+++ b/Code/CLAUDE.md
@@ -0,0 +1,132 @@
+# CLAUDE.md
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## 椤圭洰姒傝堪
+
+**WIDESEA** 鏄竴涓伐涓氫粨鍌ㄨ嚜鍔ㄥ寲绯荤粺锛屽寘鍚袱涓牳蹇冨瓙绯荤粺锛�
+
+- **WCS**锛堜粨搴撴帶鍒剁郴缁燂級锛氱洿鎺ユ帶鍒跺爢鍨涙満銆佽緭閫佺嚎銆佹満鍣ㄤ汉銆佺┛姊溅绛夌墿鐞嗚澶囷紝涓� PLC 閫氫俊
+- **WMS**锛堜粨搴撶鐞嗙郴缁燂級锛氱鐞嗗簱瀛樸�佸叆搴撱�佸嚭搴撲换鍔°�佺洏鐐圭瓑涓氬姟閫昏緫
+
+涓や釜绯荤粺閫氳繃 HTTP API 浜や簰锛學MS 渚濊禆 WCS 瀹屾垚璁惧璋冨害銆�
+
+## 鏋勫缓鍛戒护
+
+```bash
+# WCS 鍚庣锛堢鍙� 9292锛�
+dotnet build WCS/WIDESEAWCS_Server/WIDESEAWCS_Server.sln
+dotnet run --project WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_Server.csproj
+
+# WMS 鍚庣锛堢鍙� 9291锛�
+dotnet build WMS/WIDESEA_WMSServer/WIDESEA_WMSServer.sln
+dotnet run --project WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj
+
+# WCS 鍓嶇
+cd WCS/WIDESEAWCS_Client && npm run serve
+
+# WMS 鍓嶇
+cd WMS/WIDESEA_WMSClient && npm run serve
+
+# S7 妯℃嫙鍣�
+cd 娴嬭瘯宸ュ叿/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Web && npm run dev
+```
+
+## 鏋舵瀯姒傝
+
+```
+鈹屸攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�
+鈹�                        WCS (绔彛 9292)                       鈹�
+鈹�  鈹屸攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹屸攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹屸攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹�
+鈹�  鈹�   Quartz    鈹�  鈹�  Communicator 鈹�  鈹�   Redis L1+L2      鈹�  鈹�
+鈹�  鈹�   Jobs      鈹傗啋 鈹�  (PLC鍗忚)    鈹�  鈹�   Cache            鈹�  鈹�
+鈹�  鈹斺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹斺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹斺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹�
+鈹�         鈫�                                                    鈹�
+鈹�  鈹屸攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�     鈹�
+鈹�  鈹�  TcpSocketServer (绔彛 2000) / WebSocket (绔彛 9296) 鈹�     鈹�
+鈹�  鈹斺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�     鈹�
+鈹斺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�
+                              鈫� HTTP API
+                              鈫�
+鈹屸攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�
+鈹�                        WMS (绔彛 9291)                       鈹�
+鈹�  鈹屸攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹屸攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹屸攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹�
+鈹�  鈹�   Tasks     鈹�  鈹�    Stock     鈹�  鈹�    Inbound/        鈹�  鈹�
+鈹�  鈹�   Service   鈹�  鈹�    Service   鈹�  鈹�    Outbound        鈹�  鈹�
+鈹�  鈹斺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹斺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹斺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�  鈹�
+鈹斺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�
+```
+
+## WCS 椤圭洰缁撴瀯
+
+| 椤圭洰 | 鐢ㄩ�� |
+|------|------|
+| `WIDESEAWCS_Server` | 涓� API 鍏ュ彛锛堢鍙� 9292锛� |
+| `WIDESEAWCS_Core` | 妗嗘灦锛堟暟鎹簱銆佺紦瀛樸�丏I銆佹棩蹇楋級 |
+| `WIDESEAWCS_Common` | 甯搁噺銆佹灇涓俱�丷edis 閿� |
+| `WIDESEAWCS_Model` | 瀹炰綋妯″瀷 |
+| `WIDESEAWCS_DTO` | 鏁版嵁浼犺緭瀵硅薄 |
+| `WIDESEAWCS_Communicator` | 宸ヤ笟鍗忚锛圡odbus銆丼7銆丱mron 绛夛級 |
+| `WIDESEAWCS_Tasks` | 鍚庡彴璁惧鎺у埗浣滀笟 |
+| `WIDESEAWCS_QuartzJob` | Quartz.NET 璋冨害 |
+
+**璇︾粏 WCS 瑙勮寖**锛氳 `WCS/WIDESEAWCS_Server/CLAUDE.md`
+
+## WMS 椤圭洰缁撴瀯
+
+| 椤圭洰 | 鐢ㄩ�� |
+|------|------|
+| `WIDESEA_WMSServer` | 涓� API 鍏ュ彛锛堢鍙� 9291锛� |
+| `WIDESEA_Core` | 妗嗘灦宸ュ叿 |
+| `WIDESEA_Common` | 甯搁噺銆佹灇涓� |
+| `WIDESEA_Model` | 瀹炰綋妯″瀷 |
+| `WIDESEA_*Service` | 涓氬姟閫昏緫鏈嶅姟 |
+
+## 鍏抽敭璁捐
+
+- **ORM**锛歋qlSugar锛堟敮鎸佸鏁版嵁搴擄級
+- **渚濊禆娉ㄥ叆**锛欰utofac锛岄�氳繃 `AutofacModuleRegister` 娉ㄥ唽
+- **缂撳瓨**锛歊edis L1锛堝唴瀛橈級+ L2锛圧edis锛夋贩鍚堢紦瀛�
+- **璋冨害**锛歈uartz.NET
+- **瀹炴椂閫氫俊**锛歋ignalR WebSocket
+- **璁惧鍗忚**锛氬瓨鍌ㄥ湪鏁版嵁搴� `Dt_DeviceProtocol` 琛紝闈為厤缃枃浠�
+
+## 鎶�鏈爤
+
+- **鍚庣**锛�.NET 6/8锛孉SP.NET Core锛孋# 12
+- **鍓嶇**锛歏ue 3锛孍lement Plus锛孷ite锛孭inia
+- **鏁版嵁搴�**锛歋QL Server
+- **缂撳瓨**锛歊edis
+
+## 娉ㄩ噴涓庢枃妗� (寮哄埗)
+
+- **XML 鏂囨。娉ㄩ噴**: 鎵�鏈� `public` 绫汇�佹帴鍙c�佹柟娉曘�佸睘鎬�**蹇呴』**鍖呭惈 XML 鏂囨。娉ㄩ噴 (`/// <summary>...</summary>`)锛岃В閲婂叾鐢ㄩ�斻�佸弬鏁板拰杩斿洖鍊笺��
+- **琛屽唴娉ㄩ噴**: 瀵逛簬澶嶆潅鐨勪笟鍔¢�昏緫銆佺畻娉曞疄鐜版垨闈炵洿瑙傜殑浠g爜鍧楋紝**蹇呴』**娣诲姞 `//` 琛屽唴娉ㄩ噴瑙i噴鈥滀负浠�涔堣繖涔堝仛鈥濄��
+- **TODO 鏍囪**: 濡傛灉浠g爜鏈畬鎴愭垨鏈変复鏃舵柟妗堬紝蹇呴』浣跨敤 `// TODO: 璇存槑` 鏍囪銆�
+
+## 閫氱敤瑙勮寖
+
+- **寮傛缂栫▼**: 鎵�鏈� I/O 鎿嶄綔蹇呴』浣跨敤 `async/await`銆傚簱浠g爜璇蜂娇鐢� `ConfigureAwait(false)`銆�
+
+- **鍛藉悕**:
+
+  - 鎺ュ彛浠� "I" 寮�澶� (渚嬪: `IUserService`)銆�
+  - 绫诲悕銆佹柟娉曞悕浣跨敤 **PascalCase**銆�
+  - 绉佹湁瀛楁銆佸眬閮ㄥ彉閲忎娇鐢� **camelCase**銆�
+
+- **鍛藉悕绌洪棿**: 浣跨敤 **鏂囦欢浣滅敤鍩熷懡鍚嶇┖闂�** (`namespace MyApp.Api;`)銆�
+
+- 褰撻渶瑕佸涓や釜鎴栦互涓婄殑鏁版嵁搴撴墽琛屼慨鏀�/娣诲姞鎿嶄綔骞朵繚璇佷簨鍔′竴鑷存�ф椂锛岃浣跨敤宸ヤ綔鍗曞厓绠$悊鍣紙`IUnitOfWorkManage`锛夌殑浜嬪姟鏂规硶锛�
+
+  - **鍚屾鍦烘櫙**锛氳皟鐢� `BeginTran(Func<WebResponseContent> func)`锛屼紶鍏ュ悓姝ュ鎵樸��
+  - **寮傛鍦烘櫙**锛氳皟鐢� `BeginTranAsync(Func<Task<WebResponseContent>> funcAsync)`锛屼紶鍏ュ紓姝ュ鎵樸��
+
+  **娉ㄦ剰**锛歚IUnitOfWorkManage` 闇�閫氳繃渚濊禆娉ㄥ叆锛圖I锛夎幏鍙栥�傝鏂规硶浼氳嚜鍔ㄧ鐞嗕簨鍔$殑鎻愪氦涓庡洖婊氾紝鍙渶纭繚鎵�鏈夋暟鎹簱鎿嶄綔鍦ㄤ紶鍏ョ殑濮旀墭鍐呭畬鎴愩��
+
+## 馃毇 涓ョ浜嬮」
+
+- **涓ョ** 鐢熸垚娌℃湁娉ㄩ噴鐨勪唬鐮� (灏ゅ叾鏄叕鍏辨柟娉�)銆�
+- **涓ョ** 浣跨敤 `Task.Result` 鎴� `Task.Wait()`銆�
+- **涓ョ** 鍦ㄥ紓姝ヤ笂涓嬫枃涓娇鐢� `.ToList()` (蹇呴』鐢� `.ToListAsync()`)銆�
+- **涓ョ** 鐩存帴鏆撮湶瀹炰綋 (Entity)锛屽繀椤讳娇鐢� DTO銆�
+- **涓ョ** 鎹曡幏 `Exception` 鑰屼笉璁板綍鏃ュ織銆�
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/UpdateTaskDto.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/UpdateTaskDto.cs
index 8ae7d06..05b9d3d 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/UpdateTaskDto.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/TaskInfo/UpdateTaskDto.cs
@@ -20,5 +20,16 @@
         /// newStatus - 鏂扮姸鎬侊紝蹇呭~椤癸紝鐢ㄤ簬鎸囧畾浠诲姟鐨勬柊鐘舵��
         /// </summary>
         public int NewStatus { get; set; }
+
+
+        /// <summary>
+        /// NextAddress - 涓嬩竴鍦板潃锛屽繀濉」锛岀敤浜庢寚瀹氫换鍔$殑涓嬩竴浣嶇疆
+        /// </summary>
+        public string? NextAddress { get; set; }
+
+        /// <summary>
+        /// currentAddress - 褰撳墠鍦板潃锛屽繀濉」锛岀敤浜庢寚瀹氫换鍔$殑褰撳墠浣嶇疆
+        /// </summary>
+        public string? CurrentAddress { get; set; }
     }
 }
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs
index 7cd6bcc..a6b90c8 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs
@@ -137,7 +137,7 @@
         {
             var result = _httpClientHelper.Post<WebResponseContent>(
                 nameof(ConfigKey.UpdateTaskByStatus),
-                new UpdateTaskDto { Id = task.TaskNum, NewStatus = task.TaskStatus }.ToJson());
+                new UpdateTaskDto { Id = task.TaskNum, NewStatus = task.TaskStatus, NextAddress = task.NextAddress, CurrentAddress = task.CurrentAddress }.ToJson());
 
             if (!result.IsSuccess || !result.Data.Status)
                 return WebResponseContent.Instance.Error($"璋冪敤WMS鎺ュ彛鏇存柊浠诲姟鐘舵�佸け璐�,浠诲姟鍙�:銆恵task.TaskNum}銆�,閿欒淇℃伅:銆恵result.Data?.Message}銆�");
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
index e44f6cf..6082140 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
@@ -225,7 +225,7 @@
         {
             var result = _httpClientHelper.Post<WebResponseContent>(
                 nameof(ConfigKey.UpdateTaskByStatus),
-                new UpdateTaskDto { Id = task.TaskNum, NewStatus = task.TaskStatus }.ToJson());
+                new UpdateTaskDto { Id = task.TaskNum, NewStatus = task.TaskStatus, NextAddress = task.NextAddress, CurrentAddress = task.CurrentAddress }.ToJson());
 
             if (!result.IsSuccess || !result.Data.Status)
                 return WebResponseContent.Instance.Error($"璋冪敤WMS鎺ュ彛鏇存柊浠诲姟鐘舵�佸け璐�,浠诲姟鍙�:銆恵task.TaskNum}銆�,閿欒淇℃伅:銆恵result.Data?.Message}銆�");
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/RelocationTaskFlowService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/RelocationTaskFlowService.cs
index 4a35391..c94804e 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/RelocationTaskFlowService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/RelocationTaskFlowService.cs
@@ -102,7 +102,7 @@
         {
             var result = _httpClientHelper.Post<WebResponseContent>(
                 nameof(ConfigKey.UpdateTaskByStatus),
-                new UpdateTaskDto { Id = task.TaskNum, NewStatus = task.TaskStatus }.ToJson());
+                new UpdateTaskDto { Id = task.TaskNum, NewStatus = task.TaskStatus, NextAddress = task.NextAddress, CurrentAddress = task.CurrentAddress }.ToJson());
 
             if (!result.IsSuccess || !result.Data.Status)
                 return WebResponseContent.Instance.Error($"璋冪敤WMS鎺ュ彛鏇存柊浠诲姟鐘舵�佸け璐�,浠诲姟鍙�:銆恵task.TaskNum}銆�,閿欒淇℃伅:銆恵result.Data?.Message}銆�");
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ManualInbound/ManualInboundTaskHandler.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ManualInbound/ManualInboundTaskHandler.cs
index 2feaa88..8c8886f 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ManualInbound/ManualInboundTaskHandler.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/ManualInbound/ManualInboundTaskHandler.cs
@@ -49,7 +49,7 @@
                 // 鍐欏叆璧峰鍦板潃
                 conveyorLine.SetValue(ConveyorLineDBNameNew.Source, short.Parse(task.SourceAddress ?? "0"), childDeviceCode);
                 // 鍐欏叆鐩爣鍦板潃
-                conveyorLine.SetValue(ConveyorLineDBNameNew.Target, short.Parse(task.TargetAddress ?? "0"), childDeviceCode);
+                conveyorLine.SetValue(ConveyorLineDBNameNew.Target, short.Parse(task.NextAddress ?? "0"), childDeviceCode);
 
                 // 鏇存柊浠诲姟鐘舵�佸埌涓嬩竴闃舵
                 var updateResult = _taskService.UpdateTaskStatusToNext(task);
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/UpdateTaskDto.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/UpdateTaskDto.cs
index 6029b38..ac164a3 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/UpdateTaskDto.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Task/UpdateTaskDto.cs
@@ -19,5 +19,15 @@
         /// </summary>
         [Required(ErrorMessage = "鏂扮姸鎬佷笉鑳戒负绌�")]
         public int NewStatus { get; set; }
+
+        /// <summary>
+        /// NextAddress - 涓嬩竴鍦板潃锛屽繀濉」锛岀敤浜庢寚瀹氫换鍔$殑涓嬩竴浣嶇疆
+        /// </summary>
+        public string? NextAddress { get; set; }
+
+        /// <summary>
+        /// currentAddress - 褰撳墠鍦板潃锛屽繀濉」锛岀敤浜庢寚瀹氫换鍔$殑褰撳墠浣嶇疆
+        /// </summary>
+        public string? CurrentAddress { get; set; }
     }
 }
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
index 224ef16..e4954f6 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -103,7 +103,7 @@
         /// <param name="taskId"></param>
         /// <param name="newStatus"></param>
         /// <returns></returns>
-        Task<WebResponseContent> UpdateTaskByStatusAsync(int taskId, int newStatus);
+        Task<WebResponseContent> UpdateTaskByStatusAsync(UpdateTaskDto taskDto);
 
         /// <summary>
         /// 鍫嗗灈鏈哄彇鏀捐揣瀹屾垚鍚庣墿娴侀�氱煡鍖栨垚鍒嗗鏌滃畬鎴愪俊鍙�
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs
index ed7108a..3ff0a10 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_WCS.cs
@@ -567,18 +567,20 @@
         /// <param name="taskId"></param>
         /// <param name="newStatus"></param>
         /// <returns></returns>
-        public async Task<WebResponseContent> UpdateTaskByStatusAsync(int taskId, int newStatus)
+        public async Task<WebResponseContent> UpdateTaskByStatusAsync(UpdateTaskDto taskDto)
         {
             try
             {
-                var tasks = await BaseDal.QueryFirstAsync(s => s.TaskNum == taskId);
-                if (tasks == null)
+                var taskInfo = await BaseDal.QueryFirstAsync(s => s.TaskNum == taskDto.Id);
+                if (taskInfo == null)
                     return WebResponseContent.Instance.Error("鏈壘鍒板搴旂殑浠诲姟");
 
-                tasks.TaskStatus = newStatus;
-                await BaseDal.UpdateDataAsync(tasks);
+                taskInfo.TaskStatus = taskDto.NewStatus;
+                taskInfo.NextAddress = taskDto.NextAddress;
+                taskInfo.CurrentAddress = taskDto.CurrentAddress;
+                await BaseDal.UpdateDataAsync(taskInfo);
 
-                return WebResponseContent.Instance.OK("淇敼鎴愬姛", tasks);
+                return WebResponseContent.Instance.OK("淇敼鎴愬姛", taskInfo);
             }
             catch (Exception ex)
             {
@@ -930,7 +932,7 @@
                     }
                 };
 
-                await _unitOfWorkManage.BeginTranAsync(async () =>
+               return await _unitOfWorkManage.BeginTranAsync(async () =>
                 {
                     // 4. 淇濆瓨鍒版暟鎹簱
                     var result = await BaseDal.AddDataAsync(task) > 0;
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
index c1494fa..571d511 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs
@@ -142,7 +142,7 @@
         [HttpGet, HttpPost, Route("UpdateTaskByStatus"), AllowAnonymous]
         public async Task<WebResponseContent?> UpdateTaskByStatusAsync([FromBody] UpdateTaskDto taskDto)
         {
-            return await Service.UpdateTaskByStatusAsync(taskDto.Id, taskDto.NewStatus);
+            return await Service.UpdateTaskByStatusAsync(taskDto);
         }
 
         /// <summary>
diff --git "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1001/config.json" "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1001/config.json"
index 7f934af..798f25c 100644
--- "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1001/config.json"
+++ "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1001/config.json"
@@ -2,7 +2,7 @@
   "id": "1001",
   "name": "A\u533A_\u4E00\u6CE8\u8F93\u9001\u7EBF",
   "plcType": "S71500",
-  "port": 105,
+  "port": 103,
   "activationKey": "",
   "autoStart": false,
   "protocolTemplateId": "protocol-1001",
diff --git "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1002/config.json" "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1002/config.json"
index b9223cb..625a805 100644
--- "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1002/config.json"
+++ "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/instance-1002/config.json"
@@ -2,7 +2,7 @@
   "id": "1002",
   "name": "A\u533A_\u6362\u76D8\u8F93\u9001\u7EBF",
   "plcType": "S71500",
-  "port": 108,
+  "port": 104,
   "activationKey": "",
   "autoStart": false,
   "protocolTemplateId": "protocol-1002",
diff --git "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/protocol-templates.json" "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/protocol-templates.json"
index f598d77..43c14cf 100644
--- "a/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/protocol-templates.json"
+++ "b/Code/\346\265\213\350\257\225\345\267\245\345\205\267/WIDESEAWCS_S7Simulator/WIDESEAWCS_S7Simulator.Server/Data/protocol-templates.json"
@@ -705,7 +705,7 @@
         "dbNumber": 50,
         "offset": 18,
         "bit": 1,
-        "dataType": 3,
+        "dataType": 0,
         "length": 22,
         "direction": 2
       },
@@ -849,7 +849,7 @@
         "dbNumber": 50,
         "offset": 578,
         "bit": 1,
-        "dataType": 3,
+        "dataType": 0,
         "length": 22,
         "direction": 2
       },
@@ -993,7 +993,7 @@
         "dbNumber": 50,
         "offset": 1378,
         "bit": 1,
-        "dataType": 3,
+        "dataType": 0,
         "length": 22,
         "direction": 2
       },
@@ -1137,8 +1137,8 @@
         "dbNumber": 50,
         "offset": 1618,
         "bit": 1,
-        "dataType": 3,
-        "length": 22,
+        "dataType": 0,
+        "length": 20,
         "direction": 2
       }
     ]
@@ -1367,14 +1367,14 @@
         "dbNumber": 50,
         "offset": 18,
         "bit": 1,
-        "dataType": 3,
-        "length": 22,
+        "dataType": 0,
+        "length": 20,
         "direction": 2
       },
       {
         "fieldKey": "11010_TaskNo",
         "dbNumber": 50,
-        "offset": 400,
+        "offset": 360,
         "bit": 1,
         "dataType": 1,
         "length": 1,
@@ -1383,7 +1383,7 @@
       {
         "fieldKey": "11010_Source",
         "dbNumber": 50,
-        "offset": 402,
+        "offset": 362,
         "bit": 1,
         "dataType": 1,
         "length": 1,
@@ -1392,7 +1392,7 @@
       {
         "fieldKey": "11010_Target",
         "dbNumber": 50,
-        "offset": 404,
+        "offset": 364,
         "bit": 1,
         "dataType": 1,
         "length": 1,
@@ -1401,7 +1401,7 @@
       {
         "fieldKey": "11010_BoxType",
         "dbNumber": 50,
-        "offset": 406,
+        "offset": 366,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1410,7 +1410,7 @@
       {
         "fieldKey": "11010_CV_State",
         "dbNumber": 50,
-        "offset": 407,
+        "offset": 367,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1419,7 +1419,7 @@
       {
         "fieldKey": "11010_CV_ERRCode",
         "dbNumber": 50,
-        "offset": 408,
+        "offset": 368,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1428,7 +1428,7 @@
       {
         "fieldKey": "11010_WCS_STB",
         "dbNumber": 50,
-        "offset": 409,
+        "offset": 369,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1437,7 +1437,7 @@
       {
         "fieldKey": "11010_WCS_ACK",
         "dbNumber": 50,
-        "offset": 410,
+        "offset": 370,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1446,7 +1446,7 @@
       {
         "fieldKey": "11010_PLC_STB",
         "dbNumber": 50,
-        "offset": 411,
+        "offset": 371,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1455,7 +1455,7 @@
       {
         "fieldKey": "11010_PLC_ACK",
         "dbNumber": 50,
-        "offset": 412,
+        "offset": 372,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1464,7 +1464,7 @@
       {
         "fieldKey": "11010_PLC_REQ",
         "dbNumber": 50,
-        "offset": 413,
+        "offset": 373,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1473,7 +1473,7 @@
       {
         "fieldKey": "11010_WCS_ERRCode",
         "dbNumber": 50,
-        "offset": 414,
+        "offset": 374,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1482,7 +1482,7 @@
       {
         "fieldKey": "11010_WCS_Special",
         "dbNumber": 50,
-        "offset": 415,
+        "offset": 375,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1491,7 +1491,7 @@
       {
         "fieldKey": "11010_Equ_Auto",
         "dbNumber": 50,
-        "offset": 416,
+        "offset": 376,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1500,7 +1500,7 @@
       {
         "fieldKey": "11010_Last_pallet",
         "dbNumber": 50,
-        "offset": 417,
+        "offset": 377,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1509,16 +1509,16 @@
       {
         "fieldKey": "11010_Barcode",
         "dbNumber": 50,
-        "offset": 418,
+        "offset": 378,
         "bit": 1,
-        "dataType": 3,
-        "length": 22,
+        "dataType": 0,
+        "length": 20,
         "direction": 2
       },
       {
         "fieldKey": "11020_TaskNo",
         "dbNumber": 50,
-        "offset": 800,
+        "offset": 760,
         "bit": 1,
         "dataType": 1,
         "length": 1,
@@ -1527,7 +1527,7 @@
       {
         "fieldKey": "11020_Source",
         "dbNumber": 50,
-        "offset": 802,
+        "offset": 762,
         "bit": 1,
         "dataType": 1,
         "length": 1,
@@ -1536,7 +1536,7 @@
       {
         "fieldKey": "11020_Target",
         "dbNumber": 50,
-        "offset": 804,
+        "offset": 764,
         "bit": 1,
         "dataType": 1,
         "length": 1,
@@ -1545,7 +1545,7 @@
       {
         "fieldKey": "11020_BoxType",
         "dbNumber": 50,
-        "offset": 806,
+        "offset": 766,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1554,7 +1554,7 @@
       {
         "fieldKey": "11020_CV_State",
         "dbNumber": 50,
-        "offset": 807,
+        "offset": 767,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1563,7 +1563,7 @@
       {
         "fieldKey": "11020_CV_ERRCode",
         "dbNumber": 50,
-        "offset": 808,
+        "offset": 768,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1572,7 +1572,7 @@
       {
         "fieldKey": "11020_WCS_STB",
         "dbNumber": 50,
-        "offset": 809,
+        "offset": 769,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1581,7 +1581,7 @@
       {
         "fieldKey": "11020_WCS_ACK",
         "dbNumber": 50,
-        "offset": 810,
+        "offset": 770,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1590,7 +1590,7 @@
       {
         "fieldKey": "11020_PLC_STB",
         "dbNumber": 50,
-        "offset": 811,
+        "offset": 771,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1599,7 +1599,7 @@
       {
         "fieldKey": "11020_PLC_ACK",
         "dbNumber": 50,
-        "offset": 812,
+        "offset": 772,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1608,7 +1608,7 @@
       {
         "fieldKey": "11020_PLC_REQ",
         "dbNumber": 50,
-        "offset": 813,
+        "offset": 773,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1617,7 +1617,7 @@
       {
         "fieldKey": "11020_WCS_ERRCode",
         "dbNumber": 50,
-        "offset": 814,
+        "offset": 774,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1626,7 +1626,7 @@
       {
         "fieldKey": "11020_WCS_Special",
         "dbNumber": 50,
-        "offset": 815,
+        "offset": 775,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1635,7 +1635,7 @@
       {
         "fieldKey": "11020_Equ_Auto",
         "dbNumber": 50,
-        "offset": 816,
+        "offset": 776,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1644,7 +1644,7 @@
       {
         "fieldKey": "11020_Last_pallet",
         "dbNumber": 50,
-        "offset": 817,
+        "offset": 777,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1653,16 +1653,16 @@
       {
         "fieldKey": "11020_Barcode",
         "dbNumber": 50,
-        "offset": 818,
+        "offset": 778,
         "bit": 1,
-        "dataType": 3,
+        "dataType": 0,
         "length": 22,
         "direction": 2
       },
       {
         "fieldKey": "11026_TaskNo",
         "dbNumber": 50,
-        "offset": 1040,
+        "offset": 1000,
         "bit": 1,
         "dataType": 1,
         "length": 1,
@@ -1671,7 +1671,7 @@
       {
         "fieldKey": "11026_Source",
         "dbNumber": 50,
-        "offset": 1042,
+        "offset": 1002,
         "bit": 1,
         "dataType": 1,
         "length": 1,
@@ -1680,7 +1680,7 @@
       {
         "fieldKey": "11026_Target",
         "dbNumber": 50,
-        "offset": 1044,
+        "offset": 1004,
         "bit": 1,
         "dataType": 1,
         "length": 1,
@@ -1689,7 +1689,7 @@
       {
         "fieldKey": "11026_BoxType",
         "dbNumber": 50,
-        "offset": 1046,
+        "offset": 1006,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1698,7 +1698,7 @@
       {
         "fieldKey": "11026_CV_State",
         "dbNumber": 50,
-        "offset": 1047,
+        "offset": 1007,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1707,7 +1707,7 @@
       {
         "fieldKey": "11026_CV_ERRCode",
         "dbNumber": 50,
-        "offset": 1048,
+        "offset": 1008,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1716,7 +1716,7 @@
       {
         "fieldKey": "11026_WCS_STB",
         "dbNumber": 50,
-        "offset": 1049,
+        "offset": 1009,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1725,7 +1725,7 @@
       {
         "fieldKey": "11026_WCS_ACK",
         "dbNumber": 50,
-        "offset": 1050,
+        "offset": 1010,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1734,7 +1734,7 @@
       {
         "fieldKey": "11026_PLC_STB",
         "dbNumber": 50,
-        "offset": 1051,
+        "offset": 1011,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1743,7 +1743,7 @@
       {
         "fieldKey": "11026_PLC_ACK",
         "dbNumber": 50,
-        "offset": 1052,
+        "offset": 1012,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1752,7 +1752,7 @@
       {
         "fieldKey": "11026_PLC_REQ",
         "dbNumber": 50,
-        "offset": 1053,
+        "offset": 1013,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1761,7 +1761,7 @@
       {
         "fieldKey": "11026_WCS_ERRCode",
         "dbNumber": 50,
-        "offset": 1054,
+        "offset": 1014,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1770,7 +1770,7 @@
       {
         "fieldKey": "11026_WCS_Special",
         "dbNumber": 50,
-        "offset": 1055,
+        "offset": 1015,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1779,7 +1779,7 @@
       {
         "fieldKey": "11026_Equ_Auto",
         "dbNumber": 50,
-        "offset": 1056,
+        "offset": 1016,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1788,7 +1788,7 @@
       {
         "fieldKey": "11026_Last_pallet",
         "dbNumber": 50,
-        "offset": 1057,
+        "offset": 1017,
         "bit": 1,
         "dataType": 0,
         "length": 1,
@@ -1797,9 +1797,9 @@
       {
         "fieldKey": "11026_Barcode",
         "dbNumber": 50,
-        "offset": 1058,
+        "offset": 1018,
         "bit": 1,
-        "dataType": 3,
+        "dataType": 0,
         "length": 22,
         "direction": 2
       }
@@ -1950,7 +1950,7 @@
         "dbNumber": 50,
         "offset": 18,
         "bit": 1,
-        "dataType": 3,
+        "dataType": 0,
         "length": 20,
         "direction": 2
       },
@@ -2094,7 +2094,7 @@
         "dbNumber": 50,
         "offset": 338,
         "bit": 1,
-        "dataType": 3,
+        "dataType": 0,
         "length": 20,
         "direction": 2
       },
@@ -2238,7 +2238,7 @@
         "dbNumber": 50,
         "offset": 618,
         "bit": 1,
-        "dataType": 3,
+        "dataType": 0,
         "length": 22,
         "direction": 2
       }

--
Gitblit v1.9.3