即时库存-列表接口
This commit is contained in:
67
src/WMS.Web.Api/Controllers/InventoryController.cs
Normal file
67
src/WMS.Web.Api/Controllers/InventoryController.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
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.Inventory;
|
||||
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 InventoryController : ControllerBase
|
||||
{
|
||||
private readonly ILoginService _loginService;
|
||||
private readonly IInventoryDetailsRepositories _inventoryDetailsRepositories;
|
||||
private readonly IInventoryInOutDetailsRepositories _inventoryInOutDetailsRepositories;
|
||||
|
||||
public InventoryController(ILoginService loginService,
|
||||
IInventoryDetailsRepositories inventoryDetailsRepositories,
|
||||
IInventoryInOutDetailsRepositories inventoryInOutDetailsRepositories)
|
||||
{
|
||||
this._loginService = loginService;
|
||||
this._inventoryDetailsRepositories = inventoryDetailsRepositories;
|
||||
this._inventoryInOutDetailsRepositories = inventoryInOutDetailsRepositories;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 列表-即时库存
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("GetList")]
|
||||
public async Task<ResultPagedList<InventoryDetailsQueryResponse>> GetPagedList([FromBody] InventoryDetailsQueryRequest dto)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return ResultPagedList<InventoryDetailsQueryResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
var result = await _inventoryDetailsRepositories.GetPagedList(dto);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 列表-物料收发明细
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("GetListInOut")]
|
||||
public async Task<ResultPagedList<InventoryInOutDetailsQueryResponse>> GetPagedListInOut([FromBody] InventoryInOutDetailsQueryRequest dto)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return ResultPagedList<InventoryInOutDetailsQueryResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
var result = await _inventoryInOutDetailsRepositories.GetPagedList(dto);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,6 +94,25 @@
|
||||
<param name="dto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Api.Controllers.InventoryController">
|
||||
<summary>
|
||||
即时库存相关-接口
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.InventoryController.GetPagedList(WMS.Web.Core.Dto.Inventory.InventoryDetailsQueryRequest)">
|
||||
<summary>
|
||||
列表-即时库存
|
||||
</summary>
|
||||
<param name="dto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.InventoryController.GetPagedListInOut(WMS.Web.Core.Dto.Inventory.InventoryInOutDetailsQueryRequest)">
|
||||
<summary>
|
||||
列表-物料收发明细
|
||||
</summary>
|
||||
<param name="dto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Api.Controllers.LoginController">
|
||||
<summary>
|
||||
登录接口
|
||||
|
||||
Reference in New Issue
Block a user