报表排版实体变更

yun-zuoyi
yunhao.wang 6 years ago
parent 86da7bcdac
commit e35113c519

@ -571,4 +571,44 @@ public class BlockReportEnumUtil {
} }
} }
/**
*
* ELEMENT(1,"元素"),TEMPLATE(2,"模板");
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum REPORT_TYPESET_TYPE{
ELEMENT(1,"元素"),TEMPLATE(2,"模板");
private int value;
private String description;
REPORT_TYPESET_TYPE() {
}
REPORT_TYPESET_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;
}
}
} }

@ -42,17 +42,17 @@ public class BrLayout extends BaseBean {
@ApiParam(value ="布局高度") @ApiParam(value ="布局高度")
private Double layoutHeight; private Double layoutHeight;
@Column(name="ROW_COUNT") @Column(name="LAYOUT_ROW_COUNT")
@ApiParam(value ="行数") @ApiParam(value ="行数")
private Integer rowCount; private Integer layoutRowCount;
@Column(name="COLUMN_COUNT") @Column(name="LAYOUT_COLUMN_COUNT")
@ApiParam(value ="列数") @ApiParam(value ="列数")
private Integer columnCount; private Integer layoutColumnCount;
@Column(name="SEQ") @Column(name="LAYOUT_REPORT_COUNT")
@ApiParam(value ="排序") @ApiParam(value ="引用报表数量")
private Integer seq; private Integer layoutReportCount;
@Column(name="LAYOUT_HTML",columnDefinition = "TEXT") @Column(name="LAYOUT_HTML",columnDefinition = "TEXT")
@ApiParam(value ="布局html") @ApiParam(value ="布局html")

@ -62,9 +62,9 @@ public class BrLayoutColumn extends BaseBean {
@ApiParam(value ="列样式") @ApiParam(value ="列样式")
private String columnStyle; private String columnStyle;
@Column(name="SEQ") @Column(name="COLUMN_SEQ")
@ApiParam(value ="排序") @ApiParam(value ="排序")
private Integer seq; private Integer columnSeq;
@Column(name = "COLUMN_DESCRIPTION",columnDefinition = "TEXT") @Column(name = "COLUMN_DESCRIPTION",columnDefinition = "TEXT")
@ApiParam(value ="列描述") @ApiParam(value ="列描述")

@ -45,11 +45,11 @@ public class BrLayoutRow extends BaseBean {
@ApiParam(value ="行高") @ApiParam(value ="行高")
private Integer rowHeight; private Integer rowHeight;
@Column(name="SEQ") @Column(name="ROW_SEQ")
@ApiParam(value ="排序") @ApiParam(value ="排序")
private Integer seq; private Integer rowSeq;
@Column(name="ROW_STYLE") @Column(name="ROW_STYLE",columnDefinition = "TEXT")
@ApiParam(value ="行样式") @ApiParam(value ="行样式")
private String rowStyle; private String rowStyle;
@ -57,7 +57,7 @@ public class BrLayoutRow extends BaseBean {
@ApiParam(value ="行所关联列数") @ApiParam(value ="行所关联列数")
private Integer rowColNum; private Integer rowColNum;
@Column(name="ROW_HTML") @Column(name="ROW_HTML",columnDefinition = "TEXT")
@ApiParam(value ="行html") @ApiParam(value ="行html")
private String rowHtml; private String rowHtml;

@ -1,64 +0,0 @@
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;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-12-25 19:54
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="BR_REF_REPORT_TEMPLATE")
@Api(value="报表模板&报表",description = "报表模板和报表的关联表 * -》 *")
public class BrRefReportTemplate extends BaseBean {
@Column(name="REPORT_ID")
@ApiParam(value ="报表主键")
@JsonSerialize(using = ToStringSerializer.class)
private Long reportId;
@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;
@Column(name="REPORT_TEMPLATE_HTML_RDD")
@ApiParam(value ="报表模板html")
private String reportTemplateHtmlRdd;
@Transient
@ApiParam(value = "报表模板")
private BrReportTemplate brReportTemplate;
}

@ -13,8 +13,6 @@ 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 :
@ -28,9 +26,9 @@ import java.util.List;
@DynamicInsert @DynamicInsert
@DynamicUpdate @DynamicUpdate
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Table(name="BR_REF_REPORT_ELEMENT") @Table(name="BR_REF_REPORT_TYPESET")
@Api(value="元素&报表",description = "元素和报表的关联表 * -》 *") @Api(value="元素&模板&报表",description = "报表,元素和模板的关联表 * -》 *")
public class BrRefReportElement extends BaseBean { public class BrRefReportTypeset extends BaseBean {
@Column(name = "REPORT_ID") @Column(name = "REPORT_ID")
@ApiParam(value = "报表主键") @ApiParam(value = "报表主键")
@ -41,30 +39,20 @@ public class BrRefReportElement extends BaseBean {
@ApiParam(value = "报表名称") @ApiParam(value = "报表名称")
private String reportNameRdd; private String reportNameRdd;
@Column(name = "REPORT_Typeset_TYPE")
@ApiParam(value = "报表列类型")
private Integer reportTypesetType;
@Column(name = "LAYOUT_COLUMN_ID") @Column(name = "LAYOUT_COLUMN_ID")
@ApiParam(value = "列主键") @ApiParam(value = "布局列主键")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long layoutColumnId; private Long layoutColumnId;
@Column(name = "ELEMENT_ID") /**
@ApiParam(value = "元素主键") * idid
@JsonSerialize(using = ToStringSerializer.class) */
private Long elementId; @Column(name = "REL_ID")
@ApiParam(value = "关联id")
@Column(name = "ELEMENT_NAME_RDD")
@ApiParam(value = "元素名称")
private String elementNameRdd;
@Column(name = "ELEMENT_HTML_RDD",columnDefinition = "TEXT")
@ApiParam(value = "元素html")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private String elementHtmlRdd; private Long contentId;
@Transient
@ApiParam(value = "报表实例")
private BrReport brReport;
@Transient
@ApiParam(value = "报表元素")
private BrElement brElement;
} }

