From f4163300190b9eca182419543540e3c1f2a8ebb6 Mon Sep 17 00:00:00 2001 From: 肖洋 <cathay_xy@163.com> Date: 星期三, 11 十二月 2024 14:39:19 +0800 Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/HuaYiZhongHeng/BaiBuLiKu --- 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 35417c1..49943b4 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 @@ -980,15 +980,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) { @@ -1035,7 +1035,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); @@ -1043,6 +1043,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(); // 鑾峰彇绗竴涓厓绱� @@ -1056,7 +1057,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