Commit 74c8bfb4 by 杨林龙

修改离线报表没有定位地址的问题

1 parent b7be2d00
......@@ -96,6 +96,22 @@ public class OfflineService extends AbstractCommonService {
List<OfflineExport> offlineList = vehicleMapper.findOfflineList(search);
if (CollectionUtil.isNotEmpty(offlineList)) {
offlineList.forEach(offlineExport -> {
// 封装最后GPS数据和地址数据
GpsBsData gpsBsDataForGps = remoteGpsBsService.getLocationOfAlarmTime(offlineExport.getSn(), offlineExport.getLastGpsTime());
GpsLocation gpsLocation = gpsBsDataForGps.getGpsLocation();
if (ObjectUtil.isNotNull(gpsLocation)) {
offlineExport.setGpsAlarmLng(gpsLocation.getLng());
offlineExport.setGpsAlarmLat(gpsLocation.getLat());
offlineExport.setGpsAlarmAddress(gpsLocation.getAddress());
}
// 封装最后基站数据和地址数据
GpsBsData gpsBsDataForBs = remoteGpsBsService.getLocationOfAlarmTime(offlineExport.getSn(), offlineExport.getLastBsTime());
GpsLocation bsLocation = gpsBsDataForBs.getBsLocation();
if (ObjectUtil.isNotNull(bsLocation)) {
offlineExport.setBsAlarmLng(bsLocation.getLng());
offlineExport.setBsAlarmLat(bsLocation.getLat());
offlineExport.setBsAlarmAddress(bsLocation.getAddress());
}
offlineExport.setSourceStr(TypeConverseEunm.SourceEnum.getStrBySourceType(offlineExport.getSource()));
offlineExport.setDeviceTypeStr(TypeConverseEunm.DeviceTypeEnum.getStrByDeviceType(offlineExport.getDeviceType()));
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!