|
|
@ -301,7 +301,6 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
ProjectDetailResultDTO resultDTO = baseDao.selectProjectDetail(fromDTO.getProjectId()); |
|
|
|
// 查询当前流转到外部系统的ID
|
|
|
|
resultDTO.setPlatformIds(projectProcessService.selectPlatFormIds(fromDTO.getProjectId())); |
|
|
|
resultDTO.setIsSend((StringUtils.isEmpty(parameterValue) || parameterValue.equals(NumConstant.ZERO_STR)) ? false : resultDTO.getProcessable()); |
|
|
|
if (ProjectConstant.CLOSED.equals(resultDTO.getProjectStatus())) { |
|
|
|
resultDTO.setProcessable(false); |
|
|
|
resultDTO.setReturnable(false); |
|
|
@ -314,23 +313,26 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
if (null != departmentList && departmentList.size() > NumConstant.ZERO) { |
|
|
|
//TODO external_system值为1时,根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录,
|
|
|
|
// 如果没有记录或者INTERNAL_STATUS是closed,processable的值为true
|
|
|
|
if (parameterValue.equals(NumConstant.ONE_STR)) { |
|
|
|
List<String> projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); |
|
|
|
// 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录
|
|
|
|
ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); |
|
|
|
if (null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) { |
|
|
|
resultDTO.setProcessable(true); |
|
|
|
resultDTO.setIsSend(true); |
|
|
|
if (StringUtils.isNotEmpty(parameterValue)){ |
|
|
|
if (parameterValue.equals(NumConstant.ONE_STR)) { |
|
|
|
List<String> projectStaffIds = departmentList.stream().map(m -> m.getProjectStaffId()).distinct().collect(Collectors.toList()); |
|
|
|
// 根据departmentList里的projectStaffId在project_sub_process表找最新的一条记录
|
|
|
|
ProjectSubProcessDTO projectSubProcessDTO = projectSubProcessService.selectSubProcess(projectStaffIds); |
|
|
|
if (null == projectSubProcessDTO || projectSubProcessDTO.getInternalStatus().equals(ProjectConstant.CLOSED)) { |
|
|
|
resultDTO.setProcessable(true); |
|
|
|
resultDTO.setIsSend(true); |
|
|
|
} else { |
|
|
|
resultDTO.setProcessable(false); |
|
|
|
resultDTO.setIsSend(false); |
|
|
|
} |
|
|
|
} else { |
|
|
|
resultDTO.setProcessable(false); |
|
|
|
resultDTO.setProcessable(true); |
|
|
|
resultDTO.setIsSend(false); |
|
|
|
} |
|
|
|
} else { |
|
|
|
resultDTO.setProcessable(true); |
|
|
|
resultDTO.setIsSend(false); |
|
|
|
} |
|
|
|
} else { |
|
|
|
resultDTO.setProcessable(false); |
|
|
|
resultDTO.setIsSend(false); |
|
|
|
} |
|
|
|
ReturnListFromDTO returnListFromDTO = new ReturnListFromDTO(); |
|
|
|
returnListFromDTO.setProjectId(fromDTO.getProjectId()); |
|
|
|