Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
niohe·erbao 1 year ago
parent
commit
f1b7f7915f
5 changed files with 35 additions and 4 deletions
  1. +20
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java
  2. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/vo/ExpertReviewDetailVO.java
  3. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java
  4. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  5. +3
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 20
- 2
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java View File

@@ -6,18 +6,22 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.cache.lock.DistributedLock;
import com.ningdatech.file.entity.vo.result.AttachFileVo;
import com.ningdatech.file.service.FileService;
import com.ningdatech.pmapi.expert.model.dto.ReviewTemplateOptionDTO;
import com.ningdatech.pmapi.expert.model.entity.ExpertReview;
import com.ningdatech.pmapi.expert.model.req.ExpertReviewDetailReq;
import com.ningdatech.pmapi.expert.model.vo.ExpertReviewDetailVO;
import com.ningdatech.pmapi.expert.service.IExpertReviewService;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum;
import com.ningdatech.pmapi.meeting.service.IMeetingExpertService;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum.AGREED;

@@ -36,6 +40,7 @@ public class ExpertReviewManage {
private final IExpertReviewService expertReviewService;
private final DistributedLock distributedLock;
private final IMeetingExpertService meetingExpertService;
private final FileService fileService;

private static final String EXPERT_REVIEW_KEY = "expert_review:";

@@ -120,7 +125,20 @@ public class ExpertReviewManage {
query.eq(ExpertReview::getIsFinal, Boolean.FALSE);
query.orderByDesc(ExpertReview::getCreateOn);
List<ExpertReview> reviews = expertReviewService.list(query);
return CollUtils.convert(reviews, this::buildExpertReviewDetail);
if (reviews.isEmpty()) {
return Collections.emptyList();
}
List<Long> attachFileIds = CollUtils.fieldList(reviews, ExpertReview::getAttachFileId);
Map<Long, AttachFileVo> fileMap = new HashMap<>(attachFileIds.size());
if (attachFileIds.size() > 0) {
List<AttachFileVo> files = fileService.getByIds(attachFileIds);
files.forEach(w -> fileMap.put(w.getFileId(), w));
}
return CollUtils.convert(reviews, w -> {
ExpertReviewDetailVO reviewDetail = buildExpertReviewDetail(w);
reviewDetail.setAttachFile(fileMap.get(w.getAttachFileId()));
return reviewDetail;
});
}

}

+ 4
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/vo/ExpertReviewDetailVO.java View File

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.expert.model.vo;

import com.ningdatech.file.entity.vo.result.AttachFileVo;
import com.ningdatech.pmapi.expert.model.dto.ReviewTemplateOptionDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
@@ -40,6 +41,9 @@ public class ExpertReviewDetailVO {
@ApiModelProperty("附件ID")
private Long attachFileId;

@ApiModelProperty("附件详情")
private AttachFileVo attachFile;

@ApiModelProperty("评审结果:1 通过、2 需复核、3 不通过")
private Integer reviewResult;



+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java View File

@@ -31,4 +31,7 @@ public class MeetingReviewProjectDTO {
@ApiModelProperty("申报单位")
private String buildOrg;

@ApiModelProperty("评审结果")
private String reviewResult;

}

+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java View File

@@ -415,6 +415,7 @@ public class MeetingManage {
if (meeting.getIsInnerProject()) {
List<MeetingInnerProject> innerProjects = meetingInnerProjectService.listByMeetingId(meetingId);
List<Project> projects = projectService.listByIds(CollUtils.fieldList(innerProjects, MeetingInnerProject::getProjectId));
Map<Long, ExpertReview> reviewMap = expertReviewService.listFinalReviewMap(meetingId);
List<MeetingReviewProjectDTO> convert = CollUtils.convert(projects, w -> {
MeetingReviewProjectDTO mrp = new MeetingReviewProjectDTO();
mrp.setBuildOrg(w.getBuildOrgName());
@@ -422,6 +423,10 @@ public class MeetingManage {
mrp.setProjectType(w.getProjectType().toString());
mrp.setProjectYear(w.getProjectYear());
mrp.setDeclareAmount(w.getDeclareAmount());
ExpertReview review = reviewMap.get(w.getId());
if (review != null) {
mrp.setReviewResult(ReviewResultEnum.getByCode(review.getReviewResult()).getValue());
}
return mrp;
});
detail.setProjects(convert);


+ 3
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -440,8 +440,9 @@ public class TodoCenterManage {
ProcessProgressVo progressInstanceDetail = processInstanceService.getProgressInstanceDetail(nodeId, instanceId);

List<ProgressNode> progressInfo = progressInstanceDetail.getProgressInfo();
buildUserUtils.buildUserByProcessInfo(progressInfo);

if (CollUtil.isNotEmpty(progressInfo)){
buildUserUtils.buildUserByProcessInfo(progressInfo);
}
ProcessProgressDetailVo res = new ProcessProgressDetailVo();
res.setProcessProgressVo(progressInstanceDetail);
res.setStatus(progressInstanceDetail.getStatus());


Loading…
Cancel
Save