2021与蓝度共同重构项目,服务端
fix
zhanzhiqin
2022-05-27 feac6e0c2db4e60d55417fde1971a0bc6d703566
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
54
55
package com.sandu.ximon.admin.manager.iot.rrpc.enums;
 
import com.sandu.ximon.admin.dto.RemoteUpdateTypeDto;
 
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
 
/**
 * @author ZZQ
 * @date 2022/4/12 11:39
 */
public enum RemoteUpdateTypeEnum {
    //  MQTT主板
    MQTT_MAIN("0"),
    //  MQTT核心板
    MQTT_CORE("1"),
    //  单灯模块
    LIGHT("2"),
    //  C3充电桩模块
    C3_CHARGING("3");
 
    private String code;
 
    public String getCode() {
        return code;
    }
 
 
    RemoteUpdateTypeEnum(String code) {
        this.code = code;
    }
 
    public static List<RemoteUpdateTypeDto> getAllType() {
 
        List<RemoteUpdateTypeDto> list = new ArrayList<>();
        for (RemoteUpdateTypeEnum r : RemoteUpdateTypeEnum.values()) {
            RemoteUpdateTypeDto remoteUpdateTypeEntity = new RemoteUpdateTypeDto();
            remoteUpdateTypeEntity.setVal(r.getCode());
            remoteUpdateTypeEntity.setFileTypeName(map.get(r.getCode()));
            list.add(remoteUpdateTypeEntity);
        }
        return list;
    }
 
    private static ConcurrentHashMap<String, String> map = new ConcurrentHashMap<String, String>() {
        {
            put("0", "MQTT核心板");
            put("1", "Cat.1主板");
            put("2", "C3充电桩模块");
            put("3", "大气设备模块");
            put("4", "杆体倾斜模块");
        }
    };
}