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