package com.yssh.entity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import lombok.ToString; import com.yssh.utils.CalculateUtils; @ToString @ApiModel(value="报警/预警展示对象", description="报警/预警展示对象") public class WarningVo implements Serializable { public WarningVo() { } public WarningVo(String locationName, String suYuanId, double lon, double lat, double value, String time) { this.locationName = locationName; this.suYuanId = suYuanId; this.lon = lon; this.lat = lat; this.value = value; this.time = time; } private static final long serialVersionUID = 3440478664982471286L; @ApiModelProperty(value = "点位名称") private String locationName; //@JsonIgnore private String suYuanId; @ApiModelProperty(value = "经度") private double lon; @ApiModelProperty(value = "纬度") private double lat; @ApiModelProperty(value = "数值") private double value; @ApiModelProperty(value = "时间") private String time; public String getLocationName() { return locationName; } public void setLocationName(String locationName) { this.locationName = locationName; } public void setSuYuanId(String suYuanId) { this.suYuanId = suYuanId; } public double getLon() { String[] split = suYuanId.split("_"); return CalculateUtils.getLon(Integer.parseInt(split[0]), Integer.parseInt(split[1])); } public double getLat() { String[] split = suYuanId.split("_"); return CalculateUtils.getLat(Integer.parseInt(split[0]), Integer.parseInt(split[1])); } public double getValue() { return value; } public void setValue(double value) { this.value = value; } public String getSuYuanId() { return suYuanId; } public void setLon(double lon) { this.lon = lon; } public void setLat(double lat) { this.lat = lat; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } }