Compare commits

...

4 Commits

Author SHA1 Message Date
yangjun 7c0dae72e3 Merge branch 'master' of http://47.115.223.229:8888/yangjun/dbsd_kczx_java
# Conflicts:
#	jeecg-module-main/src/main/java/org/jeecg/modules/httpinterface/controller/testController.java
2024-10-09 09:17:56 +08:00
yangjun 0dde5ec824 修改文件地址 2024-10-09 09:17:21 +08:00
yangjun 45b6b8d48b Merge branch 'master' of http://47.115.223.229:8888/yangjun/dbsd_kczx_java 2024-10-09 08:50:37 +08:00
yangjun b03a545894 添加新功能 2024-10-09 08:50:29 +08:00
4 changed files with 41 additions and 11 deletions

View File

@ -16,21 +16,21 @@ import org.springframework.web.bind.annotation.RestController;
/**
* @Description: 对外部访问接口
* @Author: jeecg-boot
* @Date: 2023-04-10
* @Date: 2023-04-10
* @Version: V1.0
*/
@Slf4j
@Api(tags = "对外部访问接口")
@Api(tags="对外部访问接口")
@RestController
@RequestMapping("/temp")
public class testController extends JeecgController<TBks, ITBksService> {
@AutoLog(value = "对外部访问接口-通过IDS访问奥威亚接口")
@ApiOperation(value = "T_BKS-抓取-通过id查询", notes = "T_BKS-抓取-通过id查询")
@GetMapping(value = "/testPDF")
public Result<?> runAvyApiByIds(String ids, String type) {
PDFUtil.office2PDF("F:\\temp\\test\\a.docx", "F:\\temp\\test\\b.pdf");
return Result.OK();
}
@AutoLog(value = "对外部访问接口-通过IDS访问奥威亚接口")
@ApiOperation(value="T_BKS-抓取-通过id查询", notes="T_BKS-抓取-通过id查询")
@GetMapping(value = "/testPDF")
public Result<?> runAvyApiByIds(String ids,String type){
PDFUtil.office2PDF("D:\\opt\\upFiles\\temp\\新版VPN使用说明2_1728432595957.docx","D:\\opt\\upFiles\\temp\\111b.pdf");
return Result.OK();
}
}

View File

@ -58,7 +58,9 @@ public class SyncZyStudentPdf extends BaseSync {
System.out.println("filPath:"+zyInfoStudent.getFilePath());
System.out.println("docPath:"+docPath);
System.out.println("pdfPath:"+pdfPath);
PDFUtil.office2PDF(docPath,pdfPath);
PDFUtil pdfUtil = SpringContextHolder.getBean(PDFUtil.class);
pdfUtil.office2PDF(docPath,pdfPath);
zyInfoStudent.setPdfPath("contract/"+namePath);
zyInfoStudent.setPublishTime(new Date());
zyInfoStudentService.updateById(zyInfoStudent);

View File

@ -952,4 +952,32 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
}
@AutoLog(value = "教师批阅作业")
@ApiOperation(value="教师批阅作业", notes="教师批阅作业")
@RequestMapping(value = "/SyncZyStudentPdf", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<ZyInfoStudent> SyncZyStudentPdf() {
List<ZyInfoStudent> 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.office2PDF(docPath,pdfPath);
zyInfoStudent.setPdfPath("contract/"+namePath);
zyInfoStudent.setPublishTime(new Date());
zyInfoStudentService.updateById(zyInfoStudent);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return Result.OK("批阅完成!");
}
}

View File

@ -308,7 +308,7 @@ jodconverter:
local:
enabled: true
# 为了避免不必要的兼容问题需要配置本机的LibreOffice安装目录
office-home: D:\Program Files\LibreOffice
office-home: D:\APPLICATION\INTER\LIBREOFFICE
# 配置LibreOffice的服务端口以逗号分隔每个端口为一个独立的进程
port-numbers: 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010
# 配置最大的任务队列