From c0bc0f408480660b1e8fbe45465f0e2fe5a8ade3 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Fri, 17 Jan 2025 10:22:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=A1=A5=E5=AD=A6=E7=94=9F=E4=BD=9C?= =?UTF-8?q?=E4=B8=9Apdf=E4=B8=A2=E5=A4=B1=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SyncZyStudentPdf.java | 24 ----------------- .../controller/ZyInfoStudentController.java | 4 +-- .../impl/ZyInfoStudentServiceImpl.java | 27 ++++++++++++++++++- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyStudentPdf.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyStudentPdf.java index 75690c73..c77e0f6a 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyStudentPdf.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyStudentPdf.java @@ -5,9 +5,6 @@ import lombok.extern.slf4j.Slf4j; import org.jeecg.common.util.DateUtils; import org.jeecg.common.util.SpringContextHolder; import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync; -import org.jeecg.modules.kc.kcEvaluationsStat.entity.KcEvaluationsStat; -import org.jeecg.modules.kc.kcEvaluationsStat.service.IKcEvaluationsStatService; -import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService; import org.jeecg.modules.tools.Global; @@ -47,27 +44,6 @@ public class SyncZyStudentPdf extends BaseSync { */ public void run(Map param){ List ybtkblist = zyInfoStudentService.getDocNoPdfList(); - for(ZyInfoStudent zyInfoStudent:ybtkblist){ - try { - Global global = SpringContextHolder.getBean(Global.class); - FileUtil.mkdir(global.getContractDickPath()); - String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss"); - String docPath = upLoadPath+ File.separator+ zyInfoStudent.getFilePath(); - String namePath = dd + ".pdf"; - String pdfPath = global.getContractDickPath() + namePath; - System.out.println("filPath:"+zyInfoStudent.getFilePath()); - System.out.println("docPath:"+docPath); - System.out.println("pdfPath:"+pdfPath); - - PDFUtil pdfUtil = SpringContextHolder.getBean(PDFUtil.class); - pdfUtil.office2PDF(docPath,pdfPath); - zyInfoStudent.setPdfPath("contract/"+namePath); - zyInfoStudent.setPublishTime(new Date()); - zyInfoStudentService.updateById(zyInfoStudent); - } catch (Exception e) { - throw new RuntimeException(e); - } - } } /** diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java index e851648e..4f844264 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java @@ -790,8 +790,8 @@ public class ZyInfoStudentController extends JeecgController getDocNoPdfList() { - return baseMapper.getDocNoPdfList(); + List ybtkblist = baseMapper.getDocNoPdfList(); + for(ZyInfoStudent zyInfoStudent:ybtkblist){ + try { + Global global = SpringContextHolder.getBean(Global.class); + FileUtil.mkdir(global.getContractDickPath()); + String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss"); + String docPath = upLoadPath+ File.separator+ zyInfoStudent.getFilePath(); + String namePath = dd + ".pdf"; + String pdfPath = global.getContractDickPath() + namePath; + System.out.println("filPath:"+zyInfoStudent.getFilePath()); + System.out.println("docPath:"+docPath); + System.out.println("pdfPath:"+pdfPath); + + PDFUtil.office2PDF(docPath,pdfPath); + zyInfoStudent.setPdfPath("contract/"+namePath); + zyInfoStudent.setPublishTime(new Date()); + baseMapper.updateById(zyInfoStudent); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + return ybtkblist; } //校内查重批量提交