using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.OpApi.Controllers;
///
/// 集装箱信息服务
///
public class OpCtnController : ApiController
{
private readonly IOpCtnService _invokeService;
///
/// 构造函数
///
///
public OpCtnController(IOpCtnService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetOpCtnList")]
public DataResult> GetOpCtnList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditOpCtn")]
public DataResult EditOpCtn([FromBody] OpCtnReq model)
{
var res = _invokeService.EditOpCtn(model);
return res;
}
///
/// 详情
///
///
///
[HttpGet]
[Route("GetOpCtnInfo")]
public DataResult GetOpCtnInfo([FromQuery] string id)
{
var res = _invokeService.GetOpCtnInfo(id);
return res;
}
///
/// 删除
///
///
///
[HttpGet]
[Route("DelOpCtn")]
public DataResult DelOpCtn([FromQuery] string id)
{
var res = _invokeService.DelOpCtn(id);
return res;
}
///
/// 批量删除
///
///
///
[HttpPost]
[Route("BatchDelOpCtn")]
public DataResult BatchDelOpCtn([FromBody] IdModel req)
{
var res = _invokeService.BatchDelOpCtn(req);
return res;
}
}