From 19f73f3d2370c821355d0cc0fa5b0f7cdcb898e8 Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期一, 23 六月 2025 08:48:32 +0800 Subject: [PATCH] 增强任务处理和更新版本信息在 `TaskController.cs` 中添加了对 `WIDESEAWCS_ITaskInfoRepository` 和 `WIDESEAWCS_ITaskInfoService` 的引用,以提升任务信息处理能力。在 `CommonConveyorLineJob.cs` 中引入 `platformNotusable` 列表,确保查询平台信息时的可用性检查。在 `RequestInbound.cs` 中添加对 并优化 `outJZTask` 的查询条件。修改 `CommonStackerCraneJob.cs` 中静置出库任务的判断逻辑,确保任务执行前的适当检查。 --- CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs | 38 ++++++++++++++++++++++++++++++-------- 1 files changed, 30 insertions(+), 8 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 f4e72e0..977cbcb 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 @@ -35,6 +35,10 @@ if (isOutTray || isOutboundAndOutFinish || !isOutboundAndLineOutExecuting) { conveyorLine.SendCommand(taskCommand, childDeviceCode); + //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, taskCommand.ConveyorLineTaskNum, childDeviceCode); + //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, taskCommand.ConveyorLineTargetAddress, childDeviceCode); + //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, taskCommand.ConveyorLineBarcode, childDeviceCode); + //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); _taskService.UpdateTaskStatusToNext(taskOut); } else if (taskOut.TaskType == (int)TaskOutboundTypeEnum.OutTray && taskOut.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting) @@ -367,11 +371,18 @@ var content = CreateAndSendTask(taskDTO); if (content.Status) { - var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode); + //var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode); + var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode, command.ConveyorLineBarcode); if (task != null) { - var taskCommand = MapTaskCommand(task, command); - conveyorLine.SendCommand(taskCommand, childDeviceCode); + //var taskCommand = MapTaskCommand(task, command); + //conveyorLine.SendCommand(taskCommand, childDeviceCode); + //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); + //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); + + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)task.TaskNum, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, childDeviceCode); conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); _taskService.UpdateTaskStatusToNext(task); } @@ -392,7 +403,7 @@ var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue; - var requestTrayInTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTask)?.ConfigValue; + var requestTrayInTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTrayInTask)?.ConfigValue; if (wmsBase == null || requestTrayInTask == null) { throw new InvalidOperationException("WMS IP 鏈厤缃�"); @@ -419,8 +430,13 @@ var Hastask = _taskService.QueryBarCodeConveyorLineTask(command.ConveyorLineBarcode, childDeviceCode); if (Hastask != null) { - ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(Hastask); - conveyorLine.SendCommand(taskCommand, childDeviceCode); + //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(Hastask); + //conveyorLine.SendCommand(taskCommand, childDeviceCode); + //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); + + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)Hastask.TaskNum, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, Hastask.NextAddress, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, Hastask.PalletCode, childDeviceCode); conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); return; } @@ -431,8 +447,14 @@ var task = _taskService.QueryBarCodeConveyorLineTask(command.ConveyorLineBarcode, childDeviceCode); if (task != null) { - ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); - conveyorLine.SendCommand(taskCommand, childDeviceCode); + //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); + //conveyorLine.SendCommand(taskCommand, childDeviceCode); + //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); + //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); + + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)task.TaskNum, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, childDeviceCode); conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); _taskService.UpdateTaskStatusToNext(task); } -- Gitblit v1.9.3