package jnpf.flowable.controller;
|
|
import jnpf.base.ActionResult;
|
import jnpf.flowable.model.task.FlowModel;
|
import jnpf.flowable.model.task.TaskTo;
|
import jnpf.flowable.service.LaunchUserService;
|
import jnpf.flowable.service.TaskService;
|
import jnpf.flowable.util.OperatorUtil;
|
import jnpf.flowable.TaskApi;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
|
/**
|
* 类的描述
|
*
|
* @author JNPF@YinMai Info. Co., Ltd
|
* @version 5.0.x
|
* @since 2024/5/28 14:32
|
*/
|
@RestController
|
@RequestMapping("/task")
|
public class TaskForFileController implements TaskApi {
|
@Autowired
|
private TaskService taskService;
|
@Autowired
|
private OperatorUtil operatorUtil;
|
|
@Override
|
@PostMapping("/launchFlow")
|
public ActionResult launchFlow(@RequestBody FlowModel flowModel) {
|
try {
|
return operatorUtil.launchFlow(flowModel);
|
} catch (Exception e) {
|
e.printStackTrace();
|
return ActionResult.fail(e.getMessage());
|
}
|
}
|
|
@Override
|
@PostMapping("/getFlowTodoCount")
|
public TaskTo getFlowTodoCount(@RequestBody TaskTo taskTo) {
|
return taskService.getFlowTodoCount(taskTo);
|
}
|
|
}
|