|
@@ -89,6 +89,15 @@ public class ReviewChecklistManage { |
|
|
Map<String, List<ReviewChecklistApprove>> approveMap = |
|
|
Map<String, List<ReviewChecklistApprove>> approveMap = |
|
|
approves.stream().collect(Collectors.groupingBy(ReviewChecklistApprove::getProjectCode)); |
|
|
approves.stream().collect(Collectors.groupingBy(ReviewChecklistApprove::getProjectCode)); |
|
|
|
|
|
|
|
|
|
|
|
List<String> reviewHumans = Lists.newArrayList();; |
|
|
|
|
|
if(BizConst.DEV.equals(active)){ |
|
|
|
|
|
reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZYD; |
|
|
|
|
|
}else{ |
|
|
|
|
|
reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZZD; |
|
|
|
|
|
} |
|
|
|
|
|
List<UserFullInfoDTO> users = userInfoHelper.getUserFullInfoByEmployeeCodes(reviewHumans); |
|
|
|
|
|
Map<String, String> userMap = users.stream().collect(Collectors.toMap(u -> u.getEmployeeCode() |
|
|
|
|
|
, u -> u.getUsername())); |
|
|
List<ProjectReviewCheckListItemVO> records = CollUtils.convert(page.getRecords(), w -> { |
|
|
List<ProjectReviewCheckListItemVO> records = CollUtils.convert(page.getRecords(), w -> { |
|
|
ProjectReviewCheckListItemVO item = new ProjectReviewCheckListItemVO(); |
|
|
ProjectReviewCheckListItemVO item = new ProjectReviewCheckListItemVO(); |
|
|
item.setId(w.getId()); |
|
|
item.setId(w.getId()); |
|
@@ -109,13 +118,14 @@ public class ReviewChecklistManage { |
|
|
item.setApprovedAmount(w.getApprovalAmount()); |
|
|
item.setApprovedAmount(w.getApprovalAmount()); |
|
|
item.setAnnualPlanAmount(w.getAnnualPlanAmount()); |
|
|
item.setAnnualPlanAmount(w.getAnnualPlanAmount()); |
|
|
// 审查人员情况 |
|
|
// 审查人员情况 |
|
|
item.setVerifiedHumans(computeVerify(approveMap.get(w.getProjectCode()))); |
|
|
|
|
|
|
|
|
item.setVerifiedHumans(computeVerify(item,approveMap.get(w.getProjectCode()),userMap)); |
|
|
return item; |
|
|
return item; |
|
|
}); |
|
|
}); |
|
|
return PageVo.of(records, page.getTotal()); |
|
|
return PageVo.of(records, page.getTotal()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private String computeVerify(List<ReviewChecklistApprove> reviewChecklistApproves) { |
|
|
|
|
|
|
|
|
private String computeVerify(ProjectReviewCheckListItemVO item,List<ReviewChecklistApprove> reviewChecklistApproves, |
|
|
|
|
|
Map<String, String> userMap) { |
|
|
List<String> reviewHumans = Lists.newArrayList();; |
|
|
List<String> reviewHumans = Lists.newArrayList();; |
|
|
if(BizConst.DEV.equals(active)){ |
|
|
if(BizConst.DEV.equals(active)){ |
|
|
reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZYD; |
|
|
reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZYD; |
|
@@ -138,9 +148,19 @@ public class ReviewChecklistManage { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
item.setReviewCheckNotApprove(convertUser(userMap,computeHumanSet)); |
|
|
|
|
|
|
|
|
return finishNums[0] + StrPool.SLASH + maxNums; |
|
|
return finishNums[0] + StrPool.SLASH + maxNums; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String convertUser(Map<String, String> userMap, Set<String> computeHumanSet) { |
|
|
|
|
|
if(CollUtil.isEmpty(userMap) || CollUtil.isEmpty(computeHumanSet)){ |
|
|
|
|
|
return StringUtils.EMPTY; |
|
|
|
|
|
} |
|
|
|
|
|
return computeHumanSet.stream().filter(s -> StringUtils.isNotBlank(s) && userMap.containsKey(s)) |
|
|
|
|
|
.map(s -> userMap.get(s)).collect(Collectors.joining(StrPool.COMMA)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public UserFullInfoDTO buildProjectLibPermission(LambdaQueryWrapper<Project> query, UserInfoDetails user) { |
|
|
public UserFullInfoDTO buildProjectLibPermission(LambdaQueryWrapper<Project> query, UserInfoDetails user) { |
|
|
UserFullInfoDTO userDto = BeanUtil.copyProperties(user,UserFullInfoDTO.class); |
|
|
UserFullInfoDTO userDto = BeanUtil.copyProperties(user,UserFullInfoDTO.class); |
|
|
Optional<DataScopeDTO> currentUserDataScope = DataScopeUtil.getCurrentUserDataScope(userDto); |
|
|
Optional<DataScopeDTO> currentUserDataScope = DataScopeUtil.getCurrentUserDataScope(userDto); |
|
|