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;
|
}
|
}
|