|
|
@ -609,22 +609,23 @@ public class BalanceController : AbpController |
|
|
|
/// <param name="itemCode"></param>
|
|
|
|
/// <param name="productLine"></param>
|
|
|
|
/// <param name="isPackingCode"></param>
|
|
|
|
/// <param name="erpLocationCode"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("get-recommend-balance-erplocation")] |
|
|
|
public async Task<List<SortBalance>> GetRecommendBalanceByErpLocation(string itemCode, bool isPackingCode,string erpLocationCode) |
|
|
|
public async Task<List<SortBalance>> GetRecommendBalanceByErpLocation(SearchErpAndLocation erpLocationCode) |
|
|
|
{ |
|
|
|
var codes=await _locationAppService.GetListByErpLocationCodes(new List<string>{erpLocationCode}).ConfigureAwait(false); |
|
|
|
var codes=await _locationAppService.GetListByErpLocationCodes(new List<string>{ erpLocationCode.erpLocationCode}).ConfigureAwait(false); |
|
|
|
|
|
|
|
if(codes.Any()){ |
|
|
|
|
|
|
|
//获取可用库存
|
|
|
|
var input = new RecommendBalanceRequestInput |
|
|
|
{ |
|
|
|
ItemCode = itemCode, |
|
|
|
ItemCode = erpLocationCode.itemCode, |
|
|
|
Qty = decimal.MaxValue, |
|
|
|
Statuses = new EditableList<EnumInventoryStatus> { EnumInventoryStatus.OK }, |
|
|
|
Locations = codes.Select(p=>p.Code).ToList(), |
|
|
|
IsPackingCode = isPackingCode |
|
|
|
IsPackingCode = erpLocationCode.isPackingCode |
|
|
|
}; |
|
|
|
|
|
|
|
var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); |
|
|
@ -704,40 +705,11 @@ public class BalanceController : AbpController |
|
|
|
public int LocationRow { get; set; } |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
/// <summary>
|
|
|
|
/// 查询库余额
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="listInput"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("get-list-balance-by-input")] |
|
|
|
public async Task<PagedResultDto<BalanceDTO>> GetListBalanceByInputAsync(List<EnumLocationType> enumLocationTypes) |
|
|
|
public class SearchErpAndLocation |
|
|
|
{ |
|
|
|
var sfsInventoryRequestInputBase= new BalanceRequestInput |
|
|
|
{ |
|
|
|
MaxResultCount =list.pageSize, |
|
|
|
SkipCount = (listInput.pageIndex - 1) * listInput.pageSize, |
|
|
|
Sorting = listInput.sortBy, |
|
|
|
Condition = new Condition() |
|
|
|
{ |
|
|
|
Filters = new List<Filter>() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var balanceDTOs = await _balanceAppService.GetListAsync(); |
|
|
|
|
|
|
|
return balanceDTOs; |
|
|
|
public string itemCode { get; set; } |
|
|
|
public bool isPackingCode { get; set; } |
|
|
|
public string erpLocationCode { get; set; } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 获取可以上架的库存状态
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <exception cref="NotImplementedException"></exception>
|
|
|
|
[HttpGet("allow-putaway-inventory-status")] |
|
|
|
public virtual async Task<List<EnumInventoryStatus>> GetAllowPutawayInventoryStatusAsync() |
|
|
|
{ |
|
|
|
return await _balanceAppService .GetAllowPutawayInventoryStatusAsync(); |
|
|
|
} |
|
|
|
*/ |
|
|
|
} |
|
|
|