入库接口调整
This commit is contained in:
@@ -5,8 +5,10 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core.Dto;
|
||||
using WMS.Web.Core.Dto.InStockTask;
|
||||
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;
|
||||
|
||||
@@ -20,10 +22,12 @@ namespace WMS.Web.Api.Controllers
|
||||
public class InStockTaskController : ControllerBase
|
||||
{
|
||||
private readonly ILoginService _loginService;
|
||||
private readonly IInStockService _inStockService;
|
||||
private readonly IInStockTaskRepositories _inStockTaskRepositories;
|
||||
public InStockTaskController(ILoginService loginService, IInStockTaskRepositories inStockTaskRepositories)
|
||||
public InStockTaskController(ILoginService loginService, IInStockTaskRepositories inStockTaskRepositories, IInStockService inStockService)
|
||||
{
|
||||
this._loginService = loginService;
|
||||
this._inStockService = inStockService;
|
||||
this._inStockTaskRepositories = inStockTaskRepositories;
|
||||
}
|
||||
|
||||
@@ -42,5 +46,21 @@ namespace WMS.Web.Api.Controllers
|
||||
var result = await _inStockTaskRepositories.GetPagedList(dto);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 收货
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("Receive")]
|
||||
public async Task<Result> Receive([FromBody] UpdateInStockTaskRequest dto)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return Result.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
return await _inStockService.Receive(dto, loginInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user