Browse Source

修复工作流分页bug

test
smallchill 6 years ago
parent
commit
3cc1961139
  1. 4
      blade-ops/blade-flow/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java
  2. 4
      blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowServiceImpl.java

4
blade-ops/blade-flow/src/main/java/org/springblade/flow/business/service/impl/FlowBusinessServiceImpl.java

@ -123,7 +123,7 @@ public class FlowBusinessServiceImpl implements FlowBusinessService {
} }
// 查询列表 // 查询列表
List<HistoricProcessInstance> historyList = historyQuery.listPage(Func.toInt(page.getCurrent() - 1), Func.toInt(page.getSize() * page.getCurrent())); List<HistoricProcessInstance> historyList = historyQuery.listPage(Func.toInt((page.getCurrent() - 1) * page.getSize()), Func.toInt(page.getSize()));
historyList.forEach(historicProcessInstance -> { historyList.forEach(historicProcessInstance -> {
BladeFlow flow = new BladeFlow(); BladeFlow flow = new BladeFlow();
@ -190,7 +190,7 @@ public class FlowBusinessServiceImpl implements FlowBusinessService {
} }
// 查询列表 // 查询列表
List<HistoricTaskInstance> doneList = doneQuery.listPage(Func.toInt(page.getCurrent() - 1), Func.toInt(page.getSize() * page.getCurrent())); List<HistoricTaskInstance> doneList = doneQuery.listPage(Func.toInt((page.getCurrent() - 1) * page.getSize()), Func.toInt(page.getSize()));
doneList.forEach(historicTaskInstance -> { doneList.forEach(historicTaskInstance -> {
BladeFlow flow = new BladeFlow(); BladeFlow flow = new BladeFlow();
flow.setTaskId(historicTaskInstance.getId()); flow.setTaskId(historicTaskInstance.getId());

4
blade-ops/blade-flow/src/main/java/org/springblade/flow/engine/service/impl/FlowServiceImpl.java

@ -93,7 +93,7 @@ public class FlowServiceImpl extends ServiceImpl<FlowMapper, FlowModel> implemen
if (StringUtils.isNotEmpty(category)) { if (StringUtils.isNotEmpty(category)) {
processDefinitionQuery.processDefinitionCategory(category); processDefinitionQuery.processDefinitionCategory(category);
} }
List<ProcessDefinition> processDefinitionList = processDefinitionQuery.listPage(Func.toInt(page.getCurrent() - 1), Func.toInt(page.getSize() * page.getCurrent())); List<ProcessDefinition> processDefinitionList = processDefinitionQuery.listPage(Func.toInt((page.getCurrent() - 1) * page.getSize()), Func.toInt(page.getSize()));
List<FlowProcess> flowProcessList = new ArrayList<>(); List<FlowProcess> flowProcessList = new ArrayList<>();
processDefinitionList.forEach(processDefinition -> { processDefinitionList.forEach(processDefinition -> {
String deploymentId = processDefinition.getDeploymentId(); String deploymentId = processDefinition.getDeploymentId();
@ -117,7 +117,7 @@ public class FlowServiceImpl extends ServiceImpl<FlowMapper, FlowModel> implemen
processInstanceQuery.processDefinitionKey(processDefinitionKey); processInstanceQuery.processDefinitionKey(processDefinitionKey);
} }
List<FlowExecution> flowList = new ArrayList<>(); List<FlowExecution> flowList = new ArrayList<>();
List<ProcessInstance> procInsList = processInstanceQuery.listPage(Func.toInt(page.getCurrent() - 1), Func.toInt(page.getSize() * page.getCurrent())); List<ProcessInstance> procInsList = processInstanceQuery.listPage(Func.toInt((page.getCurrent() - 1) * page.getSize()), Func.toInt(page.getSize()));
procInsList.forEach(processInstance -> { procInsList.forEach(processInstance -> {
ExecutionEntityImpl execution = (ExecutionEntityImpl) processInstance; ExecutionEntityImpl execution = (ExecutionEntityImpl) processInstance;
FlowExecution flowExecution = new FlowExecution(); FlowExecution flowExecution = new FlowExecution();

Loading…
Cancel
Save