|
|
@@ -4,6 +4,7 @@ import java.time.LocalDateTime; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import org.checkerframework.checker.nullness.qual.Nullable; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
@@ -212,9 +213,36 @@ public class PerformanceAppraisalPlanManage { |
|
|
|
.eq(PerformanceAppraisalProjectGroup::getAppraisalId, id)); |
|
|
|
// 对计划内待评价项目进行了分组 |
|
|
|
if (CollUtil.isNotEmpty(groupList)){ |
|
|
|
|
|
|
|
// 获取分组信息 |
|
|
|
List<PerformanceAppraisalProjectGroupVO> groups = groupList.stream().map(g -> { |
|
|
|
PerformanceAppraisalProjectGroupVO groupVo = new PerformanceAppraisalProjectGroupVO(); |
|
|
|
groupVo.setAppraisalId(id); |
|
|
|
groupVo.setName(g.getName()); |
|
|
|
String reAppraisalUsersStr = g.getReAppraisalUsers(); |
|
|
|
List<UserFullInfoDTO> reAppraisalUsers = Arrays.stream(reAppraisalUsersStr.split(StrPool.COMMA)).map(r -> { |
|
|
|
UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); |
|
|
|
List<String> reUsers = Arrays.asList(r.split(StrPool.PIPE)); |
|
|
|
if (CollUtil.isNotEmpty(reUsers)) { |
|
|
|
userFullInfoDTO.setUsername(reUsers.get(0)); |
|
|
|
} |
|
|
|
return userFullInfoDTO; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
groupVo.setReAppraisalUsers(reAppraisalUsers); |
|
|
|
String verificationUsersStr = g.getVerificationUsers(); |
|
|
|
List<UserFullInfoDTO> verificationUsers = Arrays.stream(verificationUsersStr.split(StrPool.COMMA)).map(r -> { |
|
|
|
UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); |
|
|
|
List<String> reUsers = Arrays.asList(r.split(StrPool.PIPE)); |
|
|
|
if (CollUtil.isNotEmpty(reUsers)) { |
|
|
|
userFullInfoDTO.setUsername(reUsers.get(0)); |
|
|
|
} |
|
|
|
return userFullInfoDTO; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
groupVo.setVerificationUsers(verificationUsers); |
|
|
|
groupVo.setCreateOn(g.getCreateOn()); |
|
|
|
return groupVo; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
vo.setGroups(groups); |
|
|
|
} |
|
|
|
|
|
|
|
return vo; |
|
|
|
} |
|
|
|
|
|
|
|