| | |
| | | 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()); |
| | | } |