|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
package cn.estsh.i3plus.pojo.base.enumutil;
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Description :
|
|
|
|
|
* @Reference :
|
|
|
|
@ -8,4 +10,70 @@ package cn.estsh.i3plus.pojo.base.enumutil;
|
|
|
|
|
* @Modify:
|
|
|
|
|
**/
|
|
|
|
|
public class WmsEnumUtil {
|
|
|
|
|
/**
|
|
|
|
|
* 消息队列,队列名称
|
|
|
|
|
* 1: success_queue
|
|
|
|
|
* 2: fail_queue
|
|
|
|
|
*/
|
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
|
|
|
|
public enum QUEUE_NAME{
|
|
|
|
|
|
|
|
|
|
SUCCESS_QUEUE(1,"success_queue","成功消息队列"),
|
|
|
|
|
FAIL_QUEUE(1,"fail_queue","成功消息队列");
|
|
|
|
|
|
|
|
|
|
private int value;
|
|
|
|
|
private String name;
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
QUEUE_NAME() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QUEUE_NAME(int value, String name, String description) {
|
|
|
|
|
this.value = value;
|
|
|
|
|
this.name = name;
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getValue() {
|
|
|
|
|
return value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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].name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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 String codeOfDescription(String code) {
|
|
|
|
|
String tmp = null;
|
|
|
|
|
for (int i = 0; i < values().length; i++) {
|
|
|
|
|
if (values()[i].name.equals(code)) {
|
|
|
|
|
tmp = values()[i].description;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|