diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java index 0be07d0..bb07db9 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java @@ -6966,4 +6966,76 @@ public class WmsEnumUtil { return tmp; } } + + + /** + * 软适配数据类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SOFT_DATA_FORM { + XML(10, "XML", "XML"), JSON(20, "JSON", "JSON"); + private int value; + private String code; + private String description; + + SOFT_DATA_FORM(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getCode() { + return code; + } + + 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 String valueOfDescription(int val) { + return valueOf(val); + } + + public static int descriptionOfValue(String desc) { + return descOf(desc); + } + + + 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; + } + + public static SOFT_DATA_FORM codeOf(Integer value) { + if (value == null) { + return null; + } else { + for (int i = 0; i < values().length; i++) { + if (values()[i].value == value) { + return values()[i]; + } + } + } + return null; + } + } } diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dbinterface/WmsInterfaceDataMapper.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dbinterface/WmsInterfaceDataMapper.java index 48203e8..2541e40 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dbinterface/WmsInterfaceDataMapper.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/dbinterface/WmsInterfaceDataMapper.java @@ -1,10 +1,14 @@ package cn.estsh.i3plus.pojo.wms.dbinterface; +import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import org.hibernate.annotations.ColumnDefault; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; @@ -159,4 +163,14 @@ public class WmsInterfaceDataMapper extends BaseBean { */ @Column(name = "USE_SCRIPT_FILTER") public Integer useScriptFilter; + + + /** + * 数据格式类型 + */ + @Column(name = "SOFT_DATA_TYPE") + @ApiParam(value = "数据格式类型") + @ColumnDefault("10") + @AnnoOutputColumn(refClass = WmsEnumUtil.SOFT_DATA_FORM.class, refForeignKey = "value", value = "description", required = false) + public Integer softDataType; }