| | |
| | | * @return |
| | | * @param userId |
| | | */ |
| | | public Response<Map> getAcABCAnalysis(int userId){ |
| | | public Response<List> getAcABCAnalysis(int userId){ |
| | | |
| | | //交流A/B/C-过压, |
| | | //交流A/B/C-欠压, |
| | |
| | | |
| | | } |
| | | |
| | | return new Response<Map>().set(1,resultMap); |
| | | //告警机房总数和比例 |
| | | HashMap<String, Integer> map2 = new HashMap<>(); |
| | | |
| | | int alarmStationCount = mapper.getAlarmStationCountSpec(userId,types); |
| | | int stationCount = infoMapper.getStationCount(userId); |
| | | |
| | | 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); |
| | | } |
| | | |
| | | public Response<Map> getRectifierAnalysis(int userId){ |
| | |
| | | //总机房数 |
| | | int stationCount = infoMapper.getStationCount(userId); |
| | | //比例 |
| | | String alarmStationRate = (String) MathUtil.divide(alarmStationCount, stationCount,false); |
| | | String alarmStationRate = (String) MathUtil.divide(alarmStationCount, stationCount,3); |
| | | resultMap.put("告警机房数",alarmStationCount); |
| | | resultMap.put("告警机房比例",alarmStationRate); |
| | | |