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.

99 lines
2.6 KiB
C#

using DS.Module.Core;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers;
/// <summary>
/// 工作流模板-客户
/// </summary>
public class ClientFlowTemplateController : ApiController
{
private readonly IClientFlowTemplateService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public ClientFlowTemplateController(IClientFlowTemplateService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetClientFlowTemplateList")]
public DataResult<List<FlowTemplateRes>> GetListByPage([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditClientFlowTemplate")]
public DataResult EditClientFlowTemplate([FromBody] FlowTemplateReq model)
{
var res = _invokeService.EditClientFlowTemplate(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetClientFlowTemplateInfo")]
public DataResult<FlowTemplateRes> GetClientFlowTemplateInfo([FromQuery] string id)
{
var res = _invokeService.GetClientFlowTemplateInfo(id);
return res;
}
/// <summary>
/// 导入模板
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("ImportFlowTemplate")]
public DataResult ImportFlowTemplate([FromQuery] string id)
{
var res = _invokeService.ImportFlowTemplate(id);
return res;
}
/// <summary>
/// 删除模板
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("DelFlowTemplate")]
public DataResult DelFlowTemplate([FromQuery] string id)
{
var res = _invokeService.DelFlowTemplate(id);
return res;
}
/// <summary>
/// 获取模板列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetFlowTemplateList")]
public DataResult<List<FlowTemplateRes>> GetFlowTemplateList([FromBody] PageRequest request)
{
var res = _invokeService.GetFlowTemplateList(request);
return res;
}
}