ソースを参照

评审清单

master
PoffyZhang 1年前
コミット
13a43b6d0a
2個のファイルの変更25行の追加2行の削除
  1. +22
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewChecklistManage.java
  2. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectReviewCheckListItemVO.java

+ 22
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewChecklistManage.java ファイルの表示

@@ -89,6 +89,15 @@ public class ReviewChecklistManage {
Map<String, List<ReviewChecklistApprove>> approveMap =
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 -> {
ProjectReviewCheckListItemVO item = new ProjectReviewCheckListItemVO();
item.setId(w.getId());
@@ -109,13 +118,14 @@ public class ReviewChecklistManage {
item.setApprovedAmount(w.getApprovalAmount());
item.setAnnualPlanAmount(w.getAnnualPlanAmount());
// 审查人员情况
item.setVerifiedHumans(computeVerify(approveMap.get(w.getProjectCode())));
item.setVerifiedHumans(computeVerify(item,approveMap.get(w.getProjectCode()),userMap));
return item;
});
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();;
if(BizConst.DEV.equals(active)){
reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZYD;
@@ -138,9 +148,19 @@ public class ReviewChecklistManage {
}
});

item.setReviewCheckNotApprove(convertUser(userMap,computeHumanSet));

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) {
UserFullInfoDTO userDto = BeanUtil.copyProperties(user,UserFullInfoDTO.class);
Optional<DataScopeDTO> currentUserDataScope = DataScopeUtil.getCurrentUserDataScope(userDto);


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectReviewCheckListItemVO.java ファイルの表示

@@ -119,6 +119,9 @@ public class ProjectReviewCheckListItemVO {
@ApiModelProperty("是否开启评审清单")
private Boolean reviewCheckFinish;

@ApiModelProperty("未审批人员")
private String reviewCheckNotApprove;

public String getProjectTypeName() {
if (Objects.nonNull(this.projectType)) {
Optional.ofNullable(ProjectTypeNewEnum.getDesc(this.projectType))


読み込み中…
キャンセル
保存