From 9190b1eabf080af4e0d4d76d6e4ef127a12b1074 Mon Sep 17 00:00:00 2001 From: 肖洋 <cathay_xy@163.com> Date: 星期二, 10 十二月 2024 15:44:29 +0800 Subject: [PATCH] 12312312 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 11 ++++++----- 1 files changed, 6 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 e8a35a4..9e9e3ef 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 @@ -978,15 +978,15 @@ /// <param name="areaCode">鍖哄煙缂栫爜</param> /// <param name="roadways">宸烽亾缂栫爜闆嗗悎</param> /// <returns>杩斿洖缁撴灉闆�</returns> - public async Task<WebResponseContent> RequestTrayOutTaskAsync(string position, int tag, string areaCode, List<string> roadways) + public async Task<WebResponseContent> RequestTrayOutTaskAsync(string position, int tag, string areaCode, string productionLine) { WebResponseContent content = new WebResponseContent(); try { // 鏍规嵁鎵樼洏绫诲瀷鏌ヨ搴撳瓨淇℃伅 DtStockInfo stockInfo = tag == (int)TaskOutboundTypeEnum.Outbound - ? QueryStockInfoForRealTrayAsync(areaCode, roadways).Result - : QueryStockInfoForEmptyTrayAsync(areaCode, roadways).Result; + ? QueryStockInfoForRealTrayAsync(areaCode, productionLine).Result + : QueryStockInfoForEmptyTrayAsync(areaCode).Result; if (stockInfo == null) { @@ -1033,7 +1033,7 @@ /// <summary> /// 鏌ヨ瀹炵洏搴撳瓨淇℃伅 /// </summary> - private async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, List<string> roadways) + private async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, string productionLine) { var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode); @@ -1041,6 +1041,7 @@ .Includes(x => x.LocationInfo) // 棰勫姞杞絃ocationInfo .Includes(x => x.StockInfoDetails) // 棰勫姞杞絊tockInfoDetails .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) // 杩囨护鏉′欢 .OrderBy(x => x.OutboundTime) // 鎺掑簭 .FirstAsync(); // 鑾峰彇绗竴涓厓绱� @@ -1054,7 +1055,7 @@ /// <summary> /// 鏌ヨ绌虹洏搴撳瓨淇℃伅 /// </summary> - private async Task<DtStockInfo> QueryStockInfoForEmptyTrayAsync(string areaCode, List<string> roadways) + private async Task<DtStockInfo> QueryStockInfoForEmptyTrayAsync(string areaCode) { var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode); -- Gitblit v1.9.3