From 05c2e8aadb518a6323ff9fe23051fdbd56097221 Mon Sep 17 00:00:00 2001 From: huanghongfeng <huanghongfeng@hnkhzn.com> Date: 星期日, 08 十二月 2024 19:46:43 +0800 Subject: [PATCH] 文本日志查看 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 88 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 73 insertions(+), 15 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" index 9013f1b..545f443 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs" @@ -143,21 +143,46 @@ if (targetCodes[4] == "02") { - task = OutTaskMovelibrary(task); - if (task != null) + Dt_Task taskst = OutTaskMovelibrary(task); + if (taskst != null) + { + if(taskst.TaskType == (int)TaskRelocationTypeEnum.Relocation) + { + return taskst; + } + else + { + if(taskst.TargetAddress== "R02-001-021-001-02" || taskst.TargetAddress == "R02-001-022-001-02") + { + return taskst; + } + else + { + if (OutTaskStationIsOccupied(taskst) != null) + { + return taskst; + } + } + + } + + } + task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); + } + else + { + if (task.TargetAddress == "R02-001-021-001-02" || task.TargetAddress == "R02-001-022-001-02") + { + return task; + } + else { if (OutTaskStationIsOccupied(task) != null) { return task; } } - } - else - { - if (OutTaskStationIsOccupied(task) != null) - { - return task; - } + task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); } @@ -233,7 +258,7 @@ } targetCodes[4] = "01"; string SourceAddress = string.Join("-", targetCodes); //缁勮娴呭簱浣嶅湴鍧� - Dt_Task? tasks = _taskService.QueryStationIsOccupiedOutTasks(task.Roadway, SourceAddress).FirstOrDefault(); + Dt_Task? tasks = _taskService.QueryStationIsOccupiedOutTasks(task.Roadway, SourceAddress).FirstOrDefault(); //鎵炬祬搴撲綅鏄惁鏈変换鍔� if (tasks != null) { return tasks; @@ -261,7 +286,7 @@ if (Applyrelease(commonStackerCrane)) //璇诲彇鍫嗗灈鏈烘斁璐х敵璇� { Dt_Task task = _taskService.IngStackerCraneTask2(commonStackerCrane.DeviceCode); - if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound) + if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound && (task.TargetAddress != "R02-001-021-001-02" && task.TargetAddress != "R02-001-022-001-02")) { IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceProDTOs.Exists(x => x.DeviceChildCode == task.TargetAddress)); if (device != null) @@ -301,7 +326,7 @@ else { Dt_Task task = _taskService.IngStackerCraneTask2(commonStackerCrane.DeviceCode); - if (task !=null && task.TaskType == (int)TaskOutboundTypeEnum.Outbound) + if (task !=null && task.TaskType == (int)TaskOutboundTypeEnum.Outbound &&(task.TargetAddress != "R02-001-021-001-02" && task.TargetAddress != "R02-001-022-001-02")) { if (Completesignal(commonStackerCrane, task.TargetAddress)) //璇诲彇鍒版斁璐у畬鎴愪俊鍙� { @@ -602,7 +627,14 @@ { return true; } - + } + DeviceProDTO? deviceProDTO6 = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryRequest_A2in"); //绌烘墭鍑哄叆搴� + if (deviceProDTO6 != null) + { + if (GetStacker(commonStackerCrane, deviceProDTO6.DeviceProAddress).Status) + { + return true; + } } } return false; @@ -652,6 +684,15 @@ if (deviceProDTO != null) { if(SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, SCcrane).Status) { return true; } + } + } + + if (Destinationaddress == "R01-002-043-001-01") + { + DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryPermission_A2in"); + if (deviceProDTO != null) + { + if (SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, SCcrane).Status) { return true; } } } @@ -719,7 +760,17 @@ } } } - + if (Destinationaddress == "R01-002-043-001-01") + { + DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompleted_A2in"); + if (deviceProDTO != null) + { + if (GetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress).Status) + { + return true; + } + } + } return false; } @@ -768,7 +819,14 @@ if (SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, SCcrane).Status) { return true; } } } - + if (Destinationaddress == "R01-002-043-001-01") + { + DeviceProDTO? deviceProDTO = GetDeviceProDTO2(commonStackerCrane, commonStackerCrane.DeviceCode, "DeliveryCompletion_A2in"); + if (deviceProDTO != null) + { + if (SetStacker(commonStackerCrane, deviceProDTO.DeviceProAddress, SCcrane).Status) { return true; } + } + } return false; } -- Gitblit v1.9.3