yun-zuoyi
yunhao.wang 7 years ago
commit dbe4933fbb

@ -3,6 +3,7 @@ package cn.estsh.i3plus.pojo.base.bean;
import cn.estsh.i3plus.pojo.base.common.Pager; import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;

@ -14,6 +14,85 @@ import java.util.List;
**/ **/
public class BlockReportEnumUtil { public class BlockReportEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SOFT_TYPE {
CORE(2, "i3core", "i3业务平台");
private int value;
private String code;
private String description;
private SOFT_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static SOFT_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/** /**
* *
@ -346,16 +425,16 @@ public class BlockReportEnumUtil {
GT_EQUAL(2, ">=", "大于等于"), GT_EQUAL(2, ">=", "大于等于"),
LT(3, "<", "小于等于"), LT(3, "<", "小于等于"),
LT_EQUAL(4, "<=", "小于等于"), LT_EQUAL(4, "<=", "小于等于"),
LIKE(5, "like", "模糊"), LIKE(5, "LIKE", "模糊"),
LIKE_LEFT(6, "like", "左模糊"), LIKE_LEFT(6, "LIKE", "左模糊"),
LIKE_RIGHT(7, "like", "右模糊"), LIKE_RIGHT(7, "LIKE", "右模糊"),
EQUAL(8, "=", "等于"), EQUAL(8, "=", "等于"),
EQUAL_NOT(9, "!=", "不等于"), EQUAL_NOT(9, "!=", "不等于"),
AND(10, "and", "AND"), AND(10, "AND", "AND"),
OR(11, "or", "OR"), OR(11, "OR", "OR"),
NOT(12, "not", "NOT"), NOT(12, "NOT", "NOT"),
IS_NULL(13, "is null", "IS NULL"), IS_NULL(13, "IS NULL", "IS NULL"),
IS_NOT_NULL(14, "is not null", "IS NOT NULL"); IS_NOT_NULL(14, "IS NOT NULL", "IS NOT NULL");
private int value; private int value;
private String name; private String name;
@ -382,14 +461,13 @@ public class BlockReportEnumUtil {
return name; return name;
} }
public static String valueOf(int val) { public static HQL_WHERE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) { if (values()[i].value == val) {
tmp = values()[i].getName(); return values()[i];
} }
} }
return tmp; return null;
} }
public static int descOf(String desc) { public static int descOf(String desc) {
@ -437,14 +515,14 @@ public class BlockReportEnumUtil {
return name; return name;
} }
public static String valueOf(int val) { public static HQL_REF valueOf(int val) {
String tmp = null; HQL_REF tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) { if (values()[i].value == val) {
tmp = values()[i].getName(); return values()[i];
} }
} }
return tmp; return null;
} }
public static int descOf(String desc) { public static int descOf(String desc) {
@ -505,6 +583,84 @@ public class BlockReportEnumUtil {
return tmp; return tmp;
} }
public static HQL_AGGREGATION valueOf(Integer val) {
if(val != null){
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val.intValue()) {
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 HQL_ATTR_DATA_TYPE{
SHOW(1, "show", "显示"),
WHERE(2, "where", "查询"),
GROUP(3, "group", "分组"),
AGGREGATION(4, "聚合", "聚合");
private int value;
private String name;
private String description;
HQL_ATTR_DATA_TYPE() {
}
HQL_ATTR_DATA_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 HQL_ATTR_DATA_TYPE valueOf(Integer val) {
if(val != null){
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val.intValue()) {
return values()[i];
}
}
}
return null;
}
public static int descOf(String desc) { public static int descOf(String desc) {
int tmp = 1; int tmp = 1;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {

@ -85,14 +85,23 @@ public class CommonEnumUtil {
return tmp; return tmp;
} }
public static String codeOfDescription(String code) { public static SOFT_TYPE valueOf(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
public static SOFT_TYPE codeOfDescription(String code) {
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) { if (values()[i].code.equals(code)) {
tmp = values()[i].description; return values()[i];
} }
} }
return tmp; return null;
} }
} }

@ -24,6 +24,11 @@
<artifactId>i3plus-pojo-platform</artifactId> <artifactId>i3plus-pojo-platform</artifactId>
</dependency> </dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-report</artifactId>
</dependency>
</dependencies> </dependencies>

@ -1,10 +1,11 @@
package cn.estsh.i3plus.pojo.model.common; package cn.estsh.i3plus.pojo.model.common;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Getter; import lombok.Data;
import lombok.Setter;
import lombok.ToString;
import javax.persistence.Column;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -14,9 +15,7 @@ import java.io.Serializable;
* @CreateDate : 2018-12-29 15:17 * @CreateDate : 2018-12-29 15:17
* @Modify: * @Modify:
**/ **/
@Getter @Data
@Setter
@ToString
public class ClassFieldModel implements Serializable { public class ClassFieldModel implements Serializable {
@ApiParam(value ="包名") @ApiParam(value ="包名")
@ -31,6 +30,15 @@ public class ClassFieldModel implements Serializable {
@ApiParam(value ="属性名") @ApiParam(value ="属性名")
private String fieldName; private String fieldName;
@ApiParam(value ="属性别名")
private String fieldNameAlias;
@ApiParam(value ="属性描述") @ApiParam(value ="属性描述")
private String fieldDesc; private String fieldDesc;
@Column(name="AGGREGATION_TYPE")
@ApiParam(value ="聚合ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long aggregationId;
} }

@ -1,11 +1,15 @@
package cn.estsh.i3plus.pojo.model.common; package cn.estsh.i3plus.pojo.model.common;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import lombok.ToString; import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* @Description : * @Description :
@ -14,11 +18,22 @@ import java.io.Serializable;
* @CreateDate : 2018-12-29 15:17 * @CreateDate : 2018-12-29 15:17
* @Modify: * @Modify:
**/ **/
@Getter @Data
@Setter
@ToString
public class ClassModel implements Serializable { public class ClassModel implements Serializable {
@ApiParam(value ="服务ID")
private int serverId;
@ApiParam(value ="服务ID")
private String serverName;
@ApiParam(value ="服务对象ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long serverPojoId;
@ApiParam(value ="服务对象别名")
private String serverPojoNameAlias;
@ApiParam(value ="包名") @ApiParam(value ="包名")
private String packageName; private String packageName;
@ -30,4 +45,7 @@ public class ClassModel implements Serializable {
@ApiParam(value ="类描述") @ApiParam(value ="类描述")
private String clzDesc; private String clzDesc;
@ApiParam(value ="属性集合")
private List<ClassFieldModel> fieldList;
} }

@ -0,0 +1,35 @@
package cn.estsh.i3plus.pojo.model.report;
import cn.estsh.i3plus.pojo.report.bean.BrPojoAttr;
import cn.estsh.i3plus.pojo.report.bean.BrTemplateCustomHql;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
/**
* @Description ://TODO 提交注意修改 临时使用 带改动
* @Reference :
* @Author : Adair Peng
* @CreateDate : 2019-01-25 18:19
* @Modify:
**/
@Data
public class BeanBrPojoAttrModel {
@ApiParam(value = "表单模板ID")
@JsonSerialize(using = ToStringSerializer.class)
private Long templateId;
@ApiParam(value = "数据类型")
private Integer dataType;
@ApiParam(value = "对象属性")
private List<BrPojoAttr> attrList;
@ApiParam(value = "自定义HQL")
private BrTemplateCustomHql customHql;
}

@ -0,0 +1,24 @@
package cn.estsh.i3plus.pojo.model.report;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : Adair Peng
* @CreateDate : 2019-01-20 14:05
* @Modify:
**/
@Data
public class TemplateModel {
@ApiParam("执行 HQL ")
private String hql;
@ApiParam("执行 HQL 参数名称 ")
private String[] paramName;
@ApiParam("执行 HQL 参数值 ")
private Object[] paramValue;
}

@ -30,7 +30,6 @@ import javax.persistence.Table;
@Api(value="关系-用户角色",description = "关系-用户角色") @Api(value="关系-用户角色",description = "关系-用户角色")
public class SysRefUserRole extends BaseBean { public class SysRefUserRole extends BaseBean {
private static final long serialVersionUID = 1L;
@Column(name="USER_ID") @Column(name="USER_ID")
@ApiParam(value ="用户ID" , example = "-1") @ApiParam(value ="用户ID" , example = "-1")

@ -3,9 +3,6 @@ package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.bean.BaseConstWords; import cn.estsh.i3plus.pojo.base.bean.BaseConstWords;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.ImppEnumUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;

@ -96,8 +96,12 @@ public class BrMenu extends BaseBean {
private String roleNamesRdd; private String roleNamesRdd;
@Transient @Transient
@ApiParam(value ="查询 ID 集合")
private List<Long> findIdList = new ArrayList<>();
@Transient
@ApiParam(value ="角色ID 集合") @ApiParam(value ="角色ID 集合")
private List<Long> roleIdList = new ArrayList<>(); private List<String> roleIdList = new ArrayList<>();
@Transient @Transient
@ApiParam(value ="子集列表") @ApiParam(value ="子集列表")

@ -27,7 +27,7 @@ import javax.persistence.Table;
@DynamicUpdate @DynamicUpdate
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Table(name="BR_POJO_ATTR") @Table(name="BR_POJO_ATTR")
@Api(value="报表模板",description = "报表模板") @Api(value="对象属性",description = "对象属性")
public class BrPojoAttr extends BaseBean { public class BrPojoAttr extends BaseBean {
@Column(name="TEMPLATE_ID") @Column(name="TEMPLATE_ID")
@ -36,21 +36,34 @@ public class BrPojoAttr extends BaseBean {
private Long templateId; private Long templateId;
@Column(name="SERVER_ID") @Column(name="SERVER_ID")
@ApiParam(value ="服务编号",example = "-1") @ApiParam(value ="服务ID",example = "-1")
private Integer serverId; private Integer serverId;
@Column(name="POJO_CLASS_PATH") @Column(name="POJO_ID")
@ApiParam(value ="对象ClassPath") @ApiParam(value ="模板对象ID" ,example = "-1")
private String pojoClassPath; @JsonSerialize(using = ToStringSerializer.class)
private Long pojoId;
@Column(name="POJO_NAME") @Column(name="POJO_NAME")
@ApiParam(value ="对象名称") @ApiParam(value ="对象名称")
private String pojoName; private String pojoName;
@Column(name="PACKAGE_NAME_RDD")
@ApiParam(value ="主服务对象包名称" , access ="服务对象包名称")
private String packageNameRdd;
@Column(name="POJO_NAME_ALIAS") @Column(name="POJO_NAME_ALIAS")
@ApiParam(value ="对象别名") @ApiParam(value ="对象别名")
private String pojoNameAlias; private String pojoNameAlias;
@Column(name="ATTR_NAME")
@ApiParam(value ="对象别名")
private String attrName;
@Column(name="ATTR_NAME_ALIAS")
@ApiParam(value ="对象别名")
private String attrNameAlias;
@Column(name="ATTR_TYPE") @Column(name="ATTR_TYPE")
@ApiParam(value ="属性类型",example = "-1") @ApiParam(value ="属性类型",example = "-1")
private Integer attrType; private Integer attrType;
@ -67,10 +80,23 @@ public class BrPojoAttr extends BaseBean {
@ApiParam(value ="聚合类型",example = "-1") @ApiParam(value ="聚合类型",example = "-1")
private Integer aggregationType; private Integer aggregationType;
@Column(name="AGGREGATION_ID")
@ApiParam(value ="聚合类型",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long aggregationId;
@Column(name="ATTR_SORT") @Column(name="ATTR_SORT")
@ApiParam(value ="字段排序") @ApiParam(value ="字段排序")
private Integer attrSort; private Integer attrSort;
@Column(name="ATTR_DATA_SORT")
@ApiParam(value ="字段排序")
private Integer attrDataSort;
@Column(name="ATTR_STYLE")
@ApiParam(value ="字段样式")
private Integer attrStyle;
@Column(name="ATTR_DEFAULT_VALUE") @Column(name="ATTR_DEFAULT_VALUE")
@ApiParam(value ="属性默认值") @ApiParam(value ="属性默认值")
private String attrDefaultValue; private String attrDefaultValue;

@ -27,18 +27,22 @@ import javax.persistence.Table;
@DynamicUpdate @DynamicUpdate
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Table(name="BR_REF_POJO") @Table(name="BR_REF_POJO")
@Api(value="报表模板",description = "报表模板") @Api(value="对象关系",description = "对象关系")
public class BrRefPojo extends BaseBean { public class BrRefPojo extends BaseBean {
@Column(name="MASTER_TEMPLATE_ID") @Column(name="TEMPLATE_ID")
@ApiParam(value ="模板编号" ,example = "-1") @ApiParam(value ="模板编号" ,example = "-1")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long masterTemplateId; private Long templateId;
@Column(name="REF_TYPE") @Column(name="REF_TYPE")
@ApiParam(value ="关系类型") @ApiParam(value ="关系类型")
private Integer refType; private Integer refType;
@Column(name="REF_SORT")
@ApiParam(value ="关系排序")
private Integer refSort;
@Column(name="MASTER_SERVER_ID") @Column(name="MASTER_SERVER_ID")
@ApiParam(value ="主服务编号" ,example = "-1") @ApiParam(value ="主服务编号" ,example = "-1")
private Integer masterServerId; private Integer masterServerId;

@ -13,6 +13,8 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/** /**
* @Description : * @Description :
@ -27,7 +29,7 @@ import javax.persistence.Table;
@DynamicUpdate @DynamicUpdate
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Table(name="BR_REF_SERVER_POJO") @Table(name="BR_REF_SERVER_POJO")
@Api(value="报表模板",description = "报表模板") @Api(value="报表模板服务对象",description = "报表模板服务对象")
public class BrRefServerPojo extends BaseBean { public class BrRefServerPojo extends BaseBean {
@Column(name="TEMPLATE_ID") @Column(name="TEMPLATE_ID")
@ -39,24 +41,75 @@ public class BrRefServerPojo extends BaseBean {
@ApiParam(value ="模板名称" , access ="模板名称") @ApiParam(value ="模板名称" , access ="模板名称")
private String templateNameRdd; private String templateNameRdd;
@Column(name="SERVER_ID") @Column(name="POJO_REF_TYPE")
@ApiParam(value ="服务编号" ,example = "-1") @ApiParam(value ="关系类型")
private Integer serverId; private Integer pojoRefType;
@Column(name="SERVER_NAME_RDD") @Column(name="POJO_WHERE_TYPE")
@ApiParam(value ="服务名称" , access ="模板名称") @ApiParam(value ="连接关系")
private String serverNameRdd; private Integer pojoWhereType;
@Column(name="SERVER_POJO_NAME_RDD") @Column(name="POJO_SORT")
@ApiParam(value ="服务对象名称" , access ="模板名称") @ApiParam(value ="主服务编号" ,example = "-1")
private String serverPojoNameRdd; private Integer pojoSort;
@Column(name="SERVER_POJO_NAME_ALIAS") @Column(name="MASTER_SERVER_ID")
@ApiParam(value ="服务对象别名" , access ="模板名称") @ApiParam(value ="主服务编号" ,example = "-1")
private String serverPojoNameAlias; private Integer masterServerId;
@Column(name="SERVER_POJO_CLASS_PATH") @Column(name="MASTER_SERVER_NAME_RDD")
@ApiParam(value ="服务对象名称" , access ="模板名称") @ApiParam(value ="主服务名称" ,example = "-1")
private String serverPojoClassPath; private String masterServerNameRdd;
@Column(name="MASTER_POJO_NAME")
@ApiParam(value ="副对象名称")
private String masterPojoName;
@Column(name="MASTER_PACKAGE_NAME_RDD")
@ApiParam(value ="主服务对象包名称" , access ="服务对象包名称")
private String masterPackageNameRdd;
@Column(name="MASTER_POJO_NAME_ALIAS")
@ApiParam(value ="主对象别名")
private String masterPojoNameAlias;
@Column(name="MASTER_POJO_NAME_DESC")
@ApiParam(value ="主对象中文名称")
private String masterPojoNameDesc;
@Column(name="MASTER_POJO_NAME_ATTR_NAME")
@ApiParam(value ="主对象属性名称" )
private String masterPojoAttrName;
@Column(name="SECONDARY_SERVER_ID")
@ApiParam(value ="主服务编号")
private Integer secondaryServerId;
@Column(name="SECONDARY_SERVER_NAME")
@ApiParam(value ="主服务编号")
private String secondaryServerName;
@Column(name="SECONDARY_POJO_NAME")
@ApiParam(value ="副对象名称")
private String secondaryPojoName;
@Column(name="SECONDARY_PACKAGE_NAME")
@ApiParam(value ="主服务对象包名称" , access ="服务对象包名称")
private String secondaryPackageName;
@Column(name="SECONDARY_POJO_NAME_ALIAS")
@ApiParam(value ="副对象别名" )
private String secondaryPojoNameAlias;
@Column(name="SECONDARY_POJO_NAME_DESC")
@ApiParam(value ="副对象中文名称")
private String secondaryPojoNameDesc;
@Column(name="SECONDARY_POJO_ATTR_NAME")
@ApiParam(value ="副对象属性名称")
private String secondaryPojoAttrName;
@Transient
@ApiParam(value ="模板服务对象属性")
private List<BrPojoAttr> pojoAttrList;
} }

@ -27,7 +27,7 @@ import javax.persistence.Table;
@DynamicUpdate @DynamicUpdate
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Table(name="BR_REF_TEMPLATE_SERVER") @Table(name="BR_REF_TEMPLATE_SERVER")
@Api(value="报表模板",description = "报表模板") @Api(value="报表模板-服务",description = "报表模板-服务")
public class BrRefTemplateServer extends BaseBean { public class BrRefTemplateServer extends BaseBean {
@Column(name="TEMPLATE_ID") @Column(name="TEMPLATE_ID")
@ -42,7 +42,7 @@ public class BrRefTemplateServer extends BaseBean {
@Column(name="SERVER_ID") @Column(name="SERVER_ID")
@ApiParam(value ="服务编号" ,example = "-1") @ApiParam(value ="服务编号" ,example = "-1")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long serverId; private Integer serverId;
@Column(name="SERVER_NAME_RDD") @Column(name="SERVER_NAME_RDD")
@ApiParam(value ="服务名称" , access ="模板名称") @ApiParam(value ="服务名称" , access ="模板名称")

@ -11,6 +11,9 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.List;
/** /**
* @Description : * @Description :
@ -24,7 +27,7 @@ import javax.persistence.Table;
@DynamicInsert @DynamicInsert
@DynamicUpdate @DynamicUpdate
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Table(name="BR_CUSTOM_HQL") @Table(name="BR_TEMPLATE")
@Api(value="报表模板",description = "报表模板") @Api(value="报表模板",description = "报表模板")
public class BrTemplate extends BaseBean { public class BrTemplate extends BaseBean {
@ -52,6 +55,10 @@ public class BrTemplate extends BaseBean {
@ApiParam(value ="对象数量" , example ="0" , access ="权限模块数量") @ApiParam(value ="对象数量" , example ="0" , access ="权限模块数量")
private Integer numServer; private Integer numServer;
@Column(name="TEMPLATE_SERVER_ID_LIST",columnDefinition = "TEXT")
@ApiParam(value ="数据服务ID集合" , access ="服务名称")
private String templateServerIdList;
@Column(name="TEMPLATE_SERVER_NAMES_RDD",columnDefinition = "TEXT") @Column(name="TEMPLATE_SERVER_NAMES_RDD",columnDefinition = "TEXT")
@ApiParam(value ="服务名称" , access ="服务名称") @ApiParam(value ="服务名称" , access ="服务名称")
private String templateServerNamesRdd; private String templateServerNamesRdd;
@ -92,4 +99,41 @@ public class BrTemplate extends BaseBean {
@ApiParam(value ="模板HTML" , access ="模板HTML") @ApiParam(value ="模板HTML" , access ="模板HTML")
private String templateHtml; private String templateHtml;
@Transient
@ApiParam(value ="模板服务编号集合")
private List<Integer> serverIdList = new ArrayList<>();
@Transient
@ApiParam(value ="模板服务")
private List<BrRefTemplateServer> serverList = new ArrayList<>();
@Transient
@ApiParam(value ="模板服务对象")
private List<BrRefServerPojo> serverPojoList = new ArrayList<>();
@Transient
@ApiParam(value ="模板服务对象关系")
private List<BrRefPojo> serverPojoRefList = new ArrayList<>();
@Transient
@ApiParam(value ="模板服务对象关联属性")
private List<BrPojoAttr> pojoAttrList = new ArrayList<>();
@Transient
@ApiParam(value ="模板服务对象查询条件")
private List<BrPojoAttr> pojoAttrWhereList = new ArrayList<>();
@Transient
@ApiParam(value ="模板服务对象分组条件")
private List<BrPojoAttr> pojoAttrGroupList = new ArrayList<>();
@Transient
@ApiParam(value ="模板服务对象聚合条件")
private List<BrPojoAttr> pojoAttrAggrList = new ArrayList<>();
@Transient
@ApiParam(value ="模板服务对象显示属性")
private List<BrPojoAttr> pojoAttrShowList = new ArrayList<>();
} }

@ -35,9 +35,9 @@ public class BrTemplateCustomHql extends BaseBean {
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long templateId; private Long templateId;
@Column(name="CUSTOM_TYPE") @Column(name="DATA_TYPE")
@ApiParam(value ="自定义类型" , example ="-1") @ApiParam(value ="自定义类型" , example ="-1")
private Integer customType; private Integer dataType;
@Column(name="CUSTOM_CONTENT",columnDefinition="TEXT") @Column(name="CUSTOM_CONTENT",columnDefinition="TEXT")
@ApiParam(value ="自定义语句内容" , access ="自定义语句内容") @ApiParam(value ="自定义语句内容" , access ="自定义语句内容")

@ -2,10 +2,7 @@ package cn.estsh.i3plus.pojo.report.sqlpack;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.HqlPack; import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.report.bean.BrElement; import cn.estsh.i3plus.pojo.report.bean.*;
import cn.estsh.i3plus.pojo.report.bean.BrLayout;
import cn.estsh.i3plus.pojo.report.bean.BrMenu;
import cn.estsh.i3plus.pojo.report.bean.BrReport;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
/** /**
@ -59,6 +56,10 @@ public class ReportHqlPack {
HqlPack.getStringLikerPack(menu.getName(),"name",result); HqlPack.getStringLikerPack(menu.getName(),"name",result);
HqlPack.getStringLikerPack(menu.getMenuCode(),"menuCode",result); HqlPack.getStringLikerPack(menu.getMenuCode(),"menuCode",result);
if(menu.getFindIdList() != null && menu.getFindIdList().size() > 0){
HqlPack.getInPack(StringUtils.join(menu.getFindIdList(),","),"id",result);
}
// 添加默认排序 // 添加默认排序
HqlPack.getOrderDefault(menu); HqlPack.getOrderDefault(menu);
@ -66,6 +67,25 @@ public class ReportHqlPack {
} }
/** /**
*
* @param template
* @return
*/
public static String packHqlBrTemplate(BrTemplate template){
StringBuffer result = new StringBuffer();
// 查询参数封装
HqlPack.getNumEqualPack(template.getTemplateType(),"templateType",result);
HqlPack.getNumEqualPack(template.getTemplateStatus(),"templateStatus",result);
HqlPack.getStringLikerPack(template.getName(),"name",result);
// 添加默认排序
HqlPack.getOrderDefault(template);
return result.toString();
}
/**
* *
* @param brElement * @param brElement
* @return * @return

@ -107,6 +107,12 @@
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-report</artifactId>
<version>${project.version}</version>
</dependency>
<!-- spring-json转换 --> <!-- spring-json转换 -->
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>

Loading…
Cancel
Save