whyclxw
2024-10-28 1d1186dea179c503791ccb026df2dbbd1050c3f5
staticSocket近一周数据统计修改
1个文件已修改
18 ■■■■■ 已修改文件
src/main/java/com/whyc/service/BatttestdataInfService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BatttestdataInfService.java
@@ -109,29 +109,31 @@
            a200dataMap.put(resultDate.toString(),a200weekDateMap);
            actmdataMap.put(resultDate.toString(),actmweekDataMap);
        }
        //近一周a200
        Map<Integer,Integer> a200weekMap=new HashMap<>();
        a200weekMap.put(2,0);
        a200weekMap.put(3,0);
        List<BatttestdataInf> listW1=mapper.getDevTinfByWeek(userId,1);
        Map<String, List<BatttestdataInf>> typeMapW1 = listW1.stream().collect(Collectors.groupingBy(BatttestdataInf::getWeekDay));
        for (String day : typeMapW1.keySet()) {
            List<BatttestdataInf> list1=typeMapW1.get(day);
            Map<Integer, List<BatttestdataInf>> testMapM1 = list1.stream().collect(Collectors.groupingBy(BatttestdataInf::getTestType));
            //近一周a200
            Map<Integer,Integer> a200weekMap=new HashMap<>();
            a200weekMap.put(2,0);
            a200weekMap.put(3,0);
            for (Integer test : testMapM1.keySet()) {
                a200weekMap.put(test, testMapM1.get(test).size());
            }
            a200dataMap.put(day,a200weekMap);
        }
        //近一周actm
        Map<Integer,Integer> actmweekMap=new HashMap<>();
        actmweekMap.put(2,0);
        actmweekMap.put(3,0);
        List<BatttestdataInf> listW2=mapper.getDevTinfByWeek(userId,2);
        Map<String, List<BatttestdataInf>> typeMapW2= listW2.stream().collect(Collectors.groupingBy(BatttestdataInf::getWeekDay));
        for (String day : typeMapW2.keySet()) {
            List<BatttestdataInf> list2=typeMapW2.get(day);
            Map<Integer, List<BatttestdataInf>> testMapM2 = list2.stream().collect(Collectors.groupingBy(BatttestdataInf::getTestType));
            //近一周actm
            Map<Integer,Integer> actmweekMap=new HashMap<>();
            actmweekMap.put(2,0);
            actmweekMap.put(3,0);
            for (Integer test : testMapM2.keySet()) {
                actmweekMap.put(test, testMapM2.get(test).size());
            }