mest条码生成规则最大值是否循环枚举

yun-zuoyi
王杰 6 years ago
parent b375983304
commit 3b3ddd581a

@ -12,6 +12,42 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil { public class MesEnumUtil {
/** /**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum NUMBER_RULE_ISCYCLE {
TRUE(1, "是"),
FALSE(2, "否");
private int value;
private String description;
NUMBER_RULE_ISCYCLE(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;
}
}
/**
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)

Loading…
Cancel
Save