fix: 处理我的流程模块数据异常

approve-sys
tony 3 years ago
parent f2689c8080
commit 960f356631

@ -442,41 +442,14 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
flowTask.setProcDefVersion(pd.getVersion()); flowTask.setProcDefVersion(pd.getVersion());
flowTask.setCategory(pd.getCategory()); flowTask.setCategory(pd.getCategory());
flowTask.setProcDefVersion(pd.getVersion()); flowTask.setProcDefVersion(pd.getVersion());
// 当前所处流程 todo: 本地启动放开以下注释
// 当前所处流程 // List<Task> taskList = taskService.createTaskQuery().processInstanceId(hisIns.getId()).list();
// Task task = taskService.createTaskQuery().processInstanceId(hisIns.getId()).singleResult(); // if (CollectionUtils.isNotEmpty(taskList)) {
List<Task> taskList = taskService.createTaskQuery().processInstanceId(hisIns.getId()).list(); // flowTask.setTaskId(taskList.get(0).getId());
if (CollectionUtils.isNotEmpty(taskList)) { // } else {
// flowTask.setTaskName(task.getName()); // List<HistoricTaskInstance> historicTaskInstance = historyService.createHistoricTaskInstanceQuery().processInstanceId(hisIns.getId()).orderByHistoricTaskInstanceEndTime().desc().list();
flowTask.setTaskId(taskList.get(0).getId()); // flowTask.setTaskId(historicTaskInstance.get(0).getId());
// // 指定审批人员信息 // }
// if (StringUtils.isNotBlank(task.getAssignee())) {
// SysUser sysUser = sysUserService.selectUserById(Long.parseLong(task.getAssignee()));
// flowTask.setAssigneeId(sysUser.getUserId());
// flowTask.setAssigneeName(sysUser.getNickName());
// flowTask.setDeptName(sysUser.getDept().getDeptName());
// } else {
// // 候选审批人员信息
// List<IdentityLink> linksForTask = taskService.getIdentityLinksForTask(task.getId());
// StringBuilder stringBuilder = new StringBuilder();
// for (IdentityLink identityLink : linksForTask) {
// if ("candidate".equals(identityLink.getType())) {
// if (StringUtils.isNotBlank(identityLink.getUserId())) {
// SysUser sysUser = sysUserService.selectUserById(Long.parseLong(identityLink.getUserId()));
// stringBuilder.append(sysUser.getNickName()).append(",");
// }
// if (StringUtils.isNotBlank(identityLink.getGroupId())) {
// SysRole sysRole = sysRoleService.selectRoleById(Long.parseLong(identityLink.getGroupId()));
// stringBuilder.append(sysRole.getRoleName()).append(",");
// }
// }
// }
// flowTask.setCandidate(stringBuilder.substring(0, stringBuilder.length() - 1));
// }
} else {
List<HistoricTaskInstance> historicTaskInstance = historyService.createHistoricTaskInstanceQuery().processInstanceId(hisIns.getId()).orderByHistoricTaskInstanceEndTime().desc().list();
flowTask.setTaskId(historicTaskInstance.get(0).getId());
}
flowList.add(flowTask); flowList.add(flowTask);
} }
page.setRecords(flowList); page.setRecords(flowList);

Loading…
Cancel
Save