Browse Source

REPORT-44410 加个判断

bugfix/10.0
hades 4 years ago
parent
commit
9f45188d6e
  1. 20
      designer-base/src/main/java/com/fr/design/DesignModelAdapter.java

20
designer-base/src/main/java/com/fr/design/DesignModelAdapter.java

@ -281,12 +281,18 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate
TableData tableData, TableData tableData,
Map<String, ParameterProvider> map, Map<String, ParameterProvider> map,
Filter<ParameterProvider> filter) { Filter<ParameterProvider> filter) {
// 更新下缓存名称 替换下数据集名称
ParameterProvider[] providers = tableDataParametersMap.remove(oldName); ParameterProvider[] providers = null;
if (providers != null) {
tableDataParametersMap.put(tdName, providers); if (!ComparatorUtils.equals(oldName, tdName)) {
// 更新下缓存名称 替换下数据集名称
providers = tableDataParametersMap.remove(oldName);
if (providers != null) {
tableDataParametersMap.put(tdName, providers);
}
} }
try { try {
for (Map.Entry<String, ParameterProvider[]> entry : tableDataParametersMap.entrySet()) { for (Map.Entry<String, ParameterProvider[]> entry : tableDataParametersMap.entrySet()) {
ParameterProvider[] parameterProviders; ParameterProvider[] parameterProviders;
@ -309,8 +315,10 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
// 更新缓存 if (providers != null) {
tableDataParametersMap.put(tdName, providers); // 更新缓存
tableDataParametersMap.put(tdName, providers);
}
} }
protected void addGlobalParameters(Map<String, ParameterProvider> map) { protected void addGlobalParameters(Map<String, ParameterProvider> map) {

Loading…
Cancel
Save