From 713c9f02db38a209fa33519b1d15aeef7b7b1368 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 14 Nov 2024 15:02:25 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-140453=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=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E7=9A=84=E5=B1=9E=E6=80=A7=E5=85=AC=E5=BC=8F?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=9B=BF=E6=8D=A2=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/SearchTemplateFormulaAction.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/template/SearchTemplateFormulaAction.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/template/SearchTemplateFormulaAction.java index e7603de567..b95a6f6be6 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/template/SearchTemplateFormulaAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/template/SearchTemplateFormulaAction.java @@ -22,6 +22,7 @@ import com.fr.report.write.ReportWriteAttr; import com.fr.report.write.SubmitVisitor; import com.fr.report.write.ValueVerifier; import com.fr.report.write.WClassSubmiter; +import com.fr.report.write.WClassVerifier; import com.fr.stable.CommonUtils; import com.fr.stable.ListMap; @@ -106,16 +107,31 @@ public class SearchTemplateFormulaAction implements SearchTemplateFormula { //数据校验 for (int i = 0, len = attr.getVerifierCount(); i < len; i++) { Verifier verifier = attr.getVerifier(i); + ITContent content = ITContent.copy(sheetContent); + content.addOtherPos(Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify")); if (verifier instanceof ValueVerifier) { - ITContent content = ITContent.copy(sheetContent); - content.addOtherPos(Toolkit.i18nText("Fine-Design_Report_Verify_Data_Verify")); dealValueVerifier4Formula(formulaInfos, content, (ValueVerifier) verifier); + } else if (verifier instanceof WClassVerifier) { + dealWClassVerifier(formulaInfos, content, (WClassVerifier)verifier); } } } } + private void dealWClassVerifier(List formulaInfos, ITContent content, WClassVerifier verifier) { + if (verifier.getClassVerifyJob() != null) { + ListMap map = verifier.getClassVerifyJob().getPropertyMap(); + for (Object value : map.values()) { + if (value instanceof Formula) { + ITContent formulaContent = ITContent.copy(content); + formulaContent.setReplaceObject(value); + formulaInfos.add(new FormulaInfo(formulaContent)); + } + } + } + } + private void dealValueVerifier4Formula(List formulaInfos, ITContent content, ValueVerifier verifier) { ITContent verifyContent = ITContent.copy(content); verifyContent.addOtherPos(verifier.getName());