Commit a0585fad by 杨林龙

优化获取报警时间定位点的方案

1 parent 45952366
...@@ -380,30 +380,28 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService { ...@@ -380,30 +380,28 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
GpsBsData gpsBsData = new GpsBsData(); GpsBsData gpsBsData = new GpsBsData();
gpsBsData.setSn(dataGpsLocation.getSn()); gpsBsData.setSn(dataGpsLocation.getSn());
gpsBsData.setGpsLocation(DataLocationConvert.convertDataToGpsLocation(dataGpsLocation)); gpsBsData.setGpsLocation(DataLocationConvert.convertDataToGpsLocation(dataGpsLocation));
if (GeoLocationEnum.GPS.equals(dataGpsLocation.getGeoLocationEnum())) { // 补充获取基站的数据
// 2.1 如果是GPS,则补充获取基站的数据 List<BaseStationModel> bsLocationList = hdaoGpsComponent.getBaseStationPoint(sn, deviceTypeRelationEnum.getDataDeviceType(), alarmStartTime, alarmEndTime);
List<BaseStationModel> bsLocationList = hdaoGpsComponent.getBaseStationPoint(sn, deviceTypeRelationEnum.getDataDeviceType(), alarmStartTime, alarmEndTime); log.info("getLocationOfAlarmTime 查询基站的数据集合大小为===" + bsLocationList.size());
log.info("getLocationOfAlarmTime 查询基站的数据集合大小为===" + bsLocationList.size()); if (CollectionUtil.isNotEmpty(bsLocationList)) {
if (CollectionUtil.isNotEmpty(bsLocationList)) { BaseStationModel bsModel = bsLocationList.get(0);
BaseStationModel bsModel = bsLocationList.get(0); GpsLocation location = new GpsLocation();
GpsLocation location = new GpsLocation(); MobileBaseModel mbModel = null;
MobileBaseModel mbModel = null; List<BsInfoModel> bsInfoList = bsModel.getBsInfoList();
List<BsInfoModel> bsInfoList = bsModel.getBsInfoList(); for (BsInfoModel bsInfo : bsInfoList) {
for (BsInfoModel bsInfo : bsInfoList) { mbModel = hdaoGpsComponent.analyzeBsData(bsInfo.getLac(), bsInfo.getCellId(), 0);
mbModel = hdaoGpsComponent.analyzeBsData(bsInfo.getLac(), bsInfo.getCellId(), 0);
if (mbModel != null) {
break;
}
}
//整合数据
if (mbModel != null) { if (mbModel != null) {
BeanUtils.copyProperties(mbModel, location); break;
location.setStoreTime(bsModel.getStoreTime());
location.setDateTime(bsModel.getTime());
location.setAddress(getAddressBylngAndLat(dataGpsLocation.getLat(), dataGpsLocation.getLng()));
} }
gpsBsData.setBsLocation(location);
} }
//整合数据
if (mbModel != null) {
BeanUtils.copyProperties(mbModel, location);
location.setStoreTime(bsModel.getStoreTime());
location.setDateTime(bsModel.getTime());
location.setAddress(getAddressBylngAndLat(dataGpsLocation.getLat(), dataGpsLocation.getLng()));
}
gpsBsData.setBsLocation(location);
} }
return gpsBsData; return gpsBsData;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!