|
|
@ -302,6 +302,69 @@ public class BalanceController : AbpController |
|
|
|
return balanceDTOs; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 查询库存余额 根据 物品 库位 库位类型 库存状态 批次
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="listInput"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("get-fuzzy-by-balances-request-many-parameter")] |
|
|
|
public async Task<PagedResultDto<BalanceDTO>> GetFuzzyListByLocationTypeAndInventoryStatusAsync( |
|
|
|
BalanceListByIssueInputByInventoryStatusAndLocationType listInput) |
|
|
|
{ |
|
|
|
var input = new SfsInventoryRequestInputBase |
|
|
|
{ |
|
|
|
MaxResultCount = listInput.pageSize, |
|
|
|
SkipCount = (listInput.pageIndex - 1) * listInput.pageSize, |
|
|
|
Sorting = listInput.sortBy, |
|
|
|
Condition = new Condition { Filters = new List<Filter>() } |
|
|
|
}; |
|
|
|
if (!string.IsNullOrWhiteSpace(listInput.itemCode)) |
|
|
|
{ |
|
|
|
input.Condition.Filters.Add(new Filter("ItemCode", listInput.itemCode, EnumFilterAction.Like.ToString())); |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(listInput.locationCode)) |
|
|
|
{ |
|
|
|
input.Condition.Filters.Add(new Filter("LocationCode", listInput.locationCode)); |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(listInput.lot)) |
|
|
|
{ |
|
|
|
input.Condition.Filters.Add(new Filter("Lot", listInput.lot)); |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(listInput.packingCode)) |
|
|
|
{ |
|
|
|
input.Condition.Filters.Add(new Filter("PackingCode", listInput.packingCode)); |
|
|
|
} |
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(listInput.containerCode)) |
|
|
|
{ |
|
|
|
input.Condition.Filters.Add(new Filter("ContainerCode", listInput.containerCode)); |
|
|
|
} |
|
|
|
|
|
|
|
if (listInput.locationTypes != null && listInput.locationTypes.Any()) |
|
|
|
{ |
|
|
|
var locationCodes = (await _locationAppService.GetListByTypesAsync(listInput.locationTypes).ConfigureAwait(false)) |
|
|
|
.Select(t => t.Code).ToList(); |
|
|
|
|
|
|
|
if (locationCodes.Any()) |
|
|
|
{ |
|
|
|
input.Condition.Filters.Add( |
|
|
|
new Filter("LocationCode", JsonSerializer.Serialize(locationCodes), "In")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (listInput.inventoryStatuses != null && listInput.inventoryStatuses.Any()) |
|
|
|
{ |
|
|
|
input.Condition.Filters.Add( |
|
|
|
new Filter("Status", JsonSerializer.Serialize(listInput.inventoryStatuses), "In")); |
|
|
|
} |
|
|
|
|
|
|
|
var balanceDTOs = await _balanceAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false); |
|
|
|
|
|
|
|
return balanceDTOs; |
|
|
|
} |
|
|
|
/// <summary>
|
|
|
|
/// 根据零件获取库位信息
|
|
|
|
/// </summary>
|
|
|
|