| | |
| | | //告警机房总数和比例 |
| | | 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); |
| | |
| | | } |
| | | |
| | | /*======获取电源告警机房数和比例======*/ |
| | | //告警机房数 |
| | | /*//告警机房数 |
| | | 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); |
| | | } |