From 4eb18625f64eecc76d70be36a1ec5554e0ad78ea Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期六, 04 一月 2025 15:31:03 +0800 Subject: [PATCH] 1 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 45 ++++++++++++++++++++++++++++++++++++--------- 1 files changed, 36 insertions(+), 9 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs index 71718f6..4aa99c2 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs @@ -369,7 +369,7 @@ { if (command.Barcode == task.PalletCode && childDeviceCode == task.NextAddress) { - //conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, "1000", childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, "1000", childDeviceCode); ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍏ュ簱瀹屾垚,涓嬩竴鐩爣鍦板潃銆愮瓑寰呭垎閰嶈揣浣�,骞跺啓鍏�1000銆�"); @@ -572,7 +572,7 @@ // 鎵撳嵃鎴愬姛淇℃伅锛岃〃绀烘墭鐩樺凡鍒拌揪鎸囧畾杈撻�佺嚎骞跺畬鎴愬嚭搴擄紝涓嬩竴鐩爣鍦板潃宸茬‘瀹� ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine.DeviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍑哄簱瀹屾垚,涓嬩竴鐩爣鍦板潃銆恵NGAddress}銆�"); // 璁剧疆杈撻�佺嚎鐨勭洰鏍囧湴鍧�涓篘G鍦板潃 - conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, NGAddress, childDeviceCode); + conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, NGAddress, childDeviceCode); // 瀹屾垚杈撻�佺嚎鍙戦�� ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); // 鏇存柊浠诲姟鐘舵�佸埌涓嬩竴涓姸鎬� @@ -742,24 +742,51 @@ if (result1.Success) { - var serialNosError = result1.SerialNos.Where(x => x.SerialNoStatus != 1).ToList(); + ConsoleHelper.WriteWarningLine("1"); + var serialNosError = result1.SerialNos.Where(x => x.SerialNoStatus != 1 && x.SerialNoStatus != 4).ToList(); if (serialNosError.Count > 0) { + conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, 100, stationManager.stationChildCode); + ConveyorLineSendFinish(conveyorLine, stationManager.stationChildCode, ProtocalDetailValue, true); return; } - if (result1.SerialNos.Count <= 0) + if (stationManager.remark == "ZYNG") { - conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, stationManager.stationLocation, stationManager.stationChildCode); + ConsoleHelper.WriteWarningLine($"銆愭敞娑睳G鍏ュ簱銆�"); + if (result1.SerialNos.Count <= 0) + { + ConsoleHelper.WriteWarningLine("1000"); + conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTaskNum, 5, stationManager.stationChildCode); + conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, 1000, stationManager.stationChildCode); - ConveyorLineSendFinish(conveyorLine, stationManager.stationChildCode, ProtocalDetailValue, true); - + ConveyorLineSendFinish(conveyorLine, stationManager.stationChildCode, ProtocalDetailValue, true); + } + else + { + ConsoleHelper.WriteWarningLine("2"); + ConsoleHelper.WriteWarningLine(stationManager.stationLocation); + conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, stationManager.stationLocation, stationManager.stationChildCode); + } } else { - conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, 1000, stationManager.stationChildCode); + if (result1.SerialNos.Count <= 0) + { - ConveyorLineSendFinish(conveyorLine, stationManager.stationChildCode, ProtocalDetailValue, true); + ConsoleHelper.WriteWarningLine("2"); + ConsoleHelper.WriteWarningLine(stationManager.stationLocation); + conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, stationManager.stationLocation, stationManager.stationChildCode); + + } + else + { + ConsoleHelper.WriteWarningLine("1000"); + conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTaskNum, 5, stationManager.stationChildCode); + conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, 1000, stationManager.stationChildCode); + + ConveyorLineSendFinish(conveyorLine, stationManager.stationChildCode, ProtocalDetailValue, true); + } } } else -- Gitblit v1.9.3