From 13a43b6d0ae5f9ad20eb5458b41387f2c93aaeef Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 8 Nov 2023 16:56:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E5=AE=A1=E6=B8=85=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/ReviewChecklistManage.java | 24 ++++++++++++++++++++-- .../model/vo/ProjectReviewCheckListItemVO.java | 3 +++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewChecklistManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewChecklistManage.java index 793fd6c..ac6b4d6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewChecklistManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewChecklistManage.java @@ -89,6 +89,15 @@ public class ReviewChecklistManage { Map> approveMap = approves.stream().collect(Collectors.groupingBy(ReviewChecklistApprove::getProjectCode)); + List reviewHumans = Lists.newArrayList();; + if(BizConst.DEV.equals(active)){ + reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZYD; + }else{ + reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZZD; + } + List users = userInfoHelper.getUserFullInfoByEmployeeCodes(reviewHumans); + Map userMap = users.stream().collect(Collectors.toMap(u -> u.getEmployeeCode() + , u -> u.getUsername())); List 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 reviewChecklistApproves) { + private String computeVerify(ProjectReviewCheckListItemVO item,List reviewChecklistApproves, + Map userMap) { List 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 userMap, Set 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 query, UserInfoDetails user) { UserFullInfoDTO userDto = BeanUtil.copyProperties(user,UserFullInfoDTO.class); Optional currentUserDataScope = DataScopeUtil.getCurrentUserDataScope(userDto); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectReviewCheckListItemVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectReviewCheckListItemVO.java index f61f23b..b35f39e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectReviewCheckListItemVO.java +++ b/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))