From 9450b481614c7a4f191475d63cfa5c5a3f87141e Mon Sep 17 00:00:00 2001
From: zhaowenxuan <chacca165@163.com>
Date: 星期六, 15 二月 2025 20:40:07 +0800
Subject: [PATCH] 20250215

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisPDFUtil.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisPDFUtil.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisPDFUtil.java
index f6e9e3b..f3bddbf 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisPDFUtil.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisPDFUtil.java
@@ -17,6 +17,7 @@
 import com.ltkj.common.core.domain.entity.SysUser;
 import com.ltkj.common.utils.DateUtils;
 import com.ltkj.common.utils.SecurityUtils;
+import com.ltkj.db.DataSourceContextHolder;
 import com.ltkj.framework.config.MatchUtils;
 import com.ltkj.hosp.domain.*;
 import com.ltkj.hosp.mapper.DictUserInfoMapper;
@@ -1537,7 +1538,10 @@
 
         tableQz.addCell(cell);
 
-        File file = new File(value + File.separator + "yinzhang.png");
+        String keyId = DataSourceContextHolder.getDataSourceKey();
+        keyId = keyId.replace("ltkjpeis10_","");
+
+        File file = new File(value + File.separator + keyId + File.separator + "yinzhang.png");
         cell = new PdfPCell();
         cell.setBorder(Rectangle.NO_BORDER);
         cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
@@ -1944,7 +1948,9 @@
      */
     private void savePDFFile(String outputFileName1, TjOrder tjOrder, TjCustomer customer, ByteArrayOutputStream finalOutPut) throws IOException, DocumentException, InterruptedException {
         // 绗竴姝ワ細鐢熸垚鏂囦欢骞朵繚瀛�
-        String outputPath1 = value + File.separator;
+        String key = DataSourceContextHolder.getDataSourceKey();
+        key = key.replace("ltkjpeis10_","");
+        String outputPath1 = value + File.separator + key + File.separator;
         File file = new File(outputPath1 + outputFileName1);
         BufferedOutputStream outputStream = null;
         outputStream = new BufferedOutputStream(new FileOutputStream(file));

--
Gitblit v1.8.0