|
@@ -4105,8 +4105,10 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
|
|
if (dto.getType() == 0) {
|
|
if (dto.getType() == 0) {
|
|
historicProcessInstanceQuery.unfinished();
|
|
historicProcessInstanceQuery.unfinished();
|
|
}
|
|
}
|
|
|
|
+ historicProcessInstanceQuery.orderByProcessInstanceStartTime().desc();
|
|
|
|
|
|
- List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery.list();
|
|
|
|
|
|
+ int startNum = (dto.getLimit() - 1) * dto.getSize();
|
|
|
|
+ List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery.listPage(startNum, startNum + dto.getSize());
|
|
|
|
|
|
//获取到所有流程id
|
|
//获取到所有流程id
|
|
List<String> processIds = historicProcessInstances.stream().map(HistoricProcessInstance::getId).collect(Collectors.toList());
|
|
List<String> processIds = historicProcessInstances.stream().map(HistoricProcessInstance::getId).collect(Collectors.toList());
|
|
@@ -4119,6 +4121,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
|
|
.leftJoin(WorkflowSchema.class, WorkflowSchema::getId, WorkflowExtra::getSchemaId)
|
|
.leftJoin(WorkflowSchema.class, WorkflowSchema::getId, WorkflowExtra::getSchemaId)
|
|
.leftJoin(DictionaryDetail.class, DictionaryDetail::getId, WorkflowSchema::getCategory)
|
|
.leftJoin(DictionaryDetail.class, DictionaryDetail::getId, WorkflowSchema::getCategory)
|
|
.eq(StrUtil.isNotEmpty(dto.getCategory()), DictionaryDetail::getCode, dto.getCategory())
|
|
.eq(StrUtil.isNotEmpty(dto.getCategory()), DictionaryDetail::getCode, dto.getCategory())
|
|
|
|
+ .in(WorkflowExtra::getProcessId, processIds)
|
|
);
|
|
);
|
|
for (HistoricProcessInstance historicProcessInstance : historicProcessInstances) {
|
|
for (HistoricProcessInstance historicProcessInstance : historicProcessInstances) {
|
|
//找到当前流程的 任务开始时间 最大值 为当前审批节点
|
|
//找到当前流程的 任务开始时间 最大值 为当前审批节点
|
|
@@ -4159,7 +4162,7 @@ public class WorkflowExecuteServiceImpl implements IWorkflowExecuteService {
|
|
PageOutput<MonitorPageVo> output = new PageOutput<>();
|
|
PageOutput<MonitorPageVo> output = new PageOutput<>();
|
|
output.setCurrentPage(dto.getLimit());
|
|
output.setCurrentPage(dto.getLimit());
|
|
output.setPageSize(dto.getSize());
|
|
output.setPageSize(dto.getSize());
|
|
- output.setTotal(result.size());
|
|
|
|
|
|
+ output.setTotal(Convert.toInt(historicProcessInstanceQuery.count()));
|
|
output.setList(result);
|
|
output.setList(result);
|
|
return output;
|
|
return output;
|
|
}
|
|
}
|