feat:添加条码解析校验模式

yun-zuoyi
汪云昊 5 years ago
parent a5d7ff1ef4
commit 103137e2fc

@ -2606,4 +2606,53 @@ public class CommonEnumUtil {
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum BARCODE_CHECK_MODE {
SEPARATOR_NUM(10, "分割数"),
ANALYTIC_NUM(20, "解析数"),
WEAK(30, "弱校验");
private int value;
private String description;
BARCODE_CHECK_MODE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return 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;
}
public static Integer descriptionOfValue(String desc) {
Integer tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
}

Loading…
Cancel
Save