燕山石化溯源三维电子沙盘-【后端】-服务
13693261870
2023-06-15 2ba556d21ec1c8e0213708c7bbc3f02548ada6c1
添加 溯源ID 属性
已修改2个文件
23 ■■■■■ 文件已修改
src/main/java/com/yssh/entity/Report.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/entity/VocVals.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/entity/Report.java
@@ -9,6 +9,9 @@
 * @date 2023-06-18
 */
public class Report {
    @ApiModelProperty(value = "溯源ID")
    private String id;
    @ApiModelProperty(value = "点位名称")
    private String name;
@@ -48,7 +51,8 @@
    public Report() {
    }
    public Report(String name, double lon, double lat, double val, 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) {
        this.id = id;
        this.name = name;
        this.lon = lon;
        this.lat = lat;
@@ -85,10 +89,18 @@
        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(), time,
        return new Report(wd.getSuYuanId(), wd.getLocationName(), c1.getX(), c1.getY(), wd.getValue(), time,
                speed1, dir, maxVal, dis1, maxDir, isSame);
    }
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
src/main/java/com/yssh/entity/VocVals.java
@@ -15,6 +15,9 @@
    @ApiModelProperty(value = "主键")
    private BigInteger id;
    @ApiModelProperty(value = "溯源ID")
    private String suYuanId;
    @CsvProperty(index = 0)
    @ApiModelProperty(value = "X")
    private Integer x;
@@ -45,6 +48,10 @@
        this.id = id;
    }
    public String getSuYuanId() {
        return x + "_" + y + "_0";
    }
    public Integer getX() {
        return x;
    }