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.Sys.Dtos;
using DS.WMS.Core.Sys.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers;
///
/// 打印模板-模块
///
public class PrintTemplateController : ApiController
{
private readonly ISysPrintTemplateService _invokeService;
///
/// 构造函数
///
///
public PrintTemplateController(ISysPrintTemplateService invokeService)
{
_invokeService = invokeService;
}
///
/// 打印模块列表
///
///
///
[HttpPost]
[Route("GetPrintModuleList")]
public DataResult> GetPrintModuleList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 打印模块编辑
///
///
///
[HttpPost]
[Route("EditSysPrintModule")]
public DataResult EditSysPrintModule([FromBody] SysPrintModuleReq req)
{
var res = _invokeService.EditSysPrintModule(req);
return res;
}
///
/// 打印模块详情
///
///
///
[HttpGet]
[Route("GetSysPrintModuleInfo")]
public DataResult GetSysPrintModuleInfo([FromQuery] string id)
{
var res = _invokeService.GetSysPrintModuleInfo(id);
return res;
}
///
/// 批量删除打印模块
///
/// 主表Ids
///
[HttpPost]
[Route("BatchDelPrintModule")]
public DataResult BatchDelPrintModule([FromBody] IdModel req)
{
var res = _invokeService.BatchDelPrintModule(req);
return res;
}
///
/// 打印模板列表
///
///
///
[HttpPost]
[Route("GetSysPrintTemplateList")]
public DataResult> GetSysPrintTemplateList([FromBody] PageRequest request)
{
var res = _invokeService.GetSysPrintTemplateList(request);
return res;
}
///
/// 打印模板编辑
///
///
///
[HttpPost]
[Route("EditSysPrintTemplate")]
public async Task EditSysPrintTemplate([FromBody] SysPrintTemplateReq req)
{
var res = await _invokeService.EditSysPrintTemplate(req);
return res;
}
///
/// 打印模板详情
///
///
///
[HttpGet]
[Route("GetSysPrintTemplateInfo")]
public DataResult GetSysPrintTemplateInfo([FromQuery] string id)
{
var res = _invokeService.GetSysPrintTemplateInfo(id);
return res;
}
///
/// 打印模板批量删除
///
/// 主表Ids
///
[HttpPost]
[Route("BatchDelPrintTemplate")]
public DataResult BatchDelPrintTemplate([FromBody] IdModel req)
{
var res = _invokeService.BatchDelPrintTemplate(req);
return res;
}
}