From a474060ae47fc4c807120b2a6178e8d8f84c0863 Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期二, 27 一月 2026 15:07:25 +0800
Subject: [PATCH] 1

---
 WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs |    8 ++++++--
 1 files changed, 6 insertions(+), 2 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 9cf5930..b025ed5 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/AssignLocation/LocationInfoService_BC.cs
@@ -74,8 +74,12 @@
                 }
                 if (heightType == 1 && undefinedTypeEmptyLocations.Count == 0)
                 {
-                    undefinedTypeEmptyLocations = undefinedTypeEmptyLocations.Where(x => x.Layer >= 3).ToList();
-                    definedTypeEmptyLocations = definedTypeEmptyLocations.Where(x => x.Layer >= 3).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).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)
                 {

--
Gitblit v1.9.3