出库任务列表
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using AutoMapper;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core.Dto.OutStockTask;
|
||||
using WMS.Web.Core.Internal.Results;
|
||||
using WMS.Web.Domain.Infrastructure;
|
||||
using WMS.Web.Domain.IService;
|
||||
using WMS.Web.Domain.IService.Public;
|
||||
using WMS.Web.Domain.Values;
|
||||
|
||||
namespace WMS.Web.Api.Controllers
|
||||
{
|
||||
@@ -14,5 +21,34 @@ namespace WMS.Web.Api.Controllers
|
||||
[ApiController]
|
||||
public class OutStockTaskController : ControllerBase
|
||||
{
|
||||
private readonly IMapper _mapper;
|
||||
private readonly ILoginService _loginService;
|
||||
private readonly IOutStockTaskRepositories _repositories;
|
||||
private readonly IOutStockService _outStockService;
|
||||
public OutStockTaskController(IMapper mapper, ILoginService loginService,
|
||||
IOutStockTaskRepositories repositories, IOutStockService outStockService)
|
||||
{
|
||||
_mapper = mapper;
|
||||
_loginService = loginService;
|
||||
_repositories = repositories;
|
||||
_outStockService = outStockService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("GetList")]
|
||||
public async Task<ResultPagedList<OutStockTaskQueryInfoResponse>> GetPagedList([FromBody] OutStockTaskQueryRequest dto)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return ResultPagedList<OutStockTaskQueryInfoResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
var (list, count) = await _repositories.GetListAsync(dto);
|
||||
var result = ResultPagedList<OutStockTaskQueryInfoResponse>.ReSuccess(list, count);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user