Compare commits

...

4 Commits

Author SHA1 Message Date
阿斌
8cadd9a35a
Pre Merge pull request !36 from 阿斌/N/A 2025-03-20 01:57:01 +00:00
lin
b2072073a9 修复国标级联推送位置新 2025-03-20 09:56:35 +08:00
lin
ec74488b4a 修复国标级联注册失败 2025-03-20 09:21:01 +08:00
阿斌
da98101aac
update src/main/resources/civilCode.csv.
行政规划错误。江苏南通海门市,修改为海门区,浙江杭州删除下城区、江干区,新增钱塘区,临平区

Signed-off-by: 阿斌 <38912748@qq.com>
2024-12-15 08:58:42 +00:00
25 changed files with 176 additions and 62 deletions

View File

@ -34,5 +34,5 @@ public class SipConfig {
private boolean alarm = false;
private long timeout = 150;
private long timeout = 500;
}

View File

@ -190,5 +190,11 @@ public class UserSetting {
*/
private boolean autoRegisterPlatform = false;
/**
* 按需发送推流设备位置 默认发送移动位置订阅时如果位置不变则不发送 设置为false按照国标间隔持续发送
*/
private boolean sendPositionOnDemand = true;
}

View File

@ -86,6 +86,18 @@ public class CommonGBChannel {
@Schema(description = "国标-纬度 WGS-84坐标系")
private Double gbLatitude;
@Schema(description = "")
private Double gpsAltitude;
@Schema(description = "")
private Double gpsSpeed;
@Schema(description = "")
private Double gpsDirection;
@Schema(description = "")
private String gpsTime;
@Schema(description = "国标-虚拟组织所属的业务分组ID")
private String gbBusinessGroupId;

View File

@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.dao;
import com.genersoft.iot.vmp.gb28181.bean.*;
import com.genersoft.iot.vmp.gb28181.dao.provider.ChannelProvider;
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
@ -451,13 +452,18 @@ public interface CommonGBChannelMapper {
List<CommonGBChannel> queryListByStreamPushList(@Param("dataType") Integer dataType, List<StreamPush> streamPushList);
@Update(value = {" <script>" +
" <foreach collection='channels' item='item' separator=';' >" +
" <foreach collection='gpsMsgInfoList' item='item' separator=';' >" +
" UPDATE wvp_device_channel " +
" SET gb_longitude=#{item.gbLongitude}, gb_latitude=#{item.gbLatitude} " +
" WHERE data_type = #{dataType} AND gb_device_id=#{item.gbDeviceId} "+
" SET gb_longitude=#{item.lng}" +
", gb_latitude=#{item.lat} " +
", gps_speed=#{item.speed} " +
", gps_altitude=#{item.altitude} " +
", gps_direction=#{item.direction} " +
", gps_time=#{item.time} " +
" WHERE gb_device_id=#{item.id} "+
"</foreach>"+
" </script>"})
void updateGpsByDeviceIdForStreamPush(@Param("dataType") Integer dataType, List<CommonGBChannel> channels);
void updateGpsByDeviceId(List<GPSMsgInfo> gpsMsgInfoList);
@SelectProvider(type = ChannelProvider.class, method = "queryList")
List<CommonGBChannel> queryList(@Param("query") String query, @Param("online") Boolean online,

View File

@ -262,6 +262,10 @@ public interface PlatformChannelMapper {
" wdc.data_device_id,\n" +
" wdc.create_time,\n" +
" wdc.update_time,\n" +
" wdc.gps_altitude,\n" +
" wdc.gps_speed,\n" +
" wdc.gps_direction,\n" +
" wdc.gps_time,\n" +
" coalesce(wpgc.custom_device_id, wdc.gb_device_id, wdc.device_id) as gb_device_id,\n" +
" coalesce(wpgc.custom_name, wdc.gb_name, wdc.name) as gb_name,\n" +
" coalesce(wpgc.custom_manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" +

View File

@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.service;
import com.genersoft.iot.vmp.gb28181.bean.*;
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
import com.github.pagehelper.PageInfo;
@ -84,8 +85,6 @@ public interface IGbChannelService {
List<CommonGBChannel> queryListByStreamPushList(List<StreamPush> streamPushList);
void updateGpsByDeviceIdForStreamPush(List<CommonGBChannel> channels);
PageInfo<CommonGBChannel> queryList(int page, int count, String query, Boolean online, Boolean hasRecordPlan, Integer channelType);
void queryRecordInfo(CommonGBChannel channel, String startTime, String endTime, ErrorCallback<RecordInfo> callback);
@ -97,4 +96,7 @@ public interface IGbChannelService {
PageInfo<CommonGBChannel> queryListByParentForUnusual(int page, int count, String query, Boolean online, Integer channelType);
void clearChannelParent(Boolean all, List<Integer> channelIds);
void updateGPSFromGPSMsgInfo(List<GPSMsgInfo> gpsMsgInfoList);
}

View File

@ -13,6 +13,7 @@ import com.genersoft.iot.vmp.gb28181.service.IDeviceChannelService;
import com.genersoft.iot.vmp.gb28181.service.IGbChannelService;
import com.genersoft.iot.vmp.gb28181.service.IPlatformChannelService;
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
import com.genersoft.iot.vmp.utils.DateUtil;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
@ -715,11 +716,6 @@ public class GbChannelServiceImpl implements IGbChannelService {
return commonGBChannelMapper.queryListByStreamPushList(ChannelDataType.STREAM_PUSH.value, streamPushList);
}
@Override
public void updateGpsByDeviceIdForStreamPush(List<CommonGBChannel> channels) {
commonGBChannelMapper.updateGpsByDeviceIdForStreamPush(ChannelDataType.STREAM_PUSH.value, channels);
}
@Override
public PageInfo<CommonGBChannel> queryList(int page, int count, String query, Boolean online, Boolean hasRecordPlan, Integer channelType) {
PageHelper.startPage(page, count);
@ -797,4 +793,12 @@ public class GbChannelServiceImpl implements IGbChannelService {
}
commonGBChannelMapper.removeParentIdByChannelIds(channelIdsForClear);
}
@Override
public void updateGPSFromGPSMsgInfo(List<GPSMsgInfo> gpsMsgInfoList) {
if (gpsMsgInfoList == null || gpsMsgInfoList.isEmpty()) {
return;
}
commonGBChannelMapper.updateGpsByDeviceId(gpsMsgInfoList);
}
}

View File

@ -559,12 +559,26 @@ public class PlatformServiceImpl implements IPlatformService {
}
for (CommonGBChannel channel : channelList) {
GPSMsgInfo gpsMsgInfo = redisCatchStorage.getGpsMsgInfo(channel.getGbDeviceId());
// 无最新位置则发送当前位置
if (gpsMsgInfo != null && (gpsMsgInfo.getLng() == 0 && gpsMsgInfo.getLat() == 0)) {
gpsMsgInfo = null;
}
if (gpsMsgInfo == null && !userSetting.isSendPositionOnDemand()){
gpsMsgInfo = new GPSMsgInfo();
gpsMsgInfo.setId(channel.getGbDeviceId());
gpsMsgInfo.setLng(channel.getGbLongitude());
gpsMsgInfo.setLat(channel.getGbLatitude());
gpsMsgInfo.setAltitude(channel.getGpsAltitude());
gpsMsgInfo.setSpeed(channel.getGpsSpeed());
gpsMsgInfo.setDirection(channel.getGpsDirection());
gpsMsgInfo.setTime(channel.getGpsTime());
}
// 无最新位置不发送
if (gpsMsgInfo != null) {
// 经纬度都为0不发送
if (gpsMsgInfo.getLng() == 0 && gpsMsgInfo.getLat() == 0) {
continue;
}
// 发送GPS消息
try {
commanderForPlatform.sendNotifyMobilePosition(platform, gpsMsgInfo, channel, subscribe);

View File

@ -84,18 +84,16 @@ public class SIPProcessorObserver implements ISIPProcessorObserver {
// Success
if (((status >= Response.OK) && (status < Response.MULTIPLE_CHOICES)) || status == Response.UNAUTHORIZED) {
if (status != Response.UNAUTHORIZED && responseEvent.getResponse() != null && !sipSubscribe.isEmpty() ) {
CallIdHeader callIdHeader = response.getCallIdHeader();
CSeqHeader cSeqHeader = response.getCSeqHeader();
if (callIdHeader != null) {
SipEvent sipEvent = sipSubscribe.getSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
if (sipEvent != null) {
if (sipEvent.getOkEvent() != null) {
SipSubscribe.EventResult<ResponseEvent> eventResult = new SipSubscribe.EventResult<>(responseEvent);
sipEvent.getOkEvent().response(eventResult);
}
sipSubscribe.removeSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
CallIdHeader callIdHeader = response.getCallIdHeader();
CSeqHeader cSeqHeader = response.getCSeqHeader();
if (callIdHeader != null) {
SipEvent sipEvent = sipSubscribe.getSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
if (sipEvent != null) {
if (sipEvent.getOkEvent() != null) {
SipSubscribe.EventResult<ResponseEvent> eventResult = new SipSubscribe.EventResult<>(responseEvent);
sipEvent.getOkEvent().response(eventResult);
}
sipSubscribe.removeSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
}
}
ISIPResponseProcessor sipRequestProcessor = responseProcessorMap.get(response.getCSeqHeader().getMethod());

View File

@ -136,7 +136,7 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
if (errorEvent != null ) {
errorEvent.response(event);
}
}, okEvent, 5L);
}, okEvent, 2000L);
}
@Override
@ -369,7 +369,7 @@ public class SIPCommanderForPlatform implements ISIPCommanderForPlatform {
.append("<CmdType>MobilePosition</CmdType>\r\n")
.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n")
.append("<DeviceID>" + channel.getGbDeviceId() + "</DeviceID>\r\n")
.append("<Time>" + gpsMsgInfo.getTime() + "</Time>\r\n")
.append("<Time>" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(gpsMsgInfo.getTime()) + "</Time>\r\n")
.append("<Longitude>" + gpsMsgInfo.getLng() + "</Longitude>\r\n")
.append("<Latitude>" + gpsMsgInfo.getLat() + "</Latitude>\r\n")
.append("<Speed>" + gpsMsgInfo.getSpeed() + "</Speed>\r\n")

View File

@ -78,7 +78,7 @@ public class MobilePositionNotifyMessageHandler extends SIPRequestProcessorParen
String channelId = getText(rootElementAfterCharset, "DeviceID");
DeviceChannel deviceChannel = deviceChannelService.getOne(device.getDeviceId(), channelId);
if (deviceChannel == null) {
log.warn("[解析报警消息] 未找到通道:{}/{}", device.getDeviceId(), channelId);
log.warn("[解析移动位置通知] 未找到通道:{}/{}", device.getDeviceId(), channelId);
continue;
}

View File

@ -30,7 +30,7 @@ public class GPSMsgInfo {
/**
* 速度,单位:km/h (可选)
*/
private double speed;
private Double speed;
/**
* 产生通知时间, 时间格式 2020-01-14T14:32:12
@ -40,23 +40,23 @@ public class GPSMsgInfo {
/**
* 方向,取值为当前摄像头方向与正北方的顺时针夹角,取值范围0°~360°,单位:(°)(可选)
*/
private String direction;
private Double direction;
/**
* 海拔高度,单位:m(可选)
*/
private String altitude;
private Double altitude;
private boolean stored;
public static GPSMsgInfo getInstance(MobilePosition mobilePosition) {
GPSMsgInfo gpsMsgInfo = new GPSMsgInfo();
gpsMsgInfo.setChannelId(mobilePosition.getChannelId());
gpsMsgInfo.setAltitude(mobilePosition.getAltitude() + "");
gpsMsgInfo.setAltitude(mobilePosition.getAltitude());
gpsMsgInfo.setLng(mobilePosition.getLongitude());
gpsMsgInfo.setLat(mobilePosition.getLatitude());
gpsMsgInfo.setSpeed(mobilePosition.getSpeed());
gpsMsgInfo.setDirection(mobilePosition.getDirection() + "");
gpsMsgInfo.setDirection(mobilePosition.getDirection());
gpsMsgInfo.setTime(DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(mobilePosition.getTime()));
return gpsMsgInfo;
}

View File

@ -1,9 +1,11 @@
package com.genersoft.iot.vmp.service.redisMsg;
import com.alibaba.fastjson2.JSON;
import com.genersoft.iot.vmp.gb28181.service.IGbChannelService;
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.streamPush.service.IStreamPushService;
import com.genersoft.iot.vmp.utils.DateUtil;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
@ -15,9 +17,11 @@ import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
* 接收来自redis的GPS更新通知, 此处只针对推流设备
* 接收来自redis的GPS更新通知
*
* @author lin
* 监听 SUBSCRIBE VM_MSG_GPS
@ -33,6 +37,9 @@ public class RedisGpsMsgListener implements MessageListener {
@Autowired
private IStreamPushService streamPushService;
@Autowired
private IGbChannelService channelService;
private final ConcurrentLinkedQueue<Message> taskQueue = new ConcurrentLinkedQueue<>();
@ -42,7 +49,7 @@ public class RedisGpsMsgListener implements MessageListener {
taskQueue.offer(message);
}
@Scheduled(fixedDelay = 200) //每400毫秒执行一次
@Scheduled(fixedDelay = 200, timeUnit = TimeUnit.MILLISECONDS) //每400毫秒执行一次
public void executeTaskQueue() {
if (taskQueue.isEmpty()) {
return;
@ -61,6 +68,7 @@ public class RedisGpsMsgListener implements MessageListener {
for (Message msg : messageDataList) {
try {
GPSMsgInfo gpsMsgInfo = JSON.parseObject(msg.getBody(), GPSMsgInfo.class);
gpsMsgInfo.setTime(DateUtil.ISO8601Toyyyy_MM_dd_HH_mm_ss(gpsMsgInfo.getTime()));
log.info("[REDIS的位置变化通知], {}", JSON.toJSONString(gpsMsgInfo));
// 只是放入redis缓存起来
redisCatchStorage.updateGpsMsgInfo(gpsMsgInfo);
@ -74,15 +82,18 @@ public class RedisGpsMsgListener implements MessageListener {
/**
* 定时将经纬度更新到数据库
*/
@Scheduled(fixedDelay = 2 * 1000) //每2秒执行一次
@Scheduled(fixedDelay = 2, timeUnit = TimeUnit.SECONDS) //每2秒执行一次
public void execute() {
// 需要查询到
List<GPSMsgInfo> gpsMsgInfoList = redisCatchStorage.getAllGpsMsgInfo();
if (!gpsMsgInfoList.isEmpty()) {
streamPushService.updateGPSFromGPSMsgInfo(gpsMsgInfoList);
for (GPSMsgInfo msgInfo : gpsMsgInfoList) {
msgInfo.setStored(true);
redisCatchStorage.updateGpsMsgInfo(msgInfo);
gpsMsgInfoList = gpsMsgInfoList.stream().filter(gpsMsgInfo -> !gpsMsgInfo.isStored()).collect(Collectors.toList());;
if (!gpsMsgInfoList.isEmpty()) {
channelService.updateGPSFromGPSMsgInfo(gpsMsgInfoList);
for (GPSMsgInfo msgInfo : gpsMsgInfoList) {
msgInfo.setStored(true);
redisCatchStorage.updateGpsMsgInfo(msgInfo);
}
}
}
}

View File

@ -77,6 +77,30 @@ public class StreamPush extends CommonGBChannel implements Comparable<StreamPush
@Schema(description = "拉起离线推流")
private boolean startOfflinePush;
/**
* 速度,单位:km/h (可选)
*/
@Schema(description = "GPS的速度")
private Double gpsSpeed;
/**
* 方向,取值为当前摄像头方向与正北方的顺时针夹角,取值范围0°~360°,单位:(°)(可选)
*/
@Schema(description = "GPS的方向")
private Double gpsDirection;
/**
* 海拔高度,单位:m(可选)
*/
@Schema(description = "GPS的海拔高度")
private Double gpsAltitude;
/**
* GPS的更新时间
*/
@Schema(description = "GPS的更新时间")
private String gpsTime;
private String uniqueKey;
private Integer dataType = ChannelDataType.STREAM_PUSH.value;

View File

@ -1,7 +1,6 @@
package com.genersoft.iot.vmp.streamPush.service;
import com.genersoft.iot.vmp.media.bean.MediaServer;
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
import com.genersoft.iot.vmp.service.bean.StreamPushItemFromRedis;
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo;
@ -98,5 +97,4 @@ public interface IStreamPushService {
void batchRemove(Set<Integer> ids);
void updateGPSFromGPSMsgInfo(List<GPSMsgInfo> gpsMsgInfoList);
}

View File

@ -16,7 +16,6 @@ import com.genersoft.iot.vmp.media.service.IMediaServerService;
import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
import com.genersoft.iot.vmp.media.zlm.dto.hook.OriginType;
import com.genersoft.iot.vmp.service.ISendRtpServerService;
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
import com.genersoft.iot.vmp.service.bean.StreamPushItemFromRedis;
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
import com.genersoft.iot.vmp.streamPush.bean.StreamPush;
@ -586,17 +585,4 @@ public class StreamPushServiceImpl implements IStreamPushService {
streamPushMapper.batchDel(streamPushList);
gbChannelService.delete(ids);
}
@Override
public void updateGPSFromGPSMsgInfo(List<GPSMsgInfo> gpsMsgInfoList) {
List<CommonGBChannel> channels = new ArrayList<>();
for (GPSMsgInfo gpsMsgInfo : gpsMsgInfoList) {
CommonGBChannel channel = new CommonGBChannel();
channel.setGbDeviceId(gpsMsgInfo.getId());
channel.setGbLongitude(gpsMsgInfo.getLng());
channel.setGbLatitude(gpsMsgInfo.getLat());
channels.add(channel);
}
gbChannelService.updateGpsByDeviceIdForStreamPush(channels);
}
}

View File

@ -861,7 +861,7 @@
320623,如东县,3206
320681,启东市,3206
320682,如皋市,3206
320684,海门,3206
320684,海门,3206
320685,海安市,3206
3207,连云港市,32
320703,连云区,3207
@ -918,8 +918,6 @@
33,浙江省,
3301,杭州市,33
330102,上城区,3301
330103,下城区,3301
330104,江干区,3301
330105,拱墅区,3301
330106,西湖区,3301
330108,滨江区,3301
@ -927,6 +925,8 @@
330110,余杭区,3301
330111,富阳区,3301
330112,临安区,3301
330113,临平区,3301
330114,钱塘区,3301
330122,桐庐县,3301
330127,淳安县,3301
330182,建德市,3301

1 编号 名称 上级
861 320623 如东县 3206
862 320681 启东市 3206
863 320682 如皋市 3206
864 320684 海门市 海门区 3206
865 320685 海安市 3206
866 3207 连云港市 32
867 320703 连云区 3207
918 33 浙江省
919 3301 杭州市 33
920 330102 上城区 3301
330103 下城区 3301
330104 江干区 3301
921 330105 拱墅区 3301
922 330106 西湖区 3301
923 330108 滨江区 3301
925 330110 余杭区 3301
926 330111 富阳区 3301
927 330112 临安区 3301
928 330113 临平区 3301
929 330114 钱塘区 3301
930 330122 桐庐县 3301
931 330127 淳安县 3301
932 330182 建德市 3301

View File

@ -249,6 +249,8 @@ user-settings:
jwk-file: classpath:jwk.json
# wvp集群模式下如果注册向上级的wvp奔溃则自动选择一个其他wvp继续注册到上级
auto-register-platform: true
# 按需发送位置, 默认发送移动位置订阅时如果位置不变则不发送, 设置为false按照国标间隔持续发送
send-position-on-demand: true
# 关闭在线文档(生产环境建议关闭)
springdoc:

View File

@ -65,7 +65,7 @@
<!-- </el-table-column>-->
<el-table-column prop="manufacturer" label="厂家" min-width="100">
</el-table-column>
<el-table-column label="位置信息" min-width="120">
<el-table-column label="位置信息" min-width="150">
<template v-slot:default="scope">
<span size="medium" v-if="scope.row.longitude && scope.row.latitude">{{scope.row.longitude}}<br/>{{scope.row.latitude}}</span>
<span size="medium" v-if="!scope.row.longitude || !scope.row.latitude"></span>

View File

@ -156,6 +156,9 @@ create table IF NOT EXISTS wvp_device_channel
record_plan_id integer,
data_type integer not null,
data_device_id integer not null,
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
constraint uk_wvp_unique_channel unique (gb_device_id)
);

View File

@ -156,6 +156,9 @@ create table IF NOT EXISTS wvp_device_channel
record_plan_id integer,
data_type integer not null,
data_device_id integer not null,
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
constraint uk_wvp_unique_channel unique (gb_device_id)
);

View File

@ -167,6 +167,9 @@ create table IF NOT EXISTS wvp_device_channel
record_plan_id integer,
data_type integer not null,
data_device_id integer not null,
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
constraint uk_wvp_unique_channel unique (gb_device_id)
);

View File

@ -233,3 +233,32 @@ call wvp_20250312();
DROP PROCEDURE wvp_20250312;
/*
* 20250319
*/
CREATE PROCEDURE `wvp_20250319`()
BEGIN
IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS
WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and column_name = 'gps_speed')
THEN
alter table wvp_device_channel add gps_speed double precision;
END IF;
IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS
WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and column_name = 'gps_altitude')
THEN
alter table wvp_device_channel add gps_altitude double precision;
END IF;
IF NOT EXISTS (SELECT column_name FROM information_schema.STATISTICS
WHERE TABLE_SCHEMA = (SELECT DATABASE()) and table_name = 'wvp_device_channel' and column_name = 'gps_direction')
THEN
alter table wvp_device_channel add gps_direction double precision;
END IF;
END;
call wvp_20250319();
DROP PROCEDURE wvp_20250319;

View File

@ -134,6 +134,9 @@ create table IF NOT EXISTS wvp_device_channel
record_plan_id integer,
data_type integer not null,
data_device_id integer not null,
gps_speed double precision,
gps_altitude double precision,
gps_direction double precision,
constraint uk_wvp_unique_channel unique (gb_device_id)
);

View File

@ -95,5 +95,11 @@ update wvp_media_server set server_id = '你的服务ID';
update wvp_stream_proxy set server_id = '你的服务ID';
update wvp_cloud_record set server_id = '你的服务ID';
/*
* 20250319
*/
alter table wvp_device_channel add column if not exists gps_speed double precision;
alter table wvp_device_channel add column if not exists gps_altitude double precision;
alter table wvp_device_channel add column if not exists gps_direction double precision;