From 132d2f544ff571dc999a43999950f6dbc8052bb9 Mon Sep 17 00:00:00 2001 From: guoshengxiong <1923636941@qq.com> Date: Wed, 15 Jan 2025 14:27:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=85=E5=A4=B4=E5=BE=85=E5=82=AC=E5=8A=9E?= =?UTF-8?q?=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflow/service/impl/ProcessInstanceServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/wflow/workflow/service/impl/ProcessInstanceServiceImpl.java b/src/main/java/com/wflow/workflow/service/impl/ProcessInstanceServiceImpl.java index a877758..d0975a8 100644 --- a/src/main/java/com/wflow/workflow/service/impl/ProcessInstanceServiceImpl.java +++ b/src/main/java/com/wflow/workflow/service/impl/ProcessInstanceServiceImpl.java @@ -433,7 +433,6 @@ public class ProcessInstanceServiceImpl implements ProcessInstanceService { instanceQuery.processInstanceTenantId(TenantContextHolder.getTenantId()); Executor.builder() //customStatus 1待催办2已办结(只有PASS) - .ifNotBlankNext(Objects.equals(customStatus, 1) ? "PRE_%" : null, instanceQuery::processInstanceBusinessStatusLike) .ifNotBlankNext(Objects.equals(customStatus, 2) ? ProcessStatus.PASS.toString() : null, instanceQuery::processInstanceBusinessStatus) .ifNotBlankNext(startUser, instanceQuery::startedBy) .ifNotBlankNext(code, instanceQuery::processDefinitionKey) @@ -452,6 +451,9 @@ public class ProcessInstanceServiceImpl implements ProcessInstanceService { instanceQuery.variableValueLike(fieldId, "%" + fieldVal + "%"); } }); + if (Objects.equals(customStatus, 1)) { + instanceQuery.or().processInstanceBusinessStatusLike("PRE_%").unfinished().endOr(); + } List historicProcessInstances = new ArrayList<>(); if (StringUtils.isNotBlank(key)) { historicProcessInstances = instanceQuery