From 8cc0555d1f7bac0dcbf91960328ba20272f6d312 Mon Sep 17 00:00:00 2001 From: Timer <@> Date: Mon, 27 Apr 2026 21:30:48 +0800 Subject: [PATCH] bug --- .../com/sipai/controller/report/RptCreateController.java | 9 ++++++++- src/main/java/com/sipai/security/tag/AuthorizeTag.java | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sipai/controller/report/RptCreateController.java b/src/main/java/com/sipai/controller/report/RptCreateController.java index 6d4e1d65..f8e23e36 100644 --- a/src/main/java/com/sipai/controller/report/RptCreateController.java +++ b/src/main/java/com/sipai/controller/report/RptCreateController.java @@ -723,7 +723,14 @@ public class RptCreateController { RptCreate rptCreate = this.rptCreateService.selectById(id); if (rptCreate != null) {//报表生成 try { - String base = this.rptCreateService.convertExceltoHtml(CommUtil.fixRptCreateFileName(rptCreate.getRptname() + rptCreate.getId()), sheetname, id, layerType, FileNameSpaceEnum.RptCreateFile.getNameSpace()); + // 优先使用数据库中存储的文件路径,如果没有则构造路径(兼容旧数据) + String filePath; + if (rptCreate.getAbspath() != null && !rptCreate.getAbspath().isEmpty()) { + filePath = rptCreate.getAbspath(); + } else { + filePath = CommUtil.fixRptCreateFileName(rptCreate.getRptname() + rptCreate.getId()); + } + String base = this.rptCreateService.convertExceltoHtml(filePath, sheetname, id, layerType, FileNameSpaceEnum.RptCreateFile.getNameSpace()); //截取掉sheet名 目前只能先截取h2 String result = subRangeString(base, "