From 745aa71a76544989535ff193f3ede69200bab2db Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期二, 20 五月 2025 14:08:33 +0800
Subject: [PATCH] 未优化的稳定版本

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
index 61f9a66..56fa576 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
@@ -99,9 +99,19 @@
 
                             if (toplc > 0)//鑾峰彇鍒版湁鏁堝幓鍚�
                             {
-                                otherDevice.Communicator.Write("DB15.10", productInfo.Length);
-                                otherDevice.Communicator.Write("DB15.14", productInfo.Width);
-                                otherDevice.Communicator.Write("DB15.18", productInfo.Height);
+                                if (toplc == 1 && productInfo.Length < productInfo.Width)
+                                {
+                                    otherDevice.Communicator.Write("DB15.10", productInfo.Width);
+                                    otherDevice.Communicator.Write("DB15.14", productInfo.Length);
+                                    otherDevice.Communicator.Write("DB15.18", productInfo.Height);
+                                }
+                                else
+                                {
+                                    otherDevice.Communicator.Write("DB15.10", productInfo.Length);
+                                    otherDevice.Communicator.Write("DB15.14", productInfo.Width);
+                                    otherDevice.Communicator.Write("DB15.18", productInfo.Height);
+                                }
+
 
                                 otherDevice.Communicator.Write("DB15.6", toplc);   //鍐欏叆鍘诲悜
                                 otherDevice.Communicator.Write("DB15.0", true);

--
Gitblit v1.9.3