|
|
|
@ -2548,4 +2548,255 @@ public class BlockFormEnumUtil {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 脚本语言类型
|
|
|
|
|
* 10=Groovy, 20=Jython, 30=JavaScript, 40=Scala, 50=JRuby
|
|
|
|
|
*/
|
|
|
|
|
public enum LANGUAGE_TYPE {
|
|
|
|
|
GROOVY(1, "Groovy", 10),
|
|
|
|
|
PYTHON(2, "jython", 20), // "jython" string can not change
|
|
|
|
|
JS(3, "JavaScript", 30);
|
|
|
|
|
// 下面这2种语言没人会写,暂不支持
|
|
|
|
|
//SCALA(40,"scala"),
|
|
|
|
|
//JRUBY(50,"jruby");
|
|
|
|
|
|
|
|
|
|
private int index;
|
|
|
|
|
private String description;
|
|
|
|
|
private int value;
|
|
|
|
|
|
|
|
|
|
LANGUAGE_TYPE(int index, String description, int value) {
|
|
|
|
|
this.index = index;
|
|
|
|
|
this.description = description;
|
|
|
|
|
this.value = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getIndex() {
|
|
|
|
|
return this.index;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据枚举编号获取语言代码
|
|
|
|
|
public static String getCodeByIndex(Integer index) {
|
|
|
|
|
for (BlockFormEnumUtil.LANGUAGE_TYPE languageType : BlockFormEnumUtil.LANGUAGE_TYPE.values()) {
|
|
|
|
|
if (languageType.getValue() == index) {
|
|
|
|
|
return languageType.getDescription();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 系统参数类型
|
|
|
|
|
* 1.SYSTEM:系统参数
|
|
|
|
|
* 2.BUSI:业务参数
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum BLOCK_FORM_CONFIG_TYPE {
|
|
|
|
|
|
|
|
|
|
SYSTEM(10, "系统参数", "系统参数"),
|
|
|
|
|
BUSI(20, "业务参数", "业务参数");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String name;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
BLOCK_FORM_CONFIG_TYPE(int value, String name, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.name = name;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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].name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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 String codeOfDescription(String code) {
|
|
|
|
|
String tmp = null;
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
if (values()[i].name.equals(code)) {
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 脚本类型
|
|
|
|
|
* 10=组件脚本,20=表单脚本,30=报表脚本,40=JOB脚本,50=其他脚本
|
|
|
|
|
*/
|
|
|
|
|
public enum SCRIPT_TYPE {
|
|
|
|
|
MODUAL(10, "Modual", "组件脚本"),
|
|
|
|
|
FORM(20, "Form", "表单脚本"),
|
|
|
|
|
REPORT(30, "Report", "报表脚本"),
|
|
|
|
|
JOB(40, "Job", "JOB脚本"),
|
|
|
|
|
OTHER(50, "Other", "其他脚本");
|
|
|
|
|
|
|
|
|
|
private String description;
|
|
|
|
|
private int value;
|
|
|
|
|
private String code;
|
|
|
|
|
|
|
|
|
|
SCRIPT_TYPE(int value, String code, String description) {
|
|
|
|
|
this.description = description;
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.code = code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getCode() {
|
|
|
|
|
return this.code;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getIndex() {
|
|
|
|
|
return this.value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 系统参数类型
|
|
|
|
|
* 1.SYSTEM:系统参数
|
|
|
|
|
* 2.BUSI:业务参数
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum CONFIG_TYPE {
|
|
|
|
|
|
|
|
|
|
SYSTEM(10, "系统参数", "系统参数"),
|
|
|
|
|
BUSI(20, "业务参数", "业务参数");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String name;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
CONFIG_TYPE(int value, String name, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.name = name;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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].name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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 String codeOfDescription(String code) {
|
|
|
|
|
String tmp = null;
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
if (values()[i].name.equals(code)) {
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 系统配置值类型
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum CONFIG_VALUE_TYPE {
|
|
|
|
|
CHECKLIST(10, "可选列表"),
|
|
|
|
|
NUMBER(20, "数字"),
|
|
|
|
|
STRING(30, "字符串");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
CONFIG_VALUE_TYPE(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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|