| | |
| | | package com.whyc.service; |
| | | |
| | | import com.sun.org.glassfish.gmbal.NameValue; |
| | | import com.whyc.constant.BattSingalIdEnum; |
| | | import com.whyc.constant.Capperformance; |
| | | import com.whyc.constant.DevAlarmEnum; |
| | |
| | | private void alarmRealtimeStatistics(Integer userId, Map<String, Object> map) { |
| | | //电池告警信息统计 |
| | | List<AlarmDto> battAlarmListNew = new ArrayList<>(); |
| | | List<AlarmDto> battAlarmList = battAlarmService.getListByUserId(userId); |
| | | List<AlarmDto> battAlarmList = battAlarmService.getListByUserId(userId, null); |
| | | //合并单体告警的告警信息,对AlarmDto中AlmId 在17~28之间的进行合并. |
| | | Map<String, List<AlarmDto>> mergeMap = battAlarmList.stream() |
| | | .filter(alarm -> alarm.getAlmId() >= 17 && alarm.getAlmId() <= 28) |
| | |
| | | }); |
| | | |
| | | //设备告警信息统计 |
| | | List<AlarmDto> devAlarmList = devAlarmService.getListByUserId(userId); |
| | | List<AlarmDto> devAlarmList = devAlarmService.getListByUserId(userId,null); |
| | | //对告警名称赋值 |
| | | devAlarmList.forEach(alarmDto -> { |
| | | alarmDto.setAlmName(DevAlarmEnum.getValue(alarmDto.getAlmId())); |
| | |
| | | |
| | | //电源告警信息统计 |
| | | List<AlarmDto> powerAlarmListNew = new ArrayList<>(); |
| | | List<AlarmDto> powerAlarmList = powerAlarmService.getListByUserId(userId); |
| | | List<AlarmDto> powerAlarmList = powerAlarmService.getListByUserId(userId,null); |
| | | //整流器总故障合并 |
| | | //ALARM_3300001(3300001,"整流器1总故障告警"), |
| | | // ALARM_3300002(3300002,"整流器2总故障告警"), |
| | |
| | | } |
| | | |
| | | |
| | | private void testDataInfoStatistics(Integer userId, Map<String, Object> map) { |
| | | protected void testDataInfoStatistics(Integer userId, Map<String, Object> map) { |
| | | List<BatttestdataInf> testInfList = battTestDataInfService.getListByUserId(userId); |
| | | //过滤出本月的 |
| | | LocalDateTime startOfMonth = DateUtil.getStartOfMonth(); |
| | |
| | | return testInfOfMonth; |
| | | } |
| | | |
| | | private void batteryInfoStatistics(Integer userId, Map<String, Object> map) { |
| | | protected void batteryInfoStatistics(Integer userId, Map<String, Object> map) { |
| | | List<BattInf> battInfList = battInfService.getListByUserId(userId); |
| | | Map<String, List<BattInf>> brandMap = battInfList.stream().collect(Collectors.groupingBy(BattInf::getProduct)); |
| | | Map<Float, List<BattInf>> volMap = battInfList.stream().collect(Collectors.groupingBy(BattInf::getMonvolstd)); |
| | |
| | | map.put("battGroupInfo_vol",volList); |
| | | } |
| | | |
| | | private void powerInfoStatistics(Integer userId, Map<String, Object> map) { |
| | | protected void powerInfoStatistics(Integer userId, Map<String, Object> map) { |
| | | List<PowerInf> powerInfList = powerInfService.getListByUserId(userId); |
| | | Map<String, List<PowerInf>> brandMap = powerInfList.stream().collect(Collectors.groupingBy(PowerInf::getCompany)); |
| | | Map<Integer, List<PowerInf>> typeMap = powerInfList.stream().collect(Collectors.groupingBy(PowerInf::getPowerType)); |