From d0bea62f4500970678b1e49e22afe7d7c97bdb69 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期五, 10 一月 2025 09:54:14 +0800 Subject: [PATCH] 1 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/LocationInfoService_Common.cs | 32 ++++++++++++++++++++++++++------ 1 files changed, 26 insertions(+), 6 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..ef8c85c 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 @@ -83,7 +93,7 @@ { nameof(Dt_LocationInfo.Row),OrderByType.Asc } }; - return BaseDal.QueryFirst(x => x.RoadwayNo == roadwayNo && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && !lockLocations.Contains(x.LocationCode), orderBy);//鏌ヨ绌鸿揣浣嶄俊鎭苟鎺掗櫎5鍒嗛挓鍐呭垎閰嶇殑璐т綅,鏍规嵁灞傘�佸垪銆佹繁搴︺�佽鎺掑簭 + return BaseDal.QueryFirst(x => x.RoadwayNo == roadwayNo && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus != EnableStatusEnum.Disable.ObjToInt() && !lockLocations.Contains(x.LocationCode), orderBy);//鏌ヨ绌鸿揣浣嶄俊鎭苟鎺掗櫎5鍒嗛挓鍐呭垎閰嶇殑璐т綅,鏍规嵁灞傘�佸垪銆佹繁搴︺�佽鎺掑簭 } } @@ -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