From 0d9fb6555efa42e27de4d57d3fb7b8d82a78ef45 Mon Sep 17 00:00:00 2001 From: wanshenmean <cathay_xy@163.com> Date: 星期四, 27 三月 2025 14:10:43 +0800 Subject: [PATCH] 优化任务处理逻辑并清理代码 --- CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs index eeb52ee..1a6ce89 100644 --- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs +++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs @@ -1,6 +1,7 @@ 锘縰sing Masuit.Tools; using Masuit.Tools.Systems; using Newtonsoft.Json; +using System.Threading.Tasks; using WIDESEAWCS_Common; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core; @@ -165,7 +166,7 @@ AbNormalStationBZTask(conveyorLine, command, childDeviceCode); break; case 1: - RequestWmsTask(conveyorLine, command, childDeviceCode); + RequestWmsTask(conveyorLine, command, childDeviceCode, stationManager); break; } } @@ -411,7 +412,7 @@ /// <summary> /// 璇锋眰WMS浠诲姟 /// </summary> - private async void RequestWmsTask(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode) + private async void RequestWmsTask(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode, Dt_StationManager stationManager) { if (command.ConveyorLineBarcode.IsNullOrEmpty()) return; var content = await _taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode); @@ -430,6 +431,8 @@ else { WriteInfo(conveyorLine.DeviceName, content.Message); + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, stationManager.stationNGChildCode, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); ConsoleHelper.WriteErrorLine($"銆恵conveyorLine.DeviceName}銆戞墭鐩樺彿锛氥�恵command.ConveyorLineBarcode}銆戣姹傜偣浣嶏細銆恵childDeviceCode}銆戝紓甯镐俊鎭�恵content.Message}銆�"); } } -- Gitblit v1.9.3