From 945a65e917ffd620fc51354245f0e5b31f7a03ab Mon Sep 17 00:00:00 2001
From: 海波 张 <2956280567@qq.com>
Date: 星期二, 13 五月 2025 18:09:56 +0800
Subject: [PATCH] 中策金坛

---
 wms/LocationHelper.cs |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/wms/LocationHelper.cs b/wms/LocationHelper.cs
index f806d68..3a438b9 100644
--- a/wms/LocationHelper.cs
+++ b/wms/LocationHelper.cs
@@ -68,7 +68,7 @@
         internal static List<Location> GetAllLocList1(string S_AREA_CODE)
         {
             var db = new SqlHelper<object>().GetInstance();
-            return db.Queryable<Location>().Where(s => s.S_AREA_CODE == S_AREA_CODE).OrderBy(a=> a.N_ROW).OrderBy(a => a.N_COL).ToList();
+            return db.Queryable<Location>().Where(s => s.S_AREA_CODE == S_AREA_CODE && s.C_ENABLE == "Y").OrderBy(a=> a.N_ROW).OrderBy(a => a.N_COL).ToList();
         }
 
         /// <summary>
@@ -77,7 +77,7 @@
         internal static List<Location> GetAllLocList2(string S_AREA_CODE)
         {
             var db = new SqlHelper<object>().GetInstance();
-            return db.Queryable<Location>().Where(s => s.S_AREA_CODE == S_AREA_CODE).OrderBy(a => a.N_ROW).OrderByDescending(a => a.N_COL).ToList();
+            return db.Queryable<Location>().Where(s => s.S_AREA_CODE == S_AREA_CODE && s.C_ENABLE == "Y").OrderBy(a => a.N_ROW).OrderByDescending(a => a.N_COL).ToList();
         }
 
 
@@ -87,7 +87,7 @@
         internal static List<string> GetConnectionList(string S_AREA_CODE)
         {
             var db = new SqlHelper<object>().GetInstance();
-            var ConnectionList =  db.Queryable<Location>().Where(s => s.S_AREA_CODE == S_AREA_CODE).OrderBy(a => a.N_ROW).OrderBy(a => a.N_COL).ToList();
+            var ConnectionList =  db.Queryable<Location>().Where(s => s.S_AREA_CODE == S_AREA_CODE && s.C_ENABLE == "Y").OrderBy(a => a.N_ROW).OrderBy(a => a.N_COL).ToList();
             List<string> result = new List<string>();
             foreach (var item in ConnectionList)
             {
@@ -176,10 +176,10 @@
                         {
                             other = rowList.Where(b => b.S_LOCK_STATE == "鏃�).OrderBy(a => a.N_COL).Where(a => a.N_COL > full.N_COL).FirstOrDefault();
                         }
-                        if (other != null && (!string.IsNullOrEmpty(other.C_ENABLE) && other.C_ENABLE == "绂佺敤"))
+                        if (other != null && (!string.IsNullOrEmpty(other.C_ENABLE) && other.C_ENABLE == "N"))
                         {
                             //绂佺敤浜嗛�鎷╁悗闈竴涓揣浣�-                            other = db.Queryable<Location>().OrderBy(a => a.N_COL).Where(a => (string.IsNullOrEmpty(a.C_ENABLE) || a.C_ENABLE.Trim() != "绂佺敤") && a.S_AREA_CODE == other.S_AREA_CODE && a.S_LOCK_STATE=="鏃�&& a.N_ROW == other.N_ROW && a.N_COL > other.N_COL).First();
+                            other = db.Queryable<Location>().OrderBy(a => a.N_COL).Where(a => (string.IsNullOrEmpty(a.C_ENABLE) || a.C_ENABLE.Trim() != "N") && a.S_AREA_CODE == other.S_AREA_CODE && a.S_LOCK_STATE=="鏃�&& a.N_ROW == other.N_ROW && a.N_COL > other.N_COL).First();
                         }
                         if (other != null)
                         {
@@ -253,10 +253,10 @@
                         {
                             other = rowList.Where(b => b.S_LOCK_STATE == "鏃�).OrderBy(a => a.N_COL).Where(a => a.N_COL > full.N_COL).FirstOrDefault();
                         }
-                        if (other != null && (!string.IsNullOrEmpty(other.C_ENABLE) && other.C_ENABLE == "绂佺敤"))
+                        if (other != null && (!string.IsNullOrEmpty(other.C_ENABLE) && other.C_ENABLE == "N"))
                         {
                             //绂佺敤浜嗛�鎷╁悗闈竴涓揣浣�-                            other = db.Queryable<Location>().OrderBy(a => a.N_COL).Where(a => (string.IsNullOrEmpty(a.C_ENABLE) || a.C_ENABLE.Trim() != "绂佺敤") && a.S_AREA_CODE == other.S_AREA_CODE && a.S_LOCK_STATE == "鏃� && a.N_ROW == other.N_ROW && a.N_COL > other.N_COL).First();
+                            other = db.Queryable<Location>().OrderBy(a => a.N_COL).Where(a => (string.IsNullOrEmpty(a.C_ENABLE) || a.C_ENABLE.Trim() != "N") && a.S_AREA_CODE == other.S_AREA_CODE && a.S_LOCK_STATE == "鏃� && a.N_ROW == other.N_ROW && a.N_COL > other.N_COL).First();
                         }
                         if (other != null)
                         {
@@ -313,10 +313,10 @@
                         {
                             other = rowList.Where(b => b.S_LOCK_STATE == "鏃�).OrderBy(a => a.N_COL).Where(a => a.N_COL > full.N_COL).FirstOrDefault();
                         }
-                        if (other != null && (!string.IsNullOrEmpty(other.C_ENABLE) && other.C_ENABLE == "绂佺敤"))
+                        if (other != null && (!string.IsNullOrEmpty(other.C_ENABLE) && other.C_ENABLE == "N"))
                         {
                             //绂佺敤浜嗛�鎷╁悗闈竴涓揣浣�-                            other = db.Queryable<Location>().OrderBy(a => a.N_COL).Where(a => (string.IsNullOrEmpty(a.C_ENABLE) || a.C_ENABLE.Trim() != "绂佺敤") && a.S_AREA_CODE == other.S_AREA_CODE && a.S_LOCK_STATE == "鏃� && a.N_ROW == other.N_ROW && a.N_COL > other.N_COL).First();
+                            other = db.Queryable<Location>().OrderBy(a => a.N_COL).Where(a => (string.IsNullOrEmpty(a.C_ENABLE) || a.C_ENABLE.Trim() != "N") && a.S_AREA_CODE == other.S_AREA_CODE && a.S_LOCK_STATE == "鏃� && a.N_ROW == other.N_ROW && a.N_COL > other.N_COL).First();
                         }
                         if (other != null)
                         {

--
Gitblit v1.9.1