Browse Source

REPORT-140337 【数据集替换】报表填报属性-自定义提交的属性中没有替换

release/11.0
Destiny.Lin 1 month ago
parent
commit
946dd37475
  1. 22
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/template/SearchTemplateFormulaAction.java

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

@ -4,6 +4,7 @@ import com.fr.base.Formula;
import com.fr.base.Parameter;
import com.fr.base.io.AttrMark;
import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.data.ClassSubmitJob;
import com.fr.data.Verifier;
import com.fr.data.VerifyItem;
import com.fr.design.actions.replace.action.content.formula.highlight.javascript.SearchCommit2DBJSFormulaAction;
@ -20,7 +21,9 @@ import com.fr.report.write.BuiltInSQLSubmiter;
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.stable.CommonUtils;
import com.fr.stable.ListMap;
import java.util.List;
@ -139,6 +142,25 @@ public class SearchTemplateFormulaAction implements SearchTemplateFormula {
ITContent content = ITContent.copy(submitContent);
content.addOtherPos(submiter.getName());
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