|
@@ -128,11 +128,8 @@ public class TimeCalculationServiceImpl extends ServiceImpl<TimeCalculationMappe
|
|
.orderByAsc("start_time"));
|
|
.orderByAsc("start_time"));
|
|
//先把所有的日期搞到一个list里面
|
|
//先把所有的日期搞到一个list里面
|
|
ArrayList<String> dateList = new ArrayList<>();
|
|
ArrayList<String> dateList = new ArrayList<>();
|
|
- LocalDate currentDate = start;
|
|
|
|
- int i = 0;/*防止死循环的机制*/
|
|
|
|
- while (currentDate == end.plusDays(1) && ++i < 1000) {
|
|
|
|
|
|
+ for (LocalDate currentDate = start; currentDate != end.plusDays(1); currentDate = currentDate.plusDays(1)) {
|
|
dateList.add(currentDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
|
dateList.add(currentDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
|
- currentDate = currentDate.plusDays(1);
|
|
|
|
}
|
|
}
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
|
for (String date : dateList) {
|
|
for (String date : dateList) {
|