Merge remote-tracking branch 'remotes/origin/dev' into test
commit
a2bbd4b5f0
@ -0,0 +1,123 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.base.codemaker;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :
|
||||||
|
* @Reference :
|
||||||
|
* @Author : alwaysfrin
|
||||||
|
* @CreateDate : 2019-01-10 13:27
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Deprecated
|
||||||
|
public class SnowflakeId {
|
||||||
|
private long workerId;
|
||||||
|
private long datacenterId;
|
||||||
|
private long sequence = 0L;
|
||||||
|
|
||||||
|
public SnowflakeId(){
|
||||||
|
this.workerId = 1;
|
||||||
|
this.datacenterId = 1;
|
||||||
|
this.sequence = 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SnowflakeId(long workerId, long datacenterId){
|
||||||
|
if (workerId > maxWorkerId || workerId < 0) {
|
||||||
|
throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0",maxWorkerId));
|
||||||
|
}
|
||||||
|
if (datacenterId > maxDatacenterId || datacenterId < 0) {
|
||||||
|
throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0",maxDatacenterId));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.workerId = workerId;
|
||||||
|
this.datacenterId = datacenterId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long twepoch = 1288834974657L;
|
||||||
|
|
||||||
|
private long workerIdBits = 5L;
|
||||||
|
private long datacenterIdBits = 5L;
|
||||||
|
private long maxWorkerId = -1L ^ (-1L << workerIdBits);
|
||||||
|
private long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
|
||||||
|
private long sequenceBits = 12L;
|
||||||
|
|
||||||
|
private long workerIdShift = sequenceBits;
|
||||||
|
private long datacenterIdShift = sequenceBits + workerIdBits;
|
||||||
|
private long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
|
||||||
|
private long sequenceMask = -1L ^ (-1L << sequenceBits);
|
||||||
|
|
||||||
|
private long lastTimestamp = -1L;
|
||||||
|
|
||||||
|
private long getWorkerId(){
|
||||||
|
return workerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long getDatacenterId(){
|
||||||
|
return datacenterId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized long nextId() {
|
||||||
|
long timestamp = timeGen();
|
||||||
|
|
||||||
|
if (timestamp < lastTimestamp) {
|
||||||
|
System.err.printf("clock is moving backwards. Rejecting requests until %d.", lastTimestamp);
|
||||||
|
throw new RuntimeException(String.format("Clock moved backwards. Refusing to generate id for %d milliseconds",
|
||||||
|
lastTimestamp - timestamp));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastTimestamp == timestamp) {
|
||||||
|
sequence = (sequence + 1) & sequenceMask;
|
||||||
|
if (sequence == 0) {
|
||||||
|
timestamp = tilNextMillis(lastTimestamp);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sequence = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastTimestamp = timestamp;
|
||||||
|
return ((timestamp - twepoch) << timestampLeftShift) |
|
||||||
|
(datacenterId << datacenterIdShift) |
|
||||||
|
(workerId << workerIdShift) |
|
||||||
|
sequence;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long tilNextMillis(long lastTimestamp) {
|
||||||
|
long timestamp = timeGen();
|
||||||
|
while (timestamp <= lastTimestamp) {
|
||||||
|
timestamp = timeGen();
|
||||||
|
}
|
||||||
|
return timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
private long timeGen(){
|
||||||
|
return System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------测试---------------
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SnowflakeId worker = new SnowflakeId();
|
||||||
|
Runnable testRun = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
System.out.println(i + "=" + worker.nextId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Thread thread1 = new Thread(testRun);
|
||||||
|
thread1.start();
|
||||||
|
Thread thread2 = new Thread(testRun);
|
||||||
|
thread2.start();
|
||||||
|
Thread thread3 = new Thread(testRun);
|
||||||
|
thread3.start();
|
||||||
|
Thread thread4 = new Thread(testRun);
|
||||||
|
thread4.start();
|
||||||
|
Thread thread5 = new Thread(testRun);
|
||||||
|
thread5.start();
|
||||||
|
|
||||||
|
System.out.println(new SnowflakeId().nextId());
|
||||||
|
|
||||||
|
for (int i = 0; i < 10; i++) {
|
||||||
|
//System.out.println(worker.nextId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,845 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.base.enumutil;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 模块枚举类
|
||||||
|
* @Reference :
|
||||||
|
* @Author : alwaysfrin
|
||||||
|
* @CreateDate : 2018-12-25 21:08
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报表元素枚举
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据状态
|
||||||
|
* 1 启用
|
||||||
|
* 2 禁用
|
||||||
|
* 3 锁定
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum DATA_STATUS {
|
||||||
|
ENABLE(1, "启用", "fa fa-success cell-fa fa-check"),
|
||||||
|
DISABLE(2, "禁用", "fa fa-disabled cell-fa fa-times-circle");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
DATA_STATUS() {
|
||||||
|
}
|
||||||
|
|
||||||
|
DATA_STATUS(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 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模板状态
|
||||||
|
* 1 新建模板
|
||||||
|
* 2 新建模板对象
|
||||||
|
* 3 新建模板查询条件
|
||||||
|
* 4 新建模板分组条件
|
||||||
|
* 5 新建模板聚合条件
|
||||||
|
* 6 新建模板显示条件
|
||||||
|
* 7 新建模板确认
|
||||||
|
* 8 新建模板完成
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum TEMPLATE_STATUS {
|
||||||
|
SAVE_TEMPLATE(1, "新建模板", "新建模板"),
|
||||||
|
SAVE_TEMPLATE_POJO(2, "新建模板对象", "新建模板对象"),
|
||||||
|
SAVE_TEMPLATE_ATTR_WHERE(3, "新建模板查询条件", "新建模板查询条件"),
|
||||||
|
SAVE_TEMPLATE_ATTR_GROUP(4, "新建模板分组条件", "新建模板分组条件"),
|
||||||
|
SAVE_TEMPLATE_ATTR_AGGREGATION(5, "新建模板聚合条件", "新建模板聚合条件"),
|
||||||
|
SAVE_TEMPLATE_ATTR_SHOW(6, "新建模板显示条件", "新建模板显示条件"),
|
||||||
|
SAVE_TEMPLATE_ATTR_CONFIRM(7, "新建模板确认条件", "新建模板确认条件"),
|
||||||
|
SAVE_TEMPLATE_FULFIL(8, "新建模板确认条件", "新建模板确认条件");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
TEMPLATE_STATUS() {
|
||||||
|
}
|
||||||
|
|
||||||
|
TEMPLATE_STATUS(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 TEMPLATE_STATUS enumOf(int val) {
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].value == val) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据状态
|
||||||
|
* 1 启用
|
||||||
|
* 2 禁用
|
||||||
|
* 3 锁定
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum TEMPLATE_TYPE {
|
||||||
|
TABLE(1, "表格", "表格模板");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
TEMPLATE_TYPE() {
|
||||||
|
}
|
||||||
|
|
||||||
|
TEMPLATE_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 TEMPLATE_TYPE enumOf(int val) {
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].value == val) {
|
||||||
|
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 TEMPLATE_STYLE {
|
||||||
|
|
||||||
|
TABLE_LEFT(1, TEMPLATE_TYPE.TABLE, "text-left", "表单左对齐"),
|
||||||
|
TABLE_RIGHT(2, TEMPLATE_TYPE.TABLE, "text-center", "表单右对齐"),
|
||||||
|
TABLE_CENTER(3, TEMPLATE_TYPE.TABLE, "text-right", "表单居中");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private TEMPLATE_TYPE group;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
TEMPLATE_STYLE() {
|
||||||
|
}
|
||||||
|
|
||||||
|
TEMPLATE_STYLE(int value,TEMPLATE_TYPE group, String name, String description) {
|
||||||
|
this.value = value;
|
||||||
|
this.group = group;
|
||||||
|
this.name = name;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TEMPLATE_STYLE[] getGroup(TEMPLATE_TYPE type){
|
||||||
|
if(type != null){
|
||||||
|
List<TEMPLATE_STYLE> list = new ArrayList<>();
|
||||||
|
for (TEMPLATE_STYLE style : TEMPLATE_STYLE.values()) {
|
||||||
|
if(style.group.equals(type)){
|
||||||
|
list.add(style);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list.toArray(new TEMPLATE_STYLE[list.size()]);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static TEMPLATE_STYLE valueOf(int val) {
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].value == val) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HQL WHERE 条件
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum HQL_WHERE{
|
||||||
|
|
||||||
|
GT(1, ">", "大于"),
|
||||||
|
GT_EQUAL(2, ">=", "大于等于"),
|
||||||
|
LT(3, "<", "小于等于"),
|
||||||
|
LT_EQUAL(4, "<=", "小于等于"),
|
||||||
|
LIKE(5, "LIKE", "模糊"),
|
||||||
|
LIKE_LEFT(6, "LIKE", "左模糊"),
|
||||||
|
LIKE_RIGHT(7, "LIKE", "右模糊"),
|
||||||
|
EQUAL(8, "=", "等于"),
|
||||||
|
EQUAL_NOT(9, "!=", "不等于"),
|
||||||
|
AND(10, "AND", "AND"),
|
||||||
|
OR(11, "OR", "OR"),
|
||||||
|
NOT(12, "NOT", "NOT"),
|
||||||
|
IS_NULL(13, "IS NULL", "IS NULL"),
|
||||||
|
IS_NOT_NULL(14, "IS NOT NULL", "IS NOT NULL");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
HQL_WHERE() {
|
||||||
|
}
|
||||||
|
|
||||||
|
HQL_WHERE(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 HQL_WHERE valueOf(int val) {
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].value == val) {
|
||||||
|
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_REF{
|
||||||
|
LEFT_JOIN(1, "left join", "左连接"),
|
||||||
|
RIGHT_JOIN(2, "right join", "右连接"),
|
||||||
|
INNER_JOIN(3, "inner join", "内连接");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
HQL_REF() {
|
||||||
|
}
|
||||||
|
|
||||||
|
HQL_REF(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 HQL_REF valueOf(int val) {
|
||||||
|
HQL_REF tmp = null;
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].value == val) {
|
||||||
|
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_AGGREGATION{
|
||||||
|
|
||||||
|
AVG(1, "avg", "平均值"),
|
||||||
|
MIN(2, "min", "最小值"),
|
||||||
|
MAX(3, "max", "最大值"),
|
||||||
|
SUM(4, "sum", "总和"),
|
||||||
|
COUNT(5, "count", "计数");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
HQL_AGGREGATION() {
|
||||||
|
}
|
||||||
|
|
||||||
|
HQL_AGGREGATION(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_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) {
|
||||||
|
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_ORDER{
|
||||||
|
|
||||||
|
ASC(1, "ASC", "升序"),
|
||||||
|
DESC(2, "DESC", "降序");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
HQL_ORDER() {
|
||||||
|
}
|
||||||
|
|
||||||
|
HQL_ORDER(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 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报表排版枚举
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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,30 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.model.report;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
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("模板ID")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
@ApiParam("执行 HQL ")
|
||||||
|
private String hql;
|
||||||
|
|
||||||
|
@ApiParam("执行 HQL 参数名称 ")
|
||||||
|
private String[] paramName;
|
||||||
|
|
||||||
|
@ApiParam("执行 HQL 参数值 ")
|
||||||
|
private Object[] paramValue;
|
||||||
|
}
|
@ -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;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
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-18 11:32
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table(name="BR_POJO_ATTR")
|
||||||
|
@Api(value="对象属性",description = "对象属性")
|
||||||
|
public class BrPojoAttr extends BaseBean {
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_ID")
|
||||||
|
@ApiParam(value ="模板编号" ,example = "-1")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
@Column(name="SERVER_ID")
|
||||||
|
@ApiParam(value ="服务ID",example = "-1")
|
||||||
|
private Integer serverId;
|
||||||
|
|
||||||
|
@Column(name="POJO_ID")
|
||||||
|
@ApiParam(value ="模板对象ID" ,example = "-1")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long pojoId;
|
||||||
|
|
||||||
|
@Column(name="POJO_NAME")
|
||||||
|
@ApiParam(value ="对象名称")
|
||||||
|
private String pojoName;
|
||||||
|
|
||||||
|
@Column(name="PACKAGE_NAME_RDD")
|
||||||
|
@ApiParam(value ="主服务对象包名称" , access ="服务对象包名称")
|
||||||
|
private String packageNameRdd;
|
||||||
|
|
||||||
|
@Column(name="POJO_NAME_ALIAS")
|
||||||
|
@ApiParam(value ="对象别名")
|
||||||
|
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")
|
||||||
|
@ApiParam(value ="属性类型",example = "-1")
|
||||||
|
private Integer attrType;
|
||||||
|
|
||||||
|
@Column(name="ATTR_REF_TYPE")
|
||||||
|
@ApiParam(value ="关系类型",example = "-1")
|
||||||
|
private Integer attrRefType;
|
||||||
|
|
||||||
|
@Column(name="DATA_TYPE")
|
||||||
|
@ApiParam(value ="数据类型",example = "-1")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
@Column(name="AGGREGATION_TYPE")
|
||||||
|
@ApiParam(value ="聚合类型",example = "-1")
|
||||||
|
private Integer aggregationType;
|
||||||
|
|
||||||
|
@Column(name="AGGREGATION_ID")
|
||||||
|
@ApiParam(value ="聚合类型",example = "-1")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long aggregationId;
|
||||||
|
|
||||||
|
@Column(name="ATTR_SORT")
|
||||||
|
@ApiParam(value ="字段排序")
|
||||||
|
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_STYLE_RDD")
|
||||||
|
@ApiParam(value ="字段样式")
|
||||||
|
private String attrStyleRdd;
|
||||||
|
|
||||||
|
@Column(name="ATTR_DEFAULT_VALUE")
|
||||||
|
@ApiParam(value ="属性默认值")
|
||||||
|
private String attrDefaultValue;
|
||||||
|
|
||||||
|
@Column(name="ATTR_SHOW")
|
||||||
|
@ApiParam(value ="属性是否显示",example = "-1")
|
||||||
|
private Integer attrShow;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
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-18 11:32
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table(name="BR_REF_POJO")
|
||||||
|
@Api(value="对象关系",description = "对象关系")
|
||||||
|
public class BrRefPojo extends BaseBean {
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_ID")
|
||||||
|
@ApiParam(value ="模板编号" ,example = "-1")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
@Column(name="REF_TYPE")
|
||||||
|
@ApiParam(value ="关系类型")
|
||||||
|
private Integer refType;
|
||||||
|
|
||||||
|
@Column(name="REF_SORT")
|
||||||
|
@ApiParam(value ="关系排序")
|
||||||
|
private Integer refSort;
|
||||||
|
|
||||||
|
@Column(name="MASTER_SERVER_ID")
|
||||||
|
@ApiParam(value ="主服务编号" ,example = "-1")
|
||||||
|
private Integer masterServerId;
|
||||||
|
|
||||||
|
@Column(name="MASTER_POJO_NAME")
|
||||||
|
@ApiParam(value ="副对象名称")
|
||||||
|
private String masterPojoName;
|
||||||
|
|
||||||
|
@Column(name="MASTER_POJO_NAME_ALIAS")
|
||||||
|
@ApiParam(value ="主对象别名")
|
||||||
|
private String masterPojoNameAlias;
|
||||||
|
|
||||||
|
@Column(name="MASTER_POJO_NAME_ATTR_NAME")
|
||||||
|
@ApiParam(value ="主对象属性名称" )
|
||||||
|
private String masterPojoAttName;
|
||||||
|
|
||||||
|
@Column(name="SECONDARY_SERVER_ID")
|
||||||
|
@ApiParam(value ="主服务编号")
|
||||||
|
private Integer secondaryServerId;
|
||||||
|
|
||||||
|
@Column(name="SECONDARY_POJO_NAME")
|
||||||
|
@ApiParam(value ="副对象名称")
|
||||||
|
private String secondaryPojoName;
|
||||||
|
|
||||||
|
@Column(name="SECONDARY_POJO_NAME_ALIAS")
|
||||||
|
@ApiParam(value ="副对象别名" )
|
||||||
|
private String secondaryPojoNameAlias;
|
||||||
|
|
||||||
|
@Column(name="SECONDARY_POJO_ATTR_NAME")
|
||||||
|
@ApiParam(value ="副对象属性名称")
|
||||||
|
private String secondaryPojoAttrName;
|
||||||
|
}
|
@ -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;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,115 @@
|
|||||||
|
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.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Adair Peng
|
||||||
|
* @CreateDate : 2019-01-18 11:31
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table(name="BR_REF_SERVER_POJO")
|
||||||
|
@Api(value="报表模板服务对象",description = "报表模板服务对象")
|
||||||
|
public class BrRefServerPojo extends BaseBean {
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_ID")
|
||||||
|
@ApiParam(value ="模板编号" ,example = "-1")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_NAME_RDD")
|
||||||
|
@ApiParam(value ="模板名称" , access ="模板名称")
|
||||||
|
private String templateNameRdd;
|
||||||
|
|
||||||
|
@Column(name="POJO_REF_TYPE")
|
||||||
|
@ApiParam(value ="关系类型")
|
||||||
|
private Integer pojoRefType;
|
||||||
|
|
||||||
|
@Column(name="POJO_WHERE_TYPE")
|
||||||
|
@ApiParam(value ="连接关系")
|
||||||
|
private Integer pojoWhereType;
|
||||||
|
|
||||||
|
@Column(name="POJO_SORT")
|
||||||
|
@ApiParam(value ="主服务编号" ,example = "-1")
|
||||||
|
private Integer pojoSort;
|
||||||
|
|
||||||
|
@Column(name="MASTER_SERVER_ID")
|
||||||
|
@ApiParam(value ="主服务编号" ,example = "-1")
|
||||||
|
private Integer masterServerId;
|
||||||
|
|
||||||
|
@Column(name="MASTER_SERVER_NAME_RDD")
|
||||||
|
@ApiParam(value ="主服务名称" ,example = "-1")
|
||||||
|
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;
|
||||||
|
}
|
@ -0,0 +1,50 @@
|
|||||||
|
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-18 11:31
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table(name="BR_REF_TEMPLATE_SERVER")
|
||||||
|
@Api(value="报表模板-服务",description = "报表模板-服务")
|
||||||
|
public class BrRefTemplateServer extends BaseBean {
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_ID")
|
||||||
|
@ApiParam(value ="模板编号" ,example = "-1")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_NAME_RDD")
|
||||||
|
@ApiParam(value ="模板名称" , access ="模板名称")
|
||||||
|
private String templateNameRdd;
|
||||||
|
|
||||||
|
@Column(name="SERVER_ID")
|
||||||
|
@ApiParam(value ="服务编号" ,example = "-1")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Integer serverId;
|
||||||
|
|
||||||
|
@Column(name="SERVER_NAME_RDD")
|
||||||
|
@ApiParam(value ="服务名称" , access ="模板名称")
|
||||||
|
private String serverNameRdd;
|
||||||
|
}
|
@ -0,0 +1,151 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.report.bean;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||||
|
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-18 11:23
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table(name="BR_TEMPLATE")
|
||||||
|
@Api(value="报表模板",description = "报表模板")
|
||||||
|
public class BrTemplate extends BaseBean {
|
||||||
|
|
||||||
|
@Column(name="NAME")
|
||||||
|
@ApiParam(value ="模板名称" , access ="模板名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_TYPE")
|
||||||
|
@ApiParam(value ="模板类型" , example ="-1",access="表格,图表")
|
||||||
|
private Integer templateType;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_STATUS")
|
||||||
|
@ApiParam(value ="模板状态" , example ="-1",access="模板状态")
|
||||||
|
private Integer templateStatus;
|
||||||
|
|
||||||
|
@Column(name="NUM_POJO")
|
||||||
|
@ApiParam(value ="对象数量" , example ="0" , access ="对象数量")
|
||||||
|
private Integer numPojo;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_POJO_NAMES_RDD",columnDefinition = "TEXT")
|
||||||
|
@ApiParam(value ="对象名称" , access ="对象名称")
|
||||||
|
private String templatePojoNamesRdd;
|
||||||
|
|
||||||
|
@Column(name="NUM_SERVER")
|
||||||
|
@ApiParam(value ="对象数量" , example ="0" , access ="对象数量")
|
||||||
|
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")
|
||||||
|
@ApiParam(value ="服务名称" , access ="服务名称")
|
||||||
|
private String templateServerNamesRdd;
|
||||||
|
|
||||||
|
@Column(name="NUM_TEMPLATE_ATTR_FILTER")
|
||||||
|
@ApiParam(value ="对象数量" , example ="0" , access ="对象数量")
|
||||||
|
private Integer numTemplateAttrFilter;
|
||||||
|
|
||||||
|
@Column(name="template_attr_filter_list",columnDefinition = "TEXT")
|
||||||
|
@ApiParam(value ="模板查询条件" , access ="模板查询条件")
|
||||||
|
private String templateAttrFilterList;
|
||||||
|
|
||||||
|
@Column(name="NUM_TEMPLATE_ATTR_FILTER_GROUP")
|
||||||
|
@ApiParam(value ="对象数量" , example ="0" , access ="对象数量")
|
||||||
|
private Integer numTemplateAttrFilterGroup;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_ATTR_FILTER_GROUP_LIST",columnDefinition = "TEXT")
|
||||||
|
@ApiParam(value ="模板分组条件" , access ="模板分組条件")
|
||||||
|
private String templateAttrFilterGroupList;
|
||||||
|
|
||||||
|
@Column(name="NUM_TEMPLATE_ATTR_SHOW")
|
||||||
|
@ApiParam(value ="对象数量" , example ="0" , access ="对象数量")
|
||||||
|
private Integer numTemplateAttrShow;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_ATTR_SHOW_LIST",columnDefinition = "TEXT")
|
||||||
|
@ApiParam(value ="模板显示属性" , access ="模板显示属性")
|
||||||
|
private String templateAttrShowList;
|
||||||
|
|
||||||
|
@Column(name="NUM_TEMPLATE_AGGREGATION")
|
||||||
|
@ApiParam(value ="对象聚集数量" , example ="0" , access ="对象聚集数量")
|
||||||
|
private Integer numTemplateAggregation;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_ATTR_AGGREGATION_LIST",columnDefinition = "TEXT")
|
||||||
|
@ApiParam(value ="模板聚集属性" , access ="模板聚集属性")
|
||||||
|
private String templateAttrAggregationList;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_DESCRIPTION")
|
||||||
|
@ApiParam(value ="模板描述" , access ="模板描述")
|
||||||
|
private String templateDescription;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_HQL",columnDefinition = "TEXT")
|
||||||
|
@ApiParam(value ="模板执行HQL" , access ="模板执行HQL")
|
||||||
|
private String templateHql;
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_HTML",columnDefinition = "TEXT")
|
||||||
|
@ApiParam(value ="模板HTML" , access ="模板HTML")
|
||||||
|
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> pojoAttrAggregationList = new ArrayList<>();
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@ApiParam(value ="模板服务对象显示属性")
|
||||||
|
private List<BrPojoAttr> pojoAttrShowList = new ArrayList<>();
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
@ApiParam(value ="模板服务集合")
|
||||||
|
private List<String> serverNameList = new ArrayList<>();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
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-18 11:23
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table(name="BR_TEMPLATE_CUSTOM_HQL")
|
||||||
|
@Api(value="模板自定义语句",description = "模板自定义语句")
|
||||||
|
public class BrTemplateCustomHql extends BaseBean {
|
||||||
|
|
||||||
|
@Column(name="TEMPLATE_ID")
|
||||||
|
@ApiParam(value ="模板编号" , example = "-1")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
@Column(name="DATA_TYPE")
|
||||||
|
@ApiParam(value ="自定义类型" , example ="-1")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
@Column(name="CUSTOM_CONTENT",columnDefinition="TEXT")
|
||||||
|
@ApiParam(value ="自定义语句内容" , access ="自定义语句内容")
|
||||||
|
private String customContent;
|
||||||
|
|
||||||
|
}
|
@ -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<BrMenu,Long> {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.report.repository;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.BrMenu;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.BrPojoAttr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Adair Peng
|
||||||
|
* @CreateDate : 2019-01-18 15:03
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public interface BrPojoAttrRepository extends BaseRepository<BrPojoAttr,Long> {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.report.repository;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.BrRefPojo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Adair Peng
|
||||||
|
* @CreateDate : 2019-01-18 15:04
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public interface BrRefPojoRepository extends BaseRepository<BrRefPojo,Long> {
|
||||||
|
|
||||||
|
}
|
@ -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<BrRefRoleMenu,Long> {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.report.repository;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.BrMenu;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.BrRefServerPojo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Adair Peng
|
||||||
|
* @CreateDate : 2019-01-18 15:05
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public interface BrRefServerPojoRepository extends BaseRepository<BrRefServerPojo,Long> {
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.report.repository;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.BrMenu;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.BrRefTemplateServer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Adair Peng
|
||||||
|
* @CreateDate : 2019-01-18 15:05
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public interface BrRefTemplateServerRepository extends BaseRepository<BrRefTemplateServer,Long> {
|
||||||
|
}
|
@ -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.BrReportTemplateDetail;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Description :
|
|
||||||
* @Reference :
|
|
||||||
* @Author : alwaysfrin
|
|
||||||
* @CreateDate : 2018-12-26 20:23
|
|
||||||
* @Modify:
|
|
||||||
**/
|
|
||||||
public interface BrReportTemplateDetailRepository extends BaseRepository<BrReportTemplateDetail,Long> {
|
|
||||||
}
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.report.repository;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.BrMenu;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.BrTemplateCustomHql;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Adair Peng
|
||||||
|
* @CreateDate : 2019-01-18 15:05
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public interface BrTemplateCustomHqlRepository extends BaseRepository<BrTemplateCustomHql,Long> {
|
||||||
|
}
|
@ -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.BrTemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :
|
||||||
|
* @Reference :
|
||||||
|
* @Author : Adair Peng
|
||||||
|
* @CreateDate : 2019-01-18 15:05
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public interface BrTemplateRepository extends BaseRepository<BrTemplate,Long> {
|
||||||
|
}
|
@ -0,0 +1,161 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.report.sqlpack;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||||
|
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
|
||||||
|
import cn.estsh.i3plus.pojo.report.bean.*;
|
||||||
|
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);
|
||||||
|
|
||||||
|
if(menu.getFindIdList() != null && menu.getFindIdList().size() > 0){
|
||||||
|
HqlPack.getInPack(StringUtils.join(menu.getFindIdList(),","),"id",result);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加默认排序
|
||||||
|
HqlPack.getOrderDefault(menu);
|
||||||
|
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 目录查询封装
|
||||||
|
* @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
|
||||||
|
* @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();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报表布局查询
|
||||||
|
* @param brLayout
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String packHqlBrLayout(BrLayout brLayout){
|
||||||
|
StringBuffer result = new StringBuffer();
|
||||||
|
|
||||||
|
// 查询参数封装
|
||||||
|
HqlPack.getStringLikerPack(brLayout.getLayoutName(),"layoutName",result);
|
||||||
|
|
||||||
|
return result.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按顺序查询行中的单元格
|
||||||
|
* @param rowId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String packHqlBrLayoutColumnByRowIdSortBySeq(Long rowId){
|
||||||
|
StringBuffer result = new StringBuffer();
|
||||||
|
|
||||||
|
// 查询参数封装
|
||||||
|
HqlPack.getNumEqualPack(rowId,"layoutRowId",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();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按顺序查询报表中的行
|
||||||
|
* @param layoutId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
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(),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…
Reference in New Issue