| | |
| | | startDate = startDate.plusDays(1); |
| | | } |
| | | |
| | | tCharingUserMapVO.setMap(map); |
| | | tCharingUserMapVO.setMap(dateRangeStatistics); |
| | | |
| | | |
| | | List<Map<String,Object>> map1 = chargingOrderService.usersByQuery(statisticsQueryDto); |
| | | |
| | | |
| | | |
| | | |
| | | List<Map<String, Object>> dateRangeStatistics1 = new ArrayList<>(); |
| | | |
| | | // 遍历日期范围 |
| | | while (!startDate.isAfter(endDate)) { |
| | | String formattedDate = startDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | Map<String, Object> dailyStats = findMapWithDateValue(map1, formattedDate); |
| | | |
| | | if (dailyStats != null) { |
| | | dateRangeStatistics1.add(dailyStats); |
| | | } else { |
| | | Map<String, Object> dateMap = new HashMap<>(); |
| | | dateMap.put("time", formattedDate); |
| | | dateMap.put("counts", 0); |
| | | dateRangeStatistics1.add(dateMap); |
| | | } |
| | | |
| | | // 移动到下一天 |
| | | startDate = startDate.plusDays(1); |
| | | } |
| | | |
| | | tCharingUserMapVO.setMap1(dateRangeStatistics1); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | //用户标签 |