From 52728bf6ca1e1eb31a6587e183f1b1c5d1ab11c0 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 21 Nov 2024 22:10:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-141247=20=E3=80=90FVS=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E6=9B=BF=E6=8D=A2=E3=80=91=E5=85=AC=E5=BC=8F?= =?UTF-8?q?ds1.select=E3=80=81group=E3=80=81find=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D=E4=B8=8D=E4=BC=9A=E8=A2=AB=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../action/content/tabledata/TableDataFormulaUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/tabledata/TableDataFormulaUtils.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/tabledata/TableDataFormulaUtils.java index 955a44005e..bf02fe15e9 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/tabledata/TableDataFormulaUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/tabledata/TableDataFormulaUtils.java @@ -151,8 +151,10 @@ public class TableDataFormulaUtils { if (StringUtils.equals(parent.toString(), entity.getOldName())) { // 如果是要替换的数据集 String field = entity.getTargetField(name); - // 替换成匹配后的字段 - Reflect.on(ambiguity).set(STATEMENT, field); + if (StringUtils.isNotEmpty(field)) { + // 替换成匹配后的字段 + Reflect.on(ambiguity).set(STATEMENT, field); + } break; } } From 365450b387f31fca49946788d4d8725a0821d4c7 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 21 Nov 2024 22:33:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-141671=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=E7=BB=84=E5=90=88=E5=9B=BE?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86=E6=9B=BF=E6=8D=A2=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=88=97=E6=B2=A1=E6=9C=89=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/replace/utils/SearchJSUtils.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java index 8a2d245b54..cc444ba91e 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java @@ -387,11 +387,14 @@ public class SearchJSUtils { if (chartCollection.getChart(i) instanceof VanChart) { VanChart chart = ((VanChart) chartCollection.getChart(i)); if (chart.getPlot() != null) { - NameJavaScriptGroup nameJavaScriptGroup = chart.getPlot().getHotHyperLink(); - if (isNameJavaScriptGroupExist(nameJavaScriptGroup)) { - for (int j = 0; j < nameJavaScriptGroup.size(); j++) { - nameJavaScriptArrayList.add(nameJavaScriptGroup.getNameHyperlink(j)); + if (chart.getPlot() instanceof VanChartCustomPlot) { + VanChartCustomPlot plot = chart.getPlot(); + for (Plot customPlot : plot.getCustomPlotList()) { + getChartJavaScriptFromGroup(customPlot.getHotHyperLink(), nameJavaScriptArrayList); } + } else { + NameJavaScriptGroup nameJavaScriptGroup = chart.getPlot().getHotHyperLink(); + getChartJavaScriptFromGroup(nameJavaScriptGroup, nameJavaScriptArrayList); } } } @@ -399,6 +402,14 @@ public class SearchJSUtils { return nameJavaScriptArrayList; } + private static void getChartJavaScriptFromGroup(NameJavaScriptGroup nameJavaScriptGroup, ArrayList nameJavaScriptArrayList) { + if (isNameJavaScriptGroupExist(nameJavaScriptGroup)) { + for (int j = 0; j < nameJavaScriptGroup.size(); j++) { + nameJavaScriptArrayList.add(nameJavaScriptGroup.getNameHyperlink(j)); + } + } + } + /** * 处理图表的交互属性(可能存在多种地图) * @param content 存储信息的数据结构 From 66bb13ad46dc56450189e5b6bfb57027bb4d3eda Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 21 Nov 2024 22:47:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-141350=20=E3=80=90FVS=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E6=9B=BF=E6=8D=A2=E3=80=91=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?-=E5=8D=95=E5=85=83=E6=A0=BC-=E6=9D=A1=E4=BB=B6=E5=B1=9E?= =?UTF-8?q?=E6=80=A7-=E6=9D=A1=E4=BB=B6=E6=98=AF=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=88=97=EF=BC=8C=E6=97=A0=E6=B3=95=E8=AF=86=E5=88=AB=EF=BC=8C?= =?UTF-8?q?=E7=9C=8B=E4=B8=8B=E8=BF=99=E9=87=8C=E8=A6=81=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/replace/utils/ReplaceUtils.java | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) 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 a9ad21fd2e..1230433459 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 @@ -10,6 +10,7 @@ import com.fr.data.TableReplacementEntity; import com.fr.data.condition.CommonCondition; import com.fr.data.condition.JoinCondition; import com.fr.data.condition.ListCondition; +import com.fr.data.condition.ObjectCondition; import com.fr.data.core.Compare; import com.fr.data.impl.NameTableData; import com.fr.data.impl.TableDataDictionary; @@ -338,6 +339,7 @@ public class ReplaceUtils { private static void replaceHighlight(Highlight highlight, List entities) { if (highlight instanceof DefaultHighlight) { DefaultHighlight defaultHighlight = (DefaultHighlight) highlight; + replaceCondition(defaultHighlight.getCondition(), entities); for (int i = 0 ; i < defaultHighlight.actionCount() ; i++) { if (defaultHighlight.getHighlightAction(i) instanceof PresentHighlightAction) { PresentHighlightAction action = (PresentHighlightAction) defaultHighlight.getHighlightAction(i); @@ -497,35 +499,45 @@ public class ReplaceUtils { //公式条件不需要修改,里面不会涉及到,有问题再加 //普通条件 //1条条件 - if (condition instanceof CommonCondition) { - dealWithTableDataNameChange((CommonCondition) condition, entity); - } + replaceSingleCondition(condition, entity); //N条条件 if (condition instanceof ListCondition) { for (int k = 0; k < ((ListCondition) condition).getJoinConditionCount(); k++) { JoinCondition joinCondition = ((ListCondition) condition).getJoinCondition(k); Condition obCondition = joinCondition.getCondition(); if (obCondition != null) { - if (obCondition instanceof CommonCondition) { - dealWithTableDataNameChange((CommonCondition) obCondition, entity); - } + replaceSingleCondition(obCondition, entity); } } } } } + private static void replaceSingleCondition(Condition condition, List entity) { + if (condition instanceof CommonCondition) { + dealWithTableDataNameChange((CommonCondition) condition, entity); + } + if (condition instanceof ObjectCondition) { + dealWithCompare(((ObjectCondition) condition).getCompare(), entity); + } + } + private static void dealWithTableDataNameChange(CommonCondition condition, List entities) { Compare compare = condition.getCompare(); - Object ob = compare.getValue(); - if (ob instanceof SimpleDSColumn) { - for (TableReplacementEntity entity : entities) { - if (ComparatorUtils.equals(((SimpleDSColumn) ob).getDsName(), entity.getOldName())) { - ((SimpleDSColumn) ob).setDsName(entity.getNewName()); - ((SimpleDSColumn) ob).setColumn(TableDataColumn.createColumn(entity.getTargetField(TableDataColumn.getColumnName(((SimpleDSColumn) ob).getColumn())))); + dealWithCompare(compare, entities); + } + + private static void dealWithCompare(Compare compare, List entities) { + if (compare != null) { + Object ob = compare.getValue(); + if (ob instanceof SimpleDSColumn) { + for (TableReplacementEntity entity : entities) { + if (ComparatorUtils.equals(((SimpleDSColumn) ob).getDsName(), entity.getOldName())) { + ((SimpleDSColumn) ob).setDsName(entity.getNewName()); + ((SimpleDSColumn) ob).setColumn(TableDataColumn.createColumn(entity.getTargetField(TableDataColumn.getColumnName(((SimpleDSColumn) ob).getColumn())))); + } } } - } }