18034727885
2026-05-14 dad2ded3e9e9d2edf55c7ce10e791588b526961f
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
package com.example.smart.enumlist;
 
 
import java.io.Serializable;
 
public enum DeviceType implements Serializable {
    TOWER_CRANE("塔式起重机"),
    CONSTRUCTION_LIFT("施工升降机"),
    MATERIAL_HOIST("物料提升机"),
    BRIDGE_CRANE("桥式起重机"),
    SUSPENDED_SCAFFOLDING("附着式升降脚手架"),
    MOBILE_CRANE("流动式起重机"),
    HIGH_ALTITUDE_BASKET("高处作业吊篮"),
    GANTRY_CRANE("门式起重机"),
    GANTRY_TROLLEY_CRANE("架桥机"),
    OTHER("其他类型");
 
    private final String desc;
 
    DeviceType(String desc) {
        this.desc = desc;
    }
 
    public static DeviceType getByDescription(String description) {
        for (DeviceType deviceType : DeviceType.values()) {
            if (deviceType.desc.equals(description)) {
                return deviceType;
            }
        }
        return null;
    }
 
    public String getDesc() {
        return desc;
    }
 
    public String hierarchyPath() {
        return "/" + this.ordinal();
    }
}