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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| package com.zy.core.enums;
|
| public enum RgvStatusType {
|
| NONE(-1, "离线","#4A4035"),
| IDLE(0, "无任务","#1F3696"),
| PICK_UP_WALK(1, "取货行走","#2196F3"),
| IN_STATION_OPERATION(2, "进站运行中","#2196F3"),
| STATION_ENTRY_COMPLETED(3, "进站完成","#2196F3"),
| There_IS_something_waiting_to_leave_the_station(4, "有物待出站","#2196F3"),
| Exit_walking(5, "出站行走","#E2C027"),
| Outbound_request(6, "出站请求","#2196F3"),
| Outbound_operation_in_progress(7, "出站运行中","#2196F3"),
| Outbound_completed(8, "出站完成","#2196F3"),
| ROAM(11, "漫游","#2196F3"),
| WAITING(100, "任务执行完成等待确认","#2196F3"),
| SOS110(110, "报警","#2196F3"),
| SOS(999, "未知","#2196F3")
| ;
|
| public Integer id;
| public String desc;
| public String color;
| RgvStatusType(Integer id, String desc,String color) {
| this.id = id;
| this.desc = desc;
| this.color = color;
| }
|
| public static RgvStatusType get(Short id) {
| if (null == id) {
| return SOS;
| }
| for (RgvStatusType type : RgvStatusType.values()) {
| if (type.id.equals(id.intValue())) {
| return type;
| }
| }
| return NONE;
| }
|
| public static RgvStatusType get(RgvStatusType type) {
| if (null == type) {
| return SOS;
| }
| for (RgvStatusType rgvStatusType : RgvStatusType.values()) {
| if (rgvStatusType == type) {
| return rgvStatusType;
| }
| }
| return SOS;
| }
| }
|
|