From 1a3fcb92a77dcf231c9453f9ff09f6e00534ba46 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 20 Nov 2024 16:26:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-140743=20=E3=80=90=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=9B=BF=E6=8D=A2=E3=80=91=E4=B8=8B=E6=8B=89=E6=A0=91?= =?UTF-8?q?=E5=92=8C=E8=A7=86=E5=9B=BE=E6=A0=91=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=9B=BF=E6=8D=A2=E5=90=8E=EF=BC=8C=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E5=B9=B6=E6=9C=AA=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/replace/utils/ReplaceUtils.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java index 161e8d190a..effb64cf38 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java @@ -572,7 +572,14 @@ public class ReplaceUtils { } } - private static void replaceTreeConfig(Object config, List entities) { + + /** + * 处理树结构的config + * + * @param config 树结构配置 + * @param entities 替换信息 + */ + public static void replaceTreeConfig(Object config, List 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); From a0fa7a079d320e54c6ebbf4e7a36d09370032356 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 20 Nov 2024 16:51:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-140743=20=E3=80=90=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=9B=BF=E6=8D=A2=E3=80=91=E4=B8=8B=E6=8B=89=E6=A0=91?= =?UTF-8?q?=E5=92=8C=E8=A7=86=E5=9B=BE=E6=A0=91=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=9B=BF=E6=8D=A2=E5=90=8E=EF=BC=8C=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E5=B9=B6=E6=9C=AA=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/actions/replace/utils/ReplaceUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java index effb64cf38..f7c4946eb6 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/ReplaceUtils.java @@ -560,7 +560,7 @@ public class ReplaceUtils { } if (widget instanceof DataControl) { ValueInitializer value = ((DataControl) widget).getWidgetValue(); - if (value.getValue() instanceof DataBinding) { + if (value != null && value.getValue() instanceof DataBinding) { DataBinding binding = (DataBinding) value.getValue(); for (TableReplacementEntity entity : entities) { if (StringUtils.equals(entity.getOldName(), binding.getDataSourceName())) {