You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
2.9 KiB
C#
111 lines
2.9 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.BaseInfo.Dtos;
|
|
using DS.WMS.Core.BaseInfo.Interface;
|
|
using DS.WMS.Core.System.Interface;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.WebApi.Controllers;
|
|
/// <summary>
|
|
/// 仓库库位
|
|
/// </summary>
|
|
public class StoreAreaController : ApiController
|
|
{
|
|
private readonly IStoreAreaService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public StoreAreaController(IStoreAreaService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 仓库列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetStoreHouseList")]
|
|
public DataResult<List<StoreHouseViewModel>> GetStoreHouseList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 获取仓库信息
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetStoreHouseInfo")]
|
|
public DataResult<StoreHouseViewModel> GetStoreHouseInfo([FromQuery]int id)
|
|
{
|
|
var res = _invokeService.GetStoreHouseInfo(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 编辑仓库
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditStoreHouseInfo")]
|
|
public DataResult EditStoreHouseInfo([FromBody] StoreHouseInput model)
|
|
{
|
|
var res = _invokeService.EditStoreHouseInfo(model);
|
|
return res;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 库位列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetStoreAreaList")]
|
|
public DataResult<List<StoreAreaViewModel>> GetStoreAreaList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetStoreAreaList(request);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 获取库位信息
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetStoreAreaInfo")]
|
|
public DataResult<StoreAreaViewModel> GetStoreAreaInfo([FromQuery]int id)
|
|
{
|
|
var res = _invokeService.GetStoreAreaInfo(id);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 编辑库位
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditStoreAreaInfo")]
|
|
public DataResult EditStoreAreaInfo([FromBody] StoreAreaInput model)
|
|
{
|
|
var res = _invokeService.EditStoreAreaInfo(model);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除库位
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("DelStoreAreaInfo")]
|
|
public DataResult DelStoreAreaInfo([FromQuery]int id)
|
|
{
|
|
var res = _invokeService.DelStoreAreaInfo(id);
|
|
return res;
|
|
}
|
|
} |