From 56f8789d960e0e84f50cdf6a425b3e3a401ba884 Mon Sep 17 00:00:00 2001
From: xxyy <cathay_xy@163.com>
Date: 星期四, 27 三月 2025 09:32:20 +0800
Subject: [PATCH] 更新 .gitignore 和 Dt_TaskService.cs 文件

---
 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