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;
///
/// 仓库库位
///
public class StoreAreaController : ApiController
{
private readonly IStoreAreaService _invokeService;
///
/// 构造函数
///
///
public StoreAreaController(IStoreAreaService invokeService)
{
_invokeService = invokeService;
}
///
/// 仓库列表
///
///
///
[HttpPost]
[Route("GetStoreHouseList")]
public DataResult> GetStoreHouseList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 获取仓库信息
///
///
///
[HttpGet]
[Route("GetStoreHouseInfo")]
public DataResult GetStoreHouseInfo([FromQuery]int id)
{
var res = _invokeService.GetStoreHouseInfo(id);
return res;
}
///
/// 编辑仓库
///
///
///
[HttpPost]
[Route("EditStoreHouseInfo")]
public DataResult EditStoreHouseInfo([FromBody] StoreHouseInput model)
{
var res = _invokeService.EditStoreHouseInfo(model);
return res;
}
///
/// 库位列表
///
///
///
[HttpPost]
[Route("GetStoreAreaList")]
public DataResult> GetStoreAreaList([FromBody] PageRequest request)
{
var res = _invokeService.GetStoreAreaList(request);
return res;
}
///
/// 获取库位信息
///
///
///
[HttpGet]
[Route("GetStoreAreaInfo")]
public DataResult GetStoreAreaInfo([FromQuery]int id)
{
var res = _invokeService.GetStoreAreaInfo(id);
return res;
}
///
/// 编辑库位
///
///
///
[HttpPost]
[Route("EditStoreAreaInfo")]
public DataResult EditStoreAreaInfo([FromBody] StoreAreaInput model)
{
var res = _invokeService.EditStoreAreaInfo(model);
return res;
}
///
/// 删除库位
///
///
///
[HttpGet]
[Route("DelStoreAreaInfo")]
public DataResult DelStoreAreaInfo([FromQuery]int id)
{
var res = _invokeService.DelStoreAreaInfo(id);
return res;
}
}