lxw
2023-08-15 160e150009b51a39fa95d9462c3798ba28d51a09
src/main/java/com/whyc/service/PwrdevAlarmService.java
@@ -135,6 +135,10 @@
    public int getAlarmNumByUserId(int userId) {
        return  mapper.getAlarmNum(userId);
    }
    //实时1级电源告警个数
    public int getRealTimeWithLevel1(int userId) {
        return  mapper.getRealTimeWithLevel1(userId);
    }
    //首页电源总个数
    public int getHomeAlarmNum(int uId) {
@@ -299,7 +303,7 @@
            List<Map<String, Integer>> mapList = Arrays.asList(resultMap, map2);
            return new Response<>().setII(1, true, mapList, null);
        } catch (Exception e) {
            return new Response<>().set(0, false, "发生异常");
            return new Response<>().set(0, false, "发生异常:"+e.getCause());
        }
    }
@@ -325,7 +329,7 @@
            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);
@@ -339,4 +343,12 @@
    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);
    }
}