|
|
@@ -791,6 +791,17 @@ public class TodoCenterManage { |
|
|
|
.singleResult(); |
|
|
|
// 获取前一个审核节点审核人信息 |
|
|
|
String beforeUserId = lastInstance.getAssignee(); |
|
|
|
// 获取当前审核节点审核人信息 |
|
|
|
String currentUserId = task.getAssignee(); |
|
|
|
//HashSet<String> userSet = new HashSet<>(); |
|
|
|
//userSet.add(beforeUserId); |
|
|
|
//userSet.add(currentUserId); |
|
|
|
//Map<Long, UserInfoVO> userMap = userInfoService.getUserMapByIds(userSet); |
|
|
|
//UserInfoVO beforeUserInfoVO = userMap.get(Long.valueOf(beforeUserId)); |
|
|
|
//UserInfoVO currentUserInfoVO = userMap.get(Long.valueOf(currentUserId)); |
|
|
|
//String beforeUserOrgCode = beforeUserInfoVO.getOrganizationCode(); |
|
|
|
//String currentUserOrgCode = currentUserInfoVO.getOrganizationCode(); |
|
|
|
//Boolean orgFlag = currentUserOrgCode.equals(beforeUserOrgCode) ? true : false; |
|
|
|
|
|
|
|
// TODO 判断前一个审核人的部门和当前登录用户的部门是否是同一个,如果是同一个才可以撤回,否则抛出异常 |
|
|
|
Boolean orgFlag = true; |
|
|
@@ -903,7 +914,7 @@ public class TodoCenterManage { |
|
|
|
* @param instanceId 流程实例ID |
|
|
|
* @return 流程进度及表单详情 |
|
|
|
*/ |
|
|
|
public ProcessProgressDetailVo getProcessDetail(String nodeId, String instanceId) { |
|
|
|
public ProcessProgressDetailVo getProcessDetail(String nodeId, String instanceId, Long projectId) { |
|
|
|
HistoricProcessInstance instance = historyService.createHistoricProcessInstanceQuery() |
|
|
|
.processInstanceId(instanceId) |
|
|
|
.singleResult(); |
|
|
@@ -979,16 +990,8 @@ public class TodoCenterManage { |
|
|
|
.progress(taskRecords) |
|
|
|
.build(); |
|
|
|
//res.setStartUser(userInfoVO); |
|
|
|
if (Objects.isNull(instance.getEndActivityId())) { |
|
|
|
res.setStatus(ProcessStatusEnum.UNDER_REVIEW.name()); |
|
|
|
} else if (HisProInsEndActId.BACK.equals(instance.getEndActivityId())) { |
|
|
|
// TODO 被退回的审核节点状态这里只是暂时这么判断,具体怎么保存这个退回状态,后面讨论 |
|
|
|
res.setStatus(ProcessStatusEnum.BE_BACKED.name()); |
|
|
|
} else if (HisProInsEndActId.REJECT.equals(instance.getEndActivityId())) { |
|
|
|
res.setStatus(ProcessStatusEnum.BE_REJECTED.name()); |
|
|
|
} else if (HisProInsEndActId.END.equals(instance.getEndActivityId())) { |
|
|
|
res.setStatus(ProcessStatusEnum.APPROVED.name()); |
|
|
|
} |
|
|
|
Project project = projectService.getById(projectId); |
|
|
|
res.setStatus(ProcessStatusEnum.getDescByCode(project.getProcessStatus())); |
|
|
|
return res; |
|
|
|
} |
|
|
|
|
|
|
|