From ac544c1d85c53e7f51e4ea76aa2489a14aef03d9 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期五, 20 六月 2025 18:57:45 +0800 Subject: [PATCH] zjh20250620 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 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 5c9363b..fae36ba 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 @@ -341,7 +341,7 @@ return shengchengbgmoban(tjNumber, tjOrder, tjCustomer, reportTemplate,zongJianYiShiQianMing); } catch (Exception e) { // throw new Exception(e); -// log.error("鐢熸垚鎶ュ憡澶辫触锛�"+e.getMessage(),String.valueOf(e)); + log.error("鐢熸垚鎶ュ憡澶辫触锛�"+e.getMessage(),String.valueOf(e)); e.printStackTrace(); tjOrder.setReportTime(null); tjOrder.setCheckTime(null); @@ -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); @@ -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