调整接口
This commit is contained in:
@@ -300,19 +300,21 @@ namespace WMS.Web.Api.Controllers
|
||||
/// </summary>
|
||||
/// <param name="billNo"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("GetInfoByNo/{billNo}")]
|
||||
public async Task<Result<OutStockTaskInfoResponse>> GetInfoByNo([FromRoute] string billNo)
|
||||
[HttpPost]
|
||||
[Route("GetInfoByNo")]
|
||||
public async Task<Result<OutStockTaskInfoResponse>> GetInfoByNo([FromBody] OutStockTaskInfoRequest dto)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return Result<OutStockTaskInfoResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
var entity = await _repositories.GetByBillNo(billNo);
|
||||
var entity = await _repositories.GetByBillNo(dto.BillNo);
|
||||
if (entity == null)
|
||||
return Result<OutStockTaskInfoResponse>.ReFailure(ResultCodes.OutStockTaskNoData);
|
||||
|
||||
return await _outStockTaskService.GetInfo(entity.Id, loginInfo);
|
||||
var response = await _outStockTaskService.GetInfo(entity.Id, loginInfo);
|
||||
response.Data.Details = response.Data.Details.Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToList();
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user