From 9cdbdc51b34c0c0942df0330d8f4e8c59719d54a Mon Sep 17 00:00:00 2001 From: tony <846249920@qq.com> Date: Wed, 28 Dec 2022 17:57:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BC=80=E5=A7=8B=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 2 +- .../service/impl/FlowTaskServiceImpl.java | 35 ++++++++++--------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/LICENSE b/LICENSE index 261eeb9e..e245dc35 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright (c) 2022 tony Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 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 6a1b3b01..65cf21d8 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 @@ -794,27 +794,28 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask List list = historyService .createHistoricActivityInstanceQuery() .processInstanceId(procInsId) - .orderByHistoricActivityInstanceEndTime() + .orderByHistoricActivityInstanceStartTime() .desc().list(); List hisFlowList = new ArrayList<>(); for (HistoricActivityInstance histIns : list) { // 展示开始节点 - if ("startEvent".equals(histIns.getActivityType())) { - FlowTaskDto flowTask = new FlowTaskDto(); - // 流程发起人信息 - HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery() - .processInstanceId(histIns.getProcessInstanceId()) - .singleResult(); - SysUser startUser = sysUserService.selectUserById(Long.parseLong(historicProcessInstance.getStartUserId())); - flowTask.setTaskName(startUser.getNickName() + "(" + startUser.getDept().getDeptName() + ")发起申请"); - flowTask.setFinishTime(histIns.getEndTime()); - hisFlowList.add(flowTask); - } else if ("endEvent".equals(histIns.getActivityType())) { - FlowTaskDto flowTask = new FlowTaskDto(); - flowTask.setTaskName(StringUtils.isNotBlank(histIns.getActivityName()) ? histIns.getActivityName() : "结束"); - flowTask.setFinishTime(histIns.getEndTime()); - hisFlowList.add(flowTask); - } else if (StringUtils.isNotBlank(histIns.getTaskId())) { +// if ("startEvent".equals(histIns.getActivityType())) { +// FlowTaskDto flowTask = new FlowTaskDto(); +// // 流程发起人信息 +// HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery() +// .processInstanceId(histIns.getProcessInstanceId()) +// .singleResult(); +// SysUser startUser = sysUserService.selectUserById(Long.parseLong(historicProcessInstance.getStartUserId())); +// flowTask.setTaskName(startUser.getNickName() + "(" + startUser.getDept().getDeptName() + ")发起申请"); +// flowTask.setFinishTime(histIns.getEndTime()); +// hisFlowList.add(flowTask); +// } else if ("endEvent".equals(histIns.getActivityType())) { +// FlowTaskDto flowTask = new FlowTaskDto(); +// flowTask.setTaskName(StringUtils.isNotBlank(histIns.getActivityName()) ? histIns.getActivityName() : "结束"); +// flowTask.setFinishTime(histIns.getEndTime()); +// hisFlowList.add(flowTask); +// } else + if (StringUtils.isNotBlank(histIns.getTaskId())) { FlowTaskDto flowTask = new FlowTaskDto(); flowTask.setTaskId(histIns.getTaskId()); flowTask.setTaskName(histIns.getActivityName());