From 929c6698f4d7598997fc233e09c39c3bdce9fcf8 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 14 八月 2025 10:23:15 +0800
Subject: [PATCH] 判断合格绝对值的问题
---
cnas-process/src/main/java/com/yuanchu/mom/service/impl/ProcessReportServiceImpl.java | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/cnas-process/src/main/java/com/yuanchu/mom/service/impl/ProcessReportServiceImpl.java b/cnas-process/src/main/java/com/yuanchu/mom/service/impl/ProcessReportServiceImpl.java
index be47fbe..75465c3 100644
--- a/cnas-process/src/main/java/com/yuanchu/mom/service/impl/ProcessReportServiceImpl.java
+++ b/cnas-process/src/main/java/com/yuanchu/mom/service/impl/ProcessReportServiceImpl.java
@@ -42,7 +42,7 @@
* 妫�楠屾姤鍛婂彂鏀剧櫥璁拌〃 鏈嶅姟瀹炵幇绫�
* </p>
*
- * @author 鑺杞欢锛堟睙鑻忥級鏈夐檺鍏徃
+ * @author
* @since 2024-11-05 08:58:39
*/
@Service
@@ -94,18 +94,7 @@
processReport.setSignatoryName(signatoryName);
}
//鐢熸垚妫�楠屾姤鍛婂彂鏀剧櫥璁拌〃
- String url;
- try {
- InputStream inputStream = this.getClass().getResourceAsStream("/static/report-deal.docx");
- 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 inputStream = this.getClass().getResourceAsStream("/static/report-deal.docx");
ConfigureBuilder builder = Configure.builder();
builder.useSpringEL(true);
@@ -377,13 +366,11 @@
tableRenderData.setTableStyle(tableStyle);
Map<String, Object> table = new HashMap<>();
table.put("report", tableRenderData);
- table.put("index1", index1);
reportList.add(table);
index1++;
}
}
- Integer finalIndex = index1;
- XWPFTemplate template = XWPFTemplate.compile(url, builder.build()).render(
+ XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render(
new HashMap<String, Object>() {{
put("reportList", reportList);
}});
--
Gitblit v1.9.3