Commit f7cb3408 by 谢海旭

常驻点查询 增加百度经纬度字段返回

1 parent fe977524
...@@ -29,6 +29,8 @@ public class RiskAssessmentConvert { ...@@ -29,6 +29,8 @@ public class RiskAssessmentConvert {
stayPointListVO.setLocationType("GPS"); stayPointListVO.setLocationType("GPS");
Optional.of(stayPointRecordDTO).map(StayPointRecordDTO::getStayGps).map(GpsLocation::getElat).ifPresent(stayPointListVO::setElat); Optional.of(stayPointRecordDTO).map(StayPointRecordDTO::getStayGps).map(GpsLocation::getElat).ifPresent(stayPointListVO::setElat);
Optional.of(stayPointRecordDTO).map(StayPointRecordDTO::getStayGps).map(GpsLocation::getElng).ifPresent(stayPointListVO::setElng); Optional.of(stayPointRecordDTO).map(StayPointRecordDTO::getStayGps).map(GpsLocation::getElng).ifPresent(stayPointListVO::setElng);
Optional.of(stayPointRecordDTO).map(StayPointRecordDTO::getStayGps).map(GpsLocation::getBlat).ifPresent(stayPointListVO::setBlat);
Optional.of(stayPointRecordDTO).map(StayPointRecordDTO::getStayGps).map(GpsLocation::getBlng).ifPresent(stayPointListVO::setBlng);
stayPointListVO.setAddress(address); stayPointListVO.setAddress(address);
return stayPointListVO; return stayPointListVO;
} }
......
...@@ -84,6 +84,18 @@ public class StayPointListVO implements Serializable { ...@@ -84,6 +84,18 @@ public class StayPointListVO implements Serializable {
private String elng; private String elng;
/** /**
* 停留纬度-百度
* */
@ApiModelProperty(value = "停留纬度-百度")
private String blat;
/**
* 停留经度-百度
* */
@ApiModelProperty(value = "停留经度-百度")
private String blng;
/**
* 停留地址 * 停留地址
* */ * */
@ApiModelProperty(value = "停留地址") @ApiModelProperty(value = "停留地址")
......
...@@ -157,7 +157,10 @@ public class RiskAssessmentService { ...@@ -157,7 +157,10 @@ public class RiskAssessmentService {
List<LngLatDTO> lngLats = stayPointRecordList.stream().filter(e -> Objects.nonNull(e.getStayGps())).map(e -> new LngLatDTO(e.getStayGps().getElng(), e.getStayGps().getElat())).collect(Collectors.toList()); List<LngLatDTO> lngLats = stayPointRecordList.stream().filter(e -> Objects.nonNull(e.getStayGps())).map(e -> new LngLatDTO(e.getStayGps().getElng(), e.getStayGps().getElat())).collect(Collectors.toList());
LngLatAddressDTO addressDTO = remoteGpsBsService.getAddressMap(lngLats); LngLatAddressDTO addressDTO = remoteGpsBsService.getAddressMap(lngLats);
Map<String, String> addressMap = Optional.ofNullable(addressDTO).map(LngLatAddressDTO::getAddress).orElse(Maps.newHashMap()); Map<String, String> addressMap = Optional.ofNullable(addressDTO).map(LngLatAddressDTO::getAddress).orElse(Maps.newHashMap());
return stayPointRecordList.stream().map(stayPoint -> RiskAssessmentConvert.buildStayPointListVO(stayPoint, vehicle, sn, Optional.ofNullable(stayPoint.getStayGps()).map(e -> e.getElat() + e.getElng()).map(addressMap::get).orElse(Constants.EMPTY_CONTENT_EXCEL))).collect(Collectors.toList()); return stayPointRecordList.stream().map(stayPoint ->
RiskAssessmentConvert.buildStayPointListVO(stayPoint, vehicle, sn,
Optional.ofNullable(stayPoint.getStayGps()).map(e -> e.getElat() + e.getElng()).map(addressMap::get).orElse(Constants.EMPTY_CONTENT_EXCEL)))
.collect(Collectors.toList());
} }
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!