From bf9b529af8e15f6ac76bcf42120e6e63b3db092f Mon Sep 17 00:00:00 2001 From: "Sky.Luo" Date: Thu, 6 Apr 2023 17:05:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-89901=20feat:=20sql=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/wrapper/AbstractTableDataWrapper.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java index be993fa686..fc520a4d36 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java @@ -2,11 +2,13 @@ package com.fr.design.data.tabledata.wrapper; import com.fr.base.TableData; import com.fr.data.TableDataSource; +import com.fr.data.impl.DBTableData; import com.fr.data.impl.EmbeddedTableData; import com.fr.design.DesignModelAdapter; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.utils.DesignUtils; import com.fr.general.ComparatorUtils; @@ -58,6 +60,9 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper { } EmbeddedTableData embeddedTableData = null; + if (tabledata instanceof DBTableData) { + ((DBTableData) tabledata).setDesignerCurrEditTemplate(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getName()); + } try { embeddedTableData = DesignTableDataManager.previewTableDataNotNeedInputParameters(tds, tabledata, TableData.RESULT_NOT_NEED, false); } catch (Exception e) { @@ -103,6 +108,9 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper { * */ public void previewData() { + if (tabledata instanceof DBTableData) { + ((DBTableData) tabledata).setDesignerCurrEditTemplate(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getName()); + } PreviewTablePane.previewTableData(tabledata); } From 52277923da17a7f7f406bb6e64842006d3463879 Mon Sep 17 00:00:00 2001 From: "Sky.Luo" Date: Fri, 7 Apr 2023 15:55:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-89901=20feat:=20sql=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/data/DesignTableDataManager.java | 1 + .../data/tabledata/wrapper/AbstractTableDataWrapper.java | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index 5134e88c8b..2f97977f5b 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java @@ -571,6 +571,7 @@ public abstract class DesignTableDataManager { parameter.setValue(parameterMap.get(parameter.getName())); } } + parameterMap.put("templateName", HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath()); return DataOperator.getInstance().previewTableData(TableDataSourceTailor.extractTableData(tableDataSource), tabledata, parameterMap, rowCount); } catch (Exception e) { throw new TableDataException(e.getMessage(), e); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java index fc520a4d36..43a9771caf 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java @@ -60,9 +60,6 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper { } EmbeddedTableData embeddedTableData = null; - if (tabledata instanceof DBTableData) { - ((DBTableData) tabledata).setDesignerCurrEditTemplate(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getName()); - } try { embeddedTableData = DesignTableDataManager.previewTableDataNotNeedInputParameters(tds, tabledata, TableData.RESULT_NOT_NEED, false); } catch (Exception e) { @@ -108,9 +105,6 @@ public abstract class AbstractTableDataWrapper implements TableDataWrapper { * */ public void previewData() { - if (tabledata instanceof DBTableData) { - ((DBTableData) tabledata).setDesignerCurrEditTemplate(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getName()); - } PreviewTablePane.previewTableData(tabledata); } From 8b6fa967afbd8efd4465f98665cf0b7688438ab9 Mon Sep 17 00:00:00 2001 From: "Sky.Luo" Date: Fri, 7 Apr 2023 16:00:10 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-89901=20feat:=20sql=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/tabledata/wrapper/AbstractTableDataWrapper.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java index 43a9771caf..be993fa686 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/AbstractTableDataWrapper.java @@ -2,13 +2,11 @@ package com.fr.design.data.tabledata.wrapper; import com.fr.base.TableData; import com.fr.data.TableDataSource; -import com.fr.data.impl.DBTableData; import com.fr.data.impl.EmbeddedTableData; import com.fr.design.DesignModelAdapter; import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; -import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.utils.DesignUtils; import com.fr.general.ComparatorUtils; From 7a3f3dc7166e2da29fda7b1cd1daeafe2685b418 Mon Sep 17 00:00:00 2001 From: "Sky.Luo" Date: Wed, 12 Apr 2023 11:31:55 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-89901=20feat:=20sql=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/data/DesignTableDataManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index 2f97977f5b..175af0653f 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java @@ -32,6 +32,7 @@ import com.fr.file.TableDataConfig; import com.fr.general.ComparatorUtils; import com.fr.general.data.DataModel; import com.fr.general.data.TableDataException; +import com.fr.general.sql.sqlnote.SqlNoteConstants; import com.fr.log.FineLoggerFactory; import com.fr.module.ModuleContext; import com.fr.script.Calculator; @@ -571,7 +572,7 @@ public abstract class DesignTableDataManager { parameter.setValue(parameterMap.get(parameter.getName())); } } - parameterMap.put("templateName", HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath()); + parameterMap.put(SqlNoteConstants.SQL_NOTE_TEMPLATE, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath()); return DataOperator.getInstance().previewTableData(TableDataSourceTailor.extractTableData(tableDataSource), tabledata, parameterMap, rowCount); } catch (Exception e) { throw new TableDataException(e.getMessage(), e);