| | |
| | | import com.highdatas.mdm.service.IFlowsService; |
| | | import com.highdatas.mdm.service.ITUserService; |
| | | import com.sun.tools.javac.jvm.Code; |
| | | import org.activiti.engine.HistoryService; |
| | | import org.activiti.engine.RuntimeService; |
| | | import org.activiti.engine.runtime.ProcessInstance; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | |
| | | IFlowsService flowsService; |
| | | @Autowired |
| | | ITUserService userService; |
| | | @Autowired |
| | | RuntimeService runtimeService; |
| | | @RequestMapping(value = "/{pageno}", method = RequestMethod.GET) |
| | | public Result<Page<Flows>> getAll(@PathVariable int pageno, HttpServletRequest request) { |
| | | String pageSize = request.getParameter("pageSize"); |
| | |
| | | if (flows == null) { |
| | | return Result.error(CodeMsg.ERROR_PARAMS_NOT_MATHED); |
| | | } |
| | | String workflowId = flows.getWorkflowId(); |
| | | ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(workflowId).singleResult(); |
| | | if (processInstance != null) { |
| | | runtimeService.deleteProcessInstance(workflowId,"终止流程"); |
| | | } |
| | | flows.setStatus(ActivitiStatus.close); |
| | | |
| | | flowsService.aduitFinish(flows); |