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/StackerCraneJob/CommonStackerCraneJob.cs | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs index d74ab47..e1f3e5a 100644 --- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs +++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs @@ -212,7 +212,7 @@ Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); _taskService.UpdateData(newTask); } - if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && (task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001")) + if ((task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && (task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001"))||task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm) { var TASKHTY = task.Adapt<Dt_Task_Hty>(); _taskRepository.DeleteData(task); @@ -234,6 +234,12 @@ private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane) { Dt_Task task = null; + + task = _taskService.QueryOutFireAlarmTask(commonStackerCrane.DeviceCode); + if (task != null) + { + return task; + } if (commonStackerCrane.LastTaskType == null) { task = _taskService.QueryStackerCraneTask(commonStackerCrane.DeviceCode); @@ -258,7 +264,7 @@ if (task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { #region 闈欑疆鍑哄簱鍒ゆ柇鏄惁鑳芥墽琛屼换鍔� - if (task != null && task.Roadway.Contains("JZ") && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) + if (task != null && task.Roadway.Contains("JZ") && task.TaskType==(int)TaskOutboundTypeEnum.Outbound) { // 鏌ヨ鏄惁瀛樺湪闈欑疆鍏ュ簱浠诲姟 var inJZTask = _taskRepository.QueryData(x => x.Roadway == task.Roadway && @@ -452,6 +458,8 @@ stackerCraneTaskCommand.WorkType = 1; stackerCraneTaskCommand.TrayType = 0; stackerCraneTaskCommand.StartCommand = 1; + stackerCraneTaskCommand.FireCommand = Convert.ToInt16(task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm ? 2 : 0); + if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//鍒ゆ柇鏄惁鏄叆搴撲换鍔� { var value = _sys_ConfigService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStation, SysConfigKeyConst.JZNGInBoundStation).ConfigValue; @@ -546,7 +554,7 @@ } else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) { - if (task.Roadway.Contains("GW")) + if (task.Roadway.Contains("GW") || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm) { string[] endCodes = task.NextAddress.Split("-"); stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]); @@ -559,7 +567,7 @@ } else { - if ((task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001") && (task.Roadway.Contains("JZ") || task.Roadway.Contains("CH"))) + if (((task.TargetAddress == "002-071-001" || task.TargetAddress == "001-061-001") && (task.Roadway.Contains("JZ") || task.Roadway.Contains("CH"))) || task.TaskType == (int)TaskOutboundTypeEnum.OutFireAlarm) { string[] endCodes = task.NextAddress.Split("-"); stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]); -- Gitblit v1.9.3