From db94945ebe7e7941ea73c826270f160b792e040f Mon Sep 17 00:00:00 2001 From: 肖洋 <cathay_xy@163.com> Date: 星期二, 10 十二月 2024 14:15:34 +0800 Subject: [PATCH] 高温出库修改 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs | 3 ++- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 44 +++++++++++++++++++++++++++----------------- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs | 5 +++-- 3 files changed, 32 insertions(+), 20 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 949e6fb..6d678cd 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs @@ -241,33 +241,43 @@ { if (router != null) { - IDevice? device = null; if (task.Roadway.Contains("CW")) { device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == router.ChildPosiDeviceCode); - } - - else - { - device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1015"); - } - - if (device != null) - { - CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device; - if (conveyorLine.IsOccupied(task.TargetAddress))//鍑哄簱绔欏彴鏈鍗犵敤 + if (device != null) { - return task; + CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device; + if (conveyorLine.IsOccupied(task.NextAddress))//鍑哄簱绔欏彴鏈鍗犵敤 + { + return task; + } } - } - else - { - _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒板嚭搴撶珯鍙般�恵task.TargetAddress}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤"); + else + { + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒板嚭搴撶珯鍙般�恵task.TargetAddress}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤"); + } } } else { + IDevice? device = null; + if (task.Roadway.Contains("GW")) + { + device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1015"); + if (device != null) + { + CommonConveyorLine_GW conveyorLine = (CommonConveyorLine_GW)device; + if (conveyorLine.IsOccupied(task.TargetAddress))//鍑哄簱绔欏彴鏈鍗犵敤 + { + return task; + } + } + else + { + _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒板嚭搴撶珯鍙般�恵task.TargetAddress}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤"); + } + } _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.NextAddress}銆戜俊鎭紝鏃犳硶鏍¢獙绔欏彴"); } } diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs index 5a7f73a..84c29d2 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs @@ -1,4 +1,5 @@ 锘縰sing LogLibrary.Log; +using Masuit.Tools; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -122,7 +123,7 @@ // TaskState = (int)TaskOutStatusEnum.OutNew, //}; LogFactory.GetLog("鍒嗗娴嬭瘯瀹屾垚閫氱煡").Info(true, $"\r\r--------------------------------------"); - LogFactory.GetLog("鍒嗗娴嬭瘯瀹屾垚閫氱煡").Info(true, result); + LogFactory.GetLog("鍒嗗娴嬭瘯瀹屾垚閫氱煡").Info(true, result.ToJsonString()); return content.OK(); } catch (Exception ex) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs index ca5323d..9ec1468 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/RequsetCellInfo.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json; +锘縰sing Masuit.Tools; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -30,7 +31,7 @@ if (info != null) { LogFactory.GetLog("鍒嗗鑾峰彇搴撲綅鎵樼洏").Info(true, $"\r\r--------------------------------------"); - LogFactory.GetLog("鍒嗗鑾峰彇搴撲綅鎵樼洏").Info(true, result); + LogFactory.GetLog("鍒嗗鑾峰彇搴撲綅鎵樼洏").Info(true, result.ToJsonString()); return new { code = 1, palletBarcode = info.PalletCode }; } else -- Gitblit v1.9.3