jinpengyong
2023-11-01 74c430e012ade8363b57949357e3cf653b944a2d
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
package com.moral.api.pojo.vo.device;
 
 
import lombok.Data;
 
 
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.moral.api.pojo.enums.InvestigationEnum;
 
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class AppDeviceVo {
 
    private  Integer id;
 
    private  String name;
 
    private  String mac;
 
    private  String specialType;
 
    @TableField(exist = false)
    private  String typeName;
 
 
    public String getTypeName() {
        String specialType = this.specialType;
        if (!ObjectUtils.isEmpty(specialType)){
            if (specialType.equals("1")){
                return InvestigationEnum.UAV.name;
            }else if (specialType.equals("0")){
                return InvestigationEnum.TRAVELING_VEHICLE.name;
            }
        }
        return "站点";
    }
    public String getSpecialType() {
        String specialType = this.specialType;
        if (ObjectUtils.isEmpty(specialType)){
            return "3";
        }
        return specialType;
    }
}