Browse Source

Pull request #8681: REPORT-65492 新增公式

Merge in DESIGN/design from ~PENGDA/design:feature/x to feature/x

* commit 'c84ba4871e663229204cbb777c4a741a2d2a4560':
  REPORT-65492 新增公式
feature/x
pengda 3 years ago
parent
commit
f660b837fa
  1. 6
      designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java

6
designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java

@ -58,7 +58,6 @@ public final class FunctionConstants {
public static FunctionGroup ALL = getAllFunctionGroup(); public static FunctionGroup ALL = getAllFunctionGroup();
public static List<String> abandonFormulas = Arrays.asList("CIRCULAR", "CROSSLAYERTOTAL", "HIERARCHY", "LAYERTOTAL"); public static List<String> abandonFormulas = Arrays.asList("CIRCULAR", "CROSSLAYERTOTAL", "HIERARCHY", "LAYERTOTAL");
public static NameAndFunctionList NEW = getNewFunctionList(); public static NameAndFunctionList NEW = getNewFunctionList();
private static List<String> shieldedFormulas = Arrays.asList("ENBYSTRNUM","TEXTGETNUM" ,"GETCHARNUM","GCD", "LCM");
static { static {
loadEmbededFunctions(); loadEmbededFunctions();
@ -103,7 +102,7 @@ public final class FunctionConstants {
if (StableUtils.classInstanceOf(cls, iface)) { if (StableUtils.classInstanceOf(cls, iface)) {
Function inst; Function inst;
inst = (Function) cls.newInstance(); inst = (Function) cls.newInstance();
if (abandonFormulas.contains(inst.getClass().getSimpleName()) || shieldedFormulas.contains(inst.getClass().getSimpleName())) { if (abandonFormulas.contains(inst.getClass().getSimpleName())) {
continue; continue;
} }
for (NameAndTypeAndFunctionList EMBFUNCTION : EMBFUNCTIONS) { for (NameAndTypeAndFunctionList EMBFUNCTION : EMBFUNCTIONS) {
@ -289,7 +288,8 @@ public final class FunctionConstants {
private static NameAndFunctionList getNewFunctionList() { private static NameAndFunctionList getNewFunctionList() {
return new NameAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_New"), new Function[]{ return new NameAndFunctionList(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaD_New"), new Function[]{
new ENDOFMONTH(), new NUMTOZH(), new MIDCHAR(), new ISWORKDAY() new ENDOFMONTH(), new NUMTOZH(), new MIDCHAR(), new ISWORKDAY(),new ENBYSTRNUM(), new TEXTGETNUM(),
new GETCHARNUM(), new GCD(), new LCM()
}); });
} }

Loading…
Cancel
Save