dev
王杰 2 years ago
parent 22831a30c7
commit 45964e9f4a

@ -3395,4 +3395,112 @@ public class MesPcnExtEnumUtil {
return tmp; return tmp;
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MC_RECORD_SN_STATUS {
CREATE(10, "上线"),
OFFLINE(20, "下线");
private int value;
private String description;
MC_RECORD_SN_STATUS(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 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 MC_RECORD_SN_STATUS getByValue(int value) {
for (MC_RECORD_SN_STATUS produceSnStatus : values()) {
if (produceSnStatus.getValue() == value) {
return produceSnStatus;
}
}
return null;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MC_RECORD_SN_QC_STATUS {
TRUE(10, "合格"),
FALSE(20, "不合格");
private int value;
private String description;
MC_RECORD_SN_QC_STATUS(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 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 MC_RECORD_SN_QC_STATUS getByValue(int value) {
for (MC_RECORD_SN_QC_STATUS produceSnStatus : values()) {
if (produceSnStatus.getValue() == value) {
return produceSnStatus;
}
}
return null;
}
}
} }

Loading…
Cancel
Save