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());