diff --git a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java index b0ab1c2..3af8712 100644 --- a/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java +++ b/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java @@ -491,8 +491,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask */ @Override public AjaxResult stopProcess(FlowTaskVo flowTaskVo) { - Task task = taskService.createTaskQuery().processInstanceId(flowTaskVo.getInstanceId()).singleResult(); - if (task == null) { + List task = taskService.createTaskQuery().processInstanceId(flowTaskVo.getInstanceId()).list(); + if (CollectionUtils.isEmpty(task)) { throw new CustomException("流程未启动或已执行完成,取消申请失败"); } @@ -505,8 +505,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask List endNodes = process.findFlowElementsOfType(EndEvent.class, false); if (CollectionUtils.isNotEmpty(endNodes)) { Authentication.setAuthenticatedUserId(loginUser.getUserId().toString()); - taskService.addComment(task.getId(), processInstance.getProcessInstanceId(), FlowComment.STOP.getType(), - StringUtils.isBlank(flowTaskVo.getComment()) ? "取消申请" : flowTaskVo.getComment()); +// taskService.addComment(task.getId(), processInstance.getProcessInstanceId(), FlowComment.STOP.getType(), +// StringUtils.isBlank(flowTaskVo.getComment()) ? "取消申请" : flowTaskVo.getComment()); String endId = endNodes.get(0).getId(); List executions = runtimeService.createExecutionQuery().parentId(processInstance.getProcessInstanceId()).list(); diff --git a/ruoyi-ui/src/components/Process/index.vue b/ruoyi-ui/src/components/Process/index.vue index 918cb4b..fca6963 100644 --- a/ruoyi-ui/src/components/Process/index.vue +++ b/ruoyi-ui/src/components/Process/index.vue @@ -159,7 +159,8 @@ export default { await this.modeler.importXML(data) this.adjustPalette() this.fitViewport() - if (this.taskList) { + if (this.taskList !==undefined && this.taskList.length > 0 ) { + debugger this.fillColor() } } catch (err) { diff --git a/ruoyi-ui/src/views/flowable/definition/index.vue b/ruoyi-ui/src/views/flowable/definition/index.vue index 1b3747f..97d8ca0 100644 --- a/ruoyi-ui/src/views/flowable/definition/index.vue +++ b/ruoyi-ui/src/views/flowable/definition/index.vue @@ -72,7 +72,7 @@ - +