| | |
| | | } |
| | | |
| | | @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); |
| | | |
| | |
| | | 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; |