Kaynağa Gözat

会议评审列表增加会议ID

master
WendyYang 1 yıl önce
ebeveyn
işleme
d27db14e4c
7 değiştirilmiş dosya ile 68 ekleme ve 3 silme
  1. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java
  2. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java
  3. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/entity/ExpertReview.java
  4. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertReviewDetailReq.java
  5. +9
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java
  6. +41
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java
  7. +9
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/handler/GlobalResponseHandler.java Dosyayı Görüntüle

@@ -24,6 +24,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
"com.ningdatech.pmapi.sys.controller",
"com.ningdatech.pmapi.todocenter.controller",
"com.ningdatech.pmapi.user.controller",
"com.ningdatech.pmapi.meeting.controller",
"com.ningdatech.pmapi.expert.controller"
})
public class GlobalResponseHandler implements ResponseBodyAdvice<Object> {


+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertReviewManage.java Dosyayı Görüntüle

@@ -79,6 +79,7 @@ public class ExpertReviewManage {
review.setContent(JSONUtil.toJsonStr(req.getReviewTemplateOptions()));
review.setProjectId(req.getProjectId());
review.setTemplateId(req.getTemplateId());
review.setMeetingId(req.getMeetingId());
review.setOtherAdvice(req.getOtherAdvice());
review.setAttachFileId(req.getAttachFileId());
review.setIsFinal(req.getIsFinal());


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/entity/ExpertReview.java Dosyayı Görüntüle

@@ -30,6 +30,9 @@ public class ExpertReview implements Serializable {
@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("会议ID")
private Long meetingId;

@ApiModelProperty("评审模版配置ID")
private Long templateId;



+ 4
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/model/req/ExpertReviewDetailReq.java Dosyayı Görüntüle

@@ -28,6 +28,10 @@ public class ExpertReviewDetailReq {
@NotNull(message = "项目ID不能为空")
private Long projectId;

@ApiModelProperty("会议ID")
@NotNull(message = "会议ID不能为空")
private Long meetingId;

@Valid
@ApiModelProperty("配置模版")
@NotEmpty(message = "配置不能为空")


+ 9
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/controller/MeetingController.java Dosyayı Görüntüle

@@ -8,6 +8,7 @@ import com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO;
import com.ningdatech.pmapi.meeting.entity.req.*;
import com.ningdatech.pmapi.meeting.entity.vo.*;
import com.ningdatech.pmapi.meeting.manage.MeetingManage;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
@@ -15,6 +16,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

/**
* <p>
@@ -168,8 +170,14 @@ public class MeetingController {

@GetMapping("/listReviewProject")
@ApiOperation("评审会议列表")
public PageVo<ReviewProjectDTO> listReviewProject(ReviewProjectListReq req){
public PageVo<ReviewProjectDTO> listReviewProject(ReviewProjectListReq req) {
return meetingManage.pageReviewProject(req);
}

@GetMapping("/option/project")
@ApiOperation("项目列表")
public List<ProjectLibListItemVO> projectList(@RequestParam String meetingType) {
return meetingManage.optionProject(meetingType);
}

}

+ 41
- 0
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java Dosyayı Görüntüle

@@ -25,6 +25,7 @@ import com.ningdatech.pmapi.meeting.entity.domain.*;
import com.ningdatech.pmapi.meeting.entity.dto.*;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum;
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertInviteTypeEnum;
import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingReviewTypeEnum;
import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingStatusEnum;
import com.ningdatech.pmapi.meeting.entity.req.*;
import com.ningdatech.pmapi.meeting.entity.vo.*;
@@ -35,7 +36,9 @@ import com.ningdatech.pmapi.meeting.service.*;
import com.ningdatech.pmapi.meeting.task.ExpertInviteTask;
import com.ningdatech.pmapi.meta.helper.DictionaryCache;
import com.ningdatech.pmapi.meta.helper.TagCache;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.sys.model.dto.RegionDTO;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
@@ -702,4 +705,42 @@ public class MeetingManage {
return PageVo.of(page.getRecords(), page.getTotal());
}

public List<ProjectLibListItemVO> optionProject(String meetingType) {
LambdaQueryWrapper<Project> query = Wrappers.lambdaQuery(Project.class);
switch (MeetingReviewTypeEnum.getByCode(meetingType)) {
case PRELIMINARY_SCHEME_REVIEW:
buildOptionProjectQuery(query, meetingType, ProjectStatusEnum.PRE_APPLYING);
break;
case CONSTRUCTION_SCHEME_REVIEW:
buildOptionProjectQuery(query, meetingType, ProjectStatusEnum.SCHEME_UNDER_REVIEW);
break;
case ACCEPTANCE_SCHEME_REVIEW:
query.eq(Project::getStatus, ProjectStatusEnum.FINAL_ACCEPTANCE_IS_UNDER_REVIEW);
break;
case DEPT_JOIN_REVIEW:
query.eq(Project::getStatus, ProjectStatusEnum.DEPARTMENT_JOINT_REVIEW);
break;
default:
return Collections.emptyList();
}
List<Project> projects = projectService.list(query);
return CollUtils.convert(projects, w -> ProjectLibListItemVO
.builder()
.id(w.getId())
.projectName(w.getProjectName())
.declaredAmount(w.getDeclareAmount())
.projectType(w.getProjectType())
.projectYear(w.getProjectYear())
.buildOrg(w.getBuildOrgName())
.build());
}

private void buildOptionProjectQuery(LambdaQueryWrapper<Project> query, String meetingType, ProjectStatusEnum status) {
String sql = String.format("select 1 from meeting m inner join meeting_inner_project mip on" +
" m.is_inner_project = true and m.id = mip.meeting_id and m.type = %s and m.status != 3", meetingType);
query.eq(Project::getStatus, status.getCode());
query.and(q1 -> q1.notExists(sql)).or(q2 -> q2.exists(sql + " inner join nd_expert_review ner " +
"on ner.meeting_id = m.id and ner.is_final = true and review_result in (2, 3)"));
}

}

+ 9
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java Dosyayı Görüntüle

@@ -4,7 +4,9 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;

import java.math.BigDecimal;
import java.time.LocalDateTime;
@@ -20,9 +22,14 @@ import java.util.Optional;
* @since 15:13 2023/2/1
*/
@Data
@Builder
@ApiModel("项目库列表视图")
public class ProjectLibListItemVO {

@Tolerate
public ProjectLibListItemVO() {
}

@ApiModelProperty("项目ID")
private Long id;

@@ -67,8 +74,8 @@ public class ProjectLibListItemVO {

private String projectTypeName;

public String getProjectTypeName(){
if(Objects.nonNull(this.projectType)){
public String getProjectTypeName() {
if (Objects.nonNull(this.projectType)) {
Optional.ofNullable(ProjectTypeEnum.getDesc(this.projectType))
.ifPresent(desc -> this.projectTypeName = desc);
}


Yükleniyor…
İptal
Kaydet