|
@@ -186,7 +186,7 @@ public class MqttCallbackHandler {
|
|
|
String num = topic.split("IMEI")[1];
|
|
|
DeviceLp deviceLp = new DeviceLp();
|
|
|
deviceLp.setMode(msg.getInt("mode"));
|
|
|
- deviceLp.setLon(msg.getString("lng"));
|
|
|
+ deviceLp.setLon(msg.getString("lon"));
|
|
|
deviceLp.setLat(msg.getString("lat"));
|
|
|
//转换后的坐标
|
|
|
String[] gcj = CoordTransformUtil.wgs84toGcj02(deviceLp.getLon(), deviceLp.getLat());
|
|
@@ -239,9 +239,9 @@ public class MqttCallbackHandler {
|
|
|
deviceLp.setTemp(msg.getString("temp"));
|
|
|
deviceLp.setUpdateTime(LocalDateTime.now());
|
|
|
//临时解决方案
|
|
|
- if (msg.getString("lng")!=null){
|
|
|
+ if (msg.getString("lon")!=null){
|
|
|
deviceLp.setMode(msg.getInt("mode"));
|
|
|
- deviceLp.setLon(msg.getString("lng"));
|
|
|
+ deviceLp.setLon(msg.getString("lon"));
|
|
|
deviceLp.setLat(msg.getString("lat"));
|
|
|
//转换后的坐标
|
|
|
String[] gcj = CoordTransformUtil.wgs84toGcj02(deviceLp.getLon(), deviceLp.getLat());
|