Browse Source

项目 兼容

tags/24080901
PoffyZhang 1 year ago
parent
commit
88ee48764d
8 changed files with 112 additions and 4 deletions
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/FundStatisticsManage.java
  2. +64
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java
  3. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ProjectDraft.java
  4. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDraftVO.java
  5. +13
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  6. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java
  7. +7
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java
  8. +12
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/FundStatisticsManage.java View File

@@ -465,7 +465,7 @@ public class FundStatisticsManage {
v1.setAmount(v1.getAmount().add(v2.getAmount()));
return v1;
})).values().stream()
.sorted(Comparator.comparing(FundStatisticsVO.AmountData::getAmount))
.sorted(Comparator.comparing(FundStatisticsVO.AmountData::getAmount).reversed())
.limit(10).collect(Collectors.toList());
}
}

+ 64
- 3
pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java View File

@@ -12,6 +12,7 @@ import com.ningdatech.pmapi.common.util.BizUtils;
import com.ningdatech.pmapi.gov.enumeration.GovProjectClassifiedEnum;
import com.ningdatech.pmapi.gov.manage.GovProjectCollectionManage;
import com.ningdatech.pmapi.gov.model.vo.*;
import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectApplicationVO;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO;
@@ -20,6 +21,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
@@ -87,6 +89,7 @@ public class ProjectConvertUtil {
// TODO 缺少状态映射
// baseinfo.setBaseProjSetProg();
baseinfo.setBaseProjType(project.getProjectType());
baseinfo.setDeleted(Boolean.FALSE);
return baseinfo;
}

