车辆轨迹

develop
hanrenchun 9 months ago
parent ffe7447747
commit 78321b15c3

@ -99,14 +99,17 @@ public class TransitVehicleRecordController extends BaseController {
for (TransitVehicleRecord transitVehicleRecord1 : list){ for (TransitVehicleRecord transitVehicleRecord1 : list){
TransitVehicleRecordVO transitVehicleRecordVO = new TransitVehicleRecordVO(); TransitVehicleRecordVO transitVehicleRecordVO = new TransitVehicleRecordVO();
BeanUtils.copyProperties(transitVehicleRecord1,transitVehicleRecordVO); BeanUtils.copyProperties(transitVehicleRecord1,transitVehicleRecordVO);
DevopsDeviceInfo deviceInfo = devopsDeviceInfoService.lambdaQuery() List<DevopsDeviceInfo> list1 = devopsDeviceInfoService.lambdaQuery()
.eq(DevopsDeviceInfo::getGbsChannelNo, transitVehicleRecord1.getDoorwayCode()).list().get(0); .eq(DevopsDeviceInfo::getGbsChannelNo, transitVehicleRecord1.getDoorwayCode()).list();
if (list1.size() > 0){
DevopsDeviceInfo deviceInfo = list1.get(0);
if (deviceInfo != null){ if (deviceInfo != null){
transitVehicleRecordVO.setLongitude(deviceInfo.getLongitude()); transitVehicleRecordVO.setLongitude(deviceInfo.getLongitude());
transitVehicleRecordVO.setLatitude(deviceInfo.getLatitude()); transitVehicleRecordVO.setLatitude(deviceInfo.getLatitude());
transitVehicleRecordVOS.add(transitVehicleRecordVO); transitVehicleRecordVOS.add(transitVehicleRecordVO);
} }
} }
}
List<TransitVehicleRecordVO> collect = transitVehicleRecordVOS.stream() List<TransitVehicleRecordVO> collect = transitVehicleRecordVOS.stream()
.sorted(Comparator.comparing(TransitVehicleRecordVO::getPassTime)) .sorted(Comparator.comparing(TransitVehicleRecordVO::getPassTime))
.collect(Collectors.toList()); .collect(Collectors.toList());

Loading…
Cancel
Save