临时提交
This commit is contained in:
@@ -3,7 +3,6 @@ package com.genersoft.iot.vmp.gb28181.bean;
|
||||
import com.genersoft.iot.vmp.common.VideoManagerConstants;
|
||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||
import com.genersoft.iot.vmp.conf.UserSetting;
|
||||
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
|
||||
import com.genersoft.iot.vmp.gb28181.task.ISubscribeTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -24,9 +23,6 @@ public class SubscribeHolder {
|
||||
@Autowired
|
||||
private UserSetting userSetting;
|
||||
|
||||
@Autowired
|
||||
private EventPublisher eventPublisher;
|
||||
|
||||
private final String taskOverduePrefix = "subscribe_overdue_";
|
||||
|
||||
private static ConcurrentHashMap<String, SubscribeInfo> catalogMap = new ConcurrentHashMap<>();
|
||||
|
||||
@@ -12,8 +12,8 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface DeviceMobilePositionMapper {
|
||||
|
||||
@Insert("INSERT INTO wvp_device_mobile_position (device_id,channel_id, device_name,time,longitude,latitude,altitude,speed,direction,report_source,longitude_gcj02,latitude_gcj02,longitude_wgs84,latitude_wgs84,create_time)"+
|
||||
"VALUES (#{deviceId}, #{channelId}, #{deviceName}, #{time}, #{longitude}, #{latitude}, #{altitude}, #{speed}, #{direction}, #{reportSource}, #{longitudeGcj02}, #{latitudeGcj02}, #{longitudeWgs84}, #{latitudeWgs84}, #{createTime})")
|
||||
@Insert("INSERT INTO wvp_device_mobile_position (device_id,channel_id, device_name,time,longitude,latitude,altitude,speed,direction,report_source,create_time)"+
|
||||
"VALUES (#{deviceId}, #{channelId}, #{deviceName}, #{time}, #{longitude}, #{latitude}, #{altitude}, #{speed}, #{direction}, #{reportSource}, #{createTime})")
|
||||
int insertNewPosition(MobilePosition mobilePosition);
|
||||
|
||||
@Select(value = {" <script>" +
|
||||
@@ -33,31 +33,15 @@ public interface DeviceMobilePositionMapper {
|
||||
@Delete("DELETE FROM wvp_device_mobile_position WHERE device_id = #{deviceId}")
|
||||
int clearMobilePositionsByDeviceId(String deviceId);
|
||||
|
||||
|
||||
@Insert("<script> " +
|
||||
"insert into wvp_device_mobile_position " +
|
||||
"(device_id,channel_id, device_name,time,longitude,latitude,altitude,speed,direction,report_source," +
|
||||
"longitude_gcj02,latitude_gcj02,longitude_wgs84,latitude_wgs84,create_time)"+
|
||||
"values " +
|
||||
"<foreach collection='mobilePositions' index='index' item='item' separator=','> " +
|
||||
"(#{item.deviceId}, #{item.channelId}, #{item.deviceName}, #{item.time}, #{item.longitude}, " +
|
||||
"#{item.latitude}, #{item.altitude}, #{item.speed},#{item.direction}," +
|
||||
"#{item.reportSource}, #{item.longitudeGcj02}, #{item.latitudeGcj02}, #{item.longitudeWgs84}, #{item.latitudeWgs84}, " +
|
||||
"#{item.createTime}) " +
|
||||
"</foreach> " +
|
||||
"</script>")
|
||||
void batchadd2(List<MobilePosition> mobilePositions);
|
||||
|
||||
@Insert("<script> " +
|
||||
"<foreach collection='mobilePositions' index='index' item='item' separator=';'> " +
|
||||
"insert into wvp_device_mobile_position " +
|
||||
"(device_id,channel_id, device_name,time,longitude,latitude,altitude,speed,direction,report_source," +
|
||||
"longitude_gcj02,latitude_gcj02,longitude_wgs84,latitude_wgs84,create_time)"+
|
||||
"create_time)"+
|
||||
"values " +
|
||||
"(#{item.deviceId}, #{item.channelId}, #{item.deviceName}, #{item.time}, #{item.longitude}, " +
|
||||
"#{item.latitude}, #{item.altitude}, #{item.speed},#{item.direction}," +
|
||||
"#{item.reportSource}, #{item.longitudeGcj02}, #{item.latitudeGcj02}, #{item.longitudeWgs84}, #{item.latitudeWgs84}, " +
|
||||
"#{item.createTime}) " +
|
||||
"#{item.reportSource}, #{item.createTime}) " +
|
||||
"</foreach> " +
|
||||
"</script>")
|
||||
void batchadd(List<MobilePosition> mobilePositions);
|
||||
|
||||
@@ -458,7 +458,7 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||
return;
|
||||
}
|
||||
for (CommonGBChannel channel : channelList) {
|
||||
GPSMsgInfo gpsMsgInfo = redisCatchStorage.getGpsMsgInfo(channel.getGbId());
|
||||
GPSMsgInfo gpsMsgInfo = redisCatchStorage.getGpsMsgInfo(channel.getGbDeviceId());
|
||||
// 无最新位置不发送
|
||||
if (gpsMsgInfo != null) {
|
||||
// 经纬度都为0不发送
|
||||
|
||||
@@ -360,9 +360,7 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
|
||||
if (parentPlatform == null) {
|
||||
return;
|
||||
}
|
||||
if (log.isDebugEnabled()) {
|
||||
log.info("[发送 移动位置订阅] {}/{}->{},{}", parentPlatform.getServerGBId(), gpsMsgInfo.getChannelId(), gpsMsgInfo.getLng(), gpsMsgInfo.getLat());
|
||||
}
|
||||
log.info("[发送 移动位置订阅] {}/{}->{},{}", parentPlatform.getServerGBId(), gpsMsgInfo.getId(), gpsMsgInfo.getLng(), gpsMsgInfo.getLat());
|
||||
|
||||
String characterSet = parentPlatform.getCharacterSet();
|
||||
StringBuffer deviceStatusXml = new StringBuffer(600);
|
||||
|
||||
@@ -143,7 +143,7 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
|
||||
}
|
||||
}
|
||||
|
||||
log.debug("[收到移动位置订阅通知]:{}/{}->{}.{}, 时间: {}", mobilePosition.getDeviceId(), mobilePosition.getChannelId(),
|
||||
log.info("[收到移动位置订阅通知]:{}/{}->{}.{}, 时间: {}", mobilePosition.getDeviceId(), mobilePosition.getChannelId(),
|
||||
mobilePosition.getLongitude(), mobilePosition.getLatitude(), System.currentTimeMillis() - startTime);
|
||||
mobilePosition.setReportSource("Mobile Position");
|
||||
|
||||
|
||||
@@ -133,8 +133,7 @@ public class SubscribeRequestProcessor extends SIPRequestProcessorParent impleme
|
||||
}
|
||||
|
||||
try {
|
||||
Platform parentPlatform = platformService.queryPlatformByServerGBId(platformId);
|
||||
SIPResponse response = responseXmlAck(request, resultXml.toString(), parentPlatform, subscribeInfo.getExpires());
|
||||
SIPResponse response = responseXmlAck(request, resultXml.toString(), platform, subscribeInfo.getExpires());
|
||||
if (subscribeInfo.getExpires() == 0) {
|
||||
subscribeHolder.removeMobilePositionSubscribe(platformId);
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user