whycxzp
2021-10-11 d39cd5a17b4dfa9ea8dcf1141a2b9383f62c6305
src/main/java/com/whyc/service/PowerAlarmService.java
@@ -189,11 +189,11 @@
        //告警机房总数和比例
        HashMap<String, Integer> map2 = new HashMap<>();
        int alarmStationCount = mapper.getAlarmStationCountSpec(userId,types);
        int stationCount = infoMapper.getStationCount(userId);
        //int alarmStationCount = mapper.getAlarmStationCountSpec(userId,types);
        //int stationCount = infoMapper.getStationCount(userId);
        map2.put("告警机房总数",alarmStationCount);
        map2.put("告警机房数比例",(int)MathUtil.divide(alarmStationCount,stationCount,2));
        //map2.put("告警机房总数",alarmStationCount);
        //map2.put("告警机房数比例",(int)MathUtil.divide(alarmStationCount,stationCount,2));
        List<Map<String, Integer>> mapList = Arrays.asList(resultMap, map2);
        return new Response<List>().set(1,mapList);
@@ -443,14 +443,14 @@
        }
        /*======获取电源告警机房数和比例======*/
        //告警机房数
        /*//告警机房数
        int alarmStationCount = mapper.getAlarmStationCount(userId);
        //总机房数
        int stationCount = infoMapper.getStationCount(userId);
        //比例
        String alarmStationRate = (String) MathUtil.divide(alarmStationCount, stationCount,3);
        resultMap.put("告警机房数",alarmStationCount);
        resultMap.put("告警机房比例",alarmStationRate);
        resultMap.put("告警机房比例",alarmStationRate);*/
        return new Response<Map>().set(1,resultMap);
    }