| | |
| | | public int getAlarmNumByUserId(int userId) { |
| | | return mapper.getAlarmNum(userId); |
| | | } |
| | | //实时1级电源告警个数 |
| | | public int getRealTimeWithLevel1(int userId) { |
| | | return mapper.getRealTimeWithLevel1(userId); |
| | | } |
| | | |
| | | //首页电源总个数 |
| | | public int getHomeAlarmNum(int uId) { |
| | |
| | | Map<Integer, List<PwrdevAlarm>> plevelMap = pAlmList.stream().collect(Collectors.groupingBy(PwrdevAlarm::getAlmLevel)); |
| | | for (Integer level : plevelMap.keySet()) { |
| | | pAlmLevelMap.put("level" + String.valueOf(level), plevelMap.get(level).size()); |
| | | ptatolNum += plevelMap.get(level).size(); |
| | | //ptatolNum += plevelMap.get(level).size(); |
| | | } |
| | | map.put("pAlmClearMap", pAlmClearMap); |
| | | map.put("pAlmLevelMap", pAlmLevelMap); |
| | |
| | | public List<Integer> getStationList(int userId) { |
| | | return mapper.getStationList(userId); |
| | | } |
| | | |
| | | public int getCountByStationIds(List<String> stationIdList, Integer level) { |
| | | return mapper.getCountByStationIds(stationIdList,level); |
| | | } |
| | | |
| | | public List<PwrdevAlarm> getListByStationIds(List<String> stationIdList) { |
| | | return mapper.getListByStationIds(stationIdList); |
| | | } |
| | | } |