From 6db89a97e81e6c26bb2d2ccb3db79ed8858462a2 Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期四, 17 七月 2025 20:38:16 +0800 Subject: [PATCH] 优化异常库位出库功能 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs index b5c54e0..5d5f6c9 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs @@ -103,16 +103,8 @@ ConsoleHelper.WriteColorLine(builder, ConsoleColor.Blue); commonStackerCrane.LastTaskType = task.TaskType; - if(task.TaskType == (int)TaskOutboundTypeEnum.InToOut) - { - task.TaskState = (int)TaskOutStatusEnum.SC_OutExecuting; - _taskRepository.AddData(task); - _taskService.StackCraneTaskCompleted(task.TaskNum); - } - else - { - _taskService.UpdateTaskStatusToNext(task.TaskNum); - } + + _taskService.UpdateTaskStatusToNext(task.TaskNum); } } else @@ -179,6 +171,24 @@ if (task == null) commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5); + if (commonStackerCrane.DeviceCode.Contains("CW") && task.TaskType==(int)TaskOutboundTypeEnum.InToOut) + { + var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationPLC == "1017" && x.stationType == 10 && x.Roadway == commonStackerCrane.DeviceCode); + + IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationinfo.stationPLC); + if (device != null) + { + CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device; + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, Convert.ToInt16(1815), stationinfo.stationChildCode); + Thread.Sleep(100); + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, 1000, stationinfo.stationChildCode); + } + WriteInfo(commonStackerCrane.DeviceName, $"銆愭墜鍔ㄥ嚭搴撹褰曘��"); + } + + + + if (commonStackerCrane.DeviceCode.Contains("GW") && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.TargetAddress); -- Gitblit v1.9.3