From 3421307c2f3f44289500c9ed923c901c1ac71c68 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 8 Sep 2023 14:21:23 +0800 Subject: [PATCH] =?UTF-8?q?debug=20=E6=96=87=E4=BB=B6=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov/controller/GovProjectCollectionController.java | 4 ++-- .../pmapi/scheduler/task/SynProjectCollectionTask.java | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/controller/GovProjectCollectionController.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/controller/GovProjectCollectionController.java index eb0a8ba..a24560c 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/controller/GovProjectCollectionController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/controller/GovProjectCollectionController.java @@ -108,7 +108,7 @@ public class GovProjectCollectionController { @PostMapping("/staging-convert-pdf") @ApiOperation("把库存的项目归集的文件 都转换成PDF文件存入字段") @WebLog("主动转换库存的文件都为PDF文件") - public void stagingConvertPdf() { - collectionTask.stagingConvertPdf(); + public void stagingConvertPdf(@PathVariable String projId) { + collectionTask.stagingConvertPdf(projId); } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java index 4af974e..13dd79a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/SynProjectCollectionTask.java @@ -44,6 +44,8 @@ public class SynProjectCollectionTask { private GovProjectCollectionManage collectionManage; @Autowired + private IGovBizProjectBaseinfoService baseinfoService; + @Autowired private IGovBizProjectApplyService applyService; @Autowired private IGovBizProjectApproveService approveService; @@ -105,22 +107,23 @@ public class SynProjectCollectionTask { /** * 把库存的项目归集里 没有转换PDF文件的 都转换一遍 存入数据库 */ - public void stagingConvertPdf() { + public void stagingConvertPdf(String projId) { log.info("项目归集库存转换PDF任务开始====="); StopWatch stopWatch = new StopWatch(); stopWatch.start(); ProjectListReq req = new ProjectListReq(); req.setPageNumber(1); req.setPageSize(BizConst.MAX_EXPORT_COUNT); - PageVo pageRes = collectionManage.list(req); + List projects = baseinfoService.list(Wrappers.lambdaQuery(GovBizProjectBaseinfo.class) + .eq(GovBizProjectBaseinfo::getDeleted,Boolean.FALSE) + .eq(StringUtils.isNotBlank(projId),GovBizProjectBaseinfo::getBaseProjId,projId)); - if(CollUtil.isEmpty(pageRes.getRecords())){ + if(CollUtil.isEmpty(projects)){ log.info("没有项目归集 任务终止"); return; } - Collection records = pageRes.getRecords(); - for(GovBizProjectListVO project : records){ + for(GovBizProjectBaseinfo project : projects){ //开始转换PDF convertPdfVo(project.getBaseProjId()); }