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.

63 lines
2.0 KiB

4 months ago
using System.Collections.Generic;
4 months ago
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;
4 months ago
[ApiController]
[Route($"{PdaHostConst.ROOT_ROUTE}post-location")]
public class PostionLocationController : AbpController
{
private readonly IPostionLocationAppService _positionLocationAppService;
4 months ago
4 months ago
/// <summary>
/// </summary>
/// <param name="positionLocationAppService"></param>
public PostionLocationController(IPostionLocationAppService positionLocationAppService)
4 months ago
{
4 months ago
_positionLocationAppService = positionLocationAppService;
}
4 months ago
4 months ago
/// <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);
}
4 months ago
4 months ago
/// <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
4 months ago
{
4 months ago
MaxResultCount = pageSize, SkipCount = (pageIndex - 1) * pageSize, Sorting = sorting
};
4 months ago
4 months ago
var list = await _positionLocationAppService.GetPagedListByFilterAsync(request).ConfigureAwait(false);
return list;
4 months ago
}
4 months ago
/// <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);
}
}