|
|
|
@ -54,20 +54,11 @@ public class TransitVehicleRecordController extends BaseController {
|
|
|
|
|
startPage();
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
|
|
List<DevopsDeviceInfo> deviceInfos = devopsDeviceInfoService.lambdaQuery().eq(DevopsDeviceInfo::getParentMonitoringType, 1).list();
|
|
|
|
|
List<String> collect = deviceInfos.stream().map(devopsDeviceInfo -> devopsDeviceInfo.getGbsChannelNo()).collect(Collectors.toList());
|
|
|
|
|
QueryWrapper<TransitVehicleRecord> queryWrapper = new QueryWrapper<>(transitVehicleRecord);
|
|
|
|
|
queryWrapper.in("doorway_code",collect);
|
|
|
|
|
if (transitVehicleRecord.getFirstTime() == null) {
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
LocalDateTime minusDay = now.minusDays(1);
|
|
|
|
|
queryWrapper.between("partition_field", formatter.format(minusDay), formatter.format(now));
|
|
|
|
|
}else {
|
|
|
|
|
LocalDate date = LocalDate.parse(transitVehicleRecord.getFirstTime(), formatter1);
|
|
|
|
|
LocalDate nextDay = date.plusDays(1);
|
|
|
|
|
String nextDayString = nextDay.format(formatter1);
|
|
|
|
|
queryWrapper.between("partition_field", transitVehicleRecord.getFirstTime(), nextDayString);
|
|
|
|
|
}
|
|
|
|
|
LocalDate date = LocalDate.parse(transitVehicleRecord.getFirstTime(), formatter1);
|
|
|
|
|
LocalDate nextDay = date.plusDays(1);
|
|
|
|
|
String nextDayString = nextDay.format(formatter1);
|
|
|
|
|
queryWrapper.between("partition_field", transitVehicleRecord.getFirstTime(), nextDayString);
|
|
|
|
|
queryWrapper.orderByDesc("partition_field");
|
|
|
|
|
List<TransitVehicleRecord> list = transitVehicleRecordService.list(queryWrapper);
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|