燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-06-15 4ef0635ed723addb6cf03a9aff6b89414f58df4e
1
已修改2个文件
25 ■■■■ 文件已修改
src/main/java/com/yssh/entity/vo/WarningVo.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/service/impl/WarningAnalyseServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/entity/vo/WarningVo.java
@@ -18,12 +18,13 @@
    public WarningVo() {
    }
    public WarningVo(String locationName, String suYuanId, double lon, double lat, double value) {
    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;
@@ -37,6 +38,8 @@
    private double lat;
    @ApiModelProperty(value = "数值")
    private double value;
    @ApiModelProperty(value = "时间")
    private String time;
    public String getLocationName() {
        return locationName;
    }
@@ -72,4 +75,12 @@
    public void setLat(double lat) {
        this.lat = lat;
    }
    public String getTime() {
        return time;
    }
    public void setTime(String time) {
        this.time = time;
    }
}
src/main/java/com/yssh/service/impl/WarningAnalyseServiceImpl.java
@@ -89,7 +89,8 @@
            }
        }
        list.forEach(s -> {
            result.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue()));
            String time = ymdh.format(s.getCreateTime());
            result.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue(), time));
        });
        return result;
    }
@@ -123,7 +124,8 @@
            }
        }
        list.forEach(s -> {
            result.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue()));
            String time = ymdh.format(s.getCreateTime());
            result.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue(), time));
        });
        return result;
    }
@@ -389,13 +391,15 @@
        for (String tab : tables) {
            List<WarningDetail> alarmList = getAlarmByTime(tab, ids);
            for (WarningDetail s : alarmList) {
                list.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue()));
                String time = ymdh.format(s.getCreateTime());
                list.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue(), time));
            }
        }
        for (String tab : tables) {
            List<WarningDetail> warnList = getWarnByTime(tab, ids);
            for (WarningDetail s : warnList) {
                list.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue()));
                String time = ymdh.format(s.getCreateTime());
                list.add(new WarningVo(s.getLocationName(), s.getSuYuanId(), 0.0, 0.0, s.getValue(), time));
            }
        }