模板管理 后台功能完成

yun-zuoyi
wei.peng 6 years ago
commit 19a8189b05

@ -727,4 +727,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;
}
}
}

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

@ -0,0 +1,34 @@
package cn.estsh.i3plus.pojo.platform.bean;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-01-27 10:53
* @Modify:
**/
@Data
public class MailConfig {
@ApiParam(value = "邮箱服务器")
private String mailHost;
@ApiParam(value = "邮箱端口")
private Integer mailPort;
@ApiParam(value = "邮箱账号")
private String mailUser;
@ApiParam(value = "邮箱密码")
private String mailPassword;
@ApiParam(value = "发信昵称")
private String mailNick;
@ApiParam(value = "测试收信人")
private String testTo;
}

@ -19,5 +19,9 @@
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-base</artifactId>
</dependency>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-model</artifactId>
</dependency>
</dependencies>
</project>

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

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

@ -45,11 +45,11 @@ public class BrLayoutRow extends BaseBean {
@ApiParam(value ="行高")
private Integer rowHeight;
@Column(name="SEQ")
@Column(name="ROW_SEQ")
@ApiParam(value ="排序")
private Integer seq;
private Integer rowSeq;
@Column(name="ROW_STYLE")
@Column(name="ROW_STYLE",columnDefinition = "TEXT")
@ApiParam(value ="行样式")
private String rowStyle;
@ -57,7 +57,7 @@ public class BrLayoutRow extends BaseBean {
@ApiParam(value ="行所关联列数")
private Integer rowColNum;
@Column(name="ROW_HTML")
@Column(name="ROW_HTML",columnDefinition = "TEXT")
@ApiParam(value ="行html")
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.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
@ -28,9 +26,9 @@ import java.util.List;
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="BR_REF_REPORT_ELEMENT")
@Api(value="元素&报表",description = "元素和报表的关联表 * -》 *")
public class BrRefReportElement extends BaseBean {
@Table(name="BR_REF_REPORT_TYPESET")
@Api(value="元素&模板&报表",description = "报表,元素和模板的关联表 * -》 *")
public class BrRefReportTypeset extends BaseBean {
@Column(name = "REPORT_ID")
@ApiParam(value = "报表主键")
@ -41,30 +39,31 @@ public class BrRefReportElement extends BaseBean {
@ApiParam(value = "报表名称")
private String reportNameRdd;
@Column(name = "REPORT_TYPESET_TYPE")
@ApiParam(value = "报表列类型")
private Integer reportTypesetType;
@Column(name = "LAYOUT_COLUMN_ID")
@ApiParam(value = "列主键")
@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",columnDefinition = "TEXT")
@ApiParam(value = "元素html")
@JsonSerialize(using = ToStringSerializer.class)
private String elementHtmlRdd;
/**
* idid
*/
@Column(name = "REF_ID")
@ApiParam(value = "关联id")
@JsonSerialize (using = ToStringSerializer.class)
private Long refId;
@Transient
@ApiParam(value = "报表实例")
private BrReport brReport;
/**
* html
*/
@Column(name = "REF_HTML")
@ApiParam(value = "关联对象html")
private String refHtml;
@Transient
@ApiParam(value = "报表元素")
private BrElement brElement;
@Column(name = "TYPESET_DESCRIPTION",columnDefinition = "TEXT")
@ApiParam(value ="排版描述")
private String typesetDescription;
}

@ -4,6 +4,7 @@ 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.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -13,6 +14,8 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description :
@ -39,16 +42,44 @@ public class BrReport extends BaseBean {
@JsonSerialize(using = ToStringSerializer.class)
private Long layoutId;
@Column(name="LAYOUT_ID_RDD")
//get单独处理
public Long getLayoutId() {
if(layoutId != null) {
return layoutId.longValue();
}else{
return layoutId;
}
}
@Column(name="LAYOUT_NAME_RDD")
@ApiParam(value ="布局名称")
@JsonSerialize(using = ToStringSerializer.class)
private Long layoutNameRdd;
private String layoutNameRdd;
@Column(name="LAYOUT_HTML")
@ApiParam(value ="布局html")
@ApiParam(value ="报表html")
private String reportHtml;
@Column(name="SEQ")
@ApiParam(value ="排序")
private Integer seq;
@Column(name="TEMPLATE_NUM")
@ApiParam(value ="模板数量")
private Integer templateNum;
@Column(name="ELEMENT_NUM")
@ApiParam(value ="元素数量")
private Integer elementNum;
@Column(name = "REPORT_DESCRIPTION",columnDefinition = "TEXT")
@ApiParam(value ="报表描述")
private String reportDescription;
@Transient
@ApiParam(value = "报表关联布局对象")
private BrLayout brLayout;
@Transient
@ApiParam(value = "报表排版关系")
private List<BrRefReportTypeset> brRefReportTypesetList;
}

@ -48,7 +48,7 @@ public class BrReportTemplate extends BaseBean {
@Transient
@ApiParam(value ="报表模板列表")
private List<BrRefReportTemplate> brReportTemplateDetailList;
private List<BrRefReportTypeset> brRefReportTypesetList;
@Transient
@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;
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 :
@ -10,5 +10,5 @@ import cn.estsh.i3plus.pojo.report.bean.BrRefReportElement;
* @CreateDate : 2018-12-26 20:23
* @Modify:
**/
public interface BrRefReportElementRepository extends BaseRepository<BrRefReportElement,Long> {
public interface BrRefReportTypesetRepository extends BaseRepository<BrRefReportTypeset,Long> {
}

@ -5,7 +5,6 @@ import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.report.bean.BrElement;
import cn.estsh.i3plus.pojo.report.bean.BrLayout;
import cn.estsh.i3plus.pojo.report.bean.BrMenu;
import cn.estsh.i3plus.pojo.report.bean.BrTemplate;
import org.apache.commons.lang3.StringUtils;
/**
@ -127,7 +126,7 @@ public class ReportHqlPack {
// 查询参数封装
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(),CommonEnumUtil.ASC_OR_DESC.DESC.getValue()},new String[]{"columnSeq","modifyDatetime"},result);
return result.toString();
}
@ -137,12 +136,27 @@ public class ReportHqlPack {
* @param layoutId
* @return
*/
public static String packHqlBrLayoutColumnByLayoutIdSortBySeq(Long layoutId){
public static String packHqlBrLayoutRowByLayoutIdSortBySeq(Long layoutId){
StringBuffer result = new StringBuffer();
// 查询参数封装
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(),CommonEnumUtil.ASC_OR_DESC.DESC.getValue()},new String[]{"rowSeq","modifyDatetime"},result);
return result.toString();
}
/**
*
* @param brReport
* @return
*/
public static String packHqlBrReport(BrReport brReport){
StringBuffer result = new StringBuffer();
// 查询参数封装
HqlPack.getStringLikerPack(brReport.getReportName(),"reportName",result);
HqlPack.getNumEqualPack(brReport.getLayoutId(),"layoutId",result);
return result.toString();
}

Loading…
Cancel
Save