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-out")] public class ExpectOutController : AbpController { private readonly IExpectOutAppService _expectOutAppService; /// /// /// /// public ExpectOutController(IExpectOutAppService expectOutAppService) { _expectOutAppService = expectOutAppService; } /// /// 获取预计出库存列表 /// /// /// /// /// /// /// [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 _expectOutAppService.GetPagedListByFilterAsync(input, false).ConfigureAwait(false); } }