报表元素

yun-zuoyi
yunhao.wang 6 years ago
parent d75826f76c
commit 69d385d6d5

@ -51,4 +51,45 @@ public class BlockEnumUtil {
}
}
/**
*
* 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;
}
}
}

@ -53,11 +53,7 @@ public class BrElement extends BaseBean {
@ApiParam(value ="元素样式css")
private String elementStyle;
@Transient
@ApiParam(value ="元素明细列表")
private List<BrReportElementDetail> brReportElementDetailList;
@Transient
@ApiParam(value ="元素所在的列")
private BrLayoutColumn brLayoutColumn;
@Column(name="ELEMENT_HTML",columnDefinition = "TEXT")
@ApiParam(value ="元素html")
private String elementHtml;
}

@ -0,0 +1,29 @@
package cn.estsh.i3plus.pojo.report.sqlpack;
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.report.bean.BrElement;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-01-17 15:41
* @Modify:
**/
public class ReportHqlPack {
/**
*
* @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();
}
}
Loading…
Cancel
Save