Commit a0585fad by 杨林龙

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

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