|
|
|
@ -947,21 +947,24 @@ public class AndonEnumUtil {
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum ALARM_TYPE {
|
|
|
|
|
PART("PART_ALARM", 110060104, "物料"),
|
|
|
|
|
QUALITY("QUALITY_ALARM", 110060105, "质量"),
|
|
|
|
|
EQUIP("EQUMENT_ALARM", 110060106, "设备"),
|
|
|
|
|
PROCESS("ROUTING_ALARM", 110060107, "工艺"),
|
|
|
|
|
CHECK("OTHER_ALARM", 110060108, "自处理"),
|
|
|
|
|
FIX_ERROR("FIX_ERROR", 110060109, "自动报警");
|
|
|
|
|
//下面的顺序不要更改,packBrokenTimeTypeRatioList方法有用到此枚举的顺序
|
|
|
|
|
EQUIP("EQUMENT_ALARM", 110060106, "设备", "#D06D6A"),
|
|
|
|
|
QUALITY("QUALITY_ALARM", 110060105, "质量", "#9084FF"),
|
|
|
|
|
PART("PART_ALARM", 110060104, "物料", "#24BDBA"),
|
|
|
|
|
PROCESS("ROUTING_ALARM", 110060107, "工艺", "#2B97F9"),
|
|
|
|
|
CHECK("OTHER_ALARM", 110060108, "自处理", "#EAA510"),
|
|
|
|
|
FIX_ERROR("FIX_ERROR", 110060109, "自动报警", "#797B7F");
|
|
|
|
|
|
|
|
|
|
private String value;
|
|
|
|
|
private Integer code;
|
|
|
|
|
private String description;
|
|
|
|
|
private String colour;
|
|
|
|
|
|
|
|
|
|
ALARM_TYPE(String value, Integer code, String description) {
|
|
|
|
|
ALARM_TYPE(String value, Integer code, String description, String colour) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.code = code;
|
|
|
|
|
this.description = description;
|
|
|
|
|
this.colour = colour;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getValue() {
|
|
|
|
@ -976,6 +979,10 @@ public class AndonEnumUtil {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getColour() {
|
|
|
|
|
return colour;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String valueOfDescription(String val) {
|
|
|
|
|
String tmp = null;
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
@ -995,6 +1002,16 @@ public class AndonEnumUtil {
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String colourOfValue(String val) {
|
|
|
|
|
String tmp = null;
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
if (StringUtils.equalsIgnoreCase(values()[i].value, val)) {
|
|
|
|
|
tmp = values()[i].colour;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|