@ -48,7 +48,7 @@ public class BrReportTemplate extends BaseBean {
@Transient @Transient
@ApiParam(value ="报表模板列表") @ApiParam(value ="报表模板列表")
private List<BrRefReportTemplate> brReportTemplateDetailList; private List<BrRefReportTypeset> brRefReportTypesetList;
@Transient @Transient
@ApiParam(value ="元素所在的列") @ApiParam(value ="元素所在的列")

@ -1,14 +0,0 @@
package cn.estsh.i3plus.pojo.report.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.report.bean.BrRefReportTemplate;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-12-26 20:23
* @Modify:
**/
public interface BrRefReportTemplateRepository extends BaseRepository<BrRefReportTemplate,Long> {
}

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.report.repository; package cn.estsh.i3plus.pojo.report.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.report.bean.BrRefReportElement; import cn.estsh.i3plus.pojo.report.bean.BrRefReportTypeset;
/** /**
* @Description : * @Description :
@ -10,5 +10,5 @@ import cn.estsh.i3plus.pojo.report.bean.BrRefReportElement;
* @CreateDate : 2018-12-26 20:23 * @CreateDate : 2018-12-26 20:23
* @Modify: * @Modify:
**/ **/
public interface BrRefReportElementRepository extends BaseRepository<BrRefReportElement,Long> { public interface BrRefReportTypesetRepository extends BaseRepository<BrRefReportTypeset,Long> {
} }

@ -5,6 +5,7 @@ import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.report.bean.BrElement; import cn.estsh.i3plus.pojo.report.bean.BrElement;
import cn.estsh.i3plus.pojo.report.bean.BrLayout; import cn.estsh.i3plus.pojo.report.bean.BrLayout;
import cn.estsh.i3plus.pojo.report.bean.BrMenu; 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;
/** /**
@ -103,7 +104,7 @@ public class ReportHqlPack {
// 查询参数封装 // 查询参数封装
HqlPack.getNumEqualPack(rowId,"layoutRowId",result); HqlPack.getNumEqualPack(rowId,"layoutRowId",result);
HqlPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()},new String[]{"seq"},result); HqlPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()},new String[]{"columnSeq"},result);
return result.toString(); return result.toString();
} }
@ -113,12 +114,26 @@ public class ReportHqlPack {
* @param layoutId * @param layoutId
* @return * @return
*/ */
public static String packHqlBrLayoutColumnByLayoutIdSortBySeq(Long layoutId){ public static String packHqlBrLayoutRowByLayoutIdSortBySeq(Long layoutId){
StringBuffer result = new StringBuffer(); StringBuffer result = new StringBuffer();
// 查询参数封装 // 查询参数封装
HqlPack.getNumEqualPack(layoutId,"layoutId",result); HqlPack.getNumEqualPack(layoutId,"layoutId",result);
HqlPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()},new String[]{"seq"},result); HqlPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.ASC.getValue()},new String[]{"rowSeq"},result);
return result.toString();
}
/**
*
* @param brReport
* @return
*/
public static String packHqlBrReport(BrReport brReport){
StringBuffer result = new StringBuffer();
// 查询参数封装
HqlPack.getStringLikerPack(brReport.getReportName(),"reportName",result);
return result.toString(); return result.toString();
} }

Loading…
Cancel
Save