|
|
@ -603,6 +603,37 @@ public class BalanceController : AbpController |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="itemCode"></param>
|
|
|
|
/// <param name="productLine"></param>
|
|
|
|
/// <param name="isPackingCode"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("get-recommend-balance-erplocation")] |
|
|
|
public async Task<List<SortBalance>> GetRecommendBalanceByErpLocation(string itemCode, bool isPackingCode,string erpLocationCode) |
|
|
|
{ |
|
|
|
var codes=await _locationAppService.GetListByErpLocationCodes(new List<string>{erpLocationCode}).ConfigureAwait(false); |
|
|
|
|
|
|
|
if(codes.Any()){ |
|
|
|
|
|
|
|
//获取可用库存
|
|
|
|
var input = new RecommendBalanceRequestInput |
|
|
|
{ |
|
|
|
ItemCode = itemCode, |
|
|
|
Qty = decimal.MaxValue, |
|
|
|
Statuses = new EditableList<EnumInventoryStatus> { EnumInventoryStatus.OK }, |
|
|
|
Locations = codes.Select(p=>p.Code).ToList(), |
|
|
|
IsPackingCode = isPackingCode |
|
|
|
}; |
|
|
|
|
|
|
|
var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); |
|
|
|
return await SortByFifoAsync(usableList).ConfigureAwait(false); |
|
|
|
} |
|
|
|
|
|
|
|
return new List<SortBalance>(); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
///
|
|
|
|
/// </summary>
|
|
|
|