From 698afca5a6bc27688b6a58c9c54818aa24a77538 Mon Sep 17 00:00:00 2001 From: Hoky <303455184@qq.com> Date: Wed, 1 Sep 2021 14:15:28 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58577=E3=80=90=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E3=80=91map=E5=85=AC=E5=BC=8F=E5=90=88?= =?UTF-8?q?=E6=B3=95=E6=80=A7=E6=A3=80=E6=B5=8B=E9=94=99=E8=AF=AF=20&&=20R?= =?UTF-8?q?EPORT-58124=20=E5=85=AC=E5=BC=8F=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E4=B8=8D=E6=94=AF=E6=8C=81=E5=AE=9E?= =?UTF-8?q?=E6=97=B6=E8=AE=A1=E7=AE=97=E7=9A=84=E5=8A=9F=E8=83=BD=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E5=A4=84=E7=90=86=201.map=E7=9A=84=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=B0=83=E6=95=B4=EF=BC=9B=202.=E5=AF=B9?= =?UTF-8?q?=E5=86=85=E7=BD=AE=E5=8F=82=E6=95=B0=E4=B8=8D=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/FormulaPane.java | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index ca5f030dd..77074ab96 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java @@ -102,6 +102,7 @@ import java.io.Reader; import java.io.StringReader; import java.text.NumberFormat; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; @@ -787,9 +788,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { return scanner.getUnSupportFormula(); } - UnsupportedSimulationFormulaHunter unsupportedSimulationFormulaHunter = new UnsupportedSimulationFormulaHunter(); + UnsupportedSimulationNodeHunter unsupportedSimulationFormulaHunter = new UnsupportedSimulationNodeHunter(); expression.traversal4Tiny(unsupportedSimulationFormulaHunter); - return unsupportedSimulationFormulaHunter.isSupported() ? null : unsupportedSimulationFormulaHunter.getUnSupportFormula(); + return unsupportedSimulationFormulaHunter.isSupported() ? null : unsupportedSimulationFormulaHunter.getUnSupportedNode(); } catch (Exception e) { FineLoggerFactory.getLogger().error("", e); } @@ -869,25 +870,30 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { } } - private static class UnsupportedSimulationFormulaHunter extends TinyHunter { - + private static class UnsupportedSimulationNodeHunter extends TinyHunter { private boolean supported = true; - private String unSupportFormula; + private String unSupportedNode; + + private String[] curReportVariables; + + public UnsupportedSimulationNodeHunter() { + curReportVariables = VariableResolver.DEFAULT.resolveCurReportVariables(); + } public boolean isSupported() { return supported; } - public String getUnSupportFormula() { - return unSupportFormula; + public String getUnSupportedNode() { + return unSupportedNode; } public void hunter4Tiny(Tiny tiny) { - if (tiny.getClass() == ColumnRowRangeInPage.class) { + if (tiny.getClass() == ColumnRowRangeInPage.class || Arrays.asList(curReportVariables).contains(tiny.toString())) { supported = false; - unSupportFormula = tiny.toString(); + unSupportedNode = tiny.toString(); } } }