develop
hanrenchun 10 months ago
parent 64ee8a111c
commit bf20aa59fb

@ -315,9 +315,12 @@ public class BigScreenController extends BaseController {
metaAlarmInfoAndHandleAlarmVo.setJjxxAlarmResponseTime(dateFormat.format(jjxxAlarmResponse));
}
alarmVos.add(metaAlarmInfoAndHandleAlarmVo);
Collections.sort(alarmVos,Collections.reverseOrder());
}
return AjaxResult.success(alarmVos);
List<MetaAlarmInfoAndHandleAlarmVo> sortedList = alarmVos.stream()
.sorted(Comparator.comparing(MetaAlarmInfoAndHandleAlarmVo::getJjxxInformantTime))
.collect(Collectors.toList());
return AjaxResult.success(sortedList);
} catch (Exception e) {
logger.info(StringKit.toString(e));
return AjaxResult.error("请求失败,请联系管理员");

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

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

Loading…
Cancel
Save