diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java index 97c8fad..4a09da5 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java @@ -2,6 +2,9 @@ package cn.estsh.i3plus.pojo.base.enumutil; import com.fasterxml.jackson.annotation.JsonFormat; +import java.util.ArrayList; +import java.util.List; + /** * @Description : 模块枚举类 * @Reference : @@ -199,6 +202,141 @@ public class BlockReportEnumUtil { } /** + * 数据状态 + * 1 启用 + * 2 禁用 + * 3 锁定 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum TEMPLATE_TYPE { + TABLE(1, "表格", "表格模板"); + + private int value; + private String name; + private String description; + + TEMPLATE_TYPE() { + } + + TEMPLATE_TYPE(int value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getName() { + return name; + } + + public static String valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].getName(); + } + } + return tmp; + } + public static TEMPLATE_TYPE enumOf(int val) { + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** + * 表单样式 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum TEMPLATE_STYLE { + + TABLE_LEFT(1, TEMPLATE_TYPE.TABLE, "left", "表单左对齐"), + TABLE_RIGHT(2, TEMPLATE_TYPE.TABLE, "right", "表单右对齐"), + TABLE_CENTER(3, TEMPLATE_TYPE.TABLE, "center", "表单居中"); + + private int value; + private TEMPLATE_TYPE group; + private String name; + private String description; + + TEMPLATE_STYLE() { + } + + TEMPLATE_STYLE(int value,TEMPLATE_TYPE group, String name, String description) { + this.value = value; + this.group = group; + this.name = name; + this.description = description; + } + + public static TEMPLATE_STYLE[] getGroup(TEMPLATE_TYPE type){ + if(type != null){ + List list = new ArrayList<>(); + for (TEMPLATE_STYLE style : TEMPLATE_STYLE.values()) { + if(style.group.equals(type)){ + list.add(style); + } + } + return list.toArray(new TEMPLATE_STYLE[list.size()]); + } + return null; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getName() { + return name; + } + + public static String valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].getName(); + } + } + return tmp; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** * HQL WHERE 条件 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -320,6 +458,9 @@ public class BlockReportEnumUtil { } } + /** + * 表单聚合 + */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum HQL_AGGREGATION{ @@ -375,4 +516,59 @@ public class BlockReportEnumUtil { } } + /** + * 表单聚合 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum HQL_ORDER{ + + ASC(1, "ASC", "升序"), + DESC(2, "DESC", "降序"); + + private int value; + private String name; + private String description; + + HQL_ORDER() { + } + + HQL_ORDER(int value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getName() { + return name; + } + + public static String valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].getName(); + } + } + return tmp; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + } diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrTemplate.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrTemplate.java index 3ad76f8..2cd232d 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrTemplate.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrTemplate.java @@ -84,6 +84,10 @@ public class BrTemplate extends BaseBean { @ApiParam(value ="模板描述" , access ="模板描述") private String templateDescription; + @Column(name="TEMPLATE_HQL",columnDefinition = "TEXT") + @ApiParam(value ="模板执行HQL" , access ="模板执行HQL") + private String templateHql; + @Column(name="TEMPLATE_HTML",columnDefinition = "TEXT") @ApiParam(value ="模板HTML" , access ="模板HTML") private String templateHtml;