3 changed files with 70 additions and 169 deletions
@ -0,0 +1,69 @@ |
|||||
|
|
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.AspNetCore.Mvc; |
||||
|
using Win_in.Sfs.Basedata.Application.Contracts; |
||||
|
|
||||
|
|
||||
|
namespace Win_in.Sfs.Wms.Pda.Controllers.BaseDatas; |
||||
|
|
||||
|
|
||||
|
[ApiController] |
||||
|
[Route($"{PdaHostConst.ROOT_ROUTE}post-location")] |
||||
|
public class PostionLocationController : AbpController |
||||
|
{ |
||||
|
|
||||
|
private readonly IPostionLocationAppService _PositionLocationAppService; |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="PositionLocationAppService"></param>
|
||||
|
public PostionLocationController(IPostionLocationAppService PositionLocationAppService) |
||||
|
{ |
||||
|
_PositionLocationAppService = PositionLocationAppService; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="code"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet("by-code")] |
||||
|
public virtual async Task<PostionLocationDTO> GetByCode(string code) |
||||
|
{ |
||||
|
return await _PositionLocationAppService.GetByCodeAsync(code).ConfigureAwait(false); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <param name="pageSize"></param>
|
||||
|
/// <param name="pageIndex"></param>
|
||||
|
/// <param name="sorting"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet("list")] |
||||
|
public virtual async Task<PagedResultDto<PostionLocationDTO>> GetListAsync(int pageSize, int pageIndex, string sorting) |
||||
|
{ |
||||
|
var request = new SfsBaseDataRequestInputBase |
||||
|
{ |
||||
|
MaxResultCount = pageSize, |
||||
|
SkipCount = (pageIndex - 1) * pageSize, |
||||
|
Sorting = sorting |
||||
|
}; |
||||
|
|
||||
|
var list = await _PositionLocationAppService.GetPagedListByFilterAsync(request, false).ConfigureAwait(false); |
||||
|
return list; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
Loading…
Reference in new issue