From 5ae5596b024929f6ecd857411e7c2d64c1c96aca Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 25 十月 2024 17:23:25 +0800
Subject: [PATCH] 总报告调试
---
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java | 24 +-----------------------
1 files changed, 1 insertions(+), 23 deletions(-)
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
index d7805c8..bbbfaaf 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsReportServiceImpl.java
@@ -251,15 +251,6 @@
} catch (Exception e) {
throw new ErrorException("鎵句笉鍒版壒鍑嗕汉鐨勭鍚�");
}
- //鑾峰彇鍦烘墍鐨勬姤鍛婁笓鐢ㄧ珷
- /* String sealUrl;
- try {
- String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory();
- sealUrl = insReportMapper.getLaboratoryByName(laboratory);
- } catch (Exception e) {
- throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");
- }
- if (sealUrl == null) throw new ErrorException("鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");*/
//绯荤粺鐢熸垚鎶ュ憡鍦板潃
String url = insReport.getUrl();
//鎵嬪姩涓婁紶鎶ュ憡鍦板潃
@@ -488,20 +479,6 @@
public String wordToPdf(String wordPath, String pdfPath, String sealUrl) {
FileOutputStream os = null;
try {
- //鍑瘉 涓嶇劧鍒囨崲鍚庢湁姘村嵃
-// InputStream inputStream = this.getClass().getResourceAsStream("/lib/license.xml");
- /*String url;
- try {
- InputStream inputStream = this.getClass().getResourceAsStream("/lib/license.xml");
- File file = File.createTempFile("temp", ".tmp");
- OutputStream outputStream = new FileOutputStream(file);
- IOUtils.copy(inputStream, outputStream);
- url = file.getAbsolutePath();
- } catch (FileNotFoundException e) {
- throw new ErrorException("鎵句笉鍒版ā鏉挎枃浠�");
- } catch (IOException e) {
- throw new RuntimeException(e);
- }*/
InputStream is = new ClassPathResource("/lib/license.xml").getInputStream();
License license = new License();
license.setLicense(is);
@@ -527,6 +504,7 @@
}
}
}
+ doc.updateFields();
doc.save(os, SaveFormat.PDF);
//娣诲姞楠戠紳绔�
--
Gitblit v1.9.3