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 ShippingBillTemplateController : ApiController
{
private readonly IShippingBillTemplateService _invokeService;
///
/// 构造函数
///
///
public ShippingBillTemplateController(IShippingBillTemplateService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetShippingBillTemplateList")]
public DataResult> GetShippingBillTemplateList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 收发通模板下拉列表
///
///
///
[HttpGet]
[Route("GetShippingBillTemplateSelectList")]
public DataResult> GetShippingBillTemplateList([FromQuery] string type)
{
var res = _invokeService.GetShippingBillTemplateSelectList(type);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditShippingBillTemplate")]
public DataResult EditShippingBillTemplate([FromBody] ShippingBillTemplateReq model)
{
var res = _invokeService.EditShippingBillTemplate(model);
return res;
}
///
/// 详情
///
///
///
[HttpGet]
[Route("GetShippingBillTemplateInfo")]
public DataResult GetShippingBillTemplateInfo([FromQuery] string id)
{
var res = _invokeService.GetShippingBillTemplateInfo(id);
return res;
}
///
/// 删除
///
///
///
[HttpGet]
[Route("DelShippingBillTemplate")]
public DataResult DelShippingBillTemplate([FromQuery] string id)
{
var res = _invokeService.DelShippingBillTemplate(id);
return res;
}
///
/// 批量删除
///
///
///
[HttpPost]
[Route("BatchDelShippingBillTemplate")]
public DataResult BatchDelShippingBillTemplate([FromBody] IdModel req)
{
var res = _invokeService.BatchDelShippingBillTemplate(req);
return res;
}
}