@@ -293,43 +293,22 @@ public class ReAppraisalManage { | |||||
} | } | ||||
private void judgeCompleteReAppraisal(PerformanceAppraisalProjectGroup group, PerformanceAppraisalProject appraisalProject) { | private void judgeCompleteReAppraisal(PerformanceAppraisalProjectGroup group, PerformanceAppraisalProject appraisalProject) { | ||||
// 获取该评价计划的复评打分信息 | |||||
Map<String, List<PerformanceAppraisalScoreInfo>> scoreInfoMap = performanceAppraisalScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalScoreInfo.class) | |||||
.eq(PerformanceAppraisalScoreInfo::getAppraisalId,group.getAppraisalId()) | |||||
.eq(PerformanceAppraisalScoreInfo::getAppraisalType, AppraisalTypeEnum.RE_APPRAISAL.getCode())) | |||||
.stream().collect(Collectors.groupingBy(PerformanceAppraisalScoreInfo::getAppraisalEmployeeCode)); | |||||
List<String> reUsers = Lists.newArrayList(); | |||||
String reAppraisalUsers = group.getReAppraisalUsers(); | |||||
String projectCodes = group.getProjectCodes(); | |||||
if (reAppraisalUsers.contains(StrPool.COMMA)){ | |||||
reUsers = Arrays.asList(reAppraisalUsers.split(StrPool.COMMA)); | |||||
}else { | |||||
reUsers.add(reAppraisalUsers); | |||||
} | |||||
List<String> users = Lists.newArrayList(); | |||||
for (String reUser : reUsers) { | |||||
// 获取分组内复评人员对分组内项目的复评分数信息 | |||||
List<PerformanceAppraisalScoreInfo> scoreInfoList = scoreInfoMap.get(reUser); | |||||
if (CollUtil.isNotEmpty(scoreInfoList)){ | |||||
List<String> proCodes = scoreInfoList.stream() | |||||
.map(PerformanceAppraisalScoreInfo::getAppraisalProjectCode) | |||||
.collect(Collectors.toList()); | |||||
// 当前登录用户所在分组的复评人员 对分组内所有项目进行了复评 | |||||
if (CollUtil.isNotEmpty(proCodes)){ | |||||
String join = String.join(StrPool.COMMA, proCodes); | |||||
if (join.equals(projectCodes)) { | |||||
users.add(reUser); | |||||
} | |||||
// 获取该评价计划的该分组内的复评人员对该项目的的复评打分信息 | |||||
List<PerformanceAppraisalScoreInfo> scoreInfoList = performanceAppraisalScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalScoreInfo.class) | |||||
.eq(PerformanceAppraisalScoreInfo::getAppraisalId, group.getAppraisalId()) | |||||
.eq(PerformanceAppraisalScoreInfo::getAppraisalProjectCode, appraisalProject.getProjectCode()) | |||||
.eq(PerformanceAppraisalScoreInfo::getAppraisalType, AppraisalTypeEnum.RE_APPRAISAL.getCode())); | |||||
// 判断打分人员是否为分组内的复评人员 | |||||
if (CollUtil.isNotEmpty(scoreInfoList)) { | |||||
List<String> users = scoreInfoList.stream().map(PerformanceAppraisalScoreInfo::getAppraisalEmployeeCode).collect(Collectors.toList()); | |||||
if (CollUtil.isNotEmpty(users)) { | |||||
String reAppraisalUsers = group.getReAppraisalUsers(); | |||||
String join = String.join(StrPool.COMMA, users); | |||||
if (join.equals(reAppraisalUsers)) { | |||||
// 标记项目完成复评 | |||||
appraisalProject.setIsCompleteReAppraisal(Boolean.TRUE); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
if (CollUtil.isNotEmpty(users)) { | |||||
String join = String.join(StrPool.COMMA, users); | |||||
if (join.equals(reAppraisalUsers)) { | |||||
// 标记项目完成复评 | |||||
appraisalProject.setIsCompleteReAppraisal(Boolean.TRUE); | |||||
} | |||||
} | |||||
} | } | ||||
} | } |
@@ -294,42 +294,23 @@ public class VerifyManage { | |||||
} | } | ||||
private void judgeCompleteVerify(PerformanceAppraisalProjectGroup group, PerformanceAppraisalProject appraisalProject) { | private void judgeCompleteVerify(PerformanceAppraisalProjectGroup group, PerformanceAppraisalProject appraisalProject) { | ||||
// 获取该评价计划的核查打分信息 | |||||
Map<String, List<PerformanceAppraisalScoreInfo>> scoreInfoMap = performanceAppraisalScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalScoreInfo.class) | |||||
// 获取该评价计划当前分组对该项目的核查打分信息 | |||||
List<PerformanceAppraisalScoreInfo> scoreInfoList = performanceAppraisalScoreInfoService.list(Wrappers.lambdaQuery(PerformanceAppraisalScoreInfo.class) | |||||
.eq(PerformanceAppraisalScoreInfo::getAppraisalId,group.getAppraisalId()) | .eq(PerformanceAppraisalScoreInfo::getAppraisalId,group.getAppraisalId()) | ||||
.eq(PerformanceAppraisalScoreInfo::getAppraisalType, AppraisalTypeEnum.EXPERT_VERIFY.getCode())) | |||||
.stream().collect(Collectors.groupingBy(PerformanceAppraisalScoreInfo::getAppraisalEmployeeCode)); | |||||
.eq(PerformanceAppraisalScoreInfo::getAppraisalProjectCode,appraisalProject.getProjectCode()) | |||||
.eq(PerformanceAppraisalScoreInfo::getAppraisalType, AppraisalTypeEnum.EXPERT_VERIFY.getCode())); | |||||
List<String> verifyUsers = Lists.newArrayList(); | |||||
String verificationUsers = group.getVerificationUsers(); | |||||
String projectCodes = group.getProjectCodes(); | |||||
if (verificationUsers.contains(StrPool.COMMA)){ | |||||
verifyUsers = Arrays.asList(verificationUsers.split(StrPool.COMMA)); | |||||
}else { | |||||
verifyUsers.add(verificationUsers); | |||||
} | |||||
List<String> users = Lists.newArrayList(); | |||||
for (String verifyUser : verifyUsers) { | |||||
// 获取分组内核查人员对分组内项目的核查分数信息 | |||||
List<PerformanceAppraisalScoreInfo> scoreInfoList = scoreInfoMap.get(verifyUser); | |||||
if (CollUtil.isNotEmpty(scoreInfoList)){ | |||||
List<String> proCodes = scoreInfoList.stream() | |||||
.map(PerformanceAppraisalScoreInfo::getAppraisalProjectCode) | |||||
.collect(Collectors.toList()); | |||||
// 当前登录用户所在分组的核查人员 对分组内所有项目进行了核查 | |||||
if (CollUtil.isNotEmpty(proCodes)){ | |||||
String join = String.join(StrPool.COMMA, proCodes); | |||||
if (join.equals(projectCodes)) { | |||||
users.add(verifyUser); | |||||
} | |||||
// 判断打分人员是否为分组内的核查人员 | |||||
if (CollUtil.isNotEmpty(scoreInfoList)) { | |||||
List<String> users = scoreInfoList.stream().map(PerformanceAppraisalScoreInfo::getAppraisalEmployeeCode).collect(Collectors.toList()); | |||||
if (CollUtil.isNotEmpty(users)) { | |||||
String verificationUsers = group.getVerificationUsers(); | |||||
String join = String.join(StrPool.COMMA, users); | |||||
if (join.equals(verificationUsers)) { | |||||
// 标记项目完成核查 | |||||
appraisalProject.setIsCompleteVerify(Boolean.TRUE); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
if (CollUtil.isNotEmpty(users)) { | |||||
String join = String.join(StrPool.COMMA, users); | |||||
if (join.equals(verificationUsers)) { | |||||
appraisalProject.setIsCompleteVerify(Boolean.TRUE); | |||||
} | |||||
} | |||||
} | } | ||||
} | } |