From 2faed0fb7b6f24061ada3104925071724d584607 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Fri, 28 Apr 2023 13:44:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E4=BC=9A=E8=AE=AE=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=A1=B9=E7=9B=AE=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/meeting/entity/dto/MeetingBasicDTO.java | 2 +- .../entity/dto/MeetingReviewProjectDTO.java | 3 +++ .../pmapi/meeting/entity/dto/ProjectIdCodeDTO.java | 23 ++++++++++++++++++++++ .../pmapi/meeting/helper/MeetingManageHelper.java | 2 +- .../pmapi/meeting/manage/MeetingManage.java | 15 ++++++++------ 5 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ProjectIdCodeDTO.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java index 1440751..437c598 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingBasicDTO.java @@ -66,7 +66,7 @@ public class MeetingBasicDTO { private String contact; @ApiModelProperty("内部项目ID") - private List projectIdList; + private List innerProjects; @ApiModelProperty("外部项目") private List projects; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java index fd6d1dd..59fef4d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/MeetingReviewProjectDTO.java @@ -19,6 +19,9 @@ public class MeetingReviewProjectDTO { @ApiModelProperty("项目ID") private Long projectId; + @ApiModelProperty("项目编码") + private String projectCode; + @ApiModelProperty("项目名称") private String projectName; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ProjectIdCodeDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ProjectIdCodeDTO.java new file mode 100644 index 0000000..94b8641 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/entity/dto/ProjectIdCodeDTO.java @@ -0,0 +1,23 @@ +package com.ningdatech.pmapi.meeting.entity.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * ProjectIdCodeDTO + *

+ * + * @author WendyYang + * @since 2023/4/28 + **/ +@Data +public class ProjectIdCodeDTO { + + @ApiModelProperty("项目ID") + private Long projectId; + + @ApiModelProperty("项目编码") + private String projectCode; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java index 680b92a..984d8cd 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java @@ -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(), "评审项目不能为空"); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java index b2cba8d..c3e01a9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java @@ -137,12 +137,14 @@ public class MeetingManage { meeting.setInviteType(inviteRule.getInviteType()); meetingService.save(meeting); if (meetingBasic.getIsInnerProject()) { - List projects = meetingBasic.getProjectIdList().stream().map(w -> { - MeetingInnerProject project = new MeetingInnerProject(); - project.setMeetingId(meeting.getId()); - project.setProjectId(w); - return project; - }).collect(Collectors.toList()); + List 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 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());