@@ -163,4 +163,11 @@ public class GovProjectCollectionController { | |||||
public void stagingConvertPdf2(@RequestParam(required = false) String projId) { | public void stagingConvertPdf2(@RequestParam(required = false) String projId) { | ||||
collectionTask.stagingConvertPdf2(projId); | collectionTask.stagingConvertPdf2(projId); | ||||
} | } | ||||
@PostMapping("/staging-convert-pdf3") | |||||
@ApiOperation("把库存的项目归集的文件 都转换成PDF文件存入字段 采购") | |||||
@WebLog("主动转换库存的文件都为PDF文件 采购") | |||||
public void stagingConvertPdf3(@RequestParam(required = false) String projId) { | |||||
collectionTask.stagingConvertPdf3(projId); | |||||
} | |||||
} | } |
@@ -109,11 +109,11 @@ public class ProjectConvert { | |||||
.map(p -> { | .map(p -> { | ||||
ProjectProcureReq r = BeanUtil.copyProperties(p, ProjectProcureReq.class); | ProjectProcureReq r = BeanUtil.copyProperties(p, ProjectProcureReq.class); | ||||
r.setBiddingFile(StringUtils.isNotBlank(p.getBiddingFilePdf()) ? p.getBiddingFilePdf() : | r.setBiddingFile(StringUtils.isNotBlank(p.getBiddingFilePdf()) ? p.getBiddingFilePdf() : | ||||
p.getBiddingFile()); | |||||
null); | |||||
r.setPurchaseFile(StringUtils.isNotBlank(p.getPurchaseFilePdf()) ? p.getPurchaseFilePdf() : | r.setPurchaseFile(StringUtils.isNotBlank(p.getPurchaseFilePdf()) ? p.getPurchaseFilePdf() : | ||||
p.getPurchaseFile()); | |||||
null); | |||||
r.setPurchaseContract(StringUtils.isNotBlank(p.getPurchaseContractPdf()) ? p.getPurchaseContractPdf() : | r.setPurchaseContract(StringUtils.isNotBlank(p.getPurchaseContractPdf()) ? p.getPurchaseContractPdf() : | ||||
p.getPurchaseContract()); | |||||
null); | |||||
r.setBaseWinningBidTime(ProjectCollectionUtil.convertLocalDateTime(p.getBaseWinningBidTime())); | r.setBaseWinningBidTime(ProjectCollectionUtil.convertLocalDateTime(p.getBaseWinningBidTime())); | ||||
r.setBasePaymentTime(ProjectCollectionUtil.convertLocalDateTime(p.getBasePaymentTime())); | r.setBasePaymentTime(ProjectCollectionUtil.convertLocalDateTime(p.getBasePaymentTime())); | ||||
return r; | return r; | ||||
@@ -181,6 +181,34 @@ public class SynProjectCollectionTask { | |||||
log.info("项目归集库存转换PDF任务2结束====={}s",stopWatch.getTotalTimeSeconds()); | log.info("项目归集库存转换PDF任务2结束====={}s",stopWatch.getTotalTimeSeconds()); | ||||
} | } | ||||
public void stagingConvertPdf3(String projId) { | |||||
log.info("项目归集库存转换PDF任务3开始====="); | |||||
StopWatch stopWatch = new StopWatch(); | |||||
stopWatch.start(); | |||||
ProjectListReq req = new ProjectListReq(); | |||||
req.setPageNumber(1); | |||||
req.setPageSize(BizConst.MAX_EXPORT_COUNT); | |||||
List<GovBizProjectProcure> procures = procureService.list(Wrappers.lambdaQuery(GovBizProjectProcure.class) | |||||
.eq(GovBizProjectProcure::getDeleted,Boolean.FALSE) | |||||
.eq(StringUtils.isNotBlank(projId),GovBizProjectProcure::getBaseProjId,projId) | |||||
.isNotNull(GovBizProjectProcure::getPurchaseContract) | |||||
.isNull(GovBizProjectProcure::getPurchaseContractPdf)); | |||||
if(CollUtil.isEmpty(procures)){ | |||||
log.info("没有项目归集 采购信息 任务终止"); | |||||
return; | |||||
} | |||||
for(GovBizProjectProcure procure : procures){ | |||||
//开始转换PDF | |||||
convertPdfVo(procure.getBaseProjId()); | |||||
} | |||||
stopWatch.stop(); | |||||
log.info("项目归集库存转换PDF任务3结束====={}s",stopWatch.getTotalTimeSeconds()); | |||||
} | |||||
//开始转换PDF | //开始转换PDF | ||||
private void convertPdfVo(String baseProjId) { | private void convertPdfVo(String baseProjId) { | ||||
convertPdfApply(baseProjId); | convertPdfApply(baseProjId); | ||||
@@ -381,6 +409,4 @@ public class SynProjectCollectionTask { | |||||
procureService.updateById(procure); | procureService.updateById(procure); | ||||
} | } | ||||
} | } | ||||
} | } |