|
|
@@ -68,14 +68,15 @@ public class SynProjectCollectionTask { |
|
|
|
*/ |
|
|
|
@Scheduled(cron = "0 0 1 * * ?") |
|
|
|
public void doTask() throws UnknownHostException { |
|
|
|
if (!HOST.equals(InetAddress.getLocalHost().getHostName())) { |
|
|
|
log.info("定时器没开启或者host不对! {}:{}", |
|
|
|
HOST,InetAddress.getLocalHost().getHostName()); |
|
|
|
} |
|
|
|
if(BizConst.PRE.equals(active)){ |
|
|
|
log.info("预发环境不用同步!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
// if (!HOST.equals(InetAddress.getLocalHost().getHostName())) { |
|
|
|
// log.info("定时器没开启或者host不对! {}:{}", |
|
|
|
// HOST,InetAddress.getLocalHost().getHostName()); |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if(BizConst.PRE.equals(active)){ |
|
|
|
// log.info("预发环境不用同步!"); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
|
|
|
|
StopWatch stopWatch = new StopWatch(); |
|
|
|
stopWatch.start(); |
|
|
@@ -114,16 +115,18 @@ public class SynProjectCollectionTask { |
|
|
|
ProjectListReq req = new ProjectListReq(); |
|
|
|
req.setPageNumber(1); |
|
|
|
req.setPageSize(BizConst.MAX_EXPORT_COUNT); |
|
|
|
List<GovBizProjectBaseinfo> projects = baseinfoService.list(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) |
|
|
|
.eq(GovBizProjectBaseinfo::getDeleted,Boolean.FALSE) |
|
|
|
.eq(StringUtils.isNotBlank(projId),GovBizProjectBaseinfo::getBaseProjId,projId)); |
|
|
|
List<GovBizProjectApprove> projects = approveService.list(Wrappers.lambdaQuery(GovBizProjectApprove.class) |
|
|
|
.eq(GovBizProjectApprove::getDeleted,Boolean.FALSE) |
|
|
|
.eq(StringUtils.isNotBlank(projId),GovBizProjectApprove::getBaseProjId,projId) |
|
|
|
.isNotNull(GovBizProjectApprove::getBaseReviewCommentsFile) |
|
|
|
.isNull(GovBizProjectApprove::getBaseReviewCommentsFilePdf)); |
|
|
|
|
|
|
|
if(CollUtil.isEmpty(projects)){ |
|
|
|
log.info("没有项目归集 任务终止"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
for(GovBizProjectBaseinfo project : projects){ |
|
|
|
for(GovBizProjectApprove project : projects){ |
|
|
|
//开始转换PDF |
|
|
|
convertPdfVo(project.getBaseProjId()); |
|
|
|
} |
|
|
|