From 5bedccab71622d4c0f3b9e75966802be704ee019 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期四, 12 三月 2026 14:20:23 +0800
Subject: [PATCH] 1

---
 WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs
index e804e68..b025ed5 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs
@@ -72,6 +72,15 @@
                     undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer >= 14).ToList();
                     definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer >= 14).ToList();
                 }
+                if (heightType == 1 && undefinedTypeEmptyLocations.Count == 0)
+                {
+                    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).ThenBy(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 >= 3).ToList();
+                    definedTypeEmptyLocations = definedTypeEmptyLocation.Where(x => x.Layer >= 3).ToList();
+                }
                 else if (heightType == 2)
                 {
                     undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer <= 13).ToList();

--
Gitblit v1.9.3