Browse Source

Pull request #15446: REPORT-140338 【数据集替换】报表填报属性-数据校验-不满足公式提示中,没有替换 & REPORT-140337 【数据集替换】报表填报属性-自定义提交的属性中没有替换

Merge in DESIGN/design from ~DESTINY.LIN/design:release/11.0 to release/11.0

* commit '07f0ba5a2a85ad4787695fe1b7e77ad64e217767':
  REPORT-140337 【数据集替换】报表填报属性-自定义提交的属性中没有替换
  REPORT-140338 【数据集替换】报表填报属性-数据校验-不满足公式提示中,没有替换
release/11.0
parent
commit
1054f108d5
  1. 29
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/template/SearchTemplateFormulaAction.java

29
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/template/SearchTemplateFormulaAction.java

@ -2,21 +2,17 @@ package com.fr.design.actions.replace.action.content.formula.template;
import com.fr.base.Formula; import com.fr.base.Formula;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.ParameterConfig;
import com.fr.base.io.AttrMark; import com.fr.base.io.AttrMark;
import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.data.ClassSubmitJob;
import com.fr.data.Verifier; import com.fr.data.Verifier;
import com.fr.data.VerifyItem; import com.fr.data.VerifyItem;
import com.fr.design.actions.replace.action.content.formula.highlight.javascript.SearchCommit2DBJSFormulaAction; import com.fr.design.actions.replace.action.content.formula.highlight.javascript.SearchCommit2DBJSFormulaAction;
import com.fr.design.actions.replace.info.FormulaInfo; import com.fr.design.actions.replace.info.FormulaInfo;
import com.fr.design.actions.replace.info.base.ITContent; import com.fr.design.actions.replace.info.base.ITContent;
import com.fr.design.actions.replace.info.base.SearchTag; import com.fr.design.actions.replace.info.base.SearchTag;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.ReportComponentComposite;
import com.fr.design.mainframe.SheetNameTabPane;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
import com.fr.report.core.ReportUtils; import com.fr.report.core.ReportUtils;
import com.fr.report.report.Report; import com.fr.report.report.Report;
@ -25,8 +21,9 @@ import com.fr.report.write.BuiltInSQLSubmiter;
import com.fr.report.write.ReportWriteAttr; import com.fr.report.write.ReportWriteAttr;
import com.fr.report.write.SubmitVisitor; import com.fr.report.write.SubmitVisitor;
import com.fr.report.write.ValueVerifier; import com.fr.report.write.ValueVerifier;
import com.fr.report.write.WClassSubmiter;
import com.fr.stable.CommonUtils; import com.fr.stable.CommonUtils;
import com.fr.stable.ListMap;
import java.util.List; import java.util.List;
@ -133,6 +130,7 @@ public class SearchTemplateFormulaAction implements SearchTemplateFormula {
ITContent messageContent = ITContent.copy(verifyContent); ITContent messageContent = ITContent.copy(verifyContent);
messageContent.setReplaceObject(item.getMessage()); messageContent.setReplaceObject(item.getMessage());
messageContent.setHoldObject(item); messageContent.setHoldObject(item);
messageContent.setTag(SearchTag.WRITE_ATTR_MESSAGE);
formulaInfos.add(new FormulaInfo(messageContent)); formulaInfos.add(new FormulaInfo(messageContent));
} }
} }
@ -144,6 +142,25 @@ public class SearchTemplateFormulaAction implements SearchTemplateFormula {
ITContent content = ITContent.copy(submitContent); ITContent content = ITContent.copy(submitContent);
content.addOtherPos(submiter.getName()); content.addOtherPos(submiter.getName());
SearchCommit2DBJSFormulaAction.getInstance().dealWithDBManipulation(formulaInfos, content, submiter.getDBManipulation()); SearchCommit2DBJSFormulaAction.getInstance().dealWithDBManipulation(formulaInfos, content, submiter.getDBManipulation());
} else if (visitor instanceof WClassSubmiter) {
WClassSubmiter submiter = (WClassSubmiter) visitor;
ITContent content = ITContent.copy(submitContent);
content.addOtherPos(submiter.getName());
if (submiter.getSubmitJob() instanceof ClassSubmitJob) {
ClassSubmitJob job = (ClassSubmitJob) submiter.getSubmitJob();
dealClassSubmitJob(formulaInfos, job, content);
}
}
}
private void dealClassSubmitJob(List<FormulaInfo> formulaInfos, ClassSubmitJob job, ITContent content) {
ListMap map = job.getPropertyMap();
for (Object value : map.values()) {
if (value instanceof Formula) {
ITContent formulaContent = ITContent.copy(content);
formulaContent.setReplaceObject(value);
formulaInfos.add(new FormulaInfo(formulaContent));
}
} }
} }

Loading…
Cancel
Save