bug: [8533] plc数据类型改为枚举

yun-zuoyi
joke.wang 5 years ago
parent 6c7a88b962
commit e2ce63a9cd

@ -371,6 +371,7 @@ public class MesEnumUtil {
return valueOf(val); return valueOf(val);
} }
} }
/** /**
* JIS * JIS
*/ */
@ -5482,7 +5483,6 @@ public class MesEnumUtil {
} }
/** /**
* *
*/ */
@ -5730,4 +5730,42 @@ public class MesEnumUtil {
} }
} }
/**
* MES_PLC
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PLC_DATA_TYPE {
INT("int", "数字"),
STRING("string", "字符串"),
BOOLEAN("boolean", "布尔");
private String value;
private String description;
PLC_DATA_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
} }

Loading…
Cancel
Save