xxyy
2025-03-27 56f8789d960e0e84f50cdf6a425b3e3a401ba884
更新 .gitignore 和 Dt_TaskService.cs 文件

更新了 `.gitignore` 文件,添加了与 `WIDESEA_WMSServer` 相关的数据库文件的忽略规则,并删除了多个二进制文件。
在 `Dt_TaskService.cs` 中新增了对 `OutBoundMateriel` 的处理逻辑,增加了物料代码过滤条件,并在库存查询中增加了对 `LocationInfo` 的空值检查,以提高查询的安全性和准确性。
已删除4个文件
已修改2个文件
12 ■■■■■ 文件已修改
.gitignore 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/CodeChunks.db-shm 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/CodeChunks.db-wal 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/SemanticSymbols.db-shm 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/SemanticSymbols.db-wal 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -1706,3 +1706,7 @@
/Code Management/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/CopilotIndices/17.13.439.2385/SemanticSymbols.db-wal
/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/CodeChunks.db
/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/SemanticSymbols.db
/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/CodeChunks.db-shm
/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/CodeChunks.db-wal
/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/SemanticSymbols.db-shm
/Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/SemanticSymbols.db-wal
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/CodeChunks.db-shm
Binary files differ
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/CodeChunks.db-wal
Binary files differ
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/SemanticSymbols.db-shm
Binary files differ
Code Management/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.13.439.2385/SemanticSymbols.db-wal
Binary files differ
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}无满足条件的库存可出库");