yun-zuoyi
许心洁 6 years ago
commit 79cf6401a4

@ -124,7 +124,7 @@ public class AndonEnumUtil {
/**
*
* =10 =20 =3040-50-
* 10 = 20 = 30 = 40 = 50 = ,60 = 70 =
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ANDON_ACTION_FLAG{
@ -293,4 +293,31 @@ public class AndonEnumUtil {
return description;
}
}
/**
*
* 10-20-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum NOTICE_WAYS{
SMS("10","短信"),
EMAIL("20","邮箱");
private String value;
private String description;
NOTICE_WAYS(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
}

@ -14,85 +14,6 @@ import java.util.List;
**/
public class BlockReportEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SOFT_TYPE {
CORE(2, "i3core", "i3业务平台");
private int value;
private String code;
private String description;
private SOFT_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(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) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static SOFT_TYPE valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
return values()[i];
}
}
return null;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*

Loading…
Cancel
Save