|
|
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.scheduling.annotation.Scheduled; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.net.InetAddress; |
|
|
|
import java.net.UnknownHostException; |
|
|
|
import java.util.List; |
|
|
@@ -49,7 +50,6 @@ public class SynProjectCollectionTask { |
|
|
|
public String active; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final GovProjectCollectionManage collectionManage; |
|
|
|
private final IGovBizProjectBaseinfoService baseinfoService; |
|
|
|
private final IGovBizProjectApplyService applyService; |
|
|
@@ -67,16 +67,15 @@ public class SynProjectCollectionTask { |
|
|
|
/** |
|
|
|
* 前置机每天晚上10点自动清空,第二天早上6点获取数据 |
|
|
|
* 定时同步前置机数据 每天1点开始执行一次 |
|
|
|
* |
|
|
|
*/ |
|
|
|
@Scheduled(cron = "0 0 1 * * ?") |
|
|
|
public void doTask() throws UnknownHostException { |
|
|
|
if (!HOST.equals(InetAddress.getLocalHost().getHostName())) { |
|
|
|
log.info("定时器没开启或者host不对! {}:{}", |
|
|
|
HOST,InetAddress.getLocalHost().getHostName()); |
|
|
|
HOST, InetAddress.getLocalHost().getHostName()); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(BizConst.PRE.equals(active)){ |
|
|
|
if (BizConst.PRE.equals(active)) { |
|
|
|
log.info("预发环境不用同步!"); |
|
|
|
return; |
|
|
|
} |
|
|
@@ -90,7 +89,7 @@ public class SynProjectCollectionTask { |
|
|
|
//全量项目归集 |
|
|
|
ProjectListReq req = new ProjectListReq(); |
|
|
|
Long count = collectionManage.count(req) + collectionManage.operationCount(req); |
|
|
|
if(count == 0L){ |
|
|
|
if (count == 0L) { |
|
|
|
log.info("本次同步无数据"); |
|
|
|
return; |
|
|
|
} |
|
|
@@ -98,21 +97,21 @@ public class SynProjectCollectionTask { |
|
|
|
req.setPageSize(count.intValue()); |
|
|
|
PageVo<GovBizProjectListVO> projectCollectionPage = collectionManage.list(req); |
|
|
|
|
|
|
|
log.info("projectCollections size :{}",projectCollectionPage.getTotal()); |
|
|
|
log.info("projectCollections size :{}", projectCollectionPage.getTotal()); |
|
|
|
|
|
|
|
for(GovBizProjectListVO vo : projectCollectionPage.getRecords()){ |
|
|
|
for (GovBizProjectListVO vo : projectCollectionPage.getRecords()) { |
|
|
|
GovBizProjectDetailVO projectDetail = collectionManage.detail(vo.getBaseProjId()); |
|
|
|
collectionManage.pushProjectVo(projectDetail); |
|
|
|
} |
|
|
|
|
|
|
|
//2.运维备案项目 |
|
|
|
PageVo<GovBizProjectListVO> operationList = collectionManage.operationList(req); |
|
|
|
log.info("operation list size :{}",operationList.getTotal()); |
|
|
|
for(GovBizProjectListVO vo : operationList.getRecords()){ |
|
|
|
log.info("operation list size :{}", operationList.getTotal()); |
|
|
|
for (GovBizProjectListVO vo : operationList.getRecords()) { |
|
|
|
GovOperationProjectDetailVO operationDetail = collectionManage.operationDetail(vo.getBaseProjId()); |
|
|
|
GovOperationProjectBaseinfoVO baseinfo = operationDetail.getBaseinfo(); |
|
|
|
if(Objects.isNull(baseinfo) || Objects.isNull(baseinfo.getPush()) || |
|
|
|
Boolean.FALSE.equals(baseinfo.getPush())){ |
|
|
|
if (Objects.isNull(baseinfo) || Objects.isNull(baseinfo.getPush()) || |
|
|
|
Boolean.FALSE.equals(baseinfo.getPush())) { |
|
|
|
log.info("此运维项目不用推送:" + vo.getBaseProjId()); |
|
|
|
} |
|
|
|
collectionManage.pushProjectVo(operationDetail); |
|
|
@@ -120,19 +119,19 @@ public class SynProjectCollectionTask { |
|
|
|
|
|
|
|
//3.申报项目 需要推送的项目 |
|
|
|
List<Project> projects = projectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
|
.eq(Project::getNewest,Boolean.TRUE) |
|
|
|
.eq(Project::getPush,Boolean.TRUE)); |
|
|
|
log.info("projects need push size :{}",projects.size()); |
|
|
|
for(Project project : projects){ |
|
|
|
.eq(Project::getNewest, Boolean.TRUE) |
|
|
|
.eq(Project::getPush, Boolean.TRUE)); |
|
|
|
log.info("projects need push size :{}", projects.size()); |
|
|
|
for (Project project : projects) { |
|
|
|
ProjectDetailVO projectDetailVO = projectLibManage.detailProjectCode(project.getProjectCode()); |
|
|
|
GovBizProjectDetailVO vo = ProjectConvertUtil.declaredToCollection(projectDetailVO,fileService); |
|
|
|
if(Objects.nonNull(vo)){ |
|
|
|
GovBizProjectDetailVO vo = ProjectConvertUtil.declaredToCollection(projectDetailVO, fileService); |
|
|
|
if (Objects.nonNull(vo)) { |
|
|
|
collectionManage.pushProjectVo(vo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
stopWatch.stop(); |
|
|
|
log.info("数据同步任务结束====={}s",stopWatch.getTotalTimeSeconds()); |
|
|
|
log.info("数据同步任务结束====={}s", stopWatch.getTotalTimeSeconds()); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -145,13 +144,13 @@ public class SynProjectCollectionTask { |
|
|
|
|
|
|
|
GovBizProjectBaseinfo base = baseinfoService.getOne(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
|
.eq(GovBizProjectBaseinfo::getBaseProjId, projId)); |
|
|
|
if(Objects.nonNull(base)){ |
|
|
|
if (Objects.nonNull(base)) { |
|
|
|
//开始转换PDF |
|
|
|
convertPdfVo(projId); |
|
|
|
} |
|
|
|
|
|
|
|
stopWatch.stop(); |
|
|
|
log.info("项目归集库存转换PDF任务结束====={}s",stopWatch.getTotalTimeSeconds()); |
|
|
|
log.info("项目归集库存转换PDF任务结束====={}s", stopWatch.getTotalTimeSeconds()); |
|
|
|
} |
|
|
|
|
|
|
|
public void stagingConvertPdf2(String projId) { |
|
|
@@ -162,33 +161,33 @@ public class SynProjectCollectionTask { |
|
|
|
req.setPageNumber(1); |
|
|
|
req.setPageSize(BizConst.MAX_EXPORT_COUNT); |
|
|
|
List<GovBizProjectApprove> projects = approveService.list(Wrappers.lambdaQuery(GovBizProjectApprove.class) |
|
|
|
.eq(GovBizProjectApprove::getDeleted,Boolean.FALSE) |
|
|
|
.eq(StringUtils.isNotBlank(projId),GovBizProjectApprove::getBaseProjId,projId) |
|
|
|
.eq(GovBizProjectApprove::getDeleted, Boolean.FALSE) |
|
|
|
.eq(StringUtils.isNotBlank(projId), GovBizProjectApprove::getBaseProjId, projId) |
|
|
|
.isNotNull(GovBizProjectApprove::getApprovalFile) |
|
|
|
.isNull(GovBizProjectApprove::getApprovalFilePdf)); |
|
|
|
|
|
|
|
if(CollUtil.isEmpty(projects)){ |
|
|
|
if (CollUtil.isEmpty(projects)) { |
|
|
|
log.info("没有项目归集 任务终止"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
for(GovBizProjectApprove project : projects){ |
|
|
|
for (GovBizProjectApprove project : projects) { |
|
|
|
String baseProjId = project.getBaseProjId(); |
|
|
|
//开始转换PDF |
|
|
|
GovBizProjectApprove approve = approveService.getOne(Wrappers.lambdaQuery(GovBizProjectApprove.class) |
|
|
|
.eq(GovBizProjectApprove::getBaseProjId,baseProjId) |
|
|
|
.eq(GovBizProjectApprove::getBaseProjId, baseProjId) |
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
if(Objects.isNull(approve)){ |
|
|
|
if (Objects.isNull(approve)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(approve.getApprovalFilePdf()) && StringUtils.isNotBlank(approve.getApprovalFile())){ |
|
|
|
if (StringUtils.isBlank(approve.getApprovalFilePdf()) && StringUtils.isNotBlank(approve.getApprovalFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(approve.getApprovalFile()); |
|
|
|
approve.setApprovalFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
stopWatch.stop(); |
|
|
|
log.info("项目归集库存转换PDF任务2结束====={}s",stopWatch.getTotalTimeSeconds()); |
|
|
|
log.info("项目归集库存转换PDF任务2结束====={}s", stopWatch.getTotalTimeSeconds()); |
|
|
|
} |
|
|
|
|
|
|
|
public void stagingConvertPdf3(String projId) { |
|
|
@@ -200,23 +199,23 @@ public class SynProjectCollectionTask { |
|
|
|
req.setPageNumber(1); |
|
|
|
req.setPageSize(BizConst.MAX_EXPORT_COUNT); |
|
|
|
List<GovBizProjectApprove> approves = approveService.list(Wrappers.lambdaQuery(GovBizProjectApprove.class) |
|
|
|
.eq(GovBizProjectApprove::getDeleted,Boolean.FALSE) |
|
|
|
.eq(StringUtils.isNotBlank(projId),GovBizProjectApprove::getBaseProjId,projId) |
|
|
|
.eq(GovBizProjectApprove::getDeleted, Boolean.FALSE) |
|
|
|
.eq(StringUtils.isNotBlank(projId), GovBizProjectApprove::getBaseProjId, projId) |
|
|
|
.isNotNull(GovBizProjectApprove::getApprovalFile) |
|
|
|
.isNull(GovBizProjectApprove::getApprovalFilePdf)); |
|
|
|
|
|
|
|
if(CollUtil.isEmpty(approves)){ |
|
|
|
if (CollUtil.isEmpty(approves)) { |
|
|
|
log.info("没有项目归集 审批信息 立项文件 任务终止"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
for(GovBizProjectApprove approve : approves){ |
|
|
|
for (GovBizProjectApprove approve : approves) { |
|
|
|
//开始转换PDF |
|
|
|
convertPdfVo(approve.getBaseProjId()); |
|
|
|
} |
|
|
|
|
|
|
|
stopWatch.stop(); |
|
|
|
log.info("项目归集库存转换PDF任务3结束====={}s",stopWatch.getTotalTimeSeconds()); |
|
|
|
log.info("项目归集库存转换PDF任务3结束====={}s", stopWatch.getTotalTimeSeconds()); |
|
|
|
} |
|
|
|
|
|
|
|
//开始转换PDF |
|
|
@@ -230,28 +229,28 @@ public class SynProjectCollectionTask { |
|
|
|
|
|
|
|
private void convertPdfApply(String baseProjId) { |
|
|
|
GovBizProjectApply apply = applyService.getOne(Wrappers.lambdaQuery(GovBizProjectApply.class) |
|
|
|
.eq(GovBizProjectApply::getBaseProjId,baseProjId) |
|
|
|
.eq(GovBizProjectApply::getBaseProjId, baseProjId) |
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
if(Objects.isNull(apply)){ |
|
|
|
if (Objects.isNull(apply)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(apply.getBaseProjApplyFilePdf()) && StringUtils.isNotBlank(apply.getBaseProjApplyFile())){ |
|
|
|
if (StringUtils.isBlank(apply.getBaseProjApplyFilePdf()) && StringUtils.isNotBlank(apply.getBaseProjApplyFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(apply.getBaseProjApplyFile()); |
|
|
|
apply.setBaseProjApplyFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(apply.getBaseProjBasisFilePdf()) && StringUtils.isNotBlank(apply.getBaseProjBasisFile())){ |
|
|
|
if (StringUtils.isBlank(apply.getBaseProjBasisFilePdf()) && StringUtils.isNotBlank(apply.getBaseProjBasisFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(apply.getBaseProjBasisFile()); |
|
|
|
apply.setBaseProjBasisFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(apply.getBaseProjOtherFilePdf()) && StringUtils.isNotBlank(apply.getBaseProjOtherFile())){ |
|
|
|
if (StringUtils.isBlank(apply.getBaseProjOtherFilePdf()) && StringUtils.isNotBlank(apply.getBaseProjOtherFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(apply.getBaseProjOtherFile()); |
|
|
|
apply.setBaseProjOtherFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(apply.getBaseResearchReportFilePdf()) && StringUtils.isNotBlank(apply.getBaseResearchReportFile())){ |
|
|
|
if (StringUtils.isBlank(apply.getBaseResearchReportFilePdf()) && StringUtils.isNotBlank(apply.getBaseResearchReportFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(apply.getBaseResearchReportFile()); |
|
|
|
apply.setBaseResearchReportFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(apply.getBaseOperatMaintenFilePdf()) && StringUtils.isNotBlank(apply.getBaseOperatMaintenFile())){ |
|
|
|
if (StringUtils.isBlank(apply.getBaseOperatMaintenFilePdf()) && StringUtils.isNotBlank(apply.getBaseOperatMaintenFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(apply.getBaseOperatMaintenFile()); |
|
|
|
apply.setBaseOperatMaintenFilePdf(sj.toString()); |
|
|
|
} |
|
|
@@ -260,20 +259,20 @@ public class SynProjectCollectionTask { |
|
|
|
|
|
|
|
private void convertPdfApprove(String baseProjId) { |
|
|
|
GovBizProjectApprove approve = approveService.getOne(Wrappers.lambdaQuery(GovBizProjectApprove.class) |
|
|
|
.eq(GovBizProjectApprove::getBaseProjId,baseProjId) |
|
|
|
.eq(GovBizProjectApprove::getBaseProjId, baseProjId) |
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
if(Objects.isNull(approve)){ |
|
|
|
if (Objects.isNull(approve)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(approve.getApprovalFilePdf()) && StringUtils.isNotBlank(approve.getApprovalFile())){ |
|
|
|
if (StringUtils.isBlank(approve.getApprovalFilePdf()) && StringUtils.isNotBlank(approve.getApprovalFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(approve.getApprovalFile()); |
|
|
|
approve.setApprovalFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(approve.getPreliminaryDesignFilePdf()) && StringUtils.isNotBlank(approve.getPreliminaryDesignFile())){ |
|
|
|
if (StringUtils.isBlank(approve.getPreliminaryDesignFilePdf()) && StringUtils.isNotBlank(approve.getPreliminaryDesignFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(approve.getPreliminaryDesignFile()); |
|
|
|
approve.setPreliminaryDesignFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(approve.getBaseReviewCommentsFilePdf()) && StringUtils.isNotBlank(approve.getBaseReviewCommentsFile())){ |
|
|
|
if (StringUtils.isBlank(approve.getBaseReviewCommentsFilePdf()) && StringUtils.isNotBlank(approve.getBaseReviewCommentsFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(approve.getBaseReviewCommentsFile()); |
|
|
|
approve.setBaseReviewCommentsFilePdf(sj.toString()); |
|
|
|
} |
|
|
@@ -282,68 +281,68 @@ public class SynProjectCollectionTask { |
|
|
|
|
|
|
|
private void convertPdfCimplement(String baseProjId) { |
|
|
|
GovBizProjectCimplement cimplement = cimplementService.getOne(Wrappers.lambdaQuery(GovBizProjectCimplement.class) |
|
|
|
.eq(GovBizProjectCimplement::getBaseProjId,baseProjId) |
|
|
|
.eq(GovBizProjectCimplement::getBaseProjId, baseProjId) |
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
if(Objects.isNull(cimplement)){ |
|
|
|
if (Objects.isNull(cimplement)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseCheckFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseCheckFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseCheckFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseCheckFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseCheckFile()); |
|
|
|
cimplement.setBaseCheckFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseChanFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseChanFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseChanFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseChanFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseChanFile()); |
|
|
|
cimplement.setBaseChanFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseChangeFormFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseChangeFormFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseChangeFormFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseChangeFormFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseChangeFormFile()); |
|
|
|
cimplement.setBaseChangeFormFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseUserConsFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseUserConsFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseUserConsFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseUserConsFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseUserConsFile()); |
|
|
|
cimplement.setBaseUserConsFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseEstaSummFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseEstaSummFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseEstaSummFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseEstaSummFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseEstaSummFile()); |
|
|
|
cimplement.setBaseEstaSummFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseEngineerPostpoFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseEngineerPostpoFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseEngineerPostpoFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseEngineerPostpoFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseEngineerPostpoFile()); |
|
|
|
cimplement.setBaseEngineerPostpoFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBasePasswAssessFilePdf()) && StringUtils.isNotBlank(cimplement.getBasePasswAssessFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBasePasswAssessFilePdf()) && StringUtils.isNotBlank(cimplement.getBasePasswAssessFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBasePasswAssessFile()); |
|
|
|
cimplement.setBasePasswAssessFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseThirdAcceptFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseThirdAcceptFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseThirdAcceptFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseThirdAcceptFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseThirdAcceptFile()); |
|
|
|
cimplement.setBaseThirdAcceptFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseFinanlAuditFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseFinanlAuditFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseFinanlAuditFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseFinanlAuditFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseFinanlAuditFile()); |
|
|
|
cimplement.setBaseFinanlAuditFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseInitialOpinionFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseInitialOpinionFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseInitialOpinionFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseInitialOpinionFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseInitialOpinionFile()); |
|
|
|
cimplement.setBaseInitialOpinionFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseThirdAcceptFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseThirdAcceptFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseThirdAcceptFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseThirdAcceptFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseThirdAcceptFile()); |
|
|
|
cimplement.setBaseThirdAcceptFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseSummReportFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseSummReportFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseSummReportFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseSummReportFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseSummReportFile()); |
|
|
|
cimplement.setBaseSummReportFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseFinalExpertOpinionFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseFinalExpertOpinionFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseFinalExpertOpinionFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseFinalExpertOpinionFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseFinalExpertOpinionFile()); |
|
|
|
cimplement.setBaseFinalExpertOpinionFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseIrsTestRunFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseIrsTestRunFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseIrsTestRunFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseIrsTestRunFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseIrsTestRunFile()); |
|
|
|
cimplement.setBaseIrsTestRunFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(cimplement.getBaseInforLevelFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseInforLevelFile())){ |
|
|
|
if (StringUtils.isBlank(cimplement.getBaseInforLevelFilePdf()) && StringUtils.isNotBlank(cimplement.getBaseInforLevelFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(cimplement.getBaseInforLevelFile()); |
|
|
|
cimplement.setBaseInforLevelFilePdf(sj.toString()); |
|
|
|
} |
|
|
@@ -352,48 +351,48 @@ public class SynProjectCollectionTask { |
|
|
|
|
|
|
|
private void convertPdfMimplement(String baseProjId) { |
|
|
|
GovBizProjectMimplement mimplement = mimplementService.getOne(Wrappers.lambdaQuery(GovBizProjectMimplement.class) |
|
|
|
.eq(GovBizProjectMimplement::getBaseProjId,baseProjId) |
|
|
|
.eq(GovBizProjectMimplement::getBaseProjId, baseProjId) |
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
if(Objects.isNull(mimplement)){ |
|
|
|
if (Objects.isNull(mimplement)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBaseChanFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseChanFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBaseChanFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseChanFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBaseChanFile()); |
|
|
|
mimplement.setBaseChanFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBaseUserConsFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseUserConsFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBaseUserConsFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseUserConsFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBaseUserConsFile()); |
|
|
|
mimplement.setBaseUserConsFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBaseEstaSummFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseEstaSummFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBaseEstaSummFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseEstaSummFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBaseEstaSummFile()); |
|
|
|
mimplement.setBaseEstaSummFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBaseEngineerPostpoFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseEngineerPostpoFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBaseEngineerPostpoFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseEngineerPostpoFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBaseEngineerPostpoFile()); |
|
|
|
mimplement.setBaseEngineerPostpoFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBasePasswAssessFilePdf()) && StringUtils.isNotBlank(mimplement.getBasePasswAssessFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBasePasswAssessFilePdf()) && StringUtils.isNotBlank(mimplement.getBasePasswAssessFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBasePasswAssessFile()); |
|
|
|
mimplement.setBasePasswAssessFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBaseThirdAcceptFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseThirdAcceptFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBaseThirdAcceptFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseThirdAcceptFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBaseThirdAcceptFile()); |
|
|
|
mimplement.setBaseThirdAcceptFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBaseThirdAcceptFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseThirdAcceptFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBaseThirdAcceptFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseThirdAcceptFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBaseThirdAcceptFile()); |
|
|
|
mimplement.setBaseThirdAcceptFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBaseFinalExpertOpinionFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseFinalExpertOpinionFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBaseFinalExpertOpinionFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseFinalExpertOpinionFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBaseFinalExpertOpinionFile()); |
|
|
|
mimplement.setBaseFinalExpertOpinionFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBaseEngineerAlterFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseEngineerAlterFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBaseEngineerAlterFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseEngineerAlterFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBaseEngineerAlterFile()); |
|
|
|
mimplement.setBaseEngineerAlterFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(mimplement.getBaseOperatMaintenSummFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseOperatMaintenSummFile())){ |
|
|
|
if (StringUtils.isBlank(mimplement.getBaseOperatMaintenSummFilePdf()) && StringUtils.isNotBlank(mimplement.getBaseOperatMaintenSummFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(mimplement.getBaseOperatMaintenSummFile()); |
|
|
|
mimplement.setBaseOperatMaintenSummFilePdf(sj.toString()); |
|
|
|
} |
|
|
@@ -403,16 +402,16 @@ public class SynProjectCollectionTask { |
|
|
|
private void convertPdfAProcure(String baseProjId) { |
|
|
|
List<GovBizProjectProcure> procures = procureService.list(Wrappers.lambdaQuery(GovBizProjectProcure.class) |
|
|
|
.eq(GovBizProjectProcure::getBaseProjId, baseProjId)); |
|
|
|
for(GovBizProjectProcure procure : procures){ |
|
|
|
if(StringUtils.isBlank(procure.getPurchaseContractPdf()) && StringUtils.isNotBlank(procure.getPurchaseContract())){ |
|
|
|
for (GovBizProjectProcure procure : procures) { |
|
|
|
if (StringUtils.isBlank(procure.getPurchaseContractPdf()) && StringUtils.isNotBlank(procure.getPurchaseContract())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(procure.getPurchaseContract()); |
|
|
|
procure.setPurchaseContractPdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(procure.getPurchaseFilePdf()) && StringUtils.isNotBlank(procure.getPurchaseFile())){ |
|
|
|
if (StringUtils.isBlank(procure.getPurchaseFilePdf()) && StringUtils.isNotBlank(procure.getPurchaseFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(procure.getPurchaseFile()); |
|
|
|
procure.setPurchaseFilePdf(sj.toString()); |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(procure.getBiddingFilePdf()) && StringUtils.isNotBlank(procure.getBiddingFile())){ |
|
|
|
if (StringUtils.isBlank(procure.getBiddingFilePdf()) && StringUtils.isNotBlank(procure.getBiddingFile())) { |
|
|
|
StringJoiner sj = collectionManage.convertAndUpload(procure.getBiddingFile()); |
|
|
|
procure.setBiddingFilePdf(sj.toString()); |
|
|
|
} |
|
|
@@ -424,9 +423,9 @@ public class SynProjectCollectionTask { |
|
|
|
StopWatch stopWatch = new StopWatch(); |
|
|
|
stopWatch.start(); |
|
|
|
|
|
|
|
log.info("数据同步任务 指定项目编号 :{}",projectCodes); |
|
|
|
log.info("数据同步任务 指定项目编号 :{}", projectCodes); |
|
|
|
|
|
|
|
if(CollUtil.isEmpty(projectCodes)){ |
|
|
|
if (CollUtil.isEmpty(projectCodes)) { |
|
|
|
throw new BizException("不能为空!"); |
|
|
|
} |
|
|
|
|
|
|
@@ -436,21 +435,21 @@ public class SynProjectCollectionTask { |
|
|
|
req.setPageSize(1000); |
|
|
|
PageVo<GovBizProjectListVO> projectCollectionPage = collectionManage.list(req); |
|
|
|
|
|
|
|
log.info("projectCollections size :{}",projectCollectionPage.getTotal()); |
|
|
|
log.info("projectCollections size :{}", projectCollectionPage.getTotal()); |
|
|
|
|
|
|
|
for(GovBizProjectListVO vo : projectCollectionPage.getRecords()){ |
|
|
|
for (GovBizProjectListVO vo : projectCollectionPage.getRecords()) { |
|
|
|
GovBizProjectDetailVO projectDetail = collectionManage.detail(vo.getBaseProjId()); |
|
|
|
collectionManage.pushProjectVo(projectDetail); |
|
|
|
} |
|
|
|
|
|
|
|
//2.运维备案项目 |
|
|
|
PageVo<GovBizProjectListVO> operationList = collectionManage.operationList(req); |
|
|
|
log.info("operation list size :{}",operationList.getTotal()); |
|
|
|
for(GovBizProjectListVO vo : operationList.getRecords()){ |
|
|
|
log.info("operation list size :{}", operationList.getTotal()); |
|
|
|
for (GovBizProjectListVO vo : operationList.getRecords()) { |
|
|
|
GovOperationProjectDetailVO operationDetail = collectionManage.operationDetail(vo.getBaseProjId()); |
|
|
|
GovOperationProjectBaseinfoVO baseinfo = operationDetail.getBaseinfo(); |
|
|
|
if(Objects.isNull(baseinfo) || Objects.isNull(baseinfo.getPush()) || |
|
|
|
Boolean.FALSE.equals(baseinfo.getPush())){ |
|
|
|
if (Objects.isNull(baseinfo) || Objects.isNull(baseinfo.getPush()) || |
|
|
|
Boolean.FALSE.equals(baseinfo.getPush())) { |
|
|
|
log.info("此运维项目不用推送:" + vo.getBaseProjId()); |
|
|
|
} |
|
|
|
collectionManage.pushProjectVo(operationDetail); |
|
|
@@ -458,19 +457,19 @@ public class SynProjectCollectionTask { |
|
|
|
|
|
|
|
//3.申报项目 需要推送的项目 |
|
|
|
List<Project> projects = projectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
|
.eq(Project::getNewest,Boolean.TRUE) |
|
|
|
.eq(Project::getPush,Boolean.TRUE) |
|
|
|
.in(Project::getProjectCode,projectCodes)); |
|
|
|
log.info("projects need push size :{}",projects.size()); |
|
|
|
for(Project project : projects){ |
|
|
|
.eq(Project::getNewest, Boolean.TRUE) |
|
|
|
.eq(Project::getPush, Boolean.TRUE) |
|
|
|
.in(Project::getProjectCode, projectCodes)); |
|
|
|
log.info("projects need push size :{}", projects.size()); |
|
|
|
for (Project project : projects) { |
|
|
|
ProjectDetailVO projectDetailVO = projectLibManage.detailProjectCode(project.getProjectCode()); |
|
|
|
GovBizProjectDetailVO vo = ProjectConvertUtil.declaredToCollection(projectDetailVO,fileService); |
|
|
|
if(Objects.nonNull(vo)){ |
|
|
|
GovBizProjectDetailVO vo = ProjectConvertUtil.declaredToCollection(projectDetailVO, fileService); |
|
|
|
if (Objects.nonNull(vo)) { |
|
|
|
collectionManage.pushProjectVo(vo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
stopWatch.stop(); |
|
|
|
log.info("数据同步任务 指定项目编号 结束====={}s",stopWatch.getTotalTimeSeconds()); |
|
|
|
log.info("数据同步任务 指定项目编号 结束====={}s", stopWatch.getTotalTimeSeconds()); |
|
|
|
} |
|
|
|
} |