You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

67 lines
2.0 KiB

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;
/// <summary>
///
/// </summary>
[ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}inventory/expect-in")]
public class ExpectInController : AbpController
{
private readonly IExpectInAppService _expectInAppService;
/// <summary>
///
/// </summary>
/// <param name="expectInAppService"></param>
public ExpectInController(IExpectInAppService expectInAppService)
{
_expectInAppService = expectInAppService;
}
/// <summary>
/// 获取预计入库存列表
/// </summary>
/// <param name="itemCode"></param>
/// <param name="locationCode"></param>
/// <param name="pageSize"></param>
/// <param name="pageIndex"></param>
/// <param name="sortBy"></param>
/// <returns></returns>
[HttpGet("")]
public virtual async Task<PagedResultDto<ExpectInDTO>> 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<Filter>()
}
};
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);
}
}