From f239baf4263375c166bcc8e089a3716cb3de7188 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 13 Aug 2024 16:58:55 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-114392=20FR-FBP=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=AE=BE=E8=AE=A1=E9=80=82=E9=85=8D=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/preview/TableDataBeanHelper.java | 2 +- .../fr/design/actions/file/newReport/NewWorkBookAction.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java index 936f6fe119..b77f8dce27 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java @@ -117,7 +117,7 @@ public class TableDataBeanHelper { if (connection != null) { tableData.setDatabase(new NameDatabaseConnection(bean.getDatabase())); } else { - throw new RuntimeException("not find conn by " + bean.getDatabase()); + FineLoggerFactory.getLogger().error("not find conn by {}", bean.getDatabase()); } String sql = SqlUtils.clearSqlComments(DataEncryptionHelper.decrypt(bean.getQuery())); Parameter[] parameters = new Parameter[bean.getParameters().size()]; diff --git a/designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewWorkBookAction.java b/designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewWorkBookAction.java index 371e952baf..46e575e439 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewWorkBookAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewWorkBookAction.java @@ -3,6 +3,7 @@ package com.fr.design.actions.file.newReport; import com.fr.base.svg.IconUtils; import com.fr.design.actions.UpdateAction; +import com.fr.design.cache.DesignCacheManager; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JWorkBook; import com.fr.design.menu.MenuKeySet; @@ -35,7 +36,7 @@ public class NewWorkBookAction extends UpdateAction { * @param e 事件 */ public void actionPerformed(ActionEvent e) { - DesignerContext.getDesignerFrame().addAndActivateJTemplate(new JWorkBook()); + DesignCacheManager.processByCacheTableData(() -> DesignerContext.getDesignerFrame().addAndActivateJTemplate(new JWorkBook())); } public static final MenuKeySet NEW_WORK_BOOK = new MenuKeySet() {