|
@@ -135,6 +135,43 @@ public class SynProjectCollectionTask { |
|
|
log.info("项目归集库存转换PDF任务结束====={}s",stopWatch.getTotalTimeSeconds()); |
|
|
log.info("项目归集库存转换PDF任务结束====={}s",stopWatch.getTotalTimeSeconds()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void stagingConvertPdf2(String projId) { |
|
|
|
|
|
log.info("项目归集库存转换PDF任务2开始====="); |
|
|
|
|
|
StopWatch stopWatch = new StopWatch(); |
|
|
|
|
|
stopWatch.start(); |
|
|
|
|
|
ProjectListReq req = new ProjectListReq(); |
|
|
|
|
|
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) |
|
|
|
|
|
.isNotNull(GovBizProjectApprove::getApprovalFile) |
|
|
|
|
|
.isNull(GovBizProjectApprove::getApprovalFilePdf)); |
|
|
|
|
|
|
|
|
|
|
|
if(CollUtil.isEmpty(projects)){ |
|
|
|
|
|
log.info("没有项目归集 任务终止"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for(GovBizProjectApprove project : projects){ |
|
|
|
|
|
String baseProjId = project.getBaseProjId(); |
|
|
|
|
|
//开始转换PDF |
|
|
|
|
|
GovBizProjectApprove approve = approveService.getOne(Wrappers.lambdaQuery(GovBizProjectApprove.class) |
|
|
|
|
|
.eq(GovBizProjectApprove::getBaseProjId,baseProjId) |
|
|
|
|
|
.last(BizConst.LIMIT_1)); |
|
|
|
|
|
if(Objects.isNull(approve)){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
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()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//开始转换PDF |
|
|
//开始转换PDF |
|
|
private void convertPdfVo(String baseProjId) { |
|
|
private void convertPdfVo(String baseProjId) { |
|
|
convertPdfApply(baseProjId); |
|
|
convertPdfApply(baseProjId); |
|
|