|
@@ -187,14 +187,14 @@ public class MqttCallbackHandler {
|
|
|
String num = topic.split("IMEI")[1];
|
|
|
DeviceLp deviceLp = new DeviceLp();
|
|
|
deviceLp.setMode(msg.getInt("mode"));
|
|
|
- deviceLp.setLng(msg.getString("lng"));
|
|
|
+ deviceLp.setLon(msg.getString("lng"));
|
|
|
deviceLp.setLat(msg.getString("lat"));
|
|
|
//转换后的坐标
|
|
|
- String[] gcj = CoordTransformUtil.wgs84toGcj02(deviceLp.getLng(), deviceLp.getLat());
|
|
|
- deviceLp.setLngGcj(gcj[0]);
|
|
|
+ String[] gcj = CoordTransformUtil.wgs84toGcj02(deviceLp.getLon(), deviceLp.getLat());
|
|
|
+ deviceLp.setLonGcj(gcj[0]);
|
|
|
deviceLp.setLatGcj(gcj[1]);
|
|
|
// 逆地理位置解析
|
|
|
- deviceLp.setSite(GaoDeApiUtil.regeo(deviceLp.getLngGcj(), deviceLp.getLatGcj()));
|
|
|
+ deviceLp.setSite(GaoDeApiUtil.regeo(deviceLp.getLonGcj(), deviceLp.getLatGcj()));
|
|
|
// 保存基本信息
|
|
|
deviceLpService.updateByNum(deviceLp, num);
|
|
|
} catch (Exception e) {
|