|
|
@ -416,7 +416,7 @@ public class BalanceController : AbpController |
|
|
|
/// <param name="locationCode"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet("get-wip-list")] |
|
|
|
public virtual async Task<PagedResultDto<BalanceDTO>> GetWIPListAsync( |
|
|
|
public virtual async Task<PagedResultDto<BalanceDTO>> 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 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="itemCode"></param>
|
|
|
|
/// <param name="locationCode"></param>
|
|
|
|
/// <param name="locationCodeList"></param>
|
|
|
|
/// <param name="isPackingCode"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("get-recommend-balance-by-locations")] |
|
|
|
public async Task<List<SortBalance>> GetRecommendBalanceByLocation(string itemCode,List<string> locationCodeList, bool isPackingCode) |
|
|
|
{ |
|
|
|
//获取可用库存
|
|
|
|
var input = new RecommendBalanceRequestInput |
|
|
|
{ |
|
|
|
ItemCode = itemCode, |
|
|
|
Qty = decimal.MaxValue, |
|
|
|
Statuses = new EditableList<EnumInventoryStatus> { EnumInventoryStatus.OK }, |
|
|
|
Locations = locationCodeList, |
|
|
|
IsPackingCode = isPackingCode |
|
|
|
}; |
|
|
|
|
|
|
|
var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); |
|
|
|
return await SortByFifoAsync(usableList).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 排序规则 1.批次正序 2.底层 3.到货日期正序 4.数量倒序(整箱优先) 5.库位正序 6.箱码正序
|
|
|
|
/// </summary>
|
|
|
|