海波 张
2025-05-13 945a65e917ffd620fc51354245f0e5b31f7a03ab
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)
                        {