1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
| package cn.iocoder.yudao.module.mes.enums.collect;
|
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| /**
| * MES 数采报文类型
| *
| * @author 超级管理员
| */
| @Getter
| @AllArgsConstructor
| public enum MesCollectMsgTypeEnum {
|
| REALTIME("realtime", "实时数据"),
| SPC("spc", "周期过程数据"),
| TECH("tech", "工艺参数"),
| OP_LOG("opLog", "参数变更日志"),
| ALARM("alarm", "报警"),
| CONNECT("connect", "设备上线"),
| DISCONNECT("disconnect", "设备离线"),
| UNKNOWN("unknown", "未知类型");
|
| private final String type;
| private final String name;
|
| public static MesCollectMsgTypeEnum getByType(String type) {
| for (MesCollectMsgTypeEnum value : values()) {
| if (value.type.equalsIgnoreCase(type)) {
| return value;
| }
| }
| return UNKNOWN;
| }
|
| }
|
|