【11964 19048-喷涂抛光报表变更-20201021】

yun-zuoyi
陈思洁 5 years ago
parent 4e013a7ef0
commit 3dc951c34f

@ -7972,4 +7972,81 @@ public class MesEnumUtil {
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum BAD_HANDLE_TYPE {
BACK_SPRAY(10, "BACK_SPRAY", "返喷"),
SCRAPPED(20, "SCRAPPED", "报废"),
POLISHING(30, "POLISHING", "抛光"),
DETERMIND(40, "DETERMIND", "待定");
private int value;
private String code;
private String description;
BAD_HANDLE_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
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 int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static int codeOf(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
public static String codeOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -39,4 +39,7 @@ public class MgnPaintPolishingReportModel {
@ApiParam("组织代码")
private String organizeCode;
@ApiParam("不良处理类型")
private String defectActionType;
}

Loading…
Cancel
Save