|
|
|
@ -572,7 +572,14 @@ public class ReplaceUtils {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private static void replaceTreeConfig(Object config, List<TableReplacementEntity> entities) { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 处理树结构的config |
|
|
|
|
* |
|
|
|
|
* @param config 树结构配置 |
|
|
|
|
* @param entities 替换信息 |
|
|
|
|
*/ |
|
|
|
|
public static void replaceTreeConfig(Object config, List<TableReplacementEntity> entities) { |
|
|
|
|
if (config instanceof LayerConfig[]) { |
|
|
|
|
LayerConfig[] layerConfigs = (LayerConfig[]) config; |
|
|
|
|
dealWithLayerConfigs(layerConfigs, entities); |
|
|
|
@ -600,6 +607,8 @@ public class ReplaceUtils {
|
|
|
|
|
for (TableReplacementEntity entity : entities) { |
|
|
|
|
if (layerConfig.getTableData() instanceof NameTableData && StringUtils.equals(layerConfig.getTableData().getName(), entity.getOldName())) { |
|
|
|
|
layerConfig.setTableData(new NameTableData(entity.getNewName())); |
|
|
|
|
layerConfig.setViewColumn(entity.getTargetIndex(layerConfig.getViewColumn())); |
|
|
|
|
layerConfig.setModelColumn(entity.getTargetIndex(layerConfig.getModelColumn())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ElementCaseHelper.replaceTableDataDictionary(layerConfig.getDictionary(), (NameTableData) layerConfig.getDictionary().getTableData(), entities); |
|
|
|
|