@@ -73,13 +73,13 @@ public class ExpertReviewController { | |||||
return expertReviewManage.listReviews(projectId, meetingId, false); | return expertReviewManage.listReviews(projectId, meetingId, false); | ||||
} | } | ||||
@GetMapping("/detail/{projectId}") | |||||
@GetMapping("/detail/{projectCode}") | |||||
@ApiImplicitParams({ | @ApiImplicitParams({ | ||||
@ApiImplicitParam(name = "projectId", value = "项目ID"), | |||||
@ApiImplicitParam(name = "projectCode", value = "项目编号"), | |||||
}) | }) | ||||
@ApiOperation("查看项目的所有评审意见") | @ApiOperation("查看项目的所有评审意见") | ||||
public ProjectReviewDetailVO projectExpertReviewDetail(@PathVariable Long projectId) { | |||||
return expertReviewManage.projectExpertReviewDetail(projectId); | |||||
public ProjectReviewDetailVO projectExpertReviewDetail(@PathVariable String projectCode) { | |||||
return expertReviewManage.projectExpertReviewDetail(projectCode); | |||||
} | } | ||||
} | } |
@@ -107,6 +107,7 @@ public class ExpertReviewManage { | |||||
review.setReviewResult(req.getReviewResult()); | review.setReviewResult(req.getReviewResult()); | ||||
review.setContent(JSONUtil.toJsonStr(req.getReviewTemplateOptions())); | review.setContent(JSONUtil.toJsonStr(req.getReviewTemplateOptions())); | ||||
review.setProjectId(req.getProjectId()); | review.setProjectId(req.getProjectId()); | ||||
review.setProjectCode(req.getProjectCode()); | |||||
review.setTemplateId(req.getTemplateId()); | review.setTemplateId(req.getTemplateId()); | ||||
review.setMeetingId(req.getMeetingId()); | review.setMeetingId(req.getMeetingId()); | ||||
review.setOtherAdvice(req.getOtherAdvice()); | review.setOtherAdvice(req.getOtherAdvice()); | ||||
@@ -151,9 +152,9 @@ public class ExpertReviewManage { | |||||
}); | }); | ||||
} | } | ||||
public ProjectReviewDetailVO projectExpertReviewDetail(Long projectId) { | |||||
public ProjectReviewDetailVO projectExpertReviewDetail(String projectCode) { | |||||
ProjectReviewDetailVO detail = new ProjectReviewDetailVO(); | ProjectReviewDetailVO detail = new ProjectReviewDetailVO(); | ||||
List<Long> meetingIds = meetingInnerProjectService.listMeetingIdByProjectId(projectId); | |||||
List<Long> meetingIds = meetingInnerProjectService.listMeetingIdByProjectCode(projectCode); | |||||
if (meetingIds.isEmpty()) { | if (meetingIds.isEmpty()) { | ||||
return detail; | return detail; | ||||
} | } | ||||
@@ -166,7 +167,7 @@ public class ExpertReviewManage { | |||||
}))).values(); | }))).values(); | ||||
LambdaQueryWrapper<ExpertReview> erQuery = Wrappers.lambdaQuery(ExpertReview.class) | LambdaQueryWrapper<ExpertReview> erQuery = Wrappers.lambdaQuery(ExpertReview.class) | ||||
.in(ExpertReview::getMeetingId, tmpMeetingIds) | .in(ExpertReview::getMeetingId, tmpMeetingIds) | ||||
.eq(ExpertReview::getProjectId, projectId) | |||||
.eq(ExpertReview::getProjectCode, projectCode) | |||||
.orderByDesc(ExpertReview::getCreateOn); | .orderByDesc(ExpertReview::getCreateOn); | ||||
List<ExpertReview> expertReviews = expertReviewService.list(erQuery); | List<ExpertReview> expertReviews = expertReviewService.list(erQuery); | ||||
if (expertReviews.isEmpty()) { | if (expertReviews.isEmpty()) { | ||||
@@ -30,6 +30,8 @@ public class ExpertReview implements Serializable { | |||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private Long projectId; | private Long projectId; | ||||
private String projectCode; | |||||
@ApiModelProperty("会议ID") | @ApiModelProperty("会议ID") | ||||
private Long meetingId; | private Long meetingId; | ||||
@@ -28,6 +28,10 @@ public class ExpertReviewDetailReq { | |||||
@NotNull(message = "项目ID不能为空") | @NotNull(message = "项目ID不能为空") | ||||
private Long projectId; | private Long projectId; | ||||
@ApiModelProperty("项目编号") | |||||
@NotNull(message = "项目编号不能为空") | |||||
private String projectCode; | |||||
@ApiModelProperty("会议ID") | @ApiModelProperty("会议ID") | ||||
@NotNull(message = "会议ID不能为空") | @NotNull(message = "会议ID不能为空") | ||||
private Long meetingId; | private Long meetingId; | ||||
@@ -34,4 +34,7 @@ public class MeetingInnerProject implements Serializable { | |||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private Long projectId; | private Long projectId; | ||||
@ApiModelProperty("项目编号") | |||||
private String projectCode; | |||||
} | } |
@@ -28,6 +28,9 @@ public class ReviewProjectDTO { | |||||
@ApiModelProperty("项目名称") | @ApiModelProperty("项目名称") | ||||
private String projectName; | private String projectName; | ||||
@ApiModelProperty("项目编号") | |||||
private String projectCode; | |||||
@ApiModelProperty("项目类型") | @ApiModelProperty("项目类型") | ||||
private Integer projectType; | private Integer projectType; | ||||
@@ -28,6 +28,9 @@ public class MeetingReviewProjectVO { | |||||
@ApiModelProperty("项目ID") | @ApiModelProperty("项目ID") | ||||
private Long id; | private Long id; | ||||
@ApiModelProperty("项目编号") | |||||
private String projectCode; | |||||
@ApiModelProperty("项目名称") | @ApiModelProperty("项目名称") | ||||
private String projectName; | private String projectName; | ||||
@@ -897,6 +897,7 @@ public class MeetingManage { | |||||
return MeetingReviewProjectVO | return MeetingReviewProjectVO | ||||
.builder() | .builder() | ||||
.id(project.getId()) | .id(project.getId()) | ||||
.projectCode(project.getProjectCode()) | |||||
.projectName(project.getProjectName()) | .projectName(project.getProjectName()) | ||||
.declaredAmount(project.getDeclareAmount()) | .declaredAmount(project.getDeclareAmount()) | ||||
.projectType(project.getProjectType()) | .projectType(project.getProjectType()) | ||||
@@ -104,7 +104,7 @@ | |||||
</sql> | </sql> | ||||
<select id="pageReviewProjectList" resultType="com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO"> | <select id="pageReviewProjectList" resultType="com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO"> | ||||
select mip.project_id, np.project_name, np.project_type, np.project_year, np.build_org_name, m.type review_type, | |||||
select mip.project_id,np.project_code, np.project_name, np.project_type, np.project_year, np.build_org_name, m.type review_type, | |||||
np.biz_domain, np.declare_amount declared_amount, mip.meeting_id, m.type meetingType, m.start_time reviewTime,m.end_time endReviewTime, | np.biz_domain, np.declare_amount declared_amount, mip.meeting_id, m.type meetingType, m.start_time reviewTime,m.end_time endReviewTime, | ||||
m.connecter, m.contact, me.is_headman, (select count(1) from nd_expert_review ner where ner.meeting_id = m.id and ner.project_id = np.id | m.connecter, m.contact, me.is_headman, (select count(1) from nd_expert_review ner where ner.meeting_id = m.id and ner.project_id = np.id | ||||
and ner.create_by = me.expert_id) reviewed | and ner.create_by = me.expert_id) reviewed | ||||
@@ -33,4 +33,13 @@ public interface IMeetingInnerProjectService extends IService<MeetingInnerProjec | |||||
**/ | **/ | ||||
List<Long> listMeetingIdByProjectId(Long projectId); | List<Long> listMeetingIdByProjectId(Long projectId); | ||||
/** | |||||
* 查询项目关联的所有会议 | |||||
* | |||||
* @param projectCode 项目编号 | |||||
* @return 项目关联的会议ID | |||||
* @author WendyYang | |||||
**/ | |||||
List<Long> listMeetingIdByProjectCode(String projectCode); | |||||
} | } |
@@ -36,4 +36,11 @@ public class MeetingInnerProjectServiceImpl extends ServiceImpl<MeetingInnerProj | |||||
return CollUtils.fieldList(list(query), MeetingInnerProject::getMeetingId); | return CollUtils.fieldList(list(query), MeetingInnerProject::getMeetingId); | ||||
} | } | ||||
@Override | |||||
public List<Long> listMeetingIdByProjectCode(String projectCode) { | |||||
LambdaQueryWrapper<MeetingInnerProject> query = Wrappers | |||||
.lambdaQuery(MeetingInnerProject.class) | |||||
.eq(MeetingInnerProject::getProjectCode, projectCode); | |||||
return CollUtils.fieldList(list(query), MeetingInnerProject::getMeetingId); | |||||
} | |||||
} | } |