调整移动位置通知的处理
parent
0dddd7798d
commit
80ed3ba2ff
|
@ -65,7 +65,7 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
|
||||||
taskQueue.offer(new HandlerCatchData(evt, null, null));
|
taskQueue.offer(new HandlerCatchData(evt, null, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(fixedRate = 200) //每200毫秒执行一次
|
@Scheduled(fixedRate = 400) //每200毫秒执行一次
|
||||||
public void executeTaskQueue() {
|
public void executeTaskQueue() {
|
||||||
if (taskQueue.isEmpty()) {
|
if (taskQueue.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -112,7 +112,7 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
|
||||||
if (!deviceId.equals(channelId)) {
|
if (!deviceId.equals(channelId)) {
|
||||||
mobilePosition.setChannelId(channelId);
|
mobilePosition.setChannelId(channelId);
|
||||||
}
|
}
|
||||||
continue;
|
break;
|
||||||
case "Time":
|
case "Time":
|
||||||
String timeVal = element.getStringValue();
|
String timeVal = element.getStringValue();
|
||||||
if (ObjectUtils.isEmpty(timeVal)) {
|
if (ObjectUtils.isEmpty(timeVal)) {
|
||||||
|
@ -120,13 +120,13 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
|
||||||
} else {
|
} else {
|
||||||
mobilePosition.setTime(SipUtils.parseTime(timeVal));
|
mobilePosition.setTime(SipUtils.parseTime(timeVal));
|
||||||
}
|
}
|
||||||
continue;
|
break;
|
||||||
case "Longitude":
|
case "Longitude":
|
||||||
mobilePosition.setLongitude(Double.parseDouble(element.getStringValue()));
|
mobilePosition.setLongitude(Double.parseDouble(element.getStringValue()));
|
||||||
continue;
|
break;
|
||||||
case "Latitude":
|
case "Latitude":
|
||||||
mobilePosition.setLatitude(Double.parseDouble(element.getStringValue()));
|
mobilePosition.setLatitude(Double.parseDouble(element.getStringValue()));
|
||||||
continue;
|
break;
|
||||||
case "Speed":
|
case "Speed":
|
||||||
String speedVal = element.getStringValue();
|
String speedVal = element.getStringValue();
|
||||||
if (NumericUtil.isDouble(speedVal)) {
|
if (NumericUtil.isDouble(speedVal)) {
|
||||||
|
@ -134,7 +134,7 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
|
||||||
} else {
|
} else {
|
||||||
mobilePosition.setSpeed(0.0);
|
mobilePosition.setSpeed(0.0);
|
||||||
}
|
}
|
||||||
continue;
|
break;
|
||||||
case "Direction":
|
case "Direction":
|
||||||
String directionVal = element.getStringValue();
|
String directionVal = element.getStringValue();
|
||||||
if (NumericUtil.isDouble(directionVal)) {
|
if (NumericUtil.isDouble(directionVal)) {
|
||||||
|
@ -142,7 +142,7 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
|
||||||
} else {
|
} else {
|
||||||
mobilePosition.setDirection(0.0);
|
mobilePosition.setDirection(0.0);
|
||||||
}
|
}
|
||||||
continue;
|
break;
|
||||||
case "Altitude":
|
case "Altitude":
|
||||||
String altitudeVal = element.getStringValue();
|
String altitudeVal = element.getStringValue();
|
||||||
if (NumericUtil.isDouble(altitudeVal)) {
|
if (NumericUtil.isDouble(altitudeVal)) {
|
||||||
|
@ -150,7 +150,7 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
|
||||||
} else {
|
} else {
|
||||||
mobilePosition.setAltitude(0.0);
|
mobilePosition.setAltitude(0.0);
|
||||||
}
|
}
|
||||||
continue;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue