From e59d1777a111b6573b93afc58cca18c8c026ed9b Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期六, 04 一月 2025 09:57:43 +0800
Subject: [PATCH] 更新输送线目标地址和日志记录逻辑

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 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 433a120..674fe14 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,22 +742,29 @@
 
             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)
                 {
 
-                    conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, stationManager.stationLocation, stationManager.stationChildCode);
+                    ConsoleHelper.WriteWarningLine("2");
+                    ConsoleHelper.WriteWarningLine(stationManager.stationLocation);
+                    conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, stationManager.stationLocation, stationManager.stationChildCode);
 
                     ConveyorLineSendFinish(conveyorLine, stationManager.stationChildCode, ProtocalDetailValue, true);
                 }
                 else
                 {
-                    conveyorLine.SetValue(ConveyorLineDBName.ConveyorLineTargetAddress, 1000, stationManager.stationChildCode);
+                    ConsoleHelper.WriteWarningLine("1000");
+                    conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTaskNum, 5, stationManager.stationChildCode);
+                    conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, 1000, stationManager.stationChildCode);
 
                     ConveyorLineSendFinish(conveyorLine, stationManager.stationChildCode, ProtocalDetailValue, true);
                 }

--
Gitblit v1.9.3