From 56148da6e3548a72d3d69faf5dac07251461962d Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期三, 25 六月 2025 08:56:11 +0800 Subject: [PATCH] 修复响应状态类型一致性问题在 CommonConveyorLineJob.cs、CommonConveyorLine_GWJob.cs 和 RequestInbound.cs文件中,将响应状态的值从 1 修改为Convert.ToInt16(1),以确保类型一致性。增加了日志记录和状态更新的代码,以增强任务处理的可追踪性和准确性,提升了代码的可读性 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs index a5b1e27..5987e7e 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs @@ -277,7 +277,6 @@ { var taskCommand = MapTaskCommand(task, command); conveyorLine.SendCommand(taskCommand, childDeviceCode); - //ConveyorLineSendFinish(conveyorLine, childDeviceCode, true); _taskService.UpdateTaskStatusToNext(task); } } @@ -341,7 +340,7 @@ } ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); conveyorLine.SendCommand(taskCommand, childDeviceCode); - conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); _taskService.UpdateTaskStatusToNext(task); } @@ -352,7 +351,7 @@ { WriteInfo(conveyorLine.DeviceName, content.Message); conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, stationManager.stationNGChildCode, childDeviceCode); - conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); ConsoleHelper.WriteErrorLine($"銆恵conveyorLine.DeviceName}銆戞墭鐩樺彿锛氥�恵command.ConveyorLineBarcode}銆戣姹傜偣浣嶏細銆恵childDeviceCode}銆戝紓甯镐俊鎭�恵content.Message}銆�"); WriteInfo(conveyorLine.DeviceName, $"銆恵conveyorLine.DeviceName}銆戞墭鐩樺彿锛氥�恵command.ConveyorLineBarcode}銆戣姹傜偣浣嶏細銆恵childDeviceCode}銆戝紓甯镐俊鎭�恵content.Message}銆�"); } @@ -400,7 +399,7 @@ if (command.ConveyorLineBarcode.IsNullOrEmpty()) { - conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 2, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, Convert.ToInt16(1), childDeviceCode); return; } -- Gitblit v1.9.3