diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java index 14ef7d8..b240568 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/BlockFormEnumUtil.java @@ -17,7 +17,8 @@ public class BlockFormEnumUtil { @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum FORM_TABLE_TYPE { TABLE(1, "TABLE", "表"), - VIEW(2, "VIEW", "视图"); + VIEW(2, "VIEW", "视图"), + PROCEDURE(3, "PROCEDURE", "存储过程"); private int value; private String code; @@ -2347,4 +2348,53 @@ public class BlockFormEnumUtil { } } + /** + * 存储过程列类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PROCEDURE_COL_TYPE { + IN_PARAM(1, "入参"), + INOUT_PARAM(2, "出入参"), +// ?(3, "按钮"), + OUT_PARAM(4, "出参"), + RETURN_PARAM(5, "返回值"); + + private int value; + private String description; + + private PROCEDURE_COL_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; + } + + public static PROCEDURE_COL_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; + } + } + } diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObject.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObject.java index 5d5f78a..917912c 100644 --- a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObject.java +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObject.java @@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.form.bean; import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.BlockFormEnumUtil; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.Api; @@ -61,6 +62,7 @@ public class BfDataObject extends BaseBean { @ApiParam(value ="表状态(是否同步)") private Integer objectStatus; + @AnnoOutputColumn(refClass = BlockFormEnumUtil.FORM_TABLE_TYPE.class) @Column(name="OBJECT_TYPE") @ApiParam(value ="数据类型") private Integer objectType; diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectProperty.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectProperty.java index c12f8d0..bd99d69 100644 --- a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectProperty.java +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfDataObjectProperty.java @@ -52,6 +52,11 @@ public class BfDataObjectProperty extends BaseBean { @ApiParam(value ="数据对象列名称") private String objectColumnName; + // 暂用来区分存储过程出入参数信息 + @Column(name="OTHER_COLUMN_TYPE") + @ApiParam(value ="其他列类型") + private Integer otherColumnType; + @Column(name="OBJECT_COLUMN_TYPE") @ApiParam(value ="数据对象类型") private Integer objectColumnType; diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElement.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElement.java index 29d0044..3dcf892 100644 --- a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElement.java +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElement.java @@ -72,18 +72,34 @@ public class BfElement extends BaseBean { @ApiParam(value = "是否新增") private Integer isObjectAdd; + public boolean isObjectAdd(){ + return isObjectAdd != null && isObjectAdd == BlockFormEnumUtil.ELEMENT_ADD_STATUS.ON.getValue(); + } + @Column(name = "IS_OBJECT_EDIT") @ApiParam(value = "是否编辑") private Integer isObjectEdit; + public boolean isObjectEdit(){ + return isObjectEdit != null && isObjectEdit == BlockFormEnumUtil.ELEMENT_EDIT_STATUS.ON.getValue(); + } + @Column(name = "IS_OBJECT_DEL") @ApiParam(value = "是否删除") private Integer isObjectDel; + public boolean isObjectDel(){ + return isObjectDel != null && isObjectDel == BlockFormEnumUtil.ELEMENT_DEL_STATUS.ON.getValue(); + } + @Column(name = "IS_OBJECT_DEL_WEAK") @ApiParam(value = "是否弱删除") private Integer isObjectDelWeak; + public boolean isObjectDelWeak(){ + return isObjectDelWeak != null && isObjectDelWeak == BlockFormEnumUtil.ELEMENT_DELETE_WEAK_STATUS.ON.getValue(); + } + public Integer getIsObjectDelWeakVal(){ return isObjectDelWeak == null ? BlockFormEnumUtil.ELEMENT_DELETE_WEAK_STATUS.OFF.getValue() : isObjectDelWeak.intValue(); } @@ -100,6 +116,10 @@ public class BfElement extends BaseBean { return isObjectValid == null ? BlockFormEnumUtil.ELEMENT_VALID_STATUS.OFF.getValue() : isObjectValid.intValue(); } + public boolean isObjectValid(){ + return isObjectValid != null && isObjectValid == BlockFormEnumUtil.ELEMENT_VALID_STATUS.ON.getValue(); + } + @Column(name = "ELEMENT_VALID_ATTR_ID") @ApiParam(value = "元素有效属性id") private Long elementValidAttrId; @@ -112,6 +132,10 @@ public class BfElement extends BaseBean { return isOrganizeIsolation == null ? BlockFormEnumUtil.ELEMENT_ORGANIZE_ISOLATION_STATUS.OFF.getValue() : isOrganizeIsolation.intValue(); } + public boolean isOrganizeIsolation(){ + return isOrganizeIsolation != null && isOrganizeIsolation == BlockFormEnumUtil.ELEMENT_ORGANIZE_ISOLATION_STATUS.ON.getValue(); + } + @Column(name = "IS_OBJECT_EXPORT") @ApiParam(value = "是否导出") private Integer isObjectExport; diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/SqlProcedureColumnModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/SqlProcedureColumnModel.java new file mode 100644 index 0000000..ece72ff --- /dev/null +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/SqlProcedureColumnModel.java @@ -0,0 +1,64 @@ +package cn.estsh.i3plus.pojo.model.form; + +import io.swagger.annotations.ApiParam; +import lombok.Data; + +/** + * @Description : 存储过程列模型 + * @Reference : + * @Author : yunhao + * @CreateDate : 2020-10-21 19:00 + * @Modify: + **/ +@Data +public class SqlProcedureColumnModel { + + @ApiParam(value = "过程") + private String procedureCat; + + @ApiParam(value = "过程方案") + private String procedureSchem; + + @ApiParam(value = "过程名称") + private String procedureName; + + @ApiParam(value = "列名") + private String columnName; + + /** + * 1是入参 + * 2是出入参 + * 3是? + * 4是出参 + * 5是返回值(函数) + */ + @ApiParam(value = "列类型") + private Integer columnType; + + @ApiParam(value = "数据类型") + private Integer dataType; + + @ApiParam(value = "数据类型名称") + private String typeName; + + @ApiParam(value = "长度") + private Integer length; + + @ApiParam(value = "精度") + private Integer scale; + + @ApiParam(value = "是否允许为空") + private Integer nullable; + + @ApiParam(value = "备注") + private String remarks; + + /** + * 0为返回值 + * 1为首位 + */ + @ApiParam(value = "顺序位置") + private Integer ordinalPosition; + + +}