123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package com.idea.oa.activiti.controller;
- import com.idea.oa.activiti.exception.FlowException;
- import com.idea.oa.activiti.service.ProActiService;
- import com.rockstar.common.base.BaseController;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.ResponseBody;
- import java.util.Map;
- /**
- * Created by pengyq on 2020.
- */
- @Controller
- @RequestMapping(value = "ProActController")
- public class ProActiController extends BaseController {
- @Autowired
- private ProActiService proActiService;
- /**
- * 启动流程引擎
- *
- * @param mapInfo
- * @return
- */
- @PostMapping(value = "startFlow", produces = {"application/json;charset=UTF-8"})
- @ResponseBody
- public Object startFlow(Map<String, Object> mapInfo) throws FlowException, com.rockstar.flow.exception.FlowException {
- proActiService.startAutoTask(mapInfo);
- return "成功";
- }
- /**
- *
- * @param defineKey apply_leave, apply_free
- * @param processFile processes/ApplyLeave.bpmn, processes/ApplyFree.bpmn
- * @return
- */
- // @PostMapping(value = "deployProcess",produces = {"application/json;charset=UTF-8"})
- // @ResponseBody
- // public AjaxResult deployProcess(String defineKey, String processFile) {
- // return success(activitiService.deployProcess(defineKey,processFile));
- // }
- }
|