From 8a65b443d375c741d83a73ea1ecf55f7171def4c Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 09 一月 2025 14:08:23 +0800
Subject: [PATCH] 辅料

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
index 3391097..5fc6872 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs"
@@ -19,6 +19,7 @@
 using WIDESEA_Common.CommonEnum;
 using WIDESEA_Common.LocationEnum;
 using WIDESEA_Common.TaskEnum;
+using WIDESEA_Common.WareHouseEnum;
 
 namespace WIDESEA_BasicService
 {
@@ -32,11 +33,20 @@
             {
                 throw new Exception($"鏈壘鍒颁粨搴撲俊鎭�");
             }
-
-            Dt_PalletTypeInfo palletTypeInfo = _basicRepository.PalletTypeInfoRepository.QueryFirst(x => x.PalletType == palletType && x.WarehouseId == warehouse.WarehouseId);
+            Dt_PalletTypeInfo? palletTypeInfo = _basicRepository.PalletTypeInfoRepository.QueryFirst(x => x.PalletType == palletType && x.WarehouseId == warehouseId);
             if (palletTypeInfo == null)
             {
-                throw new Exception($"璇烽厤缃墭鐩樼被鍨嬩俊鎭�");
+                if (warehouse.WarehouseCode == WarehouseEnum.HA153.ToString() && warehouse.WarehouseCode == WarehouseEnum.HA71.ToString() && warehouse.WarehouseCode == WarehouseEnum.HA60.ToString())
+                {
+                    palletTypeInfo = new Dt_PalletTypeInfo()
+                    {
+                        LocaitonCount = 1,
+                        PalletType = 0,
+                        IsOdd = false,
+                    };
+                }
+                else
+                    throw new Exception($"璇烽厤缃墭鐩樼被鍨嬩俊鎭�");
             }
 
             return warehouse.WarehouseCode switch
@@ -258,11 +268,21 @@
             List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => x.RoadwayNo == location.RoadwayNo);
 
             List<Dt_PalletTypeInfo> palletTypeInfos = _basicRepository.PalletTypeInfoRepository.QueryData(x => x.WarehouseId == warehousId);
-
+            Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == warehousId);
             Dt_PalletTypeInfo? palletTypeInfo = palletTypeInfos.FirstOrDefault(x => x.PalletType == palletType && x.WarehouseId == warehousId);
             if (palletTypeInfo == null)
             {
-                throw new Exception($"璇烽厤缃墭鐩樼被鍨嬩俊鎭�");
+                if (warehouse.WarehouseCode == WarehouseEnum.HA153.ToString() || warehouse.WarehouseCode == WarehouseEnum.HA71.ToString() || warehouse.WarehouseCode == WarehouseEnum.HA60.ToString())
+                {
+                    palletTypeInfo = new Dt_PalletTypeInfo()
+                    {
+                        LocaitonCount = 1,
+                        PalletType = 0,
+                        IsOdd = false,
+                    };
+                }
+                else
+                    throw new Exception($"璇烽厤缃墭鐩樼被鍨嬩俊鎭�");
             }
             List<Dt_LocationInfo> locations = GetGroupLocations(locationInfos, location);
             if (locationInfos.Max(x => x.Depth) < 3)

--
Gitblit v1.9.3