入库任务

This commit is contained in:
tongfei
2023-10-27 10:56:04 +08:00
parent ba067eb76a
commit fad33c0d31
8 changed files with 546 additions and 6 deletions

View File

@@ -0,0 +1,46 @@
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;
using WMS.Web.Core.Internal.Results;
using WMS.Web.Domain.Infrastructure;
using WMS.Web.Domain.IService.Public;
using WMS.Web.Domain.Values;
namespace WMS.Web.Api.Controllers
{
/// <summary>
/// 入库任务单-接口
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class InStockTaskController : ControllerBase
{
private readonly ILoginService _loginService;
private readonly IInStockTaskRepositories _inStockTaskRepositories;
public InStockTaskController(ILoginService loginService, IInStockTaskRepositories inStockTaskRepositories)
{
this._loginService = loginService;
this._inStockTaskRepositories = inStockTaskRepositories;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpPost]
[Route("GetList")]
public async Task<ResultPagedList<InStockTaskQueryResponse>> GetPagedList([FromBody] InStockTaskQueryRequest dto)
{
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
if (loginInfo == null || loginInfo.UserInfo == null)
return ResultPagedList<InStockTaskQueryResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
var result = await _inStockTaskRepositories.GetPagedList(dto);
return result;
}
}
}