int[] pageParams = PageUtil.init(page, request);
if (!StringUtils.equals(processType, "all")) {
HistoricProcessInstanceQuery leaveDynamicQuery = historyService.createHistoricProcessInstanceQuery()
.processDefinitionKey("leave-dynamic-from").finished().orderByProcessInstanceEndTime().desc();
List<HistoricProcessInstance> list = leaveDynamicQuery.listPage(pageParams[0], pageParams[1]);
HistoricProcessInstanceQuery dispatchQuery = historyService.createHistoricProcessInstanceQuery()
.processDefinitionKey("dispatch").finished().orderByProcessInstanceEndTime().desc();
List<HistoricProcessInstance> list2 = dispatchQuery.listPage(pageParams[0], pageParams[1]);