From e5cec7201ded7f390cb970437660167ea5297030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 4 Jun 2024 22:55:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E9=A9=B3=E5=9B=9E?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BB=BB=E5=8A=A1=E5=8F=AF=E8=83=BD=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88=E5=BC=82=E5=B8=B8=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/dromara/workflow/service/impl/ActTaskServiceImpl.java | 4 +++- .../dromara/workflow/service/impl/TestLeaveServiceImpl.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/ActTaskServiceImpl.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/ActTaskServiceImpl.java index ad71836b..95a1c169 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/ActTaskServiceImpl.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/ActTaskServiceImpl.java @@ -692,7 +692,9 @@ public class ActTaskServiceImpl implements IActTaskService { MultiInstanceVo multiInstance = WorkflowUtils.isMultiInstance(task.getProcessDefinitionId(), task.getTaskDefinitionKey()); if (multiInstance == null && taskList.size() > 1) { List tasks = StreamUtils.filter(taskList, e -> !e.getTaskDefinitionKey().equals(task.getTaskDefinitionKey())); - actHiTaskinstMapper.deleteBatchIds(StreamUtils.toList(tasks, Task::getId)); + if (CollUtil.isNotEmpty(tasks)) { + actHiTaskinstMapper.deleteBatchIds(StreamUtils.toList(tasks, Task::getId)); + } } diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java index 1744c152..230e83f7 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/TestLeaveServiceImpl.java @@ -122,7 +122,9 @@ public class TestLeaveServiceImpl implements ITestLeaveService { public void processHandler(ProcessEvent processEvent) { log.info("当前任务执行了{}", processEvent.toString()); TestLeave testLeave = baseMapper.selectById(Long.valueOf(processEvent.getBusinessKey())); - testLeave.setStatus(processEvent.getStatus()); + if (processEvent.isSubmit()) { + testLeave.setStatus(BusinessStatusEnum.WAITING.getStatus()); + } baseMapper.updateById(testLeave); }