Browse Source

Pull request #8011: REPORT-64014 层次坐标优化

Merge in DESIGN/design from ~HOKY.HE/design-hoky:feature/x to feature/x

* commit 'e9c26f63c2cfaf7b161978a7acd048e107f7954a':
  REPORT-64014 层次坐标优化 1.新增三个层次坐标公式; 2.修改公式SORT、MOM。
feature/x
Hoky.He 3 years ago
parent
commit
08d51418a9
  1. 9
      designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java

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

@ -36,6 +36,7 @@ import java.util.Comparator;
import java.util.Enumeration;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
@ -46,6 +47,7 @@ public final class FunctionConstants {
public static NameAndFunctionList COMMON = getCommonFunctionList();
public static NameAndTypeAndFunctionList[] EMBFUNCTIONS = getEmbededFunctionListArray();
public static FunctionGroup ALL = getAllFunctionGroup();
public static List<String> abandonFormulas = Arrays.asList("CIRCULAR", "CROSSLAYERTOTAL", "HIERARCHY", "LAYERTOTAL");
static {
loadEmbededFunctions();
@ -54,7 +56,8 @@ public final class FunctionConstants {
/**
* Don't let anyone instantiate this class.
*/
private FunctionConstants() {}
private FunctionConstants() {
}
private static void loadEmbededFunctions() {
String pkgName = "com.fr.function";
@ -89,6 +92,9 @@ public final class FunctionConstants {
if (StableUtils.classInstanceOf(cls, iface)) {
Function inst;
inst = (Function) cls.newInstance();
if (abandonFormulas.contains(inst.getClass().getSimpleName())) {
continue;
}
for (NameAndTypeAndFunctionList EMBFUNCTION : EMBFUNCTIONS) {
if (EMBFUNCTION.test(inst)) {
break;
@ -305,6 +311,7 @@ public final class FunctionConstants {
Collections.addAll(all, createFunctionGroup(((FunctionDefContainer) container)).getDescriptions());
}
}
all = all.stream().filter(n -> !abandonFormulas.contains(n.getName())).collect(Collectors.toList());
Collections.sort(all, new Comparator<NameAndDescription>() {
@Override

Loading…
Cancel
Save