From 5b34a1458e74f8902d01ebd844c2954f554c9e74 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期四, 30 四月 2026 11:05:37 +0800
Subject: [PATCH] 1
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs | 33 ++++++++++++++++++++++++++++++---
1 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
index c34af94..192b2a5 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json;
+锘縰sing Masuit.Tools.Hardware;
+using Newtonsoft.Json;
using Serilog;
using System.Diagnostics.CodeAnalysis;
using WIDESEA_Core;
@@ -253,10 +254,36 @@
/// <param name="task">浠诲姟瀹炰綋銆�</param>
/// <returns>鍚屾缁撴灉銆�</returns>
private WebResponseContent UpdateWMSTaskStatus(Dt_Task task)
- {
+ {
+ DateTime startTime = DateTime.Now;
+ // 澶勭悊鍑哄簱瀹屾垚鐘舵�佺殑鐗规畩鍚屾
+ if (task.TaskStatus == (int)TaskOutStatusEnum.SC_OutFinish)
+ {
+ string OutboundFinishKey = nameof(ConfigKey.OutboundFinishTaskAsync);
+ var requestDto = new CreateTaskDto()
+ {
+ PalletCode = task.PalletCode,
+ SourceAddress = task.SourceAddress,
+ TargetAddress = task.TargetAddress,
+ Roadway = task.Roadway,
+ TaskType = task.TaskType,
+ }.ToJson();
+
+ var resultFinish = _httpClientHelper.Post<WebResponseContent>(OutboundFinishKey, requestDto);
+ if (!resultFinish.IsSuccess || !resultFinish.Data.Status)
+ {
+ QuartzLogHelper.LogError(_logger, $"璋冪敤WMS鎺ュ彛澶辫触,鎺ュ彛:銆恵resultFinish}銆�,璇锋眰鍙傛暟:銆恵requestDto}銆�,閿欒淇℃伅:銆恵resultFinish.Data?.Message}銆�", "OutboundTaskFlowService");
+ return WebResponseContent.Instance.Error($"璋冪敤WMS鎺ュ彛鏇存柊浠诲姟鐘舵�佸け璐�,浠诲姟鍙�:銆恵task.TaskNum}銆�,閿欒淇℃伅:銆恵resultFinish.Data?.Message}銆�");
+ }
+
+ QuartzLogHelper.LogInfo(_logger, $"璋冪敤WMS鎺ュ彛鎴愬姛,鎺ュ彛:銆恵OutboundFinishKey}銆�,鍝嶅簲鏁版嵁:銆恵resultFinish.Data?.Data}銆�,鑰楁椂:{(DateTime.Now - startTime).TotalMilliseconds}ms", "OutboundTaskFlowService");
+
+ return WebResponseContent.Instance.OK();
+ }
+
string configKey = nameof(ConfigKey.UpdateTaskByStatus);
string requestParam = new UpdateTaskDto { Id = task.TaskNum, NewStatus = task.TaskStatus, NextAddress = task.NextAddress, CurrentAddress = task.CurrentAddress }.ToJson();
- DateTime startTime = DateTime.Now;
+
var result = _httpClientHelper.Post<WebResponseContent>(
configKey,
--
Gitblit v1.9.3