From ba9c1994b95624b88ef606ec00394990d8f2009f Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 15 四月 2026 19:41:27 +0800
Subject: [PATCH] refactor(TaskService): 重构任务服务代码结构,拆分文件并优化逻辑
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs
index 7cd6bcc..69c8796 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/InboundTaskFlowService.cs
@@ -38,17 +38,20 @@
/// </summary>
/// <param name="task">浠诲姟瀹炰綋銆�</param>
/// <param name="source">WMS浠诲姟鍘熷鏁版嵁銆�</param>
- public void InitializeOnReceive([NotNull] Dt_Task task, [NotNull] WMSTaskDTO source)
+ public WebResponseContent InitializeOnReceive([NotNull] Dt_Task task, [NotNull] WMSTaskDTO source)
{
+ WebResponseContent content = new WebResponseContent();
Dt_Router routers = _routerService.QueryNextRoute(source.SourceAddress);
if (routers.IsNullOrEmpty())
{
- return;
+ return content.Error("鏈壘鍒拌矾鐢变俊鎭�");
}
task.TaskStatus = (int)TaskInStatusEnum.InNew;
task.CurrentAddress = source.SourceAddress;
task.NextAddress = routers.ChildPosi;
+
+ return content.OK();
}
/// <summary>
@@ -137,7 +140,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}銆�");
--
Gitblit v1.9.3