From 580b1764ed7f1eb14b55cd76417f3ac3d493c433 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期二, 25 八月 2026 16:03:01 +0800
Subject: [PATCH] 遗体器官获取伦理审查表
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceEthicalreviewopinionsController.java | 35 +++++++++++++++++++++++++++--------
ruoyi-admin/src/main/resources/application-druid.yml | 2 +-
ruoyi-project/target/classes/com/ruoyi/project/service/impl/GiLinkService.class | 0
ruoyi-project/src/main/resources/mapper/project/ServiceEthicalreviewopinionsMapper.xml | 2 +-
4 files changed, 29 insertions(+), 10 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 41c248d..af373f7 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
@@ -14,6 +14,7 @@
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.PageUtils;
+import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.project.domain.ServiceDonateorganBase;
import com.ruoyi.project.domain.ServiceEthicalreviewinitiate;
@@ -33,8 +34,10 @@
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.formula.functions.Now;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
@@ -202,15 +205,27 @@
}
EthicalreviewopinionsStateTotalVO stateTotalVO=serviceEthicalreviewopinionsService.stateTotalAll(nitiateId);
String filePath = getClass().getResource("/template/").getPath();
+ File directory = new File("");// 鍙傛暟涓虹┖
+ String filePath1 = null;
+ try {
+ filePath1 = 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(filePath + "閬椾綋鍣ㄥ畼鑾峰彇浼︾悊瀹℃煡琛ㄩ椤�.xml");
- byte[] bytes = Files.readAllBytes(path);
- content = new String(bytes, StandardCharsets.UTF_8);
+ //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);
+ }
String name=list.get(0).getName()+"锛堜綇闄㈠彿锛�"+list.get(0).getInpatientno()+"锛�";
content=content.replace("$name",name);//椤圭洰鍚嶇О
@@ -275,10 +290,12 @@
}
if(expName.length()==2) expName=expName.substring(0,1)+" "+expName.substring(1);
- if(row.getReceiveStatus().equals("1"))State="宸插悓鎰�";
- else if(row.getReceiveStatus().equals("2")) State="涓嶅悓鎰�";
- else if(row.getReceiveStatus().equals("3")) State="寮冩潈";
- else if(row.getReceiveStatus().equals("4")) State="淇敼鍚庡悓鎰�";
+ if(row.getReceiveStatus().equals("0"))State="寰呮帴鏀�";
+ else if(row.getReceiveStatus().equals("1")) State="鏈帴鏀�";
+ else if(row.getReceiveStatus().equals("2")) State="宸叉帴鏀�";
+ else if(row.getReceiveStatus().equals("3")) State="瓒呮椂";
+ else if(row.getReceiveStatus().equals("4")) State="涓";
+ else if(row.getReceiveStatus().equals("5")) State="瀹屾垚";
committeeOpinion+=" <w:tr wsp:rsidR=\"00425E28\" wsp:rsidRPr=\"00CB3FB5\" wsp:rsidTr=\"00425E28\"><w:trPr><w:trHeight w:val=\"680\"/></w:trPr>\n" +
" <w:tc><w:tcPr><w:tcW w:w=\"885\" w:type=\"dxa\"/><w:vmerge/><w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"auto\"/><w:vAlign\n" +
" w:val=\"center\"/></w:tcPr>\n" +
@@ -333,10 +350,12 @@
try {
Path path = Paths.get(filePathData + "/" + name + ".doc");
Files.write(path, content.getBytes(StandardCharsets.UTF_8));
+
} catch (Exception e1) {
e1.printStackTrace();
}
+
Map<String, Object> map = new HashMap<>();
map.put("downloadUrl", "/download/wordtemplate/" + name + ".doc");
map.put("downloadName", name + ".doc");
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index e7b525c..f6fad6c 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -69,7 +69,7 @@
multi-statement-allow: true
redis:
# 鍦板潃銆佸瘑鐮併�佺鍙o紙榛樿涓�6379锛夛細寮�鍙戠幆澧�
- host: 192.168.100.10
+ host: 127.0.0.1
password: Smartor
port: 6020
diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceEthicalreviewopinionsMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceEthicalreviewopinionsMapper.xml
index b0f20e7..b75c766 100644
--- a/ruoyi-project/src/main/resources/mapper/project/ServiceEthicalreviewopinionsMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/ServiceEthicalreviewopinionsMapper.xml
@@ -238,8 +238,8 @@
SELECT COUNT(*) count,SUM(CASE WHEN receive_status = 5 THEN 1 ELSE 0 END) AS throughCount,
SUM(CASE WHEN receive_status =4 THEN 1 ELSE 0 END) AS rejectCount,
SUM(CASE WHEN receive_status =3 THEN 1 ELSE 0 END) AS waiveCount,
- SUM(CASE WHEN receive_status =2 THEN 1 ELSE 0 END) AS disagreeCount,
SUM(CASE WHEN receive_status =1 THEN 1 ELSE 0 END) AS agreeCount,
+ SUM(CASE WHEN receive_status =0 THEN 1 ELSE 0 END) AS disagreeCount,
SUM(CASE WHEN receive_status !=0 THEN 1 ELSE 0 END) AS inCount
FROM service_ethicalreviewopinions
diff --git a/ruoyi-project/target/classes/com/ruoyi/project/service/impl/GiLinkService.class b/ruoyi-project/target/classes/com/ruoyi/project/service/impl/GiLinkService.class
index dc50b4c..1f7e11f 100644
--- a/ruoyi-project/target/classes/com/ruoyi/project/service/impl/GiLinkService.class
+++ b/ruoyi-project/target/classes/com/ruoyi/project/service/impl/GiLinkService.class
Binary files differ
--
Gitblit v1.9.3