Browse Source

Merge remote-tracking branch 'origin/release/11.0' into release/11.0

release/11.0
Leo.Qin 2 years ago
parent
commit
7a815349df
  1. 8
      designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
  2. 22
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

8
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<String> 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) {

22
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,27 @@ public abstract class DesignTableDataManager {
return list.toArray(new String[0]);
}
/**
* 获取所有的数据集名称,无论模板是不是有数据集的权限
*/
public static Set<String> getAllDSNamesWithoutPermissions(TableDataSource source) {
Set<String> names = new HashSet<>();
Map<String, TableDataWrapper> resMap = new HashMap<>();
// 模板数据集
addTemplateData(resMap, source);
// 存储过程
addStoreProcedureData(resMap);
for (Map.Entry<String, TableDataWrapper> entry : resMap.entrySet()) {
names.add(entry.getKey());
}
//服务器数据集
Map<String, TableData> tableDatas = TableDataConfig.getInstance().getTableDatas();
for (Map.Entry<String, TableData> entry : tableDatas.entrySet()) {
names.add(entry.getKey());
}
return names;
}
/**
* 不根据过滤设置返回当前模板数据集服务器数据集存储过程本身是有顺序的
*/

Loading…
Cancel
Save