|
|
@@ -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; |
|
|
@@ -54,6 +61,7 @@ import com.wflow.exception.BusinessException; |
|
|
|
import com.wflow.workflow.bean.dto.OrgInfoDTO; |
|
|
|
import com.wflow.workflow.bean.process.FileBasicInfo; |
|
|
|
import com.wflow.workflow.bean.process.ProcessComment; |
|
|
|
import com.wflow.workflow.bean.vo.ProcessDetailVO; |
|
|
|
import com.wflow.workflow.bean.vo.ProcessStartParamsVo; |
|
|
|
import com.wflow.workflow.service.ProcessInstanceService; |
|
|
|
import com.wflow.workflow.service.ProcessModelService; |
|
|
@@ -102,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) { |
|
|
|
|
|
|
@@ -184,9 +195,36 @@ public class ProjectFileManage { |
|
|
|
} |
|
|
|
|
|
|
|
public ProjectFileVO file(Long projectId) { |
|
|
|
ProjectDetailVO projectDetailVo = projectLibManage.getProjectDetail(projectId); |
|
|
|
|
|
|
|
return null; |
|
|
|
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); |
|
|
|
String empPosUnitCode = userFullInfo.getEmpPosUnitCode(); |
|
|
|
|
|
|
|
// 判断该项目是否为本单位或下属单位的项目或者已经申请借阅成功的项目 |
|
|
|
Project project = projectService.getById(projectId); |
|
|
|
Set<String> subOrgList = getSubOrgList(empPosUnitCode); |
|
|
|
|
|
|
|
if (!checkCanRead(subOrgList,project)){ |
|
|
|
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.setProjectReviewDetailVo(projectReviewDetailVo); |
|
|
|
projectFileVo.setPurchaseVo(purchaseVo); |
|
|
|
projectFileVo.setContractVo(contractVo); |
|
|
|
projectFileVo.setPreInsVo(preInsVo); |
|
|
|
projectFileVo.setFinalAcceptanceVo(finalAcceptanceVo); |
|
|
|
|
|
|
|
return projectFileVo; |
|
|
|
} |
|
|
|
|
|
|
|
public String wantRead(Long projectId) { |
|
|
@@ -357,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(); |
|
|
|