|
|
|
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 ClientFlowInstanceController : ApiController
|
|
|
|
{
|
|
|
|
private readonly IClientFlowInstanceService _invokeService;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 构造函数
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="invokeService"></param>
|
|
|
|
public ClientFlowInstanceController(IClientFlowInstanceService invokeService)
|
|
|
|
{
|
|
|
|
_invokeService = invokeService;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 列表
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("GetFlowInstanceList")]
|
|
|
|
public DataResult<List<FlowInstanceRes>> GetListByPage([FromBody] PageRequest request)
|
|
|
|
{
|
|
|
|
var res = _invokeService.GetListByPage(request);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 编辑
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="model"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("EditFlowInstance")]
|
|
|
|
public DataResult EditFlowInstance([FromBody] FlowInstanceReq model)
|
|
|
|
{
|
|
|
|
var res = _invokeService.EditFlowInstance(model);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 详情
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("GetFlowInstanceInfo")]
|
|
|
|
public DataResult<FlowInstanceRes> GetFlowInstanceInfo([FromQuery] string id)
|
|
|
|
{
|
|
|
|
var res = _invokeService.GetFlowInstanceInfo(id);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 启动实例
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("StartFlowInstance")]
|
|
|
|
public DataResult StartFlowInstance([FromQuery] string id)
|
|
|
|
{
|
|
|
|
var res = _invokeService.StartFlowInstance(id);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 创建流程实例
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="model"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CreateFlowInstance")]
|
|
|
|
public DataResult CreateFlowInstance([FromBody] CreateFlowInstanceReq req)
|
|
|
|
{
|
|
|
|
var res = _invokeService.CreateFlowInstance(req);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|