From 513da724807c2fed2d4ec772b31d054a550d391a Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期三, 28 一月 2026 14:13:55 +0800
Subject: [PATCH] 1

---
 WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_FL.cs |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_FL.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_FL.cs
index 6f3578c..4d306bc 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_FL.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_FL.cs
@@ -14,7 +14,7 @@
 
 
         private readonly static object _locker_FL = new object();
-        static List<LocationCache> locationCaches_FL= new List<LocationCache>();
+        static List<LocationCache> locationCaches_FL = new List<LocationCache>();
         /// <summary>
         /// 鏉挎潗浠撹揣浣嶅垎閰�
         /// </summary>
@@ -63,25 +63,30 @@
 
 
                 //鏈畾涔夌被鍨嬬殑绌鸿揣浣� 
-                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList();
+                List<Dt_LocationInfo> undefinedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenByDescending(x => x.Column).ThenBy(x => x.Row).ToList();
 
                 List<Dt_LocationInfo> definedTypeEmptyLocations = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == palletType.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList();
 
                 if (heightType == 1)
                 {
-                    undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer >= 14).ToList();
-                    definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer >= 14).ToList();
+                    undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer > 7).ToList();
+                    definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer > 7).ToList();
                 }
-                else if (heightType == 2)
+                if (undefinedTypeEmptyLocations == null)
                 {
-                    undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer <= 13).ToList();
-                    definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer <= 13).ToList();
+                    List<Dt_LocationInfo> undefinedTypeEmptyLocation = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == LocationTypeEnum.Undefined.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenByDescending(x => x.Column).ThenBy(x => x.Row).ToList();
+
+                    List<Dt_LocationInfo> definedTypeEmptyLocation = locationInfos.Where(x => (x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() || x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == palletType.ObjToInt() && !lockLocationCodes.Contains(x.LocationCode)).OrderByDescending(x => x.Depth).ThenBy(x => x.Layer).ThenBy(x => x.Column).ThenBy(x => x.Row).ToList();
+
+                    undefinedTypeEmptyLocations = undefinedTypeEmptyLocation.Where(x => x.Layer <= 7).ToList();
+                    definedTypeEmptyLocations = definedTypeEmptyLocation.Where(x => x.Layer <= 7).ToList();
                 }
-                else if (heightType == 3)
+                if (heightType == 2)
                 {
-                    undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer <= 4).ToList();
-                    definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer <= 4).ToList();
+                    undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer <= 7).ToList();
+                    definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer <= 7).ToList();
                 }
+
                 //else
                 //{
                 //    undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => false).ToList();
@@ -90,7 +95,7 @@
 
                 if (palletTypeInfo.LocaitonCount == 2)
                 {
-                    if (roadwayNo != "SC01_FL")
+                    if (roadwayNo != "SC01_DW")
                         definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
                     else
                         definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Column % 2 == 0).ToList();
@@ -122,7 +127,7 @@
                 {
                     if (palletTypeInfo.LocaitonCount == 2)
                     {
-                        if (roadwayNo != "SC01_FL")
+                        if (roadwayNo != "SC01_DW")
                             undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 1).ToList();
                         else
                             undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Column % 2 == 0).ToList();

--
Gitblit v1.9.3