From 9e579eda4601ed7b492b9d19a24e8146f6ebdf8d Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期六, 19 四月 2025 19:50:43 +0800 Subject: [PATCH] 优化空托出入库逻辑 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" index 3e82900..095fc47 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" @@ -304,9 +304,15 @@ string CarChargingStation = AppSettings.Configuration[nameof(CarChargingStation)];//鑾峰彇绌挎杞﹀厖鐢典綅缃� var ChargingStations = CarChargingStation.Split(","); Dt_StockInfoDetail? instockInfoDetail = null; - var instockInfoDetails = _stockService.StockInfoDetailService.Repository.QueryData(x => x.MaterielCode == stockInfoDetail.MaterielCode && x.Status == StockStatusEmun.宸插叆搴�.ObjToInt()); - if (instockInfoDetails != null && instockInfoDetails.Count > 0) + var instockInfoDetails = _stockService.StockInfoDetailService.Repository.QueryData(x => x.MaterielCode == stockInfoDetail.MaterielCode && x.Status == StockStatusEmun.鍏ュ簱涓�.ObjToInt()); + if (instockInfoDetails.Count > 0) instockInfoDetail = instockInfoDetails.OrderByDescending(x => x.CreateDate).First(); + if (instockInfoDetails.Count < 1) + { + instockInfoDetails = _stockService.StockInfoDetailService.Repository.QueryData(x => x.MaterielCode == stockInfoDetail.MaterielCode && x.Status == StockStatusEmun.宸插叆搴�.ObjToInt()); + if (instockInfoDetails != null && instockInfoDetails.Count > 0) + instockInfoDetail = instockInfoDetails.OrderByDescending(x => x.CreateDate).First(); + } if (instockInfoDetail != null) instockInfo = _stockService.StockInfoService.Repository.GetStockInfo(instockInfoDetail.StockId); if (instockInfo != null)//鏃犲簱瀛� { @@ -319,6 +325,10 @@ { locationInfo = null; } + if (locationInfo == null) + { + locationInfo = _basicService.LocationInfoService.GetLocationPallet(); + } } else { -- Gitblit v1.9.3