添加基础数据枚举

yun-zuoyi
宋军超 5 years ago
parent 60ad38649d
commit 896bd9b35b

@ -1,5 +1,7 @@
package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* @author Wynne.Lu
* @date 2020/2/12 17:41
@ -7,4 +9,325 @@ package cn.estsh.i3plus.pojo.base.enumutil;
*/
public class PtlEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_TAG_TYPE {
LOCATION_TAG(10, "库位标签"),
COMPLATE_TAG(20, "完成器标签"),
TAG_MONITOR(30, "标签显示器"),
TAG_SCAN_INTERFACE(40, "标签扫描接口");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private PTL_TAG_TYPE(int value, String description) {
this.value = value;
this.description = 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_LIGHT_STATUS {
LIGHT_OFF(10, "灭灯"),
COMPLATE_ON(20, "亮点");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private PTL_LIGHT_STATUS(int value, String description) {
this.value = value;
this.description = 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_TAG_STATUS {
NORMAL(10, "正常"),
UNAVAILABLE(20, "不可用");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private PTL_TAG_STATUS(int value, String description) {
this.value = value;
this.description = 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_LIGHT_MODE {
LIGHT(10, "常亮"),
TWINKLE(20, "闪烁");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private PTL_LIGHT_MODE(int value, String description) {
this.value = value;
this.description = 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_LIGHT_COLOR {
WHITE(10, "白色"),
RED(20, "红色"),
GREEN(30, "绿色"),
BLUE(40, "蓝色"),
YELLOW(50, "黄色");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private PTL_LIGHT_COLOR(int value, String description) {
this.value = value;
this.description = 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_IS_BUZZING {
YES(1, "是"),
NO(2, "否");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private PTL_IS_BUZZING(int value, String description) {
this.value = value;
this.description = 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_CONTROL_TYPE {
ATOP(10, "上尚"),
AIOI(20, "爱欧");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private PTL_CONTROL_TYPE(int value, String description) {
this.value = value;
this.description = 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_CONTROL_STATUS {
CONNECT(10, "连接"),
BREAK(20, "断开");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private PTL_CONTROL_STATUS(int value, String description) {
this.value = value;
this.description = 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;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PTL_PART_TYPE {
RAW_MATERIAL(10, "原材料"),
PARTIALLY_PREPARED_PRODUCTS(20, "半成品"),
FINISHED_PRODUCT(30, "成品");
private int value;
private String description;
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
private PTL_PART_TYPE(int value, String description) {
this.value = value;
this.description = 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;
}
}
}

@ -43,7 +43,7 @@ public class PtlPart extends BaseBean implements Serializable {
@Column(name = "PART_TYPE")
@ApiParam("物料类型")
@DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.TEXT)
@DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.SELECT, enumName = "PTL_PART_TYPE")
private String partType;
@Column(name = "UNIT")

@ -64,7 +64,7 @@ public class PtlTag extends BaseBean implements Serializable {
@Column(name = "TAG_TYPE")
@ApiParam("标签类型")
@DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.TEXT)
@DynamicField(webFieldType = WmsEnumUtil.FIELD_TYPE.SELECT, enumName = "PTL_TAG_TYPE")
private Integer tagType;
@Column(name = "LIGHT_STATUS")

Loading…
Cancel
Save