fix: 1.升级 flowable 版本 2.修复任务列表分页查询数据错误问题

approve-sys
tony 3 years ago
parent 7dc9d39d53
commit aef8335b6e

@ -32,7 +32,7 @@
<poi.version>4.1.2</poi.version> <poi.version>4.1.2</poi.version>
<velocity.version>1.7</velocity.version> <velocity.version>1.7</velocity.version>
<jwt.version>0.9.1</jwt.version> <jwt.version>0.9.1</jwt.version>
<flowable.version>6.5.0</flowable.version> <flowable.version>6.7.2</flowable.version>
<swagger.bootstrap-ui.version>1.9.6</swagger.bootstrap-ui.version> <swagger.bootstrap-ui.version>1.9.6</swagger.bootstrap-ui.version>
</properties> </properties>

@ -80,7 +80,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
// .latestVersion() // .latestVersion()
.orderByProcessDefinitionKey().asc(); .orderByProcessDefinitionKey().asc();
page.setTotal(processDefinitionQuery.count()); page.setTotal(processDefinitionQuery.count());
List<ProcessDefinition> processDefinitionList = processDefinitionQuery.listPage(pageNum - 1, pageSize); List<ProcessDefinition> processDefinitionList = processDefinitionQuery.listPage(pageSize * (pageNum - 1), pageSize);
List<FlowProcDefDto> dataList = new ArrayList<>(); List<FlowProcDefDto> dataList = new ArrayList<>();
for (ProcessDefinition processDefinition : processDefinitionList) { for (ProcessDefinition processDefinition : processDefinitionList) {

@ -417,7 +417,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
.startedBy(userId.toString()) .startedBy(userId.toString())
.orderByProcessInstanceStartTime() .orderByProcessInstanceStartTime()
.desc(); .desc();
List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery.listPage(pageNum - 1, pageSize); List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery.listPage(pageSize * (pageNum - 1), pageSize);
page.setTotal(historicProcessInstanceQuery.count()); page.setTotal(historicProcessInstanceQuery.count());
List<FlowTaskDto> flowList = new ArrayList<>(); List<FlowTaskDto> flowList = new ArrayList<>();
for (HistoricProcessInstance hisIns : historicProcessInstances) { for (HistoricProcessInstance hisIns : historicProcessInstances) {
@ -570,7 +570,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
// .taskAssignee(userId.toString()) // .taskAssignee(userId.toString())
.orderByTaskCreateTime().desc(); .orderByTaskCreateTime().desc();
page.setTotal(taskQuery.count()); page.setTotal(taskQuery.count());
List<Task> taskList = taskQuery.listPage(pageNum - 1, pageSize); List<Task> taskList = taskQuery.listPage(pageSize * (pageNum - 1), pageSize);
List<FlowTaskDto> flowList = new ArrayList<>(); List<FlowTaskDto> flowList = new ArrayList<>();
for (Task task : taskList) { for (Task task : taskList) {
FlowTaskDto flowTask = new FlowTaskDto(); FlowTaskDto flowTask = new FlowTaskDto();
@ -623,7 +623,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
.taskAssignee(userId.toString()) .taskAssignee(userId.toString())
.orderByHistoricTaskInstanceEndTime() .orderByHistoricTaskInstanceEndTime()
.desc(); .desc();
List<HistoricTaskInstance> historicTaskInstanceList = taskInstanceQuery.listPage(pageNum - 1, pageSize); List<HistoricTaskInstance> historicTaskInstanceList = taskInstanceQuery.listPage(pageSize * (pageNum - 1), pageSize);
List<FlowTaskDto> hisTaskList = Lists.newArrayList(); List<FlowTaskDto> hisTaskList = Lists.newArrayList();
for (HistoricTaskInstance histTask : historicTaskInstanceList) { for (HistoricTaskInstance histTask : historicTaskInstanceList) {
FlowTaskDto flowTask = new FlowTaskDto(); FlowTaskDto flowTask = new FlowTaskDto();
@ -657,7 +657,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
flowTask.setStartDeptName(startUser.getDept().getDeptName()); flowTask.setStartDeptName(startUser.getDept().getDeptName());
hisTaskList.add(flowTask); hisTaskList.add(flowTask);
} }
page.setTotal(hisTaskList.size()); page.setTotal(taskInstanceQuery.count());
page.setRecords(hisTaskList); page.setRecords(hisTaskList);
// Map<String, Object> result = new HashMap<>(); // Map<String, Object> result = new HashMap<>();
// result.put("result",page); // result.put("result",page);

Loading…
Cancel
Save