From aa856b99d0c299bb90437936ef004f92efbb72fe Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期四, 27 八月 2026 10:19:51 +0800
Subject: [PATCH] 遗体器官获取伦理审查表图片处理

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceEthicalreviewopinionsController.java |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceEthicalreviewopinionsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceEthicalreviewopinionsController.java
index af373f7..b6ac014 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceEthicalreviewopinionsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceEthicalreviewopinionsController.java
@@ -206,26 +206,22 @@
         EthicalreviewopinionsStateTotalVO  stateTotalVO=serviceEthicalreviewopinionsService.stateTotalAll(nitiateId);
         String filePath = getClass().getResource("/template/").getPath();
         File directory = new File("");// 鍙傛暟涓虹┖
-        String filePath1 = null;
+
         try {
-            filePath1 = directory.getCanonicalPath()+"\\template\\";
+            filePath = directory.getCanonicalPath()+"/template/";
         } catch (IOException e) {
         }
-        if(filePath.substring(0,1).equals("/"))
-            filePath=filePath.substring(1);
+
         String content ="";
         Template t = null;
         try {
             //content = Files.readString(Paths.get(filePath+"閬椾綋鍣ㄥ畼鑾峰彇浼︾悊瀹℃煡琛ㄩ椤�.xml"), StandardCharsets.UTF_8);
-            Path path = Paths.get(filePath1 + "閬椾綋鍣ㄥ畼鑾峰彇浼︾悊瀹℃煡琛ㄩ椤�.xml");
-            if(Files.exists(path)) {
-                byte[] bytes = Files.readAllBytes(path);
-                content = new String(bytes, StandardCharsets.UTF_8);
-            }else{
-                path = Paths.get(filePath + "閬椾綋鍣ㄥ畼鑾峰彇浼︾悊瀹℃煡琛ㄩ椤�.xml");
-                byte[] bytes = Files.readAllBytes(path);
-                content = new String(bytes, StandardCharsets.UTF_8);
-            }
+            Path path = Paths.get(filePath + "閬椾綋鍣ㄥ畼鑾峰彇浼︾悊瀹℃煡琛ㄩ椤�.xml");
+            logger.info(filePath + "閬椾綋鍣ㄥ畼鑾峰彇浼︾悊瀹℃煡琛ㄩ椤�.xml ;"+Files.exists(path));
+
+            byte[] bytes = Files.readAllBytes(path);
+            content = new String(bytes, StandardCharsets.UTF_8);
+
             String name=list.get(0).getName()+"锛堜綇闄㈠彿锛�"+list.get(0).getInpatientno()+"锛�";
             content=content.replace("$name",name);//椤圭洰鍚嶇О
 
@@ -313,6 +309,7 @@
                         "                        <w:t>绛惧悕锛�</w:t></w:r>\n" +
                         "                    <w:r wsp:rsidR=\"00421BE1\">\n" ;
                         if(sgin.length()>10) {
+                            sgin=sgin.replace("https://opo.qduh.cn:8091","http://192.168.76.25:8090");
                             committeeOpinion +="<w:pict><w:binData w:name=\"wordml://03000001.png\" xml:space=\"preserve\">\n" + sgin + "\n" +
                                     "</w:binData><v:shape  style=\"width:50pt;height:20pt\"><v:imagedata src=\"wordml://03000001.png\" o:title=\"\"/></v:shape></w:pict>\n" ;
                         }

--
Gitblit v1.9.3