3 changed files with 55 additions and 64 deletions
@ -1,69 +1,62 @@ |
|||
|
|||
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.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; |
|||
|
|||
[ApiController] |
|||
[Route($"{PdaHostConst.ROOT_ROUTE}post-location")] |
|||
public class PostionLocationController : AbpController |
|||
/// <summary>
|
|||
/// </summary>
|
|||
/// <param name="positionLocationAppService"></param>
|
|||
public PostionLocationController(IPostionLocationAppService positionLocationAppService) |
|||
{ |
|||
_positionLocationAppService = positionLocationAppService; |
|||
} |
|||
|
|||
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="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) |
|||
/// <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 |
|||
{ |
|||
var request = new SfsBaseDataRequestInputBase |
|||
{ |
|||
MaxResultCount = pageSize, |
|||
SkipCount = (pageIndex - 1) * pageSize, |
|||
Sorting = sorting |
|||
}; |
|||
MaxResultCount = pageSize, SkipCount = (pageIndex - 1) * pageSize, Sorting = sorting |
|||
}; |
|||
|
|||
var list = await _PositionLocationAppService.GetPagedListByFilterAsync(request, false).ConfigureAwait(false); |
|||
return list; |
|||
} |
|||
var list = await _positionLocationAppService.GetPagedListByFilterAsync(request).ConfigureAwait(false); |
|||
return list; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// </summary>
|
|||
/// <param name="code"></param>
|
|||
/// <returns></returns>
|
|||
[HttpPost("get-list-by-location")] |
|||
public virtual async Task<List<PostionLocationDTO>> GetByLocationCodeAsync(string code) |
|||
{ |
|||
return await _positionLocationAppService.GetByLocationCodeAsync(code).ConfigureAwait(false); |
|||
} |
|||
} |
|||
|
Loading…
Reference in new issue