ProActiController.java 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package com.idea.oa.activiti.controller;
  2. import com.idea.oa.activiti.exception.FlowException;
  3. import com.idea.oa.activiti.service.ProActiService;
  4. import com.rockstar.common.base.BaseController;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.stereotype.Controller;
  7. import org.springframework.web.bind.annotation.PostMapping;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.web.bind.annotation.ResponseBody;
  10. import java.util.Map;
  11. /**
  12. * Created by pengyq on 2020.
  13. */
  14. @Controller
  15. @RequestMapping(value = "ProActController")
  16. public class ProActiController extends BaseController {
  17. @Autowired
  18. private ProActiService proActiService;
  19. /**
  20. * 启动流程引擎
  21. *
  22. * @param mapInfo
  23. * @return
  24. */
  25. @PostMapping(value = "startFlow", produces = {"application/json;charset=UTF-8"})
  26. @ResponseBody
  27. public Object startFlow(Map<String, Object> mapInfo) throws FlowException, com.rockstar.flow.exception.FlowException {
  28. proActiService.startAutoTask(mapInfo);
  29. return "成功";
  30. }
  31. /**
  32. *
  33. * @param defineKey apply_leave, apply_free
  34. * @param processFile processes/ApplyLeave.bpmn, processes/ApplyFree.bpmn
  35. * @return
  36. */
  37. // @PostMapping(value = "deployProcess",produces = {"application/json;charset=UTF-8"})
  38. // @ResponseBody
  39. // public AjaxResult deployProcess(String defineKey, String processFile) {
  40. // return success(activitiService.deployProcess(defineKey,processFile));
  41. // }
  42. }