From f1cad31b8247a57699c34067cfc0cd31cf0a91c8 Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期五, 18 七月 2025 16:06:53 +0800 Subject: [PATCH] 更新任务逻辑、版本号及发布历史记录 --- CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs index 8270a07..adcf4e2 100644 --- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs +++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs @@ -113,16 +113,9 @@ //builder.AppendLine(); //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 @@ -192,6 +185,22 @@ 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 == "1006" && 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(3292), stationinfo.stationChildCode); + Thread.Sleep(100); + conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, 1000, stationinfo.stationChildCode); + } + WriteInfo(commonStackerCrane.DeviceName, $"銆愭墜鍔ㄥ嚭搴撹褰曘�戜换鍔″彿銆恵e.TaskNum}銆戞墭鐩樺彿銆恵task.PalletCode}銆�"); + } + + if (commonStackerCrane.DeviceCode.Contains("GW") && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.TargetAddress); -- Gitblit v1.9.3