|
|
@ -55,10 +55,9 @@ public class TransitVehicleRecordController extends BaseController {
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
QueryWrapper<TransitVehicleRecord> queryWrapper = new QueryWrapper<>(transitVehicleRecord);
|
|
|
|
QueryWrapper<TransitVehicleRecord> queryWrapper = new QueryWrapper<>(transitVehicleRecord);
|
|
|
|
LocalDate date = LocalDate.parse(transitVehicleRecord.getFirstTime(), formatter1);
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
LocalDate nextDay = date.plusDays(1);
|
|
|
|
LocalDateTime minusDay = now.minusDays(1);
|
|
|
|
String nextDayString = nextDay.format(formatter1);
|
|
|
|
queryWrapper.between("partition_field", formatter.format(minusDay), formatter.format(now));
|
|
|
|
queryWrapper.between("partition_field", transitVehicleRecord.getFirstTime(), nextDayString);
|
|
|
|
|
|
|
|
queryWrapper.orderByDesc("partition_field");
|
|
|
|
queryWrapper.orderByDesc("partition_field");
|
|
|
|
List<TransitVehicleRecord> list = transitVehicleRecordService.list(queryWrapper);
|
|
|
|
List<TransitVehicleRecord> list = transitVehicleRecordService.list(queryWrapper);
|
|
|
|
return getDataTable(list);
|
|
|
|
return getDataTable(list);
|
|
|
|