From b8cd98f0a2d8a7e644563eb67d4c88371279a729 Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <1247017146@qq.com> Date: 星期三, 09 四月 2025 10:17:23 +0800 Subject: [PATCH] 1 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs index 5182457..e990f18 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs @@ -1026,6 +1026,13 @@ .Where(x => x.DeviceCode.Contains("CWSC")) // 杩囨护鏉′欢 .ToList().Select(x => x.DeviceCode).ToList(); + var outBoundMateriel = AppSettings.app<OutBoundMateriel>("OutBoundMateriel"); + List<string>? materielCodes = outBoundMateriel.Count != 0 + ? outBoundMateriel.Where(x => x.ProductionLine == station.productLine && x.ProcessCode == "CWSC3") + .Select(x => x.MaterielCode) + .ToList() + : null; + // 浠庣紦瀛樹腑鑾峰彇搴撳瓨淇℃伅 IDictionary<string, DtStockInfo>? stockInfos = _simpleCacheService.HashGetAll<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo); List<DtStockInfo> stockInfoList = stockInfos.Values.ToList(); @@ -1042,6 +1049,7 @@ .Where(x => x.LocationInfo != null && x.LocationInfo.LocationStatus == (int)LocationEnum.InStock) // 澧炲姞瀵� LocationInfo 鐨勭┖鍊兼鏌� .WhereIF(!deviceCode.IsNullOrEmpty(), x => x.LocationInfo != null && deviceCode.Contains(x.LocationInfo.RoadwayNo)) + .WhereIF(!materielCodes.IsNullOrEmpty(), x => x.StockInfoDetails != null && x.StockInfoDetails.Any(y => materielCodes.Contains(y.MaterielCode))) .FirstOrDefault(); if (stockInfo == null) throw new Exception($"搴撳唴{station.productLine}鏃犳弧瓒虫潯浠剁殑搴撳瓨鍙嚭搴�"); -- Gitblit v1.9.3