liujie
11 小时以前 1c2dd640beec3a2e2458fbe272768ad0416d6211
修改大屏数据问题
2个文件已修改
12 ■■■■ 已修改文件
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TScreenContentServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/KsolarUtils.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TScreenContentServiceImpl.java
@@ -137,7 +137,7 @@
        // 生成每天数据
        for (int i = 7; i >= 1; i--) {//升序
            LocalDate day = today.minusDays(i);
            dates.add(day);
            Map<String, Object> stringObjectMap = monthEnergy.stream().filter(e -> e.get("time").toString().contains(day.toString())).findFirst().orElse(null);
            if(stringObjectMap!=null){
                values.add(Double.valueOf(stringObjectMap.get("value").toString()));
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/KsolarUtils.java
@@ -99,10 +99,7 @@
        }
    }
    public static void main(String[] args) throws Exception {
        ArrayList<Map<String, Object>> monthEnergy = getMonthEnergy("2025-05", "2025-06");
        System.out.println(monthEnergy);
    }
    /**
     * 光伏累计
@@ -229,7 +226,10 @@
        }
        return value;
    }
    public static void main(String[] args) throws Exception {
        String electricity = getElectricity();
        System.out.println(electricity);
    }