From 88ee48764d2654e138077e10902f9f29d70f355e Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 29 Nov 2023 17:33:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=20=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/manage/FundStatisticsManage.java | 2 +- .../pmapi/gov/utils/ProjectConvertUtil.java | 67 +++++++++++++++++++++- .../projectdeclared/model/entity/ProjectDraft.java | 6 ++ .../projectdeclared/model/vo/ProjectDraftVO.java | 6 ++ .../pmapi/projectlib/manage/ProjectLibManage.java | 13 +++++ .../pmapi/projectlib/model/dto/ProjectDTO.java | 3 + .../pmapi/projectlib/model/entity/Project.java | 7 +++ .../pmapi/projectlib/model/vo/ProjectDetailVO.java | 12 ++++ 8 files changed, 112 insertions(+), 4 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/FundStatisticsManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/FundStatisticsManage.java index 85dfde5..363b6fc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/FundStatisticsManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/FundStatisticsManage.java @@ -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()); } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java index e63969a..954e9c2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java @@ -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 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 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; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ProjectDraft.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ProjectDraft.java index 8fdde15..c6980be 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ProjectDraft.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ProjectDraft.java @@ -361,4 +361,10 @@ public class ProjectDraft implements Serializable { @ApiModelProperty("系统定位") private String systemPosition; + + @ApiModelProperty("立项依据") + private String baseProjBasis; + + @ApiModelProperty("立项依据证明材料") + private String baseProjBasisFile; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDraftVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDraftVO.java index 9b1b712..f1d0df6 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDraftVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDraftVO.java @@ -364,4 +364,10 @@ public class ProjectDraftVO implements Serializable { @ApiModelProperty("系统定位") private String systemPosition; + + @ApiModelProperty("立项依据") + private String baseProjBasis; + + @ApiModelProperty("立项依据证明材料") + private String baseProjBasisFile; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java index 67c6e55..4153453 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java @@ -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 projectLibList(ProjectListReq req) { LambdaQueryWrapper 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; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java index 5160dae..d2480bf 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java @@ -373,4 +373,7 @@ public class ProjectDTO implements Serializable { @ApiModelProperty("系统定位") private String systemPosition; + + @ApiModelProperty("立项依据证明材料") + private String baseProjBasisFile; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java index 34a2076..ddee407 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java @@ -570,4 +570,11 @@ public class Project implements Serializable { @ApiModelProperty("系统定位") private String systemPosition; + + @ApiModelProperty("立项依据") + private String baseProjBasis; + + @ApiModelProperty("立项依据证明材料") + private String baseProjBasisFile; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java index 32ea859..b21d2a1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java @@ -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; }