|
@@ -75,10 +75,10 @@ public class BeidouLocationServiceImpl extends ServiceImpl<BeidouLocationMapper,
|
|
|
BeidouLocationEntity locationEntity = JSONObject.parseObject(msg.toString(), BeidouLocationEntity.class);
|
|
|
String location = StrUtil.format("POINT ({} {})", locationEntity.getLongitude(),locationEntity.getLatitude());
|
|
|
locationEntity.setLocation(location);
|
|
|
- BigDecimal longitudeDecimal = new BigDecimal(locationEntity.getLongitude());
|
|
|
- locationEntity.setLongitude(LatLngUtil.latLng2Dfm(longitudeDecimal.doubleValue()));
|
|
|
- BigDecimal latitudeDecimal = new BigDecimal(locationEntity.getLatitude());
|
|
|
- locationEntity.setLatitude(LatLngUtil.latLng2Dfm(latitudeDecimal.doubleValue()));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
locationEntities.add(locationEntity);
|
|
|
shipStatusService.pushOnLineDeviceId(locationEntity.getDeviceId(),"true");
|
|
|
}
|
|
@@ -106,9 +106,9 @@ public class BeidouLocationServiceImpl extends ServiceImpl<BeidouLocationMapper,
|
|
|
String location = e.getLocation();
|
|
|
if (StringUtils.hasText(location) && !location.equals(locationMaps.get(e.getDeviceId()))) {
|
|
|
|
|
|
- String longitude = location.substring(location.indexOf("(")+1,location.indexOf(" ",location.indexOf("(")));
|
|
|
- String latitude = location.substring(location.indexOf(" ",location.indexOf("("))+1,location.indexOf(")"));
|
|
|
- List<ContainsDTO> result = warningAreaMapper.containsPoint(longitude,latitude);
|
|
|
+
|
|
|
+
|
|
|
+ List<ContainsDTO> result = warningAreaMapper.containsPoint(e.getLongitude(),e.getLatitude());
|
|
|
if(result.size()>0){
|
|
|
shipStatusService.pushinportDeviceId(e.getDeviceId(), WarningCodeConstants.INPORT_WARNING);
|
|
|
}else{
|