Browse Source

档案下载修改

master
CMM 1 year ago
parent
commit
1be22ab0b6
2 changed files with 73 additions and 42 deletions
  1. +53
    -25
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java
  2. +20
    -17
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java

+ 53
- 25
pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java View File

@@ -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<ProjectFileListVO> 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<ProcessDetailVO> 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<Long> biddingFileIdList = getFileIdList(biddingDoc);
fileIdList.addAll(biddingFileIdList);
// 获取招标文件
String bidDoc = purchase.getBidDoc();
List<Long> bidFileIdList = getFileIdList(bidDoc);
fileIdList.addAll(bidFileIdList);
// 获取中标通知书
String acceptanceLetter = purchase.getAcceptanceLetter();
List<Long> acceptFileIdList = getFileIdList(acceptanceLetter);
fileIdList.addAll(acceptFileIdList);
if (Objects.nonNull(purchase)) {
String biddingDoc = purchase.getBiddingDoc();
List<Long> biddingFileIdList = getFileIdList(biddingDoc);
fileIdList.addAll(biddingFileIdList);
// 获取招标文件
String bidDoc = purchase.getBidDoc();
List<Long> bidFileIdList = getFileIdList(bidDoc);
fileIdList.addAll(bidFileIdList);
// 获取中标通知书
String acceptanceLetter = purchase.getAcceptanceLetter();
List<Long> 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<Long> contractFileIdList = getFileIdList(attachment);
fileIdList.addAll(contractFileIdList);
if (Objects.nonNull(contract)) {
String attachment = contract.getAttachment();
List<Long> contractFileIdList = getFileIdList(attachment);
fileIdList.addAll(contractFileIdList);
}
// 初验备案阶段
// 获取初验材料
String preliminaryInspectionMaterials = project.getPreliminaryInspectionMaterials();


+ 20
- 17
pmapi/src/main/java/com/ningdatech/pmapi/filemanage/model/vo/ProjectFileVO.java View File

@@ -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<ProcessDetailVO> 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<ProcessDetailVO> processDetailVos;
@ApiModelProperty("终验信息详情")
private FinalAcceptanceVO finalAcceptanceVo;
}

Loading…
Cancel
Save