Update MobilePositionResponseMessageHandler.java
parent
314423bd01
commit
c2ef001546
|
@ -83,7 +83,10 @@ public class MobilePositionResponseMessageHandler extends SIPRequestProcessorPar
|
||||||
}
|
}
|
||||||
mobilePosition.setDeviceId(device.getDeviceId());
|
mobilePosition.setDeviceId(device.getDeviceId());
|
||||||
mobilePosition.setChannelId(getText(rootElement, "DeviceID"));
|
mobilePosition.setChannelId(getText(rootElement, "DeviceID"));
|
||||||
mobilePosition.setTime(getText(rootElement, "Time"));
|
//兼容ISO 8601格式时间
|
||||||
|
String time = getText(rootElement, "Time");
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
mobilePosition.setTime(LocalDateTime.parse(time).format(formatter));
|
||||||
mobilePosition.setLongitude(Double.parseDouble(getText(rootElement, "Longitude")));
|
mobilePosition.setLongitude(Double.parseDouble(getText(rootElement, "Longitude")));
|
||||||
mobilePosition.setLatitude(Double.parseDouble(getText(rootElement, "Latitude")));
|
mobilePosition.setLatitude(Double.parseDouble(getText(rootElement, "Latitude")));
|
||||||
if (NumericUtil.isDouble(getText(rootElement, "Speed"))) {
|
if (NumericUtil.isDouble(getText(rootElement, "Speed"))) {
|
||||||
|
|
Loading…
Reference in New Issue