yun-zuoyi
zhang.xw 2 years ago
commit 8614928368

@ -12,6 +12,182 @@ import java.util.Objects;
* @Modify: * @Modify:
**/ **/
public class BlockFormEnumUtil { public class BlockFormEnumUtil {
/**
* common
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum FORM_SCRIPT_TYPE {
SAVE(1, "save", "保存"),
UPDATE(2, "update", "更新"),
DELETE(3, "delete", "删除"),
QUERY(4, "query", "查询"),
EXPORT(5, "export", "导出"),
IMPORT(6, "import", "导入"),
COMMON(7,"common","普通操作");
private int value;
private String type;
private String description;
FORM_SCRIPT_TYPE(int value, String type, String description) {
this.value = value;
this.type = type;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return type;
}
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].type;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].type.toLowerCase().equals(code.toLowerCase())) {
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 FORM_SCRIPT_TYPE valueOf(int val) {
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].type.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum FORM_SCRIPT_FUN_TYPE {
BEFORE_SAVE(1, "beforeSave", "保存前执行"),
AFTER_SAVE(2, "afterSave", "保存后执行"),
BEFORE_UPDATE(3, "beforeUpdate", "更新前执行"),
AFTER_UPDATE(4, "afterUpdate", "更新后执行"),
BEFORE_DELETE(5, "beforeDelete", "删除前执行"),
AFTER_DELETE(6, "afterDelete", "删除后执行"),
BEFORE_QUERY(7, "beforeQuery", "查询前执行"),
AFTER_QUERY(8, "afterQuery", "查询后执行"),
BEFORE_EXPORT(9, "beforeExport", "导出前执行"),
AFTER_EXPORT(10, "afterExport", "导出后执行"),
BEFORE_IMPORT(11, "beforeImport", "导入前执行"),
AFTER_IMPORT(12, "afterImport", "导入后执行");
private int value;
private String funName;
private String description;
FORM_SCRIPT_FUN_TYPE(int value, String funName, String description) {
this.value = value;
this.funName = funName;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return funName;
}
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].funName;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].funName.toLowerCase().equals(code.toLowerCase())) {
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 FORM_SCRIPT_FUN_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].funName.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/** /**
* *
@ -1916,6 +2092,7 @@ public class BlockFormEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum BUTTON_TRIGGER_EFFECT { public enum BUTTON_TRIGGER_EFFECT {
SCRIPT(60,"SCRIPT","执行脚本"),
DIALOG(10, "DIALOG", "弹出窗口"), DIALOG(10, "DIALOG", "弹出窗口"),
NEW_WINDOW(20, "NEW_WINDOW", "新开窗口"), NEW_WINDOW(20, "NEW_WINDOW", "新开窗口"),
SQL(30, "SQL", "执行SQL"), SQL(30, "SQL", "执行SQL"),

@ -74,4 +74,12 @@ public class BfButton extends BaseBean {
@Column(name = "BUTTON_DESCRIPTION") @Column(name = "BUTTON_DESCRIPTION")
@ApiParam(value = "按钮描述") @ApiParam(value = "按钮描述")
private String buttonDescription; private String buttonDescription;
@Column(name = "FUN_NAME")
@ApiParam(value = "groovy脚本时的方法名")
private String funName;
@Column(name = "SCRIPT_NO")
@ApiParam(value = "脚本No")
private String scriptNo;
} }

@ -125,6 +125,9 @@ public class BfDataObjectProperty extends BaseBean {
@ApiParam(value ="属性描述") @ApiParam(value ="属性描述")
private String propertyDescription; private String propertyDescription;
@Column(name = "REF_TABLE_NAME")
@ApiParam(value ="字段来源的表名--可空,如果自定义对象不可空")
private String refTableName;
@Transient @Transient
@ApiParam(value ="默认查询条件") @ApiParam(value ="默认查询条件")
private Integer objectColumnCustomWhere; private Integer objectColumnCustomWhere;

@ -54,27 +54,27 @@ public class BfElement extends BaseBean {
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long elementPropertyPrimaryKey; private Long elementPropertyPrimaryKey;
@Column(name="ELEMENT_PROPERTY_PRIMARY_KEY_NAME_RDD") @Column(name = "ELEMENT_PROPERTY_PRIMARY_KEY_NAME_RDD")
@ApiParam(value ="元素主键Key名称") @ApiParam(value = "元素主键Key名称")
private String elementPropertyPrimaryKeyNameRdd; private String elementPropertyPrimaryKeyNameRdd;
@Column(name="ELEMENT_TYPE") @Column(name = "ELEMENT_TYPE")
@ApiParam(value ="元素类型") @ApiParam(value = "元素类型")
private Integer elementType; private Integer elementType;
@Column(name="ELEMENT_NAME") @Column(name = "ELEMENT_NAME")
@ApiParam(value ="元素名称") @ApiParam(value = "元素名称")
private String elementName; private String elementName;
@Column(name="ELEMENT_CODE") @Column(name = "ELEMENT_CODE")
@ApiParam(value ="元素编码") @ApiParam(value = "元素编码")
private String elementCode; private String elementCode;
@Column(name = "IS_OBJECT_ADD") @Column(name = "IS_OBJECT_ADD")
@ApiParam(value = "是否新增") @ApiParam(value = "是否新增")
private Integer isObjectAdd; private Integer isObjectAdd;
public boolean isObjectAdd(){ public boolean isObjectAdd() {
return isObjectAdd != null && isObjectAdd == BlockFormEnumUtil.ELEMENT_ADD_STATUS.ON.getValue(); return isObjectAdd != null && isObjectAdd == BlockFormEnumUtil.ELEMENT_ADD_STATUS.ON.getValue();
} }
@ -82,7 +82,7 @@ public class BfElement extends BaseBean {
@ApiParam(value = "是否编辑") @ApiParam(value = "是否编辑")
private Integer isObjectEdit; private Integer isObjectEdit;
public boolean isObjectEdit(){ public boolean isObjectEdit() {
return isObjectEdit != null && isObjectEdit == BlockFormEnumUtil.ELEMENT_EDIT_STATUS.ON.getValue(); return isObjectEdit != null && isObjectEdit == BlockFormEnumUtil.ELEMENT_EDIT_STATUS.ON.getValue();
} }
@ -90,7 +90,7 @@ public class BfElement extends BaseBean {
@ApiParam(value = "是否删除") @ApiParam(value = "是否删除")
private Integer isObjectDel; private Integer isObjectDel;
public boolean isObjectDel(){ public boolean isObjectDel() {
return isObjectDel != null && isObjectDel == BlockFormEnumUtil.ELEMENT_DEL_STATUS.ON.getValue(); return isObjectDel != null && isObjectDel == BlockFormEnumUtil.ELEMENT_DEL_STATUS.ON.getValue();
} }
@ -98,11 +98,11 @@ public class BfElement extends BaseBean {
@ApiParam(value = "是否弱删除") @ApiParam(value = "是否弱删除")
private Integer isObjectDelWeak; private Integer isObjectDelWeak;
public boolean isObjectDelWeak(){ public boolean isObjectDelWeak() {
return isObjectDelWeak != null && isObjectDelWeak == BlockFormEnumUtil.ELEMENT_DELETE_WEAK_STATUS.ON.getValue(); return isObjectDelWeak != null && isObjectDelWeak == BlockFormEnumUtil.ELEMENT_DELETE_WEAK_STATUS.ON.getValue();
} }
public Integer getIsObjectDelWeakVal(){ public Integer getIsObjectDelWeakVal() {
return isObjectDelWeak == null ? BlockFormEnumUtil.ELEMENT_DELETE_WEAK_STATUS.OFF.getValue() : isObjectDelWeak.intValue(); return isObjectDelWeak == null ? BlockFormEnumUtil.ELEMENT_DELETE_WEAK_STATUS.OFF.getValue() : isObjectDelWeak.intValue();
} }
@ -114,11 +114,11 @@ public class BfElement extends BaseBean {
@ApiParam(value = "是否有效") @ApiParam(value = "是否有效")
private Integer isObjectValid; private Integer isObjectValid;
public Integer getIsObjectValidVal(){ public Integer getIsObjectValidVal() {
return isObjectValid == null ? BlockFormEnumUtil.ELEMENT_VALID_STATUS.OFF.getValue() : isObjectValid.intValue(); return isObjectValid == null ? BlockFormEnumUtil.ELEMENT_VALID_STATUS.OFF.getValue() : isObjectValid.intValue();
} }
public boolean isObjectValid(){ public boolean isObjectValid() {
return isObjectValid != null && isObjectValid == BlockFormEnumUtil.ELEMENT_VALID_STATUS.ON.getValue(); return isObjectValid != null && isObjectValid == BlockFormEnumUtil.ELEMENT_VALID_STATUS.ON.getValue();
} }
@ -130,13 +130,14 @@ public class BfElement extends BaseBean {
@ApiParam(value = "是否组织隔离") @ApiParam(value = "是否组织隔离")
private Integer isOrganizeIsolation; private Integer isOrganizeIsolation;
public Integer getIsOrganizeIsolationVal(){ public Integer getIsOrganizeIsolationVal() {
return isOrganizeIsolation == null ? BlockFormEnumUtil.ELEMENT_ORGANIZE_ISOLATION_STATUS.OFF.getValue() : isOrganizeIsolation.intValue(); return isOrganizeIsolation == null ? BlockFormEnumUtil.ELEMENT_ORGANIZE_ISOLATION_STATUS.OFF.getValue() : isOrganizeIsolation.intValue();
} }
public boolean isOrganizeIsolation(){ public boolean isOrganizeIsolation() {
return isOrganizeIsolation != null && isOrganizeIsolation == BlockFormEnumUtil.ELEMENT_ORGANIZE_ISOLATION_STATUS.ON.getValue(); return isOrganizeIsolation != null && isOrganizeIsolation == BlockFormEnumUtil.ELEMENT_ORGANIZE_ISOLATION_STATUS.ON.getValue();
} }
@Column(name = "ELEMENT_ORGANIZE_ISOLATION_ATTR_ID") @Column(name = "ELEMENT_ORGANIZE_ISOLATION_ATTR_ID")
@ApiParam(value = "组织隔离属性id") @ApiParam(value = "组织隔离属性id")
private Long elementOrganizeIsolationAttrId; private Long elementOrganizeIsolationAttrId;
@ -158,33 +159,53 @@ public class BfElement extends BaseBean {
@ApiParam(value = "是否导入") @ApiParam(value = "是否导入")
private Integer isObjectImport; private Integer isObjectImport;
@Column(name="ELEMENT_SORT_ATTR_ID") @Column(name = "ELEMENT_SORT_ATTR_ID")
@ApiParam(value ="默认排序属性") @ApiParam(value = "默认排序属性")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long elementSortAttrId; private Long elementSortAttrId;
@Column(name="ELEMENT_SORT_ATTR_CODE_RDD") @Column(name = "ELEMENT_SORT_ATTR_CODE_RDD")
@ApiParam(value ="默认排序属性名称") @ApiParam(value = "默认排序属性名称")
private String elementSortAttrCodeRdd; private String elementSortAttrCodeRdd;
@Column(name="ELEMENT_SORT_ATTR_TYPE") @Column(name = "ELEMENT_SORT_ATTR_TYPE")
@ApiParam(value ="默认排序规则") @ApiParam(value = "默认排序规则")
private Integer elementSortAttrType; private Integer elementSortAttrType;
// @Lob // @Lob
@Column(name="ELEMENT_CSS_STYLE") @Column(name = "ELEMENT_CSS_STYLE")
@ApiParam(value ="元素样式") @ApiParam(value = "元素样式")
private String elementCssStyle; private String elementCssStyle;
// @Lob // @Lob
@Column(name="ELEMENT_FORMATTER") @Column(name = "ELEMENT_FORMATTER")
@ApiParam(value ="元素格式化") @ApiParam(value = "元素格式化")
private String elementFormatter; private String elementFormatter;
@Column(name="ELEMENT_DESCRIPTION") @Column(name = "ELEMENT_DESCRIPTION")
@ApiParam(value ="元素描述") @ApiParam(value = "元素描述")
private String elementDescription; private String elementDescription;
/**
*
* 1: true,
* 2: false,
*/
@Column(name = "CUSTOM_ELEMENT")
@ApiParam(value = "自定义元素")
private Integer customElement;
/**
* BlockFormEnumUtil.FORM_SCRIPT_FUN_TYPE ,
*/
@Column(name = "SCRIPT_EXECUTE_POSITION")
@ApiParam(value = "执行脚本的位置,取值为枚举")
private String scriptExecutePosition;
@Column(name = "SCRIPT_NO")
@ApiParam(value = "脚本No")
private String scriptNo;
@Transient @Transient
@ApiParam(value = "数据对象") @ApiParam(value = "数据对象")
private BfDataObject dataObject; private BfDataObject dataObject;

@ -166,7 +166,7 @@
<dependency> <dependency>
<groupId>org.apache.shiro</groupId> <groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId> <artifactId>shiro-core</artifactId>
<version>1.4.0</version> <version>1.10.1</version>
</dependency> </dependency>

Loading…
Cancel
Save