From 69c258359052738b4c60dcabc85f09e4debf2c94 Mon Sep 17 00:00:00 2001 From: helongyang <647556386@qq.com> Date: 星期六, 12 七月 2025 10:45:32 +0800 Subject: [PATCH] 更新优化 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ErpProScrapSheetDetailService.cs | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ErpProScrapSheetDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ErpProScrapSheetDetailService.cs" index 7fb5094..7aa1a90 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ErpProScrapSheetDetailService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/ErpProScrapSheetDetailService.cs" @@ -38,7 +38,7 @@ public IBasicService _basicService; public IRecordService _recordService; - public ErpProScrapSheetDetailService(IErpProScrapSheetDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IErpProScrapSheetRepository proScrapSheetRepository, IInvokeERPService invokeERPService, IStockRepository stockRepository, IStockService stockService, IOutProStockInfoService outProStockInfoService, IRecordService recordService) : base(BaseDal) + public ErpProScrapSheetDetailService(IErpProScrapSheetDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IErpProScrapSheetRepository proScrapSheetRepository, IInvokeERPService invokeERPService, IStockRepository stockRepository, IStockService stockService, IOutProStockInfoService outProStockInfoService, IRecordService recordService, IBasicService basicService) : base(BaseDal) { _unitOfWorkManage = unitOfWorkManage; _proScrapSheetRepository = proScrapSheetRepository; @@ -47,6 +47,7 @@ _stockService = stockService; _outProStockInfoService = outProStockInfoService; _recordService = recordService; + _basicService = basicService; } //鑾峰彇瀵瑰簲鍗曞彿鐨勬姤搴熸槑缁� public List<Dt_ErpProScrapSheetDetail> GetByDetails(string scrapNo) @@ -339,10 +340,13 @@ } //} } - List<string> locationArr = outStocks.Select(x => x.LocationCode).ToList(); - - locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(locationArr)); - + List<string> locationCodes = outStocks.Select(x => x.LocationCode).ToList(); + List<Dt_LocationInfo> locationInfos1 = _basicService.LocationInfoService.Repository.GetLocationInfos(locationCodes); + if (locationInfos1 == null) + { + throw new Exception($"{locationCodes}璐т綅鏌ヨ涓虹┖锛岃妫�鏌�"); + } + locationInfos.AddRange(locationInfos1); } return (outStocks, proOutOrderDetails, outProStockInfos, locationInfos); } -- Gitblit v1.9.3