燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2024-11-13 2f55cebbad3dea187a5f91d16ec80a9677dab699
src/main/java/com/yssh/entity/Report.java
@@ -3,12 +3,10 @@
import com.yssh.utils.CalculateUtils;
import io.swagger.annotations.ApiModelProperty;
/**
 * 报告
 * @author WWW
 * @date 2023-06-18
 */
public class Report {
    @ApiModelProperty(value = "溯源ID")
    private String id;
    @ApiModelProperty(value = "点位名称")
    private String name;
@@ -22,7 +20,7 @@
    private double val;
    @ApiModelProperty(value = "去年数值")
    private double lastVal;
    private Double lastVal;
    @ApiModelProperty(value = "时间")
    private String time;
@@ -39,21 +37,31 @@
    @ApiModelProperty(value = "距离")
    private double dis;
    @ApiModelProperty(value = "500m范围最大值的方向")
    @ApiModelProperty(value = "500m范围最大值的风向")
    private String maxDir;
    @ApiModelProperty(value = "是否一致")
    private int isSame;
    @ApiModelProperty(value = "最大值的ID")
    private String maxId;
    @ApiModelProperty(value = "最大值的地名")
    private String maxAddr;
    @ApiModelProperty(value = "溯源类")
    private SuYuan700 su;
    public Report() {
    }
    public Report(String name, double lon, double lat, double val, double lastVal, String time, double speed, String dir, double maxVal, double dis, String maxDir, int isSame) {
    public Report(String id, String name, double lon, double lat, double val, String time, double speed,
                  String dir, double maxVal, double dis, String maxDir, int isSame, String maxId, String maxAddr) {
        this.id = id;
        this.name = name;
        this.lon = lon;
        this.lat = lat;
        this.val = val;
        this.lastVal = lastVal;
        this.time = time;
        this.speed = speed;
        this.dir = dir;
@@ -61,6 +69,8 @@
        this.dis = dis;
        this.maxDir = maxDir;
        this.isSame = isSame;
        this.maxId = maxId;
        this.maxAddr = maxAddr;
    }
    /**
@@ -71,7 +81,6 @@
        Coordinate c2 = CalculateUtils.getCoordinate(suMax);
        String time = wd.getTableName().replace("su_yuan_", "");
        double lastVal = 0;
        double speed1 = CalculateUtils.round2(CalculateUtils.getWindSpeed(suYuan.getV(), suYuan.getU()));
        double direction1 = CalculateUtils.getWindDirection(suYuan.getV(), suYuan.getU());
        String dir = CalculateUtils.getDir(direction1);
@@ -84,11 +93,22 @@
        double speed2 = CalculateUtils.getWindSpeed(suMax.getV(), suMax.getU());
        double direction2 = CalculateUtils.getWindDirection(suMax.getV(), suMax.getU());
        String maxDir = CalculateUtils.getDir(angle);
        int isSame = (Math.abs(direction1 - direction2) < 30 && Math.abs(speed1 - speed2) < 0.5) ? 1 : 0;
        String maxDir = CalculateUtils.getDir(direction2); // CalculateUtils.getDir(angle);
        int isSame = (Math.abs(direction1 - direction2) <= 45 && Math.abs(speed1 - speed2) <= 0.5) ? 1 : 0;
        return new Report(wd.getLocationName(), c1.getX(), c1.getY(), wd.getValue(), lastVal, time,
                speed1, dir, maxVal, dis1, maxDir, isSame);
        String[] strs = suMax.getId().split("_");
        String maxId = (Integer.parseInt(strs[0]) / 10) + "_" + (Integer.parseInt(strs[1]) / 10);
        return new Report(wd.getSuYuanId(), wd.getLocationName(), c1.getX(), c1.getY(), wd.getValue(), time,
                speed1, dir, maxVal, dis1, maxDir, isSame, maxId, suMax.getAddr());
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getName() {
@@ -123,11 +143,11 @@
        this.val = val;
    }
    public double getLastVal() {
    public Double getLastVal() {
        return lastVal;
    }
    public void setLastVal(double lastVal) {
    public void setLastVal(Double lastVal) {
        this.lastVal = lastVal;
    }
@@ -186,4 +206,28 @@
    public void setIsSame(int isSame) {
        this.isSame = isSame;
    }
    public String getMaxId() {
        return maxId;
    }
    public void setMaxId(String maxId) {
        this.maxId = maxId;
    }
    public String getMaxAddr() {
        return maxAddr;
    }
    public void setMaxAddr(String maxAddr) {
        this.maxAddr = maxAddr;
    }
    public SuYuan700 getSu() {
        return su;
    }
    public void setSu(SuYuan700 su) {
        this.su = su;
    }
}