| | |
| | | wrapper.between("time", startDate, endDate); |
| | | List<HistoryHourly> historyHourlies = multiTableQuery(wrapper, tableNames); |
| | | historyHourlies = historyHourlies.stream().distinct().collect(Collectors.toList()); |
| | | List<HistoryHourly> distinctHistoryHourlies = new ArrayList<>(); |
| | | Map<String, Object> disMap = new HashMap<>(); |
| | | for (HistoryHourly historyHourly:historyHourlies) { |
| | | Date time = historyHourly.getTime(); |
| | | String timeStr = DateUtils.dateToDateString(time,DateUtils.yyyy_MM_dd_HH_mm_ss_EN); |
| | | if (!disMap.containsKey(timeStr)){ |
| | | distinctHistoryHourlies.add(historyHourly); |
| | | disMap.put(timeStr,true); |
| | | } |
| | | } |
| | | for (HistoryHourly historyHourly:distinctHistoryHourlies) { |
| | | Map<String,Object> historyHourlyMap = new HashMap<>(); |
| | | historyHourlyMap.put("mac",mac); |
| | | JSONObject value = JSONObject.parseObject(historyHourly.getValue()); |