From bda1ce873514c0848c4ad76bdd2274f01ab5dcc1 Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期一, 11 八月 2025 08:48:08 +0800
Subject: [PATCH] zjh202500811

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java
index 9756f76..ec609de 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java
@@ -83,8 +83,8 @@
     private IDictCompService dictCompService;
     @Resource
     private ITjReportTemplateService reportTemplateService;
-    @Value("${path.filePath}")
-    private String value;
+//    @Value("${path.filePath}")
+//    private String value;
     @Value("${path.reportServer}")
     private String urlValue;
     @Resource
@@ -358,6 +358,7 @@
     }
 
     public AjaxResult shengchengbgmoban(String tjNumber, TjOrder tjOrder, TjCustomer tjCustomer, TjReportTemplate reportTemplate,TjReportTemplate zongJianYiShiQianMing) throws Exception {
+        String value = configService.selectConfigByKey("path_filePath");
         AjaxResult ajaxResult = null;
         try {
             ajaxResult = hisPDFUtil.hisPDFNew2(tjOrder, tjCustomer, reportTemplate,zongJianYiShiQianMing);
@@ -747,7 +748,7 @@
                         tjOrderDetail.setStandard(list2.get(0));
                     } else {
                         Long cusSex = customer.getCusSex();
-                        Date cusBrithday = customer.getCusBrithday();
+                        String cusBrithday = customer.getCusBrithday();
                         int age = DateUtil.ageOfNow(cusBrithday);
                         for (TjStandard tjStandard : list2) {
                             LambdaQueryWrapper<TjStandard> wq8 = new LambdaQueryWrapper<>();
@@ -825,7 +826,7 @@
                     tjOrderDetail.setStandard(list2.get(0));
                 } else {
                     Long cusSex = customer.getCusSex();
-                    Date cusBrithday = customer.getCusBrithday();
+                    String cusBrithday = customer.getCusBrithday();
                     int age = DateUtil.ageOfNow(cusBrithday);
                     for (TjStandard tjStandard : list2) {
                         LambdaQueryWrapper<TjStandard> wq8 = new LambdaQueryWrapper<>();
@@ -908,6 +909,7 @@
 //        if (one == null) {
 //            return;
 //        }
+        String value = configService.selectConfigByKey("path_filePath");
         String key = DataSourceContextHolder.getDataSourceKey();
         key = key.replace("ltkjpeis10_","");
 //        String userId = SecurityUtils.getLoginUser().getUsername();
@@ -982,7 +984,7 @@
         }
         String key = DataSourceContextHolder.getDataSourceKey();
         key = key.replace("ltkjpeis10_","");
-
+        String value = configService.selectConfigByKey("path_filePath");
 //        String userId = SecurityUtils.getLoginUser().getUsername();
 //        PDFBinaryUtil.base64StringToPDF(one.getReport(), FileUtil.mkdir(value).getPath() + File.separator + key + File.separator + tjCustomer.getCusId() + tjNumber + tjCustomer.getCusName() + "_浣撴鎶ュ憡.pdf");
         String filePath = value + File.separator + key + File.separator + tjCustomer.getCusId() + tjNumber + tjCustomer.getCusName() + "_鎶ュ憡.pdf";
@@ -1054,8 +1056,9 @@
     public AjaxResult preview(@RequestBody String data) {
         String is_batch_report_use_sql = configService.selectConfigByKey("is_batch_report_use_sql");
         List<String> tjNumbers = Arrays.stream(data.split(",")).collect(Collectors.toList());
+        String value = configService.selectConfigByKey("path_filePath");
         if ("true".equals(is_batch_report_use_sql)) {
-            return tjReportService.makeBatchReport(tjNumbers);
+            return tjReportService.makeBatchReport(tjNumbers, value);
         } else {
             return makeReport(tjNumbers);
         }

--
Gitblit v1.8.0