From 20dc4a9b0c4835322fc9230b3a6480d5e6c0e312 Mon Sep 17 00:00:00 2001 From: tony <846249920@qq.com> Date: Fri, 10 Sep 2021 10:40:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B7=B2=E5=8F=91?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=80=BB=E6=9D=A1=E6=95=B0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/flowable/service/impl/FlowTaskServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 7a3ccd1..fd08d6e 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 @@ -36,6 +36,7 @@ import org.flowable.common.engine.impl.identity.Authentication; import org.flowable.engine.ProcessEngineConfiguration; import org.flowable.engine.history.HistoricActivityInstance; import org.flowable.engine.history.HistoricProcessInstance; +import org.flowable.engine.history.HistoricProcessInstanceQuery; import org.flowable.engine.repository.ProcessDefinition; import org.flowable.engine.runtime.Execution; import org.flowable.engine.runtime.ProcessInstance; @@ -412,12 +413,12 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask public AjaxResult myProcess(Integer pageNum, Integer pageSize) { Page page = new Page<>(); Long userId = SecurityUtils.getLoginUser().getUser().getUserId(); - List historicProcessInstances = historyService.createHistoricProcessInstanceQuery() + HistoricProcessInstanceQuery historicProcessInstanceQuery = historyService.createHistoricProcessInstanceQuery() .startedBy(userId.toString()) .orderByProcessInstanceStartTime() - .desc() - .listPage(pageNum - 1, pageSize); - page.setTotal(historicProcessInstances.size()); + .desc(); + List historicProcessInstances = historicProcessInstanceQuery.listPage(pageNum - 1, pageSize); + page.setTotal(historicProcessInstanceQuery.count()); List flowList = new ArrayList<>(); for (HistoricProcessInstance hisIns : historicProcessInstances) { FlowTaskDto flowTask = new FlowTaskDto();