diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockEnumUtil.java deleted file mode 100644 index a66dd65..0000000 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockEnumUtil.java +++ /dev/null @@ -1,54 +0,0 @@ -package cn.estsh.i3plus.pojo.base.enumutil; - -import com.fasterxml.jackson.annotation.JsonFormat; - -/** - * @Description : 模块枚举类 - * @Reference : - * @Author : alwaysfrin - * @CreateDate : 2018-12-25 21:08 - * @Modify: - **/ -public class BlockEnumUtil { - - - /** - * 报表元素枚举 - * WORDS(1,"文字"),PIC(2,"图片"),REPORT(3,"报表"); - */ - @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum REPORT_ELEMENT_TYPE{ - - WORDS(1,"文字"),PIC(2,"图片"),REPORT(3,"报表"); - - private int value; - private String description; - - REPORT_ELEMENT_TYPE() { - } - - REPORT_ELEMENT_TYPE(int value, String description) { - this.value = value; - this.description = description; - } - - public int getValue() { - return value; - } - - public String getDescription() { - return description; - } - - 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; - } - - } -} 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 new file mode 100644 index 0000000..946754b --- /dev/null +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockReportEnumUtil.java @@ -0,0 +1,144 @@ +package cn.estsh.i3plus.pojo.base.enumutil; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * @Description : 模块枚举类 + * @Reference : + * @Author : alwaysfrin + * @CreateDate : 2018-12-25 21:08 + * @Modify: + **/ +public class BlockReportEnumUtil { + + + /** + * 报表元素枚举 + * WORDS(1,"文字"),PIC(2,"图片"),REPORT(3,"报表"); + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum REPORT_ELEMENT_TYPE{ + + WORDS(1,"文字"),PIC(2,"图片"); + + private int value; + private String description; + + REPORT_ELEMENT_TYPE() { + } + + REPORT_ELEMENT_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + 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; + } + + } + + + /** + * 报表布局枚举 + * TABLE(1,"表格"),CHART(2,"图表"); + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum REPORT_LAYOUT_TYPE{ + + TABLE(1,"表格"),CHART(2,"图表"); + + private int value; + private String description; + + REPORT_LAYOUT_TYPE() { + } + + REPORT_LAYOUT_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + 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; + } + } + + + + /** + * 功能级别 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum METHOD_LEVEL { +// PLUGIN(1, "插件"), + MODULE(2, "顶级目录"), + METHOD(3, "二级目录"); +// BUTTON(4, "按钮"); + + private int value; + private String description; + + private METHOD_LEVEL(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + 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].description; + } + } + return tmp; + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + +} diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java index b6fa846..24e4496 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/CommonEnumUtil.java @@ -443,7 +443,10 @@ public class CommonEnumUtil { */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum METHOD_LEVEL { - PLUGIN(1, "插件"),MODULE(2, "模块"), METHOD(3, "功能"), BUTTON(4, "按钮"); + PLUGIN(1, "插件"), + MODULE(2, "顶级目录"), + METHOD(3, "二级目录"), + BUTTON(4, "按钮"); private int value; private String description; diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrElement.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrElement.java index 3d2a4d8..165dcd9 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrElement.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrElement.java @@ -38,7 +38,7 @@ public class BrElement extends BaseBean { @Column(name="ELEMENT_TYPE") @ApiParam(value ="元素类型") - //BlockEnumUtil.REPORT_ELEMENT_TYPE + //BlockReportEnumUtil.REPORT_ELEMENT_TYPE private Integer elementType; @Column(name="ELEMENT_VALUE") @@ -53,11 +53,7 @@ public class BrElement extends BaseBean { @ApiParam(value ="元素样式css") private String elementStyle; - @Transient - @ApiParam(value ="元素明细列表") - private List brReportElementDetailList; - - @Transient - @ApiParam(value ="元素所在的列") - private BrLayoutColumn brLayoutColumn; + @Column(name="ELEMENT_HTML",columnDefinition = "TEXT") + @ApiParam(value ="元素html") + private String elementHtml; } diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayout.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayout.java index fd5bfe9..be01fe4 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayout.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayout.java @@ -54,11 +54,15 @@ public class BrLayout extends BaseBean { @ApiParam(value ="排序") private Integer seq; + @Column(name="LAYOUT_HTML",columnDefinition = "TEXT") + @ApiParam(value ="布局html") + private String layoutHtml; + + @Column(name = "LAYOUT_DESCRIPTION",columnDefinition = "TEXT") + @ApiParam(value ="布局描述") + private String layoutDescription; + @Transient @ApiParam(value ="模板行列表") private List brLayoutRowList; - - @Transient - @ApiParam(value ="使用模板的报表") - private List brReportList; } diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutColumn.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutColumn.java index 05a5a47..6fa3a3c 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutColumn.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutColumn.java @@ -42,27 +42,31 @@ public class BrLayoutColumn extends BaseBean { @JsonSerialize(using = ToStringSerializer.class) private Long layoutRowId; - @Column(name="COLUMN_CROSS") + @Column(name="COLUMN_COLSPAN") @ApiParam(value ="跨列数") - private Integer columnCross; + private Integer columnColspan; + + @Column(name="COLUMN_ROWSPAN") + @ApiParam(value ="跨行数") + private Integer columnRowspan; @Column(name="COLUMN_WIDTH") @ApiParam(value ="列宽") private Integer columnWidth; + @Column(name="COLUMN_HEIGHT") + @ApiParam(value ="列高") + private Integer columnHeight; + @Column(name="SEQ") @ApiParam(value ="排序") private Integer seq; - @Transient - @ApiParam(value ="列所在的行") - private BrLayoutRow brLayoutRow; - - @Transient - @ApiParam(value ="列所包含的元素") - private List brElementList; + @Column(name = "COLUMN_DESCRIPTION",columnDefinition = "TEXT") + @ApiParam(value ="列描述") + private String columnDescription; - @Transient - @ApiParam(value ="列所包含的报表模板") - private List brReportTemplateList; + @Column(name="COLUMN_HTML") + @ApiParam(value ="列html") + private String columnHtml; } diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutRow.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutRow.java index ede4846..450b5a1 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutRow.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrLayoutRow.java @@ -37,9 +37,9 @@ public class BrLayoutRow extends BaseBean { @JsonSerialize(using = ToStringSerializer.class) private Long layoutId; - @Column(name="ROW_CROSS") - @ApiParam(value ="跨行") - private Integer rowCross; + @Column(name="ROW_WIDTH") + @ApiParam(value ="行宽") + private Integer rowWidth; @Column(name="ROW_HEIGHT") @ApiParam(value ="行高") @@ -49,12 +49,15 @@ public class BrLayoutRow extends BaseBean { @ApiParam(value ="排序") private Integer seq; - @Transient - @ApiParam(value ="行所在的布局") - private BrLayout brLayout; + @Column(name="ROW_STYLE") + @ApiParam(value ="行样式") + private String rowStyle; + + @Column(name="ROW_HTML") + @ApiParam(value ="行样式") + private String rowHtml; @Transient @ApiParam(value ="行所包含的列") private List brLayoutColumns; - } diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrMenu.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrMenu.java new file mode 100644 index 0000000..534c0af --- /dev/null +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrMenu.java @@ -0,0 +1,99 @@ +package cn.estsh.i3plus.pojo.report.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; +import javax.persistence.Transient; +import java.util.ArrayList; +import java.util.List; + +/** + * @Description : 目录 + * @Reference : + * @Author : Adair Peng + * @CreateDate : 2019-01-17 11:17 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="BR_MENU") +@Api(value="报表目录",description = "报表目录") +public class BrMenu extends BaseBean { + + @Column(name="NAME") + @ApiParam(value ="功能名称") + private String name; + + @Column(name="NAME_ZH_SHORTENING") + @ApiParam(value ="功能名称中文简写") + private String nameZhShortening; + + @Column(name="MENU_CODE") + @ApiParam(value ="功能代码") + private String menuCode; + + @Column(name="MENU_TYPE") + @ApiParam(value ="功能类型(枚举:1.模块,2.菜单,3.按钮)" , example ="-1") + private Integer menuType; + + // 根节点-1 + @Column(name="PARENT_ID") + @ApiParam(value ="父级功能ID" , example = "-1") + @JsonSerialize(using = ToStringSerializer.class) + private Long parentId; + + @Column(name="PARENT_NAME_RDD") + @ApiParam(value ="父级功能名称" , access ="父级功能名称") + private String parentNameRdd; + + @Column(name="MENU_CLASS_PATH") + @ApiParam(value ="功能 class path" , access ="资源class path") + private String menuClassPath; + + @Column(name="MENU_GRADE") + @ApiParam(value ="功能等级", example = "1") + private String menuGrade; + + @Column(name="MENU_SORT") + @ApiParam(value ="功能排序", example = "0") + private Integer menuSort; + + @Column(name="MENU_URL") + @ApiParam(value ="功能 url" , access ="资源 url") + private String menuUrl; + + @Column(name="MENU_CSS") + @ApiParam(value ="功能 css" , access ="资源css") + private String menuCss; + + @Column(name="MENU_ICON") + @ApiParam(value ="功能icon" , access ="资源icon") + private String menuIcon; + + @Column(name="MENU_DESCRIPTION") + @ApiParam(value ="功能描述" , access ="配置描述") + private String menuDescription; + + @Column(name="MENU_STATUS") + @ApiParam(value ="功能状态(1.正常,2.禁用)" , example ="1" , access ="功能状态(1.正常,2.禁用)",defaultValue="1") + private Integer menuStatus; + + @Transient + @ApiParam(value ="子集列表") + private List childList = new ArrayList<>(); + + +} diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportElementDetail.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportElement.java similarity index 76% rename from modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportElementDetail.java rename to modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportElement.java index 03ce6c8..b278d0b 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportElementDetail.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportElement.java @@ -28,25 +28,37 @@ import java.util.List; @DynamicInsert @DynamicUpdate @EqualsAndHashCode(callSuper = true) -@Table(name="BR_REPORT_ELEMENT_DETAIL") +@Table(name="BR_REF_REPORT_ELEMENT") @Api(value="元素&报表",description = "元素和报表的关联表 * -》 *") -public class BrReportElementDetail extends BaseBean { +public class BrRefReportElement extends BaseBean { @Column(name = "REPORT_ID") @ApiParam(value = "报表主键") @JsonSerialize(using = ToStringSerializer.class) private Long reportId; - @Column(name = "ELEMENT_ID") - @ApiParam(value = "元素主键") - @JsonSerialize(using = ToStringSerializer.class) - private Long elementId; + @Column(name = "REPORT_NAME_RDD") + @ApiParam(value = "报表名称") + private String reportNameRdd; @Column(name = "LAYOUT_COLUMN_ID") @ApiParam(value = "列主键") @JsonSerialize(using = ToStringSerializer.class) private Long layoutColumnId; + @Column(name = "ELEMENT_ID") + @ApiParam(value = "元素主键") + @JsonSerialize(using = ToStringSerializer.class) + private Long elementId; + + @Column(name = "ELEMENT_NAME_RDD") + @ApiParam(value = "元素名称") + private String elementNameRdd; + + @Column(name = "ELEMENT_HTML_RDD") + @ApiParam(value = "元素html") + @JsonSerialize(using = ToStringSerializer.class) + private Long elementHtmlRdd; @Transient @ApiParam(value = "报表实例") diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportTemplateDetail.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportTemplate.java similarity index 76% rename from modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportTemplateDetail.java rename to modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportTemplate.java index 37db458..d213c6d 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportTemplateDetail.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportTemplate.java @@ -27,29 +27,36 @@ import javax.persistence.Transient; @DynamicInsert @DynamicUpdate @EqualsAndHashCode(callSuper = true) -@Table(name="BR_REPORT_TEMPLATE_DETAIL") +@Table(name="BR_REF_REPORT_TEMPLATE") @Api(value="报表模板&报表",description = "报表模板和报表的关联表 * -》 *") -public class BrReportTemplateDetail extends BaseBean { +public class BrRefReportTemplate extends BaseBean { @Column(name="REPORT_ID") @ApiParam(value ="报表主键") @JsonSerialize(using = ToStringSerializer.class) private Long reportId; - @Column(name="REPORT_TEMPLATE_ID") - @ApiParam(value ="报表模板主键") - @JsonSerialize(using = ToStringSerializer.class) - private Long reportTemplateId; + @Column(name = "REPORT_NAME_RDD") + @ApiParam(value = "报表名称") + private String reportNameRdd; @Column(name="LAYOUT_COLUMN_ID") @ApiParam(value ="列主键") @JsonSerialize(using = ToStringSerializer.class) private Long layoutColumnId; + @Column(name="REPORT_TEMPLATE_ID") + @ApiParam(value ="报表模板主键") + @JsonSerialize(using = ToStringSerializer.class) + private Long reportTemplateId; + + @Column(name="REPORT_TEMPLATE_NAME_RDD") + @ApiParam(value ="报表模板名称") + private String reportTemplateNameRdd; - @Transient - @ApiParam(value = "报表实例") - private BrReport brReport; + @Column(name="REPORT_TEMPLATE_HTML_RDD") + @ApiParam(value ="报表模板html") + private String reportTemplateHtmlRdd; @Transient @ApiParam(value = "报表模板") diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefRoleMenu.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefRoleMenu.java new file mode 100644 index 0000000..1c29ea9 --- /dev/null +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefRoleMenu.java @@ -0,0 +1,55 @@ +package cn.estsh.i3plus.pojo.report.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : + * @Reference : + * @Author : Adair Peng + * @CreateDate : 2019-01-17 11:17 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="SYS_REF_ROLE_MENU") +@Api(value="关系-角色目录",description = "关系-角色目录") +public class BrRefRoleMenu extends BaseBean { + + @Column(name="MENU_ID") + @ApiParam(value ="菜单ID" ,example = "-1") + @JsonSerialize(using = ToStringSerializer.class) + private Long menuId; + + @Column(name="MENU_NAME_RDD") + @ApiParam(value ="菜单名称" , access ="菜单名称") + private String menuNameRdd; + + @Column(name="MENU_TYPE_RDD") + @ApiParam(value ="菜单类型") + private Integer menuTypeRdd; + + @Column(name="ROLE_ID") + @ApiParam(value ="角色ID" , example = "-1") + @JsonSerialize(using = ToStringSerializer.class) + private Long roleId; + + @Column(name="ROLE_NAME_Rdd") + @ApiParam(value ="角色名称" , access ="角色名称") + private String roleNameRdd; + +} diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReport.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReport.java index 7d3c0bb..79d54e2 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReport.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReport.java @@ -39,10 +39,14 @@ public class BrReport extends BaseBean { @JsonSerialize(using = ToStringSerializer.class) private Long layoutId; - @Column(name="SOFT_TYPE") - @ApiParam(value ="模块") - //所属模块,CommonEnumUtil.SOFT_TYPE - private Integer softType; + @Column(name="LAYOUT_ID_RDD") + @ApiParam(value ="布局名称") + @JsonSerialize(using = ToStringSerializer.class) + private Long layoutNameRdd; + + @Column(name="LAYOUT_HTML") + @ApiParam(value ="布局html") + private String reportHtml; @Column(name="SEQ") @ApiParam(value ="排序") diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportTemplate.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportTemplate.java index 3f847f0..65480b8 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportTemplate.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReportTemplate.java @@ -48,7 +48,7 @@ public class BrReportTemplate extends BaseBean { @Transient @ApiParam(value ="报表模板列表") - private List brReportTemplateDetailList; + private List brReportTemplateDetailList; @Transient @ApiParam(value ="元素所在的列") diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrMenuRepository.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrMenuRepository.java new file mode 100644 index 0000000..ed77735 --- /dev/null +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrMenuRepository.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.pojo.report.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.report.bean.BrMenu; + +/** + * @Description : + * @Reference : + * @Author : Adair Peng + * @CreateDate : 2019-01-17 11:59 + * @Modify: + **/ +public interface BrMenuRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrReportElementDetailRepository.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrRefReportElementRepository.java similarity index 57% rename from modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrReportElementDetailRepository.java rename to modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrRefReportElementRepository.java index 44a969d..90771e4 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrReportElementDetailRepository.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrRefReportElementRepository.java @@ -1,7 +1,7 @@ package cn.estsh.i3plus.pojo.report.repository; import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; -import cn.estsh.i3plus.pojo.report.bean.BrReportElementDetail; +import cn.estsh.i3plus.pojo.report.bean.BrRefReportElement; /** * @Description : @@ -10,5 +10,5 @@ import cn.estsh.i3plus.pojo.report.bean.BrReportElementDetail; * @CreateDate : 2018-12-26 20:23 * @Modify: **/ -public interface BrReportElementDetailRepository extends BaseRepository { +public interface BrRefReportElementRepository extends BaseRepository { } diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrReportTemplateDetailRepository.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrRefReportTemplateRepository.java similarity index 56% rename from modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrReportTemplateDetailRepository.java rename to modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrRefReportTemplateRepository.java index 99387d4..1b22193 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrReportTemplateDetailRepository.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrRefReportTemplateRepository.java @@ -1,7 +1,7 @@ package cn.estsh.i3plus.pojo.report.repository; import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; -import cn.estsh.i3plus.pojo.report.bean.BrReportTemplateDetail; +import cn.estsh.i3plus.pojo.report.bean.BrRefReportTemplate; /** * @Description : @@ -10,5 +10,5 @@ import cn.estsh.i3plus.pojo.report.bean.BrReportTemplateDetail; * @CreateDate : 2018-12-26 20:23 * @Modify: **/ -public interface BrReportTemplateDetailRepository extends BaseRepository { +public interface BrRefReportTemplateRepository extends BaseRepository { } diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrRefRoleMenuRepository.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrRefRoleMenuRepository.java new file mode 100644 index 0000000..4fff2a4 --- /dev/null +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/repository/BrRefRoleMenuRepository.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.pojo.report.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.report.bean.BrRefRoleMenu; + +/** + * @Description : + * @Reference : + * @Author : Adair Peng + * @CreateDate : 2019-01-17 12:00 + * @Modify: + **/ +public interface BrRefRoleMenuRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/sqlpack/ReportHqlPack.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/sqlpack/ReportHqlPack.java new file mode 100644 index 0000000..7191c64 --- /dev/null +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/sqlpack/ReportHqlPack.java @@ -0,0 +1,79 @@ +package cn.estsh.i3plus.pojo.report.sqlpack; + +import cn.estsh.i3plus.pojo.base.tool.HqlPack; +import cn.estsh.i3plus.pojo.report.bean.BrElement; +import cn.estsh.i3plus.pojo.report.bean.BrMenu; +import org.apache.commons.lang3.StringUtils; + +/** + * @Description : 报表对象封装 + * @Reference : + * @Author : yunhao + * @CreateDate : 2019-01-17 15:41 + * @Modify: + **/ +public class ReportHqlPack { + + /** + * In 参数封装 + * @param columnName + * @return + */ + public static String packHqlIds(String columnName,String[] params){ + StringBuffer result = new StringBuffer(); + + // 参数数组 [1,2,3] -> "1,2,3" + HqlPack.getInPack(String.join(",",params),columnName,result); + return result.toString(); + } + + + /** + * In 参数封装 + * @param columnName + * @return + */ + public static String packHqlIds(String columnName,Long[] params){ + StringBuffer result = new StringBuffer(); + + // 参数数组 [1,2,3] -> "1,2,3" + HqlPack.getInPack(StringUtils.join(params,","),columnName,result); + return result.toString(); + } + + /** + * 目录查询封装 + * @param menu + * @return + */ + public static String packHqlBrMenu(BrMenu menu){ + StringBuffer result = new StringBuffer(); + + // 查询参数封装 + HqlPack.getNumEqualPack(menu.getParentId(),"parentId",result); + HqlPack.getNumEqualPack(menu.getMenuType(),"menuType",result); + HqlPack.getNumEqualPack(menu.getMenuStatus(),"menuStatus",result); + HqlPack.getStringLikerPack(menu.getName(),"name",result); + HqlPack.getStringLikerPack(menu.getMenuCode(),"menuCode",result); + + // 添加默认排序 + HqlPack.getOrderDefault(menu); + + return result.toString(); + } + + /** + * 报表元素查询 + * @param brElement + * @return + */ + public static String packHqlBrElement(BrElement brElement){ + StringBuffer result = new StringBuffer(); + + // 查询参数封装 + HqlPack.getNumEqualPack(brElement.getElementType(),"elementType",result); + HqlPack.getStringLikerPack(brElement.getElementName(),"elementName",result); + + return result.toString(); + } +}