入库任务
This commit is contained in:
46
src/WMS.Web.Api/Controllers/InStockTaskController.cs
Normal file
46
src/WMS.Web.Api/Controllers/InStockTaskController.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user