jinpengyong
2024-02-01 0d95bea786a3ecf999a7e2f0172310c508ff6a96
screen-api/src/main/java/com/moral/api/service/impl/DeviceServiceImpl.java
@@ -560,7 +560,7 @@
        Map<String, List<OnlineRateVo>> collectList=new HashMap<>();
        List<OnlineRateVo> OnlineRateVoList = deviceMapper.getLists(onlineRatePageCond.getOrganizationId(),onlineRatePageCond.getState());
        if (!ObjectUtils.isEmpty(OnlineRateVoList)){
            collectList = OnlineRateVoList.stream().collect(Collectors.groupingBy(OnlineRateVo::getHourState));
            for (OnlineRateVo onlineRateVo : OnlineRateVoList) {
                List<HistoryHourly> valueByMacAndTime = historyHourlyService.getValueByMacAndTime(onlineRateVo.getMac(), start, end);
                ArrayList<Date> dates = new ArrayList<>();
@@ -685,7 +685,9 @@
                }
            });
        }*/
        if (!ObjectUtils.isEmpty(OnlineRateVoList)){
            collectList = OnlineRateVoList.stream().collect(Collectors.groupingBy(OnlineRateVo::getHourState));
        }
        return ObjectUtils.isEmpty(onlineRatePageCond.getHourState())?OnlineRateVoList:collectList.get(onlineRatePageCond.getHourState());
    }