| | |
| | | String stationId = inf.getStationId(); |
| | | //查询分组电池信息 |
| | | List<SystemGrdoupBatt> sgblist = rtstateMapper.selectSystemGrdoupBatt(stationId); |
| | | for (int i = 0; i < sgblist.size(); i++) { |
| | | int battGroupId = sgblist.get(i).getBattGroupId(); |
| | | //查询机房下最大的单体电压和单体 |
| | | BattRtdata maxData = rtdataMapper.maxData(battGroupId); |
| | | sgblist.get(i).setMaxVol(maxData.getMonVol()); |
| | | sgblist.get(i).setMaxNum(maxData.getMonNum()); |
| | | //查询机房下最低的单体电压和单体 |
| | | BattRtdata minData = rtdataMapper.minData(battGroupId); |
| | | sgblist.get(i).setMinVol(maxData.getMonVol()); |
| | | sgblist.get(i).setMinNum(maxData.getMonNum()); |
| | | //查询实时告警总数 |
| | | int battAlm = battAlmMapper.getbattAlm(battGroupId); |
| | | sgblist.get(i).setBattAlm(battAlm); |
| | | if (sgblist != null && sgblist.size() > 0) { |
| | | for (int i = 0; i < sgblist.size(); i++) { |
| | | //判断是否落后 |
| | | int battGroupId = sgblist.get(i).getBattGroupId(); |
| | | int badbattFlag = badMapper.judgeBatt(battGroupId); |
| | | sgblist.get(i).setBadbattFlag(badbattFlag); |
| | | } |
| | | inf.setSgbList(sgblist); |
| | | } |
| | | inf.setSgbList(sgblist); |
| | | int devAlm = devAlmMapper.getdevAlm(stationId); |
| | | inf.setDevAlm(devAlm); |
| | | int pwrAlm = pwrAlmMapper.getpwrAlm(stationId); |
| | | inf.setPwrAlm(pwrAlm); |
| | | //查询停电续航时间 |
| | | QueryWrapper wrapper = new QueryWrapper(); |
| | | wrapper.eq("stationid", stationId); |
| | | BattEndurance endurance = endMapper.selectOne(wrapper); |
| | | if (endurance != null) { |
| | | inf.setEndurance(endurance); |
| | | } |
| | | } |
| | | map.put("data", list); |
| | | //站点统计 |