@@ -106,7 +109,17 @@ public class ProjectConvertUtil {
}
return app.getApplicationName();
}).collect(Collectors.joining(StrPool.SEMICOLON_CHINA));
apply.setBaseAccountAppName(appName);
String appCode = projectApplications.stream().map(app -> {
if (StringUtils.isNotBlank(app.getRelatedExistsApplication())) {
return app.getRelatedExistsApplicationCode();
}
return app.getAppCode();
}).collect(Collectors.joining(StrPool.SEMICOLON_CHINA));
String accountName = projectApplications.stream().map(app -> app.getAccountAppName())
.collect(Collectors.joining(StrPool.SEMICOLON_CHINA));
apply.setBaseAccountAppName(accountName);
apply.setBaseProjSys(appName);
apply.setBaseProjSysCode(appCode);
}
apply.setBaseBasisAmountOri(project.getBaseBasisAmountOri());
String coreBusiness = project.getCoreBusiness();
@@ -134,8 +147,6 @@ public class ProjectConvertUtil {
apply.setBaseHistorProjName(project.getBaseHistorProjName());
apply.setBaseHistorProjYear(project.getBaseHistorProjYear());
apply.setBaseProjApplyFile(project.getProjectApplicationForm());
apply.setBaseProjApplyFilePdf(collectionManage.convertAndUpload(project
.getProjectApplicationForm()).toString());
String beginTime = project.getBeginTime();
String endTime = project.getEndTime();
if(StringUtils.isNotBlank(beginTime)){
@@ -145,12 +156,62 @@ public class ProjectConvertUtil {
apply.setBaseProjEndTime(BizUtils.convertLocalDateTime(endTime));
}
apply.setBaseProjDuration(project.getBuildCycle());
apply.setBaseProjConsClass(project.getBuildLevel());
apply.setBaseProjIntro(project.getProjectIntroduction());
apply.setBaseProjBasis(project.getBaseProjBasis());
apply.setBaseProjBasisFile(project.getBaseProjBasisFile());
apply.setBaseProjDeclAmount(project.getAnnualPlanAmount());
apply.setBaseProjTotalAmount(project.getDeclareAmount());
apply.setBaseProjSetYear(Objects.nonNull(project.getProjectYear())
? String.valueOf(project.getProjectYear()) : null);
apply.setBaseProjRemark(project.getProjectRemarks());
apply.setBaseProjOtherFile(project.getBaseProjOtherFile());
apply.setBaseResearchReportFile(project.getBaseResearchReportFile());
apply.setBeseExpectedResults(project.getBeseExpectedResults());
apply.setSetProjCodeFinan(project.getFinancialCode());
apply.setMissing(StringUtils.isNotBlank(project.getBaseHistorProjId()) ? Boolean.FALSE : Boolean.TRUE);
return apply;
}

//转化审批信息
private GovBizProjectApproveVO buildApprove(ProjectDetailVO project) {
GovBizProjectApproveVO approve = new GovBizProjectApproveVO();
approve.setBaseProjId(project.getProjectCode());
approve.setBaseProjName(project.getProjectName());
approve.setApprovalFile(project.getApprovedFile());
approve.setAreaCode(RegionConst.RC_LS);
approve.setDeleted(Boolean.FALSE);
approve.setBaseDevelopCode(project.getDevelopCode());
approve.setBaseExpertTotalMoney(project.getProposeTotalInvest());
approve.setBaseExpertYearMoney(project.getProposeAnnualBudget());
approve.setBaseInitialReviewTotalMoney(project.getApprovalAmount());
approve.setBaseProjReplyAmount(project.getApprovalBudget());
approve.setBaseReviewCommentsFile(project.getProposeAttachFiles());
List<ProjectApplicationVO> projectApplications = project.getProjectApplications();
if(CollUtil.isNotEmpty(projectApplications)){
Integer max = 0;
for(ProjectApplicationVO app : projectApplications){
max = Math.max(app.getSecrecyGrade(),max);
}
if(max > 0){
approve.setEqualProtectionLevel(String.format(max.toString(),
StrPool.FORMAT_DATE_SINGLE_DIGITS));
}
}
approve.setPreliminaryDesignScheme(project.getPreliminaryPlanFile());
approve.setPreliminaryDesignFile(project.getPreliminaryInspectionMaterials());
approve.setBaseReviewOpinion(project.getProposeAttach());
if(Objects.nonNull(project.getBaseReviewResults())){
approve.setBaseReviewResults(String.format(project.getBaseReviewResults().toString(),
StrPool.FORMAT_DATE_SINGLE_DIGITS));
}
List<PurchaseVO> purchases = project.getPurchases();
if(CollUtil.isNotEmpty(purchases)){
purchases.stream().map(PurchaseVO::getTransactionAmount)
.filter(Objects::nonNull).reduce(BigDecimal::add)
.ifPresent(j -> approve.setReleaseYearMoney(j));

}

return approve;
}


+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ProjectDraft.java View File

@@ -361,4 +361,10 @@ public class ProjectDraft implements Serializable {

@ApiModelProperty("系统定位")
private String systemPosition;

@ApiModelProperty("立项依据")
private String baseProjBasis;

@ApiModelProperty("立项依据证明材料")
private String baseProjBasisFile;
}

+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDraftVO.java View File

@@ -364,4 +364,10 @@ public class ProjectDraftVO implements Serializable {

@ApiModelProperty("系统定位")
private String systemPosition;

@ApiModelProperty("立项依据")
private String baseProjBasis;

@ApiModelProperty("立项依据证明材料")
private String baseProjBasisFile;
}

+ 13
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java View File

@@ -32,6 +32,8 @@ import com.ningdatech.pmapi.dashboard.handle.ApplicationHandler;
import com.ningdatech.pmapi.dashboard.handle.ProjectStatusHandler;
import com.ningdatech.pmapi.datascope.model.DataScopeDTO;
import com.ningdatech.pmapi.datascope.utils.DataScopeUtil;
import com.ningdatech.pmapi.expert.model.entity.ExpertReview;
import com.ningdatech.pmapi.expert.service.IExpertReviewService;
import com.ningdatech.pmapi.filemanage.model.entity.ProjectApplyBorrow;
import com.ningdatech.pmapi.filemanage.service.INdProjectApplyBorrowService;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
@@ -142,6 +144,8 @@ public class ProjectLibManage {

private final UserInfoHelper userInfoHelper;

private final IExpertReviewService expertReviewService;

public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) {
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req);
query.eq(Project::getNewest, Boolean.TRUE);
@@ -822,6 +826,15 @@ public class ProjectLibManage {
vo.setApprovedFileName(fileMap.get(vo.getApprovedFile()));
vo.setApprovedConstructionPlanFileName(fileMap.get(vo.getApprovedConstructionPlanFile()));
}
//专家评审 其它建议
ExpertReview expertReview = expertReviewService.getOne(Wrappers.lambdaQuery(ExpertReview.class)
.eq(ExpertReview::getProjectCode, projectInfo.getProjectCode())
.eq(ExpertReview::getIsFinal, Boolean.TRUE)
.last(BizConst.LIMIT_1));
if(Objects.nonNull(expertReview)){
vo.setProposeAttach(expertReview.getOtherAdvice());
vo.setBaseReviewResults(expertReview.getReviewResult());
}
return vo;
}



+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java View File

@@ -373,4 +373,7 @@ public class ProjectDTO implements Serializable {

@ApiModelProperty("系统定位")
private String systemPosition;

@ApiModelProperty("立项依据证明材料")
private String baseProjBasisFile;
}

+ 7
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java View File

@@ -570,4 +570,11 @@ public class Project implements Serializable {

@ApiModelProperty("系统定位")
private String systemPosition;

@ApiModelProperty("立项依据")
private String baseProjBasis;

@ApiModelProperty("立项依据证明材料")
private String baseProjBasisFile;

}

+ 12
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java View File

@@ -535,6 +535,12 @@ public class ProjectDetailVO {
@ApiModelProperty("建议评审意见附件")
private String proposeAttachFiles;

@ApiModelProperty("专家评审意见")
private String proposeAttach;

@ApiModelProperty("专家评审结果")
private Integer baseReviewResults;

@ApiModelProperty("咨询公司")
private String consultancy;

@@ -552,4 +558,10 @@ public class ProjectDetailVO {

@ApiModelProperty("系统定位")
private String systemPosition;

@ApiModelProperty("立项依据")
private String baseProjBasis;

@ApiModelProperty("立项依据证明材料")
private String baseProjBasisFile;
}

Loading…
Cancel
Save