From 59b24e5ebb3dd9ae399359dfe82abd8a31e36596 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期五, 10 一月 2025 14:34:22 +0800 Subject: [PATCH] 优化获取旧WMS辅料仓库存方法 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" index 3a1f80b..d4e21aa 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" @@ -119,6 +119,10 @@ var palletCode = saveModel.MainData["barcode"].ToString(); var warehouseId = saveModel.MainData["warehouseId"].ObjToInt(); Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId).Includes(x => x.Details).First(); + if (stockInfo.StockStatus != StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt()) + { + throw new Exception($"璇ユ墭鐩樿繕鏈嚭搴撳畬鎴�"); + } if (stockInfo == null) { throw new Exception($"鏈壘鍒板簱瀛樹俊鎭�"); @@ -128,7 +132,7 @@ { throw new Exception($"鏈壘鍒板簱瀛樿鎯�"); } - List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id && x.Status < OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt()); + List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id && x.Status == OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt()); return stockLockInfos; } catch (Exception ex) -- Gitblit v1.9.3