|
|
@@ -670,6 +670,7 @@ public class PerformanceAppraisalPlanManage { |
|
|
|
PerformanceAppraisalProjectVO vo = new PerformanceAppraisalProjectVO(); |
|
|
|
if(projectMap.containsKey(projectCode)){ |
|
|
|
Project project = projectMap.get(projectCode); |
|
|
|
vo.setProjectName(project.getProjectName()); |
|
|
|
vo.setProjectTypeName(BizUtils.getProjectTypeName(project.getProjectType())); |
|
|
|
vo.setProjectType(project.getProjectType()); |
|
|
|
vo.setId(project.getId()); |
|
|
@@ -731,6 +732,17 @@ public class PerformanceAppraisalPlanManage { |
|
|
|
// 获取已经创建的评价计划中添加的评价项目ID |
|
|
|
List<Long> projectIds = performanceAppraisalProjectService.list().stream() |
|
|
|
.map(PerformanceAppraisalProject::getProjectId).collect(Collectors.toList()); |
|
|
|
Long appraisalId = addDTO.getAppraisalId(); |
|
|
|
// 如果评价计划不为空,说明是编辑评价计划, |
|
|
|
// 评价计划中原来已经勾选的待评价项目,不作为判断重复添加的内容 |
|
|
|
if (Objects.nonNull(appraisalId)){ |
|
|
|
// 获取当前编辑的评价计划中选择的项目 |
|
|
|
List<Long> proIds = performanceAppraisalProjectService.list(Wrappers.lambdaQuery(PerformanceAppraisalProject.class) |
|
|
|
.eq(PerformanceAppraisalProject::getAppraisalId, appraisalId)).stream() |
|
|
|
.map(PerformanceAppraisalProject::getProjectId).collect(Collectors.toList()); |
|
|
|
// 去除这些项目 |
|
|
|
projectIds.removeAll(proIds); |
|
|
|
} |
|
|
|
// 如果有交集,说明选择的项目中,有已经在其他评价计划中的项目 |
|
|
|
if (Boolean.TRUE.equals(haveIntersection(projectIdList, projectIds))){ |
|
|
|
// 得到交集 |
|
|
@@ -758,6 +770,17 @@ public class PerformanceAppraisalPlanManage { |
|
|
|
// 获取已经创建的评价计划中添加的评价应用ID |
|
|
|
List<Long> applicationIds = performanceAppraisalApplicationService.list().stream() |
|
|
|
.map(PerformanceAppraisalApplication::getApplicationId).collect(Collectors.toList()); |
|
|
|
Long appraisalId = addDTO.getAppraisalId(); |
|
|
|
// 如果评价计划不为空,说明是编辑评价计划, |
|
|
|
// 评价计划中原来已经勾选的待评价应用,不作为判断重复添加的内容 |
|
|
|
if (Objects.nonNull(appraisalId)){ |
|
|
|
// 获取当前编辑的评价计划中选择的应用 |
|
|
|
List<Long> appIds = performanceAppraisalApplicationService.list(Wrappers.lambdaQuery(PerformanceAppraisalApplication.class) |
|
|
|
.eq(PerformanceAppraisalApplication::getAppraisalId, appraisalId)).stream() |
|
|
|
.map(PerformanceAppraisalApplication::getApplicationId).collect(Collectors.toList()); |
|
|
|
// 去除这些应用 |
|
|
|
applicationIds.removeAll(appIds); |
|
|
|
} |
|
|
|
// 如果有交集,说明选择的应用中,有已经在其他评价计划中的应用 |
|
|
|
if (Boolean.TRUE.equals(haveIntersection(applicationIdList, applicationIds))){ |
|
|
|
// 得到交集 |
|
|
|