whycxzp
9 天以前 167236d51d359745c6abe0b6ed827b2ff7d37a4b
src/main/java/com/whyc/service/LeaderHomeService.java
@@ -1,6 +1,5 @@
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;
@@ -176,7 +175,7 @@
    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)
@@ -205,7 +204,7 @@
        });
        //设备告警信息统计
        List<AlarmDto> devAlarmList = devAlarmService.getListByUserId(userId);
        List<AlarmDto> devAlarmList = devAlarmService.getListByUserId(userId,null);
        //对告警名称赋值
        devAlarmList.forEach(alarmDto -> {
            alarmDto.setAlmName(DevAlarmEnum.getValue(alarmDto.getAlmId()));
@@ -213,7 +212,7 @@
        //电源告警信息统计
        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总故障告警"),
@@ -689,7 +688,7 @@
    }
    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();
@@ -766,7 +765,7 @@
        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));
@@ -786,7 +785,7 @@
        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));