From 1be22ab0b6378790b2035fa6e321ca4b2d554e16 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Tue, 27 Jun 2023 11:03:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E4=B8=8B=E8=BD=BD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/filemanage/manage/ProjectFileManage.java | 78 +++++++++++++++------- .../pmapi/filemanage/model/vo/ProjectFileVO.java | 37 +++++----- 2 files changed, 73 insertions(+), 42 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java index 5e47aa2..91387f4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java @@ -28,9 +28,16 @@ import com.ningdatech.pmapi.filemanage.model.vo.ProjectFileVO; import com.ningdatech.pmapi.filemanage.service.INdProjectApplyBorrowService; import com.ningdatech.pmapi.organization.model.entity.DingOrganization; import com.ningdatech.pmapi.organization.service.IDingOrganizationService; +import com.ningdatech.pmapi.projectdeclared.manage.ConstructionManage; import com.ningdatech.pmapi.projectdeclared.manage.DefaultDeclaredProjectManage; +import com.ningdatech.pmapi.projectdeclared.manage.FinalAcceptanceManage; +import com.ningdatech.pmapi.projectdeclared.manage.PurchaseManage; import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; +import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.FinalAcceptanceVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; import com.ningdatech.pmapi.projectdeclared.service.IContractService; import com.ningdatech.pmapi.projectdeclared.service.IPurchaseService; import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; @@ -103,6 +110,9 @@ public class ProjectFileManage { private final IContractService contractService; private final ExpertReviewManage expertReviewManage; private final FileService fileService; + private final PurchaseManage purchaseManage; + private final ConstructionManage constructionManage; + private final FinalAcceptanceManage finalAcceptanceManage; public PageVo list(ProjectFileListParam param) { @@ -197,16 +207,23 @@ public class ProjectFileManage { throw new BizException("您没有权限查看此项目档案!"); } ProjectFileVO projectFileVo = new ProjectFileVO(); + String projectCode = project.getProjectCode(); ProjectDetailVO projectDetailVo = projectLibManage.getProjectDetail(projectId); List processDetailVos = projectLibManage.processScheduleDetail(projectId); + ProjectReviewDetailVO projectReviewDetailVo = expertReviewManage.projectExpertReviewDetail(projectCode); + PurchaseVO purchaseVo = purchaseManage.detailByProjectId(projectId); + ContractVO contractVo = constructionManage.detailContractByProjectId(projectId); + PreInsVO preInsVo = constructionManage.detailPreInsByProjectId(projectId); + FinalAcceptanceVO finalAcceptanceVo = finalAcceptanceManage.detailByProjectId(projectId); + projectFileVo.setProjectDetailVo(projectDetailVo); projectFileVo.setProcessDetailVos(processDetailVos); - projectFileVo.setProjectName(project.getProjectName()); - projectFileVo.setCanRead(Boolean.TRUE); - projectFileVo.setPojectCode(project.getProjectCode()); - projectFileVo.setId(projectId); - projectFileVo.setBuildOrgName(project.getBuildOrgName()); - projectFileVo.setUpdateOn(project.getUpdateOn()); + projectFileVo.setProjectReviewDetailVo(projectReviewDetailVo); + projectFileVo.setPurchaseVo(purchaseVo); + projectFileVo.setContractVo(contractVo); + projectFileVo.setPreInsVo(preInsVo); + projectFileVo.setFinalAcceptanceVo(finalAcceptanceVo); + return projectFileVo; } @@ -378,41 +395,52 @@ public class ProjectFileManage { // 方案申报阶段 // 获取建设方案文件 String constructionPlanFile = project.getConstructionPlanFile(); - JSONObject jsonObject = JSON.parseObject(constructionPlanFile, JSONObject.class); - Long constructFileId = jsonObject.getLong(CommonConst.FILE_ID_STR); - fileIdList.add(constructFileId); + String str = StrPool.LEFT_SQ_BRACKET + StrPool.RIGHT_SQ_BRACKET; + if (!str.equals(constructionPlanFile)) { + JSONObject jsonObject = JSON.parseObject(constructionPlanFile, JSONObject.class); + Long constructFileId = jsonObject.getLong(CommonConst.FILE_ID_STR); + fileIdList.add(constructFileId); + } // 立项批复阶段 // 获取批复文件 String approvedFile = project.getApprovedFile(); - fileIdList.add(Long.valueOf(approvedFile)); + if (Objects.nonNull(approvedFile)) { + fileIdList.add(Long.valueOf(approvedFile)); + } // 获取建设方案文件 String approvedConstructionPlanFile = project.getApprovedConstructionPlanFile(); - fileIdList.add(Long.valueOf(approvedConstructionPlanFile)); + if (Objects.nonNull(approvedConstructionPlanFile)) { + fileIdList.add(Long.valueOf(approvedConstructionPlanFile)); + } // 采购结果备案阶段 Purchase purchase = purchaseService .getOne(Wrappers.lambdaQuery(Purchase.class).eq(Purchase::getProjectId, projectId).last(BizConst.LIMIT_1)); // 获取投标文件 - String biddingDoc = purchase.getBiddingDoc(); - List biddingFileIdList = getFileIdList(biddingDoc); - fileIdList.addAll(biddingFileIdList); - // 获取招标文件 - String bidDoc = purchase.getBidDoc(); - List bidFileIdList = getFileIdList(bidDoc); - fileIdList.addAll(bidFileIdList); - // 获取中标通知书 - String acceptanceLetter = purchase.getAcceptanceLetter(); - List acceptFileIdList = getFileIdList(acceptanceLetter); - fileIdList.addAll(acceptFileIdList); + if (Objects.nonNull(purchase)) { + String biddingDoc = purchase.getBiddingDoc(); + List biddingFileIdList = getFileIdList(biddingDoc); + fileIdList.addAll(biddingFileIdList); + // 获取招标文件 + String bidDoc = purchase.getBidDoc(); + List bidFileIdList = getFileIdList(bidDoc); + fileIdList.addAll(bidFileIdList); + // 获取中标通知书 + String acceptanceLetter = purchase.getAcceptanceLetter(); + List acceptFileIdList = getFileIdList(acceptanceLetter); + fileIdList.addAll(acceptFileIdList); + } // 合同备案阶段 Contract contract = contractService .getOne(Wrappers.lambdaQuery(Contract.class).eq(Contract::getProjectId, projectId).last(BizConst.LIMIT_1)); // 获取合同附件 - String attachment = contract.getAttachment(); - List contractFileIdList = getFileIdList(attachment); - fileIdList.addAll(contractFileIdList); + if (Objects.nonNull(contract)) { + String attachment = contract.getAttachment(); + List contractFileIdList = getFileIdList(attachment); + fileIdList.addAll(contractFileIdList); + } // 初验备案阶段 // 获取初验材料 String preliminaryInspectionMaterials = project.getPreliminaryInspectionMaterials(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java index 4c51371..4408614 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java @@ -1,5 +1,11 @@ package com.ningdatech.pmapi.filemanage.model.vo; +import com.ningdatech.pmapi.expert.model.vo.ExpertReviewDetailVO; +import com.ningdatech.pmapi.expert.model.vo.ProjectReviewDetailVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.FinalAcceptanceVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; import com.wflow.workflow.bean.vo.ProcessDetailVO; import io.swagger.annotations.ApiModel; @@ -19,27 +25,24 @@ import java.util.List; @ApiModel(value = "ProjectFileVO", description = "项目档案") public class ProjectFileVO { - @ApiModelProperty("项目ID") - private Long id; + @ApiModelProperty("项目档案详情") + private ProjectDetailVO projectDetailVo; - @ApiModelProperty("项目名称") - private String projectName; + @ApiModelProperty("流程进度详情") + private List processDetailVos; - @ApiModelProperty("项目单位") - private String buildOrgName; + @ApiModelProperty("专家评审详情") + private ProjectReviewDetailVO projectReviewDetailVo; - @ApiModelProperty("项目编号") - private String pojectCode; + @ApiModelProperty("招标登记详情") + private PurchaseVO purchaseVo; - @ApiModelProperty("是否可阅") - private Boolean canRead = Boolean.FALSE; + @ApiModelProperty("合同登记详情") + private ContractVO contractVo; - @ApiModelProperty("最后修改时间") - private LocalDateTime updateOn; + @ApiModelProperty("初验登记详情") + private PreInsVO preInsVo; - @ApiModelProperty("项目档案详情") - private ProjectDetailVO projectDetailVo; - - @ApiModelProperty("流程进度详情") - private List processDetailVos; + @ApiModelProperty("终验信息详情") + private FinalAcceptanceVO finalAcceptanceVo; }