燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-06-16 b546994ced2db809d4efe9a7a338892c4df27e75
src/main/java/com/yssh/service/impl/WarningAnalyseServiceImpl.java
@@ -368,7 +368,7 @@
    }
    @Override
    public List<WarningVo> getAlarmAndWarnByTime(Date begin, Date end) {
    public List<Report> getAlarmAndWarnByTime(Date begin, Date end) {
        String startTime = ymdhms.format(begin);
        String endTime = ymdhms.format(end);
@@ -379,10 +379,22 @@
        List<WarningDetail> rsBj = warningDetailMapper.selectByTimeForBj(startTime, endTime);
        if (null != rsBj && rsBj.size() > 0) rs.addAll(rsBj);
        List<WarningVo> list = new ArrayList<>();
        List<Report> list = new ArrayList<>();
        for (WarningDetail wd : rs) {
            String time = ymdh.format(wd.getCreateTime());
            list.add(new WarningVo(wd.getLocationName(), wd.getSuYuanId(), 0.0, 0.0, wd.getValue(), time));
            //String time = ymdh.format(wd.getCreateTime());
            //list.add(new WarningVo(wd.getLocationName(), wd.getSuYuanId(), 0.0, 0.0, wd.getValue(), time));
            int rows = suYuanMapper.isTableExists(wd.getTableName());
            DistanceSuYuan suYuan = null;
            if (rows > 0) {
                MonitorPointPosition point = commonService.select3dCheckPointByName(wd.getLocationName());
                List<String> ids3d = CalculateUtils.aloneCrosswiseExtend(point, 50);
                suYuan = suYuanMapper.getSuYuan500Max(wd.getTableName(), ids3d);
            }
            Report report = Report.calcReport(wd, suYuan);
            list.add(report);
        }
        return list;