Browse Source

modify:

1. 会议关联项目评审结果上传;
tags/24093001
WendyYang 3 months ago
parent
commit
2a79eb2732
3 changed files with 20 additions and 5 deletions
  1. +5
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/req/ProjectReviewInfoReq.java
  2. +9
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java
  3. +6
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java

+ 5
- 0
hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/req/ProjectReviewInfoReq.java View File

@@ -2,7 +2,9 @@ package com.hz.pm.api.meeting.entity.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
@@ -26,15 +28,18 @@ public class ProjectReviewInfoReq {
private String techFeasibility;

@ApiModelProperty("审核结果:1 通过、0 不通过")
@NotNull(message = "评审结果不能为空")
private Integer reviewResult;

@ApiModelProperty("其他意见")
@Length(max = 2000, message = "专家意见长度不能超过2000")
private String otherAdvices;

@ApiModelProperty("投资测算合理性")
private String investRationality;

@ApiModelProperty("建议资金(单位:万元)")
@NotNull(message = "评审项目总投资不能为空")
private BigDecimal suggestedFunding;

@ApiModelProperty("相关材料")


+ 9
- 5
hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/MeetingManage.java View File

@@ -44,6 +44,7 @@ import com.hz.pm.api.meta.helper.TagCache;
import com.hz.pm.api.open.model.vo.ExpertInfoVO;
import com.hz.pm.api.open.model.vo.MeetingExpertToMhDTO;
import com.hz.pm.api.organization.service.IDingOrganizationService;
import com.hz.pm.api.projectlib.helper.ProjectManageUtil;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus;
import com.hz.pm.api.projectlib.service.IProjectService;
@@ -1004,11 +1005,12 @@ public class MeetingManage {
case PROJECT_REVIEW:
case EXPERT_REVIEW:
query.isNotNull(Project::getConstructionPlanSealFile);
buildOptionProjectQuery(query, meetingType, ProjectStatus.WITHOUT_PROJECT_REVIEW);
buildOptionProjectQuery(query, meetingType, ProjectStatus.WITHOUT_EXPERT_REVIEW, ProjectStatus.EXPERT_REVIEW_FAILED);
break;
default:
return PageVo.empty();
}
ProjectManageUtil.projectBaseQuery(query);
Page<Project> page = projectService.page(req.page(), query);
PageVo<MeetingReviewProjectVO> result = PageVo.of(null, page.getTotal());
if (result.getTotal() > 0) {
@@ -1047,14 +1049,15 @@ public class MeetingManage {
return ProjectReviewResultBuilder.convert(projectReview);
}

private void buildOptionProjectQuery(LambdaQueryWrapper<Project> query, String meetingType, ProjectStatus status) {
if (status != null) {
query.eq(Project::getStatus, status.getCode());
private void buildOptionProjectQuery(LambdaQueryWrapper<Project> query, String meetingType, ProjectStatus... statusList) {
if (statusList != null && statusList.length > 0) {
List<Integer> statusCodeList = CollUtils.fieldList(Arrays.asList(statusList), ProjectStatus::getCode);
query.in(Project::getStatus, statusCodeList);
}
String sql = String.format("select 1 from meeting m inner join meeting_inner_project mip on" +
" m.is_inner_project = 1 and m.id = mip.meeting_id and nd_project.id = mip.project_id" +
" and m.type = %s and m.status != 3", meetingType);
String sql2 = String.format("1 = (select case when review_result in (2,3) then 1 else 0 end from " +
String sql2 = String.format("1 = (select case when review_result in (0) then 1 else 0 end from " +
" (select ner.review_result from meeting m inner join meeting_inner_project mip on" +
" m.is_inner_project = 1 and m.id = mip.meeting_id and nd_project.id = mip.project_id" +
" and m.type = %s and m.status != 3 left join nd_expert_review ner on ner.meeting_id = m.id " +
@@ -1099,6 +1102,7 @@ public class MeetingManage {
return result;
}

@Transactional(rollbackFor = Exception.class)
public void uploadProjectReviewResult(ProjectReviewResultUploadReq req) {
String key = "meeting_project_result_upload:" + req.getMeetingProjectId();
if (!distributedLock.lock(key, RETRY_TIMES)) {


+ 6
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java View File

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.enumeration.ProjectProcessType;
import com.hz.pm.api.common.exception.ReturnException;
import com.hz.pm.api.common.helper.UserInfoHelper;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.common.model.constant.ExistsSqlConst;
@@ -355,6 +356,11 @@ public class ProjectReviewManage {
}

public void uploadConstructionPlanSealFile(UploadConstructionPlanSealFileReq req) {
Project project = projectService.getNewProject(req.getProjectId());
if (project == null || (ProjectStatus.WITHOUT_EXPERT_REVIEW.eq(project.getStatus())
&& !ProjectStatus.EXPERT_REVIEW_FAILED.eq(project.getStatus()))) {
throw ReturnException.wrap("项目不存在或项目状态异常");
}
Wrapper<Project> wrapper = Wrappers.lambdaUpdate(Project.class)
.set(Project::getConstructionPlanSealFile, req.getConstructionPlanSealFile())
.set(Project::getUpdateOn, LocalDateTime.now())


Loading…
Cancel
Save