From f418358d6cad2a366a1144ccdecbec5af882674f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=2EYing-=E5=BA=94=E5=BF=97=E6=B5=A9?= Date: Wed, 8 Feb 2023 10:35:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-29522=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=86=85=E5=AF=BC=E5=87=BA=E6=8C=89=E9=92=AE=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=96=87=E5=AD=97=E5=B8=A6=E6=9C=89"..."=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=96=87=E5=AD=97=E5=8F=88=E6=B2=A1=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/file/export/ExcelExportAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/file/export/ExcelExportAction.java b/designer-realize/src/main/java/com/fr/design/actions/file/export/ExcelExportAction.java index 171a68ce8d..0933387062 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/file/export/ExcelExportAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/file/export/ExcelExportAction.java @@ -12,7 +12,7 @@ public class ExcelExportAction extends AbstractExcelExportAction { public ExcelExportAction(JWorkBook jwb) { super(jwb); this.setMenuKeySet(KeySetUtils.SIMPLE_EXCEL_EXPORT); - this.setName(getMenuKeySet().getMenuKeySetName()); + this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/excel.png")); } From 9c3d02995035cc6c84af517d7f2bf6c4339ca2fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=2EYing-=E5=BA=94=E5=BF=97=E6=B5=A9?= Date: Fri, 10 Feb 2023 13:47:08 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-88426=20=E6=A8=A1=E6=9D=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=92=8C=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E9=87=8D=E5=90=8D=E6=97=B6=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=A8=A1=E6=9D=BF=E4=BC=9A=E9=94=99=E8=AF=AF=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/BasicTableDataTreePane.java | 8 ++------ .../fr/design/data/DesignTableDataManager.java | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java index fa1fe545ed..b3c090d549 100644 --- a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java @@ -378,12 +378,8 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp protected boolean isDsNameRepeaded(String name) { allDSNames = DesignTableDataManager.getAllDSNames(tc.getBook()); - for (int i = 0; i < allDSNames.length; i++) { - if (ComparatorUtils.equals(name, allDSNames[i])) { - return true; - } - } - return false; + Set allDSNamesWithoutPermissions = DesignTableDataManager.getAllDSNamesWithoutPermissions(tc.getBook()); + return allDSNamesWithoutPermissions.contains(name); } protected KeyAdapter getTableTreeNodeListener(final UpdateAction editAction, final UpdateAction previewTableDataAction, final UpdateAction removeAction, final TableDataSourceOP op, final TableDataTree dataTree) { 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 e18b2a47d3..536ce1f972 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 @@ -48,6 +48,7 @@ import java.text.Collator; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; @@ -295,6 +296,22 @@ public abstract class DesignTableDataManager { return list.toArray(new String[0]); } + /** + * 获取所有的数据集名称,无论模板是不是有数据集的权限 + */ + public static Set getAllDSNamesWithoutPermissions(TableDataSource source) { + Set names = new HashSet<>(); + String[] allDSNames = getAllDSNames(source); + Map tableDatas = TableDataConfig.getInstance().getTableDatas(); + for (String dsName : allDSNames) { + names.add(dsName); + } + for (Map.Entry entry : tableDatas.entrySet()) { + names.add(entry.getKey()); + } + return names; + } + /** * 不根据过滤设置,返回当前模板数据集、服务器数据集、存储过程本身,是有顺序的 */ From fe9ba332303577e5e1fb515496be9ac58ef980db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=2EYing-=E5=BA=94=E5=BF=97=E6=B5=A9?= Date: Fri, 10 Feb 2023 13:48:47 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-88426=20=E6=A8=A1=E6=9D=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=92=8C=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E9=87=8D=E5=90=8D=E6=97=B6=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=A8=A1=E6=9D=BF=E4=BC=9A=E9=94=99=E8=AF=AF=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/file/export/ExcelExportAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/file/export/ExcelExportAction.java b/designer-realize/src/main/java/com/fr/design/actions/file/export/ExcelExportAction.java index 0933387062..171a68ce8d 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/file/export/ExcelExportAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/file/export/ExcelExportAction.java @@ -12,7 +12,7 @@ public class ExcelExportAction extends AbstractExcelExportAction { public ExcelExportAction(JWorkBook jwb) { super(jwb); this.setMenuKeySet(KeySetUtils.SIMPLE_EXCEL_EXPORT); - this.setName(getMenuKeySet().getMenuKeySetName() + "..."); + this.setName(getMenuKeySet().getMenuKeySetName()); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/excel.png")); } From 071b96c7120458bc897a0147432dbb3c65caf7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=2EYing-=E5=BA=94=E5=BF=97=E6=B5=A9?= Date: Fri, 10 Feb 2023 14:44:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-88426=20=E6=A8=A1=E6=9D=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=92=8C=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E9=87=8D=E5=90=8D=E6=97=B6=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=A8=A1=E6=9D=BF=E4=BC=9A=E9=94=99=E8=AF=AF=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C--=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=8B=EF=BC=8C?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E9=87=8D=E5=A4=8D=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/data/DesignTableDataManager.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 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 536ce1f972..5134e88c8b 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 @@ -301,11 +301,16 @@ public abstract class DesignTableDataManager { */ public static Set getAllDSNamesWithoutPermissions(TableDataSource source) { Set names = new HashSet<>(); - String[] allDSNames = getAllDSNames(source); - Map tableDatas = TableDataConfig.getInstance().getTableDatas(); - for (String dsName : allDSNames) { - names.add(dsName); + Map resMap = new HashMap<>(); + // 模板数据集 + addTemplateData(resMap, source); + // 存储过程 + addStoreProcedureData(resMap); + for (Map.Entry entry : resMap.entrySet()) { + names.add(entry.getKey()); } + //服务器数据集 + Map tableDatas = TableDataConfig.getInstance().getTableDatas(); for (Map.Entry entry : tableDatas.entrySet()) { names.add(entry.getKey()); }