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.
128 lines
3.5 KiB
C#
128 lines
3.5 KiB
C#
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;
|
|
|
|
/// <summary>
|
|
/// 打印模板-模块
|
|
/// </summary>
|
|
public class PrintTemplateController : ApiController
|
|
{
|
|
private readonly ISysPrintTemplateService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public PrintTemplateController(ISysPrintTemplateService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 打印模块列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetPrintModuleList")]
|
|
public DataResult<List<SysPrintModuleRes>> GetPrintTemplateList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 打印模块编辑
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditSysPrintModule")]
|
|
public DataResult EditSysPrintModule([FromBody] SysPrintModuleReq req)
|
|
{
|
|
var res = _invokeService.EditSysPrintModule(req);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 打印模块详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetSysPrintModuleInfo")]
|
|
public DataResult<SysPrintModuleRes> GetSysPrintModuleInfo([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.GetSysPrintModuleInfo(id);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 批量删除打印模块
|
|
/// </summary>
|
|
/// <param name="req">主表Ids</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("BatchDelPrintModule")]
|
|
public DataResult BatchDelPrintModule([FromBody] IdModel req)
|
|
{
|
|
var res = _invokeService.BatchDelPrintModule(req);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 打印模板列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetSysPrintTemplateList")]
|
|
public DataResult<List<SysPrintTemplateRes>> GetSysPrintTemplateList([FromBody] PageRequest request)
|
|
{
|
|
var res = _invokeService.GetSysPrintTemplateList(request);
|
|
return res;
|
|
}
|
|
/// <summary>
|
|
/// 打印模板编辑
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditSysPrintTemplate")]
|
|
public async Task<DataResult> EditSysPrintTemplate([FromBody] SysPrintTemplateReq req)
|
|
{
|
|
var res = await _invokeService.EditSysPrintTemplate(req);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 打印模板详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetSysPrintTemplateInfo")]
|
|
public DataResult<SysPrintTemplateRes> GetSysPrintTemplateInfo([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.GetSysPrintTemplateInfo(id);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 打印模板批量删除
|
|
/// </summary>
|
|
/// <param name="req">主表Ids</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("BatchDelPrintTemplate")]
|
|
public DataResult BatchDelPrintTemplate([FromBody] IdModel req)
|
|
{
|
|
var res = _invokeService.BatchDelPrintTemplate(req);
|
|
return res;
|
|
}
|
|
} |