From ff006f77f6267fc0d2c4ee810d897a85165f5b8f Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期四, 30 四月 2026 22:08:29 +0800
Subject: [PATCH] Merge branch 'xiaoyang' into dev
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Flows/OutboundTaskFlowService.cs | 41 ++++++++++++++++++++++++++++++++++++-----
1 files changed, 36 insertions(+), 5 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..e9df2c8 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;
@@ -106,13 +107,17 @@
if (task.TaskStatus == (int)TaskOutStatusEnum.Line_OutFinish && task.TaskType == (int)TaskOutboundTypeEnum.Outbound)
{
- return WebResponseContent.Instance.OK();
+ //return WebResponseContent.Instance.OK();
+
+ //return _robotTaskService.CheckSourceLineAndCreateRobotTask(task);
+ // Todo:鑾峰彇瀵瑰悜绾夸綋鏄惁鏈夋墭鐩樺彿锛屽鏋滄湁鎵樼洏鍙风洿鎺ョ敓鎴愭満姊版墜浠诲姟
+
return GetWMSOutboundTrayTask(task);
}
if (task.TaskStatus == (int)TaskOutStatusEnum.Line_OutFinish && task.TaskType == (int)TaskOutboundTypeEnum.OutEmpty)
{
- return _robotTaskService.CreateLocalRobotTask(task);
+ return _robotTaskService.CreateLocalRobotTask(task);
//if (!content.Status)
//{
// return content;
@@ -253,10 +258,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