diff --git a/src/main/java/com/genersoft/iot/vmp/conf/UserSetting.java b/src/main/java/com/genersoft/iot/vmp/conf/UserSetting.java
index 7a025de0..e273ca66 100644
--- a/src/main/java/com/genersoft/iot/vmp/conf/UserSetting.java
+++ b/src/main/java/com/genersoft/iot/vmp/conf/UserSetting.java
@@ -74,6 +74,8 @@ public class UserSetting {
private boolean registerKeepIntDialog = false;
+ private boolean sendPositionOnDemand = true;
+
public Boolean getSavePositionHistory() {
return savePositionHistory;
}
@@ -325,4 +327,13 @@ public class UserSetting {
public void setDocEnable(Boolean docEnable) {
this.docEnable = docEnable;
}
+
+
+ public boolean isSendPositionOnDemand() {
+ return sendPositionOnDemand;
+ }
+
+ public void setSendPositionOnDemand(boolean sendPositionOnDemand) {
+ this.sendPositionOnDemand = sendPositionOnDemand;
+ }
}
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java
index 6e230afe..d3290f50 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java
@@ -258,6 +258,24 @@ public class DeviceChannel {
@Schema(description = "GPS的更新时间")
private String gpsTime;
+ /**
+ * 速度,单位:km/h (可选)
+ */
+ @Schema(description = "GPS的速度")
+ private Double gpsSpeed;
+
+ /**
+ * 方向,取值为当前摄像头方向与正北方的顺时针夹角,取值范围0°~360°,单位:(°)(可选)
+ */
+ @Schema(description = "GPS的方向")
+ private String gpsDirection;
+
+ /**
+ * 海拔高度,单位:m(可选)
+ */
+ @Schema(description = "GPS的海拔高度")
+ private String gpsAltitude;
+
@Schema(description = "码流标识,优先级高于设备中码流标识," +
"用于选择码流时组成码流标识。默认为null,不设置。可选值: stream/streamnumber/streamprofile/streamMode")
private String streamIdentification;
@@ -614,4 +632,29 @@ public class DeviceChannel {
public void setCustomLatitude(double customLatitude) {
this.customLatitude = customLatitude;
}
+
+
+ public Double getGpsSpeed() {
+ return gpsSpeed;
+ }
+
+ public void setGpsSpeed(Double gpsSpeed) {
+ this.gpsSpeed = gpsSpeed;
+ }
+
+ public String getGpsDirection() {
+ return gpsDirection;
+ }
+
+ public void setGpsDirection(String gpsDirection) {
+ this.gpsDirection = gpsDirection;
+ }
+
+ public String getGpsAltitude() {
+ return gpsAltitude;
+ }
+
+ public void setGpsAltitude(String gpsAltitude) {
+ this.gpsAltitude = gpsAltitude;
+ }
}
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
index 2b2af643..da1db017 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
@@ -528,9 +528,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
.append("\r\n")
.append("" + gpsMsgInfo.getLng() + "\r\n")
.append("" + gpsMsgInfo.getLat() + "\r\n")
- .append("" + gpsMsgInfo.getSpeed() + "\r\n")
- .append("" + gpsMsgInfo.getDirection() + "\r\n")
- .append("" + gpsMsgInfo.getAltitude() + "\r\n")
+ .append("" + (gpsMsgInfo.getSpeed() == null?"":gpsMsgInfo.getSpeed()) + "\r\n")
+ .append("" + (gpsMsgInfo.getDirection() == null ? "" : gpsMsgInfo.getDirection()) + "\r\n")
+ .append("" + (gpsMsgInfo.getAltitude() == null ? "" : gpsMsgInfo.getAltitude()) + "\r\n")
.append("\r\n");
sendNotify(parentPlatform, deviceStatusXml.toString(), subscribeInfo, eventResult -> {
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
index 8da07a15..5c8a0a96 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
@@ -166,6 +166,10 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements
deviceChannel.setLongitude(mobilePosition.getLongitude());
deviceChannel.setLatitude(mobilePosition.getLatitude());
deviceChannel.setGpsTime(mobilePosition.getTime());
+ deviceChannel.setGpsSpeed(mobilePosition.getSpeed());
+ deviceChannel.setGpsAltitude(mobilePosition.getAltitude() + "");
+ deviceChannel.setGpsDirection(mobilePosition.getDirection() + "");
+
deviceChannel = deviceChannelService.updateGps(deviceChannel, device);
diff --git a/src/main/java/com/genersoft/iot/vmp/service/bean/GPSMsgInfo.java b/src/main/java/com/genersoft/iot/vmp/service/bean/GPSMsgInfo.java
index 3b84420f..c8ec8f35 100755
--- a/src/main/java/com/genersoft/iot/vmp/service/bean/GPSMsgInfo.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/bean/GPSMsgInfo.java
@@ -13,17 +13,17 @@ public class GPSMsgInfo {
/**
* 经度 (必选)
*/
- private double lng;
+ private Double lng;
/**
* 纬度 (必选)
*/
- private double lat;
+ private Double lat;
/**
* 速度,单位:km/h (可选)
*/
- private double speed;
+ private Double speed;
/**
* 产生通知时间, 时间格式: 2020-01-14T14:32:12
@@ -63,27 +63,27 @@ public class GPSMsgInfo {
this.id = id;
}
- public double getLng() {
+ public Double getLng() {
return lng;
}
- public void setLng(double lng) {
+ public void setLng(Double lng) {
this.lng = lng;
}
- public double getLat() {
+ public Double getLat() {
return lat;
}
- public void setLat(double lat) {
+ public void setLat(Double lat) {
this.lat = lat;
}
- public double getSpeed() {
+ public Double getSpeed() {
return speed;
}
- public void setSpeed(double speed) {
+ public void setSpeed(Double speed) {
this.speed = speed;
}
diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java
index 99d48309..1c4b6b70 100755
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java
@@ -109,7 +109,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
channel = updateGps(channel, null);
if (deviceChannel == null) {
channel.setCreateTime(now);
- channelMapper.add(channel);
+ addChannel(channel);
}else {
channelMapper.update(channel);
}
diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java
index 06c621e5..7413a0c0 100755
--- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformServiceImpl.java
@@ -1,10 +1,10 @@
package com.genersoft.iot.vmp.service.impl;
import com.alibaba.fastjson2.JSONObject;
+import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.InviteInfo;
import com.genersoft.iot.vmp.common.InviteSessionStatus;
import com.genersoft.iot.vmp.common.InviteSessionType;
-import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.conf.DynamicTask;
import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.SsrcTransactionNotFoundException;
@@ -13,12 +13,10 @@ import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
import com.genersoft.iot.vmp.gb28181.session.SSRCFactory;
import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
-import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
-import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
-import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeFactory;
-import com.genersoft.iot.vmp.media.zlm.dto.HookSubscribeForStreamChange;
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
+import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
import com.genersoft.iot.vmp.media.zlm.ZLMServerFactory;
+import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
import com.genersoft.iot.vmp.service.IInviteStreamService;
@@ -27,11 +25,11 @@ import com.genersoft.iot.vmp.service.IPlatformService;
import com.genersoft.iot.vmp.service.IPlayService;
import com.genersoft.iot.vmp.service.bean.*;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
-import com.genersoft.iot.vmp.storager.dao.*;
+import com.genersoft.iot.vmp.storager.dao.GbStreamMapper;
+import com.genersoft.iot.vmp.storager.dao.ParentPlatformMapper;
import com.genersoft.iot.vmp.utils.DateUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
-import gov.nist.javax.sip.message.SIPRequest;
import gov.nist.javax.sip.message.SIPResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,17 +39,8 @@ import org.springframework.stereotype.Service;
import javax.sdp.*;
import javax.sip.InvalidArgumentException;
import javax.sip.ResponseEvent;
-import javax.sip.PeerUnavailableException;
import javax.sip.SipException;
import java.text.ParseException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
import java.util.*;
/**
@@ -437,19 +426,33 @@ public class PlatformServiceImpl implements IPlatformService {
if (subscribe != null) {
// TODO 暂时只处理视频流的回复,后续增加对国标设备的支持
- List gbStreams = gbStreamMapper.queryGbStreamListInPlatform(platform.getServerGBId(), userSetting.isUsePushingAsStatus());
- if (gbStreams.size() == 0) {
+ List deviceChannelList = gbStreamMapper.queryGbStreamListInPlatform(platform.getServerGBId(), userSetting.isUsePushingAsStatus());
+ if (deviceChannelList.isEmpty()) {
return;
}
- for (DeviceChannel deviceChannel : gbStreams) {
+ for (DeviceChannel deviceChannel : deviceChannelList) {
String gbId = deviceChannel.getChannelId();
GPSMsgInfo gpsMsgInfo = redisCatchStorage.getGpsMsgInfo(gbId);
- // 无最新位置不发送
+ // 无最新位置则发送当前位置
if (gpsMsgInfo != null) {
// 经纬度都为0不发送
- if (gpsMsgInfo.getLng() == 0 && gpsMsgInfo.getLat() == 0) {
- continue;
+ if (gpsMsgInfo.getLng() == 0 || gpsMsgInfo.getLat() == 0) {
+ gpsMsgInfo.setLng(deviceChannel.getLongitude());
+ gpsMsgInfo.setLat(deviceChannel.getLatitude());
}
+ }else {
+ if (!userSetting.isSendPositionOnDemand()) {
+ gpsMsgInfo = new GPSMsgInfo();
+ gpsMsgInfo.setId(deviceChannel.getChannelId());
+ gpsMsgInfo.setLng(deviceChannel.getLongitude());
+ gpsMsgInfo.setLat(deviceChannel.getLatitude());
+ gpsMsgInfo.setAltitude(deviceChannel.getGpsAltitude());
+ gpsMsgInfo.setSpeed(deviceChannel.getGpsSpeed());
+ gpsMsgInfo.setDirection(deviceChannel.getGpsDirection());
+ gpsMsgInfo.setTime(deviceChannel.getGpsTime());
+ }
+ }
+ if (gpsMsgInfo != null) {
// 发送GPS消息
try {
commanderForPlatform.sendNotifyMobilePosition(platform, gpsMsgInfo, subscribe);
diff --git a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGpsMsgListener.java b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGpsMsgListener.java
index cea39b4c..e0ed8d20 100755
--- a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGpsMsgListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisGpsMsgListener.java
@@ -68,7 +68,7 @@ public class RedisGpsMsgListener implements MessageListener {
@Scheduled(fixedRate = 2 * 1000) //每2秒执行一次
public void execute(){
List gpsMsgInfo = redisCatchStorage.getAllGpsMsgInfo();
- if (gpsMsgInfo.size() > 0) {
+ if (!gpsMsgInfo.isEmpty()) {
storager.updateStreamGPS(gpsMsgInfo);
for (GPSMsgInfo msgInfo : gpsMsgInfo) {
msgInfo.setStored(true);
diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
index 6807ffbd..2aecb720 100755
--- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
@@ -22,7 +22,8 @@ public interface DeviceChannelMapper {
"(channel_id, device_id, name, manufacture, model, owner, civil_code, block, sub_count, " +
" address, parental, parent_id, safety_way, register_way, cert_num, certifiable, err_code, secrecy, " +
" ip_address,port,password,ptz_type,status,stream_id,longitude,latitude,longitude_gcj02,latitude_gcj02,"+
- " longitude_wgs84,latitude_wgs84,has_audio,create_time,update_time,business_group_id,gps_time,stream_identification)"+
+ " longitude_wgs84,latitude_wgs84,has_audio,create_time,update_time,business_group_id," +
+ " gps_time,gps_speed,gps_direction,gps_altitude,stream_identification)"+
"values " +
"(#{channelId}, #{deviceId}, #{name}, #{manufacture}, #{model}, " +
"#{owner}, #{civilCode}, #{block},#{subCount}," +
@@ -31,7 +32,7 @@ public interface DeviceChannelMapper {
"#{ipAddress}, #{port}, #{password}, #{ptzType}, #{status}, " +
"#{streamId}, #{longitude}, #{latitude},#{longitudeGcj02}, " +
"#{latitudeGcj02},#{longitudeWgs84}, #{latitudeWgs84}, #{hasAudio}, now(), now(), " +
- "#{businessGroupId}, #{gpsTime}, #{streamIdentification}) " +
+ "#{businessGroupId}, #{gpsTime}, #{gpsSpeed}, #{gpsDirection}, #{gpsAltitude}, #{streamIdentification}) " +
"")
int add(DeviceChannel channel);
@@ -68,6 +69,9 @@ public interface DeviceChannelMapper {
", latitude_wgs84=#{latitudeWgs84}" +
", business_group_id=#{businessGroupId}" +
", gps_time=#{gpsTime}" +
+ ", gps_speed=#{gpsSpeed}" +
+ ", gps_direction=#{gpsDirection}" +
+ ", gps_altitude=#{gpsAltitude}" +
", stream_identification=#{streamIdentification}" +
"WHERE device_id=#{deviceId} AND channel_id=#{channelId}"+
" "})
@@ -107,6 +111,9 @@ public interface DeviceChannelMapper {
", latitude_wgs84=#{latitudeWgs84}" +
", business_group_id=#{businessGroupId}" +
", gps_time=#{gpsTime}" +
+ ", gps_speed=#{gpsSpeed}" +
+ ", gps_direction=#{gpsDirection}" +
+ ", gps_altitude=#{gpsAltitude}" +
", stream_identification=#{streamIdentification}" +
"WHERE id=#{id}" +
"WHERE device_id=#{deviceId} AND channel_id=#{channelId}" +
@@ -154,7 +161,10 @@ public interface DeviceChannelMapper {
"dc.latitude_wgs84, " +
"dc.business_group_id, " +
"dc.stream_identification, " +
- "dc.gps_time " +
+ "dc.gps_time, " +
+ "dc.gps_speed, " +
+ "dc.gps_direction, " +
+ "dc.gps_altitude " +
"from " +
"wvp_device_channel dc " +
"WHERE " +
@@ -293,7 +303,8 @@ public interface DeviceChannelMapper {
"(channel_id, device_id, name, manufacture, model, owner, civil_code, block, sub_count, " +
" address, parental, parent_id, safety_way, register_way, cert_num, certifiable, err_code, secrecy, " +
" ip_address,port,password,ptz_type,status,stream_id,longitude,latitude,longitude_gcj02,latitude_gcj02,"+
- " longitude_wgs84,latitude_wgs84,has_audio,create_time,update_time,business_group_id,gps_time,stream_identification)"+
+ " longitude_wgs84,latitude_wgs84,has_audio,create_time,update_time,business_group_id," +
+ " gps_time,gps_speed,gps_direction,gps_altitude,stream_identification)"+
"values " +
" " +
"(#{item.channelId}, #{item.deviceId}, #{item.name}, #{item.manufacture}, #{item.model}, " +
@@ -303,65 +314,12 @@ public interface DeviceChannelMapper {
"#{item.ipAddress}, #{item.port}, #{item.password}, #{item.ptzType}, #{item.status}, " +
"#{item.streamId}, #{item.longitude}, #{item.latitude},#{item.longitudeGcj02}, " +
"#{item.latitudeGcj02},#{item.longitudeWgs84}, #{item.latitudeWgs84}, #{item.hasAudio}, now(), now(), " +
- "#{item.businessGroupId}, #{item.gpsTime}, #{item.streamIdentification}) " +
+ "#{item.businessGroupId}, #{item.gpsTime}, #{item.gpsSpeed}, #{item.gpsDirection}, #{item.gpsAltitude}, #{item.streamIdentification}) " +
" " +
"")
int batchAdd(@Param("addChannels") List addChannels);
- @Insert("")
- int batchAddOrUpdate(List addChannels);
-
@Update(value = {"UPDATE wvp_device_channel SET status=true WHERE device_id=#{deviceId} AND channel_id=#{channelId}"})
void online(@Param("deviceId") String deviceId, @Param("channelId") String channelId);
@@ -403,6 +361,9 @@ public interface DeviceChannelMapper {
", latitude_wgs84=#{item.latitudeWgs84}" +
", business_group_id=#{item.businessGroupId}" +
", gps_time=#{item.gpsTime}" +
+ ", gps_speed=#{item.gpsSpeed}" +
+ ", gps_direction=#{item.gpsDirection}" +
+ ", gps_altitude=#{item.gpsAltitude}" +
", stream_identification=#{item.streamIdentification}" +
"WHERE id=#{item.id}" +
"WHERE device_id=#{item.deviceId} AND channel_id=#{item.channelId}" +
@@ -443,6 +404,9 @@ public interface DeviceChannelMapper {
"latitude_gcj02=#{latitudeGcj02}, " +
"longitude_wgs84=#{longitudeWgs84}, " +
"latitude_wgs84=#{latitudeWgs84}, " +
+ "gps_speed=#{gpsSpeed}," +
+ "gps_direction=#{gpsDirection}," +
+ "gps_altitude=#{gpsAltitude}," +
"gps_time=#{gpsTime} " +
"WHERE device_id=#{deviceId} " +
" AND channel_id=#{channelId}" +
@@ -508,6 +472,10 @@ public interface DeviceChannelMapper {
",longitude_wgs84"+
",latitude_gcj02"+
",longitude_gcj02"+
+ ",gps_time"+
+ ",gps_speed"+
+ ",gps_direction"+
+ ",gps_altitude"+
"from wvp_device_channel where device_id = #{deviceId} " +
"and latitude != 0 " +
"and longitude != 0 " +
@@ -588,7 +556,10 @@ public interface DeviceChannelMapper {
" longitude_wgs84,\n" +
" latitude_wgs84,\n" +
" business_group_id,\n" +
- " gps_time\n" +
+ " gps_time," +
+ " gps_speed,"+
+ " gps_direction,"+
+ " gps_altitude"+
"from wvp_device_channel " +
"where device_id=#{deviceId}" +
" and parent_id = #{parentId} " +
@@ -616,6 +587,9 @@ public interface DeviceChannelMapper {
", longitude_wgs84=#{item.longitudeWgs84}" +
", latitude_wgs84=#{item.latitudeWgs84}" +
", gps_time=#{item.gpsTime}" +
+ ", gps_speed=#{item.gpsSpeed}" +
+ ", gps_direction=#{item.gpsDirection}" +
+ ", gps_altitude=#{item.gpsAltitude}" +
"WHERE id=#{item.id}" +
"WHERE device_id=#{item.deviceId} AND channel_id=#{item.channelId}" +
"" +
diff --git a/src/main/resources/all-application.yml b/src/main/resources/all-application.yml
index f2fd504a..0ded9f92 100644
--- a/src/main/resources/all-application.yml
+++ b/src/main/resources/all-application.yml
@@ -243,6 +243,8 @@ user-settings:
register-keep-int-dialog: false
# 开启接口文档页面。 默认开启,生产环境建议关闭,遇到swagger相关的漏洞时也可以关闭
doc-enable: true
+ # 按需发送位置, 默认发送移动位置订阅时如果位置不变则不发送, 设置为false按照国标间隔持续发送
+ send-position-on-demand: true
# 跨域配置,不配置此项则允许所有跨域请求,配置后则只允许配置的页面的地址请求, 可以配置多个
allowed-origins:
- http://localhost:8008
diff --git a/数据库/2.7.1/初始化-mysql-2.7.1.sql b/数据库/2.7.1/初始化-mysql-2.7.1.sql
index 5640b82c..1c1a4056 100644
--- a/数据库/2.7.1/初始化-mysql-2.7.1.sql
+++ b/数据库/2.7.1/初始化-mysql-2.7.1.sql
@@ -1,4 +1,5 @@
/*建表*/
+/*建表*/
create table wvp_device (
id serial primary key ,
device_id character varying(50) not null ,
@@ -91,6 +92,9 @@ create table wvp_device_channel (
latitude_wgs84 double precision,
business_group_id character varying(50),
gps_time character varying(50),
+ gps_speed double precision,
+ gps_direction character varying(255),
+ gps_altitude character varying(255),
stream_identification character varying(50),
constraint uk_wvp_device_channel_unique_device_channel unique (device_id, channel_id)
);
diff --git a/数据库/2.7.1/初始化-postgresql-kingbase-2.7.1.sql b/数据库/2.7.1/初始化-postgresql-kingbase-2.7.1.sql
index d8e9bb6d..54782e34 100644
--- a/数据库/2.7.1/初始化-postgresql-kingbase-2.7.1.sql
+++ b/数据库/2.7.1/初始化-postgresql-kingbase-2.7.1.sql
@@ -91,6 +91,9 @@ create table wvp_device_channel (
latitude_wgs84 double precision,
business_group_id character varying(50),
gps_time character varying(50),
+ gps_speed double precision,
+ gps_direction character varying(255),
+ gps_altitude character varying(255),
stream_identification character varying(50),
constraint uk_wvp_device_channel_unique_device_channel unique (device_id, channel_id)
);
diff --git a/数据库/2.7.1/更新-mysql-2.7.1.sql b/数据库/2.7.1/更新-mysql-2.7.1.sql
index b1e33291..5821986a 100644
--- a/数据库/2.7.1/更新-mysql-2.7.1.sql
+++ b/数据库/2.7.1/更新-mysql-2.7.1.sql
@@ -3,3 +3,11 @@ alter table wvp_media_server
alter table wvp_platform_catalog
add civil_code_for_channel character varying(50);
+
+
+/* 20250207 */
+alter table wvp_device_channel add gps_speed double precision;
+
+alter table wvp_device_channel add gps_direction character varying(255);
+
+alter table wvp_device_channel add gps_altitude character varying(255);
diff --git a/数据库/2.7.1/更新-postgresql-kingbase-2.7.1.sql b/数据库/2.7.1/更新-postgresql-kingbase-2.7.1.sql
index 638791db..fc474b92 100644
--- a/数据库/2.7.1/更新-postgresql-kingbase-2.7.1.sql
+++ b/数据库/2.7.1/更新-postgresql-kingbase-2.7.1.sql
@@ -2,4 +2,12 @@ alter table wvp_media_server
add transcode_suffix character varying(255);
alter table wvp_platform_catalog
- add civil_code_for_channel character varying(50);
\ No newline at end of file
+ add civil_code_for_channel character varying(50);
+
+
+/* 20250207 */
+alter table wvp_device_channel add gps_speed double precision;
+
+alter table wvp_device_channel add gps_direction character varying(255);
+
+alter table wvp_device_channel add gps_altitude character varying(255);
\ No newline at end of file