From ba170d901087045a8e051a6b4c6a47abf7585251 Mon Sep 17 00:00:00 2001 From: "DESKTOP-J8LE24C\\cqjx" <846249920@qq.com> Date: Thu, 29 Apr 2021 23:37:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=81=E7=A8=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=81=E7=A8=8B=E5=9B=BE=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FlowTaskServiceImpl.java | 8 +++---- ruoyi-ui/src/components/Process/index.vue | 3 ++- .../src/views/flowable/definition/index.vue | 21 +++++++++++++------ .../src/views/flowable/task/record/index.vue | 4 ++-- 4 files changed, 23 insertions(+), 13 deletions(-) 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 @@ - +