From e2655143a06ee42eec06a97b045f33a09fbb3a3f Mon Sep 17 00:00:00 2001 From: 肖洋 <cathay_xy@163.com> Date: 星期二, 24 十二月 2024 17:40:18 +0800 Subject: [PATCH] 合并更改 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs index 48cd4a9..b19f3b0 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs @@ -1,5 +1,6 @@ 锘縰sing Mapster; using Masuit.Tools; +using SixLabors.Fonts.Tables.AdvancedTypographic; using System.Text.RegularExpressions; using System.Threading.Tasks; using WIDESEA_Core.Const; @@ -1028,7 +1029,7 @@ { // 鏍规嵁鎵樼洏绫诲瀷鏌ヨ搴撳瓨淇℃伅 DtStockInfo stockInfo = tag == (int)TaskOutboundTypeEnum.Outbound - ? areaCodes == null ? await QueryStockInfoForRealTrayAsync(areaCode, productionLine) : await QueryStockInfoForRealTrayCWAsync(areaCodes, productionLine) + ? areaCode != "CWSC1" ? await QueryStockInfoForRealTrayAsync(areaCode, areaCodes, productionLine) : await QueryStockInfoForRealTrayCWAsync(areaCodes, productionLine) : await QueryStockInfoForEmptyTrayAsync(areaCode); if (stockInfo == null) @@ -1076,7 +1077,7 @@ /// <summary> /// 鏌ヨ瀹炵洏搴撳瓨淇℃伅 /// </summary> - private async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, string productionLine) + private async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, List<string> devices, string productionLine) { var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode); @@ -1086,6 +1087,7 @@ .Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull == true) // 杩囨护鏉′欢 .WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine) .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID) // 杩囨护鏉′欢 + .WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo)) .OrderBy(x => x.OutboundTime) // 鎺掑簭 .FirstAsync(); // 鑾峰彇绗竴涓厓绱� @@ -1096,7 +1098,7 @@ } /// <summary> - /// 鏌ヨ瀹炵洏搴撳瓨淇℃伅 + /// 鏌ヨ甯告俯瀹炵洏搴撳瓨淇℃伅 /// </summary> private async Task<DtStockInfo> QueryStockInfoForRealTrayCWAsync(List<string> areaCodes, string productionLine) { @@ -1145,7 +1147,7 @@ { return new Dt_Task { - Grade = 1, + Grade = tag == 104 ? 2 : 1, Roadway = stockInfo.LocationInfo.RoadwayNo, TargetAddress = position, Dispatchertime = DateTime.Now, @@ -1172,7 +1174,7 @@ return new WMSTaskDTO { TaskNum = task.TaskNum.Value, - Grade = 1, + Grade = task.Grade.Value, PalletCode = task.PalletCode, RoadWay = task.Roadway, SourceAddress = task.SourceAddress, -- Gitblit v1.9.3