ptl pojo init
parent
73af305576
commit
3bed5974f6
@ -0,0 +1,10 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.base.enumutil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Wynne.Lu
|
||||||
|
* @date 2020/2/12 17:41
|
||||||
|
* @desc
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class PtlEnumUtil {
|
||||||
|
}
|
@ -0,0 +1,181 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.base.enumutil;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Wynne.Lu
|
||||||
|
* @date 2020/2/12 17:41
|
||||||
|
* @desc
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class PtlPcnEnumUtil {
|
||||||
|
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum RouteEvent {
|
||||||
|
TRIGGER(10, "trigger", "触发"),
|
||||||
|
ENTRY(20, "entry", "进入状态"),
|
||||||
|
EXIT(30, "exit", "离开状态");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
RouteEvent(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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum RouteState {
|
||||||
|
START(10, "START", "开启流程"),
|
||||||
|
TERMINATE(20, "TERMINATE", "终止流程"),
|
||||||
|
FINISH(30, "FINISH", "结束流程");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
RouteState(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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum TagType {
|
||||||
|
BIN_TAG(10, "库位标签"),
|
||||||
|
FINALIZER_TAG(20, "完成器标签"),
|
||||||
|
SCREEN_TAG(30, "标签显示器"),
|
||||||
|
TAG_SCAN_API(40, "标签扫描接口");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
TagType(int value, String description) {
|
||||||
|
this.value = value;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum TriggerType {
|
||||||
|
INNER_TRIGGER(10, "内部触发"),
|
||||||
|
OUTER_TRIGGER(20, "外部触发");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
TriggerType(int value, String description) {
|
||||||
|
this.value = value;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum RouteType {
|
||||||
|
GEN_TASK(10, "生成任务"),
|
||||||
|
OFF_TAG(20, "灭灯");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
RouteType(int value, String description) {
|
||||||
|
this.value = value;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
|
||||||
|
public enum MonitorProcessMessageType {
|
||||||
|
CONNECT_CONTROL(10, "CONNECT_CONTROL", "连接控制器"),
|
||||||
|
DISCONNECT_CONTROL(20, "DISCONNECT_CONTROL", "断开控制器"),
|
||||||
|
LIGHT_ON_CMD(30, "LIGHT_ON_CMD", "亮灯命令");
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
private String code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
MonitorProcessMessageType(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 MonitorProcessMessageType getTypeByValue(String code) {
|
||||||
|
if (StringUtils.isEmpty(code)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (MonitorProcessMessageType enums : MonitorProcessMessageType.values()) {
|
||||||
|
if (enums.getCode().equals(code)) {
|
||||||
|
return enums;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue