yun-zuoyi
王杰 5 years ago
parent 145fcac065
commit e1d133de61

@ -290,18 +290,20 @@ public class PtlPcnEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum TAG_LIGHT_COLOR_CMD {
TAG_LIGHT_COLOR_RED("00", "红"),
TAG_LIGHT_COLOR_GREEN("01", "绿"),
TAG_LIGHT_COLOR_ORANGE("02", "橙"),
TAG_LIGHT_COLOR_BLUE("03", "蓝"),
TAG_LIGHT_COLOR_PINK_RED("04", "粉红"),
TAG_LIGHT_COLOR_BLUE_GREEN("05", "蓝绿");
TAG_LIGHT_COLOR_RED("00", 0, "红"),
TAG_LIGHT_COLOR_GREEN("01", 1, "绿"),
TAG_LIGHT_COLOR_ORANGE("02", 2, "橙"),
TAG_LIGHT_COLOR_BLUE("03", 3, "蓝"),
TAG_LIGHT_COLOR_PINK_RED("04", 4, "粉红"),
TAG_LIGHT_COLOR_BLUE_GREEN("05", 5, "蓝绿");
private String code;
private Integer value;
private String description;
TAG_LIGHT_COLOR_CMD(String code, String description) {
TAG_LIGHT_COLOR_CMD(String code, Integer value, String description) {
this.code = code;
this.value = value;
this.description = description;
}
@ -314,10 +316,24 @@ public class PtlPcnEnumUtil {
return null;
}
public static String valueOf(int value) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == value) {
tmp = values()[i].code;
}
}
return tmp;
}
public String getCode() {
return code;
}
public Integer getValue() {
return value;
}
public String getDescription() {
return description;
}
@ -355,24 +371,26 @@ public class PtlPcnEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum FINISH_TAG_LIGHT_MUSIC_CMD {
FINISH_TAG_LIGHT_MUSIC_00H("00", "Jingle bells"),
FINISH_TAG_LIGHT_MUSIC_01H("01", "Carmen"),
FINISH_TAG_LIGHT_MUSIC_02H("02", "Happy Chinese new year"),
FINISH_TAG_LIGHT_MUSIC_03H("03", "Edelweiss"),
FINISH_TAG_LIGHT_MUSIC_04H("04", "Going home"),
FINISH_TAG_LIGHT_MUSIC_05H("05", "PAPALA"),
FINISH_TAG_LIGHT_MUSIC_06H("06", "Classical"),
FINISH_TAG_LIGHT_MUSIC_07H("07", "Listen to the rhythm of the falling rain"),
FINISH_TAG_LIGHT_MUSIC_08H("08", "Rock and roll"),
FINISH_TAG_LIGHT_MUSIC_09H("09", "Happy birthday"),
FINISH_TAG_LIGHT_MUSIC_0AH("0A", "Do Re Me"),
FINISH_TAG_LIGHT_MUSIC_0BH("0B", "Strauss");
FINISH_TAG_LIGHT_MUSIC_00H("00", 0, "Jingle bells"),
FINISH_TAG_LIGHT_MUSIC_01H("01", 1, "Carmen"),
FINISH_TAG_LIGHT_MUSIC_02H("02", 2, "Happy Chinese new year"),
FINISH_TAG_LIGHT_MUSIC_03H("03", 3, "Edelweiss"),
FINISH_TAG_LIGHT_MUSIC_04H("04", 4, "Going home"),
FINISH_TAG_LIGHT_MUSIC_05H("05", 5, "PAPALA"),
FINISH_TAG_LIGHT_MUSIC_06H("06", 6, "Classical"),
FINISH_TAG_LIGHT_MUSIC_07H("07", 7, "Listen to the rhythm of the falling rain"),
FINISH_TAG_LIGHT_MUSIC_08H("08", 8, "Rock and roll"),
FINISH_TAG_LIGHT_MUSIC_09H("09", 9, "Happy birthday"),
FINISH_TAG_LIGHT_MUSIC_0AH("0A", 10, "Do Re Me"),
FINISH_TAG_LIGHT_MUSIC_0BH("0B", 11, "Strauss");
private String code;
private Integer value;
private String description;
FINISH_TAG_LIGHT_MUSIC_CMD(String code, String description) {
FINISH_TAG_LIGHT_MUSIC_CMD(String code, Integer value, String description) {
this.code = code;
this.value = value;
this.description = description;
}
@ -385,10 +403,24 @@ public class PtlPcnEnumUtil {
return null;
}
public static String valueOf(int value) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == value) {
tmp = values()[i].code;
}
}
return tmp;
}
public String getCode() {
return code;
}
public Integer getValue() {
return value;
}
public String getDescription() {
return description;
}
@ -590,7 +622,7 @@ public class PtlPcnEnumUtil {
public enum MonitorProcessMessageType {
CONNECT_CONTROL_CMD(10, "CONNECT_CONTROL_CMD", "connectControlService", "连接控制器"),
DISCONNECT_CONTROL_CMD(20, "DISCONNECT_CONTROL_CMD", "disconnectControlService", "断开控制器"),
EXCEPTION__DISCONNECT_CONTROL_CMD(25, "EXCEPTION__DISCONNECT_CONTROL_CMD", "disconnectControlService", "断开控制器"),
EXCEPTION__DISCONNECT_CONTROL_CMD(25, "EXCEPTION_DISCONNECT_CONTROL_CMD", "disconnectControlService", "断开控制器"),
LIGHT_ON_CMD(30, "LIGHT_ON_CMD", "lightOnService", "亮灯命令"),
LIGHT_OFF_CMD(40, "LIGHT_OFF_CMD", "lightOffService", "灭灯命令"),
CONTROL_SIGNAL_CMD(50, "CONTROL_SIGNAL_CMD", "controlSignalService", "控制器反馈信号"),

Loading…
Cancel
Save