using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
using Win_in.Sfs.Shared.Domain;
using Win_in.Sfs.Wms.Inventory.Application.Contracts;
namespace Win_in.Sfs.Wms.Pda.Controllers.Inventories;
///
///
///
[ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}inventory/expect-in")]
public class ExpectInController : AbpController
{
private readonly IExpectInAppService _expectInAppService;
///
///
///
///
public ExpectInController(IExpectInAppService expectInAppService)
{
_expectInAppService = expectInAppService;
}
///
/// 获取预计入库存列表
///
///
///
///
///
///
///
[HttpGet("")]
public virtual async Task> GetListAsync(
string itemCode,
string locationCode,
int pageSize,
int pageIndex,
string sortBy)
{
var input = new SfsInventoryRequestInputBase()
{
MaxResultCount = pageSize,
SkipCount = (pageIndex - 1) * pageSize,
Sorting = sortBy,
Condition = new Condition()
{
Filters = new List()
}
};
if (!string.IsNullOrWhiteSpace(itemCode))
{
input.Condition.Filters.Add(new Filter("ItemCode", itemCode));
}
if (!string.IsNullOrWhiteSpace(locationCode))
{
input.Condition.Filters.Add(new Filter("LocationCode", locationCode));
}
return await _expectInAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false);
}
}