对象结构添加是否显示和显示顺序字段

yun-zuoyi
宋军超 5 years ago
parent 6bc9aa1f70
commit 716f0ac1f9

@ -991,6 +991,51 @@ public class MesEnumUtil {
} }
} }
/**
* Mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum OBJECT_CFG_IS_SHOW {
SHOW(1, "是"),
NO_SHOW(2, "否");
private int value;
private String description;
OBJECT_CFG_IS_SHOW(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 Integer descriptionOfValue(String description) {
Integer tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/** /**
* Mes * Mes

@ -58,6 +58,14 @@ public class MesObjectCfg extends BaseBean implements Serializable {
@ApiParam("是否保存 1存 2不存") @ApiParam("是否保存 1存 2不存")
private Integer isSave; private Integer isSave;
@Column(name = "SHOW_SEQ")
@ApiParam("显示顺序")
private Integer showSeq;
@Column(name = "IS_SHOW")
@ApiParam("是否显示")
private Integer isShow;
@Transient @Transient
@ApiParam("是否存储名") @ApiParam("是否存储名")
private String isSaveName; private String isSaveName;

Loading…
Cancel
Save