liusuyi
2026-05-12 59b5859e049628aaeb1b971057a7a0427f92eb16
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
56
57
58
package com.ard.qs.domain;
 
import jakarta.validation.constraints.NotNull;
 
public class DeviceType implements Comparable<DeviceType>{
 
    /**
     * 编号
     */
    private String name;
 
    /**
     * 名称
     */
    private String code;
 
    /**
     * 归属名称
     */
    private String ownerName;
    public static DeviceType getInstance(DeviceTypeEnum typeEnum) {
        DeviceType deviceType = new DeviceType();
        deviceType.setName(typeEnum.getName());
        deviceType.setCode(typeEnum.getCode());
        deviceType.setOwnerName(typeEnum.getOwnerName());
        return deviceType;
    }
 
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String getCode() {
        return code;
    }
 
    public void setCode(String code) {
        this.code = code;
    }
 
    public String getOwnerName() {
        return ownerName;
    }
 
    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }
 
    @Override
    public int compareTo(@NotNull DeviceType deviceType) {
        return Integer.compare(Integer.parseInt(this.code), Integer.parseInt(deviceType.getCode()));
    }
}