Browse Source

创建会议增加项目编码

master
WendyYang 1 year ago
parent
commit
2faed0fb7b
5 changed files with 37 additions and 8 deletions
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java
  2. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java
  3. +23
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ProjectIdCodeDTO.java
  4. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java
  5. +9
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java View File

@@ -66,7 +66,7 @@ public class MeetingBasicDTO {
private String contact;

@ApiModelProperty("内部项目ID")
private List<Long> projectIdList;
private List<ProjectIdCodeDTO> innerProjects;

@ApiModelProperty("外部项目")
private List<MeetingReviewProjectDTO> projects;


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

@@ -19,6 +19,9 @@ public class MeetingReviewProjectDTO {
@ApiModelProperty("项目ID")
private Long projectId;

@ApiModelProperty("项目编码")
private String projectCode;

@ApiModelProperty("项目名称")
private String projectName;



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

@@ -0,0 +1,23 @@
package com.ningdatech.pmapi.meeting.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
* <p>
* ProjectIdCodeDTO
* </p>
*
* @author WendyYang
* @since 2023/4/28
**/
@Data
public class ProjectIdCodeDTO {

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

@ApiModelProperty("项目编码")
private String projectCode;

}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java View File

@@ -63,7 +63,7 @@ public class MeetingManageHelper {

public void checkReviewProject(MeetingBasicDTO meetingBasic) {
if (meetingBasic.getIsInnerProject()) {
Assert.notEmpty(meetingBasic.getProjectIdList(), "评审项目不能为空");
Assert.notEmpty(meetingBasic.getInnerProjects(), "评审项目不能为空");
} else {
Assert.notEmpty(meetingBasic.getProjects(), "评审项目不能为空");
}


+ 9
- 6
pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java View File

@@ -137,12 +137,14 @@ public class MeetingManage {
meeting.setInviteType(inviteRule.getInviteType());
meetingService.save(meeting);
if (meetingBasic.getIsInnerProject()) {
List<MeetingInnerProject> projects = meetingBasic.getProjectIdList().stream().map(w -> {
MeetingInnerProject project = new MeetingInnerProject();
project.setMeetingId(meeting.getId());
project.setProjectId(w);
return project;
}).collect(Collectors.toList());
List<MeetingInnerProject> projects = meetingBasic.getInnerProjects()
.stream().map(w -> {
MeetingInnerProject project = new MeetingInnerProject();
project.setMeetingId(meeting.getId());
project.setProjectId(w.getProjectId());
project.setProjectCode(w.getProjectCode());
return project;
}).collect(Collectors.toList());
meetingInnerProjectService.saveBatch(projects);
} else {
List<MeetingOuterProject> projects = meetingBasic.getProjects().stream().map(w -> {
@@ -450,6 +452,7 @@ public class MeetingManage {
mrp.setProjectType(w.getProjectType().toString());
mrp.setProjectYear(w.getProjectYear());
mrp.setDeclareAmount(w.getDeclareAmount());
mrp.setProjectCode(w.getProjectCode());
ExpertReview review = reviewMap.get(w.getId());
if (review != null) {
mrp.setReviewResult(ReviewResultEnum.getByCode(review.getReviewResult()).getValue());


Loading…
Cancel
Save