2021与蓝度共同重构项目,服务端
liuhaonan
2022-04-19 5459d7d124fc4c4eb93e8074354dd72c9527081e
ximon-admin/src/main/java/com/sandu/ximon/admin/service/LightService.java
@@ -207,44 +207,17 @@
        Long clientId = SecurityUtils.getClientId();
//        List<LightBo> listLight = baseMapper.listLight(clientId, null);
//        List<String> deviceCodeList = listLight.stream().map(LightBo::getDeviceCode).collect(Collectors.toList());
        List<String> deviceCodeList = new ArrayList<>();
        deviceCodeList.add("32313243305005ffa633ffff");
//        DateTime startDate = DateUtil.date();
//        DateTime endDate = DateUtil.offsetDay(startDate, 3);
//        if (CollectionUtil.isNotEmpty(deviceCodeList)) {
//
//            List<LightReportDataBo> reportDataList = lightReportDataService.reportDataList(deviceCodeList, startDate,  endDate);
//        }
        //获取用户最近7天的单灯数据
        List<LightReportData> reportDataList = lightReportDataService.list(Wrappers.<LightReportData>lambdaQuery()
                .in(LightReportData::getDeviceCode, deviceCodeList)
                .ge(LightReportData::getCreateTime, DateUtil.offsetDay(DateUtil.yesterday(), -7))
                .orderByDesc(LightReportData::getCreateTime));
        List<LightTaskDto> lightTaskDtos = SpringContextHolder.getBean(LightTaskService.class).listLightTask(null, null);
        lightTaskDtos.forEach(Task -> {
                });
        LocalDateTime dateTime = LocalDateTime.now();
        dateTime.plusDays(7L);
        reportDataList.forEach(
                reportData -> {
                    LocalDateTime createTime = reportData.getCreateTime();
                    if(dateTime.plusDays(-1L).getDayOfMonth()==createTime.getDayOfMonth()){
                    }
                }
        );
        Map map = new HashMap();
        map.put("-1", null);
        return reportDataList;
        return null;
    }
    /**