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; } //校内查重批量提交