From d4fd2574b94a355de638c0a3ce5436aec8d9edea Mon Sep 17 00:00:00 2001
From: czw <selecti@yeah.net>
Date: 星期二, 01 七月 2025 15:45:53 +0800
Subject: [PATCH] 1

---
 HH.WCS.QingXiNongfu/core/Monitor.cs |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/HH.WCS.QingXiNongfu/core/Monitor.cs b/HH.WCS.QingXiNongfu/core/Monitor.cs
index 8399a13..641bac1 100644
--- a/HH.WCS.QingXiNongfu/core/Monitor.cs
+++ b/HH.WCS.QingXiNongfu/core/Monitor.cs
@@ -430,13 +430,17 @@
                 var orders = WCSHelper.GetWorkOrder2();
                 var thisOrder = orders.Find(x => x.SQL_WorkNo == WorkNo);
                 LogHelper.Info("绉诲簱瑙i攣 --褰撳墠宸ュ崟 sid:" + thisOrder?.S_ID);
-                if (thisOrder != null)
-                {
-                    var other = orders.Find(x => x.SQL_WorkNo != WorkNo && x.start_area == thisOrder.start_area && x.start_row == thisOrder.start_row);
-                    LogHelper.Info($"绉诲簱瑙i攣 --鍏朵粬宸ュ崟 x.start_area == {thisOrder.start_area} start_row == {thisOrder.start_row} SID:" + other?.S_ID);
-                    if (other != null)
-                        j瑙i攣璧风偣搴撳尯鎺�= false;
-                }
+                var allarea_rows = orders.FindAll(x => x.S_ID != thisOrder.S_ID && x.start_area == thisOrder.start_area && x.start_row == thisOrder.start_row);
+                LogHelper.Info("绉诲簱瑙i攣 --褰撳墠宸ュ崟 鐨勫悓搴撳尯鎺�鍏朵粬宸ュ崟:" + JsonConvert.SerializeObject(allarea_rows));
+                if (allarea_rows.Any())
+                    j瑙i攣璧风偣搴撳尯鎺�= false;
+                //if (thisOrder != null)
+                //{
+                //    var other = orders.Find(x => x.SQL_WorkNo != WorkNo && x.start_area == thisOrder.start_area && x.start_row == thisOrder.start_row);
+                //    LogHelper.Info($"绉诲簱瑙i攣 --鍏朵粬宸ュ崟 x.start_area == {thisOrder.start_area} start_row == {thisOrder.start_row} SID:" + other?.S_ID);
+                //    if (other != null)
+                //        j瑙i攣璧风偣搴撳尯鎺�= false;
+                //}
             }
             //if (sign == 1)
             //{

--
Gitblit v1.9.1