ProActiController.java 1.7 KB

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