diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs index 6788a2414..f3c894493 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs @@ -416,7 +416,7 @@ public class BalanceController : AbpController /// /// [HttpGet("get-wip-list")] - public virtual async Task> GetWIPListAsync( + public virtual async Task> GetWipListAsync( string itemCode, string locationCode) { @@ -448,6 +448,11 @@ public class BalanceController : AbpController { var expectOut = await _expectOutAppService.GetListByPackingCodeAsync(listInput.packingCode).ConfigureAwait(false); + if (expectOut==null) + { + return null; + } + if (expectOut != null && expectOut.Any()) { throw new UserFriendlyException($"箱码为 {listInput.packingCode} 已被任务{expectOut[0].JobNumber}使用"); @@ -535,6 +540,31 @@ public class BalanceController : AbpController } } + /// + /// + /// + /// + /// + /// + /// + /// + [HttpPost("get-recommend-balance-by-locations")] + public async Task> GetRecommendBalanceByLocation(string itemCode,List locationCodeList, bool isPackingCode) + { + //获取可用库存 + var input = new RecommendBalanceRequestInput + { + ItemCode = itemCode, + Qty = decimal.MaxValue, + Statuses = new EditableList { EnumInventoryStatus.OK }, + Locations = locationCodeList, + IsPackingCode = isPackingCode + }; + + var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); + return await SortByFifoAsync(usableList).ConfigureAwait(false); + } + /// /// 排序规则 1.批次正序 2.底层 3.到货日期正序 4.数量倒序(整箱优先) 5.库位正序 6.箱码正序 /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/InspectJobs/IInspectJobAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/InspectJobs/IInspectJobAppService.cs index 65fe5830a..7ed6be421 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/InspectJobs/IInspectJobAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Jobs/InspectJobs/IInspectJobAppService.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Threading.Tasks; namespace Win_in.Sfs.Wms.Store.Application.Contracts; @@ -50,4 +51,12 @@ public interface IInspectJobAppService /// Task SaveDetail_SplitPackingAsync(SplitPacking_UpdateJobDetailInput input); + /// + /// 批量设置质检状态 + /// + /// + /// + /// + /// + Task SetManyDetailStatusAsync(Guid id, List detailIdList, InspectJobDetailDTO detailDto); }