调整数据库字段

pull/1642/head
648540858 2024-07-04 16:55:42 +08:00
parent 0b0344bb6d
commit 7936194718
5 changed files with 194 additions and 448 deletions

View File

@ -37,7 +37,7 @@ public class CommonGBChannel {
private String gbAddress;
@Schema(description = "国标-是否有子设备")
private Boolean gbParental;
private Integer gbParental;
@Schema(description = "国标-父节点ID")
private String gbParentId;
@ -82,7 +82,7 @@ public class CommonGBChannel {
private String gbPassword;
@Schema(description = "国标-设备状态")
private Boolean gbStatus;
private Integer gbStatus;
@Schema(description = "国标-经度 WGS-84坐标系")
private Double gbLongitude;
@ -99,7 +99,7 @@ public class CommonGBChannel {
// 2016
@Schema(description = "-摄像机位置类型扩展。1-省际检查站、2-党政机关、3-车站码头、4-中心广场、5-体育场馆、6-商业中心、7-宗教场所、" +
"8-校园周边、9-治安复杂区域、10-交通干线。当目录项为摄像机时可选。")
private Integer PositionType;
private Integer gbPositionType;
@Schema(description = "国标-摄像机光电成像类型。1-可见光成像;2-热成像;3-雷达成像;4-X光成像;5-深度光场成像;9-其他。可多值,")
private String gbPhotoelectricImagingTyp;
@ -297,7 +297,7 @@ public class CommonGBChannel {
.append("<Latitude>" + this.getGbLatitude() + "</Latitude>\n")
.append("<Info>\n")
.append(" <PTZType>" + this.getGbPtzType() + "</PTZType>\n")
.append(" <PositionType>" + this.getPositionType() + "</PositionType>\n")
.append(" <PositionType>" + this.getGbPositionType() + "</PositionType>\n")
.append(" <RoomType>" + this.getGbRoomType() + "</RoomType>\n")
.append(" <UseType>" + this.getGbUseType() + "</UseType>\n")
.append(" <SupplyLightType>" + this.getGbSupplyLightType() + "</SupplyLightType>\n")

View File

@ -19,6 +19,9 @@ public class DeviceChannel extends CommonGBChannel {
@Schema(description = "数据库自增ID")
private int id;
@Schema(description = "设备的数据库自增ID")
private Integer deviceDbId;
@MessageElement("DeviceID")
@Schema(description = "编码")
private String deviceId;

View File

@ -1,185 +1,96 @@
package com.genersoft.iot.vmp.gb28181.bean;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author lin
*/
@Data
@Schema(description = "平台信息")
public class ParentPlatform {
/**
* id
*/
@Schema(description = "ID(数据库中)")
private Integer id;
/**
*
*/
@Schema(description = "是否启用")
private boolean enable;
/**
*
*/
@Schema(description = "名称")
private String name;
/**
* SIP
*/
@Schema(description = "SIP服务国标编码")
private String serverGBId;
/**
* SIP
*/
@Schema(description = "SIP服务国标域")
private String serverGBDomain;
/**
* SIPIP
*/
@Schema(description = "SIP服务IP")
private String serverIP;
/**
* SIP
*/
@Schema(description = "SIP服务端口")
private int serverPort;
/**
*
*/
@Schema(description = "设备国标编号")
private String deviceGBId;
/**
* ip
*/
@Schema(description = "设备ip")
private String deviceIp;
/**
*
*/
@Schema(description = "设备端口")
private int devicePort;
/**
* SIP(使)
*/
@Schema(description = "SIP认证用户名(默认使用设备国标编号)")
private String username;
/**
* SIP
*/
@Schema(description = "SIP认证密码")
private String password;
/**
* ()
*/
@Schema(description = "注册周期 (秒)")
private int expires;
/**
* ()
*/
@Schema(description = "心跳周期(秒)")
private int keepTimeout;
/**
*
* UDP/TCP
*/
@Schema(description = "传输协议")
private String transport;
/**
*
*/
@Schema(description = "字符集")
private String characterSet;
/**
*
*/
@Schema(description = "允许云台控制")
private boolean ptz;
/**
* RTCP
*/
@Schema(description = "RTCP流保活")
private boolean rtcp;
/**
* 线
*/
@Schema(description = "在线状态")
private boolean status;
/**
* 线
*/
@Schema(description = "在线状态")
private int channelCount;
/**
* Id,
*/
@Schema(description = "默认目录Id,自动添加的通道多放在这个目录下")
private String catalogId;
/**
*
*/
@Schema(description = "已被订阅目录信息")
private boolean catalogSubscribe;
/**
*
*/
@Schema(description = "已被订阅报警信息")
private boolean alarmSubscribe;
/**
*
*/
@Schema(description = "已被订阅移动位置信息")
private boolean mobilePositionSubscribe;
/**
* 使redis
*/
@Schema(description = "点播未推流的设备时是否使用redis通知拉起")
private boolean startOfflinePush;
/**
* -1,2,4,8
*/
@Schema(description = "目录分组-每次向上级发送通道信息时单个包携带的通道数量取值1,2,4,8")
private int catalogGroup;
/**
*
*/
@Schema(description = "行政区划")
private String administrativeDivision;
/**
*
*/
@Schema(description = "更新时间")
private String updateTime;
/**
*
*/
@Schema(description = "创建时间")
private String createTime;
@ -192,259 +103,6 @@ public class ParentPlatform {
@Schema(description = "点播回复200OK使用次IP")
private String sendStreamIp;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public boolean isEnable() {
return enable;
}
public void setEnable(boolean enable) {
this.enable = enable;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getServerGBId() {
return serverGBId;
}
public void setServerGBId(String serverGBId) {
this.serverGBId = serverGBId;
}
public String getServerGBDomain() {
return serverGBDomain;
}
public void setServerGBDomain(String serverGBDomain) {
this.serverGBDomain = serverGBDomain;
}
public String getServerIP() {
return serverIP;
}
public void setServerIP(String serverIP) {
this.serverIP = serverIP;
}
public int getServerPort() {
return serverPort;
}
public void setServerPort(int serverPort) {
this.serverPort = serverPort;
}
public String getDeviceGBId() {
return deviceGBId;
}
public void setDeviceGBId(String deviceGBId) {
this.deviceGBId = deviceGBId;
}
public String getDeviceIp() {
return deviceIp;
}
public void setDeviceIp(String deviceIp) {
this.deviceIp = deviceIp;
}
public int getDevicePort() {
return devicePort;
}
public void setDevicePort(int devicePort) {
this.devicePort = devicePort;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getExpires() {
return expires;
}
public void setExpires(int expires) {
this.expires = expires;
}
public int getKeepTimeout() {
return keepTimeout;
}
public void setKeepTimeout(int keepTimeout) {
this.keepTimeout = keepTimeout;
}
public String getTransport() {
return transport;
}
public void setTransport(String transport) {
this.transport = transport;
}
public String getCharacterSet() {
return characterSet;
}
public void setCharacterSet(String characterSet) {
this.characterSet = characterSet;
}
public boolean isPtz() {
return ptz;
}
public void setPtz(boolean ptz) {
this.ptz = ptz;
}
public boolean isRtcp() {
return rtcp;
}
public void setRtcp(boolean rtcp) {
this.rtcp = rtcp;
}
public boolean isStatus() {
return status;
}
public void setStatus(boolean status) {
this.status = status;
}
public int getChannelCount() {
return channelCount;
}
public void setChannelCount(int channelCount) {
this.channelCount = channelCount;
}
public String getCatalogId() {
return catalogId;
}
public void setCatalogId(String catalogId) {
this.catalogId = catalogId;
}
public boolean isCatalogSubscribe() {
return catalogSubscribe;
}
public void setCatalogSubscribe(boolean catalogSubscribe) {
this.catalogSubscribe = catalogSubscribe;
}
public boolean isAlarmSubscribe() {
return alarmSubscribe;
}
public void setAlarmSubscribe(boolean alarmSubscribe) {
this.alarmSubscribe = alarmSubscribe;
}
public boolean isMobilePositionSubscribe() {
return mobilePositionSubscribe;
}
public void setMobilePositionSubscribe(boolean mobilePositionSubscribe) {
this.mobilePositionSubscribe = mobilePositionSubscribe;
}
public boolean isStartOfflinePush() {
return startOfflinePush;
}
public void setStartOfflinePush(boolean startOfflinePush) {
this.startOfflinePush = startOfflinePush;
}
public int getCatalogGroup() {
return catalogGroup;
}
public void setCatalogGroup(int catalogGroup) {
this.catalogGroup = catalogGroup;
}
public String getAdministrativeDivision() {
return administrativeDivision;
}
public void setAdministrativeDivision(String administrativeDivision) {
this.administrativeDivision = administrativeDivision;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public boolean isAsMessageChannel() {
return asMessageChannel;
}
public void setAsMessageChannel(boolean asMessageChannel) {
this.asMessageChannel = asMessageChannel;
}
public boolean isAutoPushChannel() {
return autoPushChannel;
}
public void setAutoPushChannel(boolean autoPushChannel) {
this.autoPushChannel = autoPushChannel;
}
public String getSendStreamIp() {
return sendStreamIp;
}
public void setSendStreamIp(String sendStreamIp) {
this.sendStreamIp = sendStreamIp;
}
@Schema(description = "是否使用自定义业务分组")
private Boolean customCatalog;
}

View File

@ -49,52 +49,6 @@ create table wvp_device_alarm (
create_time character varying(50) not null
);
create table wvp_device_channel (
id serial primary key ,
channel_id character varying(50) not null,
name character varying(255),
custom_name character varying(255),
manufacture character varying(50),
model character varying(50),
owner character varying(50),
civil_code character varying(50),
block character varying(50),
address character varying(50),
parent_id character varying(50),
safety_way integer,
register_way integer,
cert_num character varying(50),
certifiable integer,
err_code integer,
end_time character varying(50),
secrecy character varying(50),
ip_address character varying(50),
port integer,
password character varying(255),
ptz_type integer,
custom_ptz_type integer,
status bool default false,
longitude double precision,
custom_longitude double precision,
latitude double precision,
custom_latitude double precision,
stream_id character varying(255),
device_id character varying(50) not null,
parental character varying(50),
has_audio bool default false,
create_time character varying(50) not null,
update_time character varying(50) not null,
sub_count integer,
longitude_gcj02 double precision,
latitude_gcj02 double precision,
longitude_wgs84 double precision,
latitude_wgs84 double precision,
business_group_id character varying(50),
gps_time character varying(50),
stream_identification character varying(50),
constraint uk_wvp_device_channel_unique_device_channel unique (device_id, channel_id)
);
create table wvp_device_mobile_position (
id serial primary key,
device_id character varying(50) not null,
@ -141,6 +95,109 @@ create table wvp_log (
create_time character varying(50)
);
create table wvp_device_channel (
id serial primary key ,
device_db_id integer,
device_id character varying(50) not null,
name character varying(255),
manufacturer character varying(50),
model character varying(50),
owner character varying(50),
civil_code character varying(50),
block character varying(50),
address character varying(50),
parental integer,
parent_id character varying(50),
safety_way integer,
register_way integer,
cert_num character varying(50),
certifiable integer,
err_code integer,
end_time character varying(50),
secrecy integer,
ip_address character varying(50),
port integer,
password character varying(255),
status character varying(50),
longitude double precision,
latitude double precision,
ptz_type integer,
position_type integer,
room_type integer,
use_type integer,
supply_light_type integer,
direction_type integer,
resolution character varying(255),
business_group_id character varying(255),
download_speed character varying(255),
svc_space_support_mod integer,
svc_time_support_mode integer,
create_time character varying(50) not null,
update_time character varying(50) not null,
sub_count integer,
stream_id character varying(255),
has_audio bool default false,
gps_time character varying(50),
stream_identification character varying(50),
gb_device_id character varying(50),
gb_name character varying(255),
gb_manufacturer character varying(255),
gb_model character varying(255),
gb_owner character varying(255),
gb_civil_code character varying(255),
gb_block character varying(255),
gb_address character varying(255),
gb_parental integer,
gb_parent_id character varying(255),
gb_safety_way integer,
gb_register_way integer,
gb_cert_num integer,
gb_certifiable integer,
gb_err_code integer,
gb_end_time integer,
gb_security_level_code character varying(255),
gb_secrecy integer,
gb_ip_address character varying(50),
gb_port integer,
gb_password character varying(50),
gb_status integer,
gb_longitude double,
gb_latitude double,
gb_business_group_id character varying(50),
gb_ptz_type integer,
gb_position_type integer,
gb_photoelectric_imaging_typ integer,
gb_capture_position_type integer,
gb_room_type integer,
gb_use_type integer,
gb_supply_light_type integer,
gb_direction_type integer,
gb_resolution character varying(255),
gb_stream_number_list character varying(255),
gb_download_speed character varying(255),
gb_svc_space_support_mod integer,
gb_svc_time_support_mode integer,
gb_ssvc_ratio_support_list character varying(255),
gb_mobile_device_type integer,
gb_horizontal_field_angle double,
gb_vertical_field_angle double,
gb_max_view_distance double,
gb_grassroots_code character varying(255),
gb_po_type integer,
gb_po_common_name character varying(255),
gb_mac character varying(255),
gb_function_type character varying(255),
gb_encode_type character varying(255),
gb_install_time character varying(255),
gb_management_unit character varying(255),
gb_contact_info character varying(255),
gb_record_save_days integer,
gb_industrial_classification character varying(255),
stream_push_id integer,
stream_proxy_id integer,
constraint uk_wvp_device_channel_unique_device_channel unique (device_db_id, device_id)
);
create table wvp_media_server (
id character varying(255) primary key ,
ip character varying(50),
@ -197,58 +254,41 @@ create table wvp_platform (
rtcp bool default false,
status bool default false,
start_offline_push bool default false,
administrative_division character varying(50),
catalog_group integer,
create_time character varying(50),
update_time character varying(50),
as_message_channel bool default false,
custom_catalog bool default false,
auto_push_channel bool default false,
send_stream_ip character varying(50),
constraint uk_platform_unique_server_gb_id unique (server_gb_id)
);
create table wvp_platform_catalog (
id character varying(50),
platform_id character varying(50),
name character varying(255),
parent_id character varying(50),
civil_code character varying(50),
business_group_id character varying(50),
constraint uk_platform_catalog_id_platform_id unique (id, platform_id)
);
create table wvp_platform_gb_channel (
id serial primary key ,
platform_id character varying(50),
catalog_id character varying(50),
platform_id integer,
device_channel_id integer,
device_id character varying(50),
name character varying(255),
civil_code character varying(50),
business_group_id character varying(50),
constraint uk_platform_gb_channel_platform_id_catalog_id_device_channel_id unique (platform_id, catalog_id, device_channel_id)
);
create table wvp_platform_gb_stream (
id serial primary key,
platform_id character varying(50),
catalog_id character varying(50),
gb_stream_id integer,
constraint uk_platform_gb_stream_platform_id_catalog_id_gb_stream_id unique (platform_id, catalog_id, gb_stream_id)
);
create table wvp_stream_proxy (
id serial primary key,
type character varying(50),
app character varying(255),
stream character varying(255),
url character varying(255),
src_url character varying(255),
dst_url character varying(255),
timeout_ms integer,
timeout integer,
ffmpeg_cmd_key character varying(255),
rtp_type character varying(50),
rtsp_type character varying(50),
media_server_id character varying(50),
enable_audio bool default false,
enable_mp4 bool default false,
enable bool default false,
status boolean,
enable_remove_none_reader bool default false,
create_time character varying(50),
name character varying(255),
@ -262,11 +302,7 @@ create table wvp_stream_push (
id serial primary key,
app character varying(255),
stream character varying(255),
total_reader_count character varying(50),
origin_type integer,
origin_type_str character varying(50),
create_time character varying(50),
alive_second integer,
media_server_id character varying(50),
server_id character varying(50),
push_time character varying(50),

View File

@ -1,26 +1,75 @@
alter table wvp_media_server
add transcode_suffix character varying(255);
alter table wvp_device_channel
drop column custom_name;
alter table wvp_media_server
add type character varying(50) default 'zlm';
alter table wvp_device_channel
drop column channel_id;
alter table wvp_media_server
add flv_port integer;
alter table wvp_media_server
add flv_ssl_port integer;
alter table wvp_media_server
add ws_flv_port integer;
alter table wvp_media_server
add ws_flv_ssl_port integer;
alter table wvp_device_channel
drop column custom_longitude;
alter table wvp_device_channel
drop column custom_latitude;
alter table wvp_device_channel
drop column custom_ptz_type;
alter table wvp_device_channel
drop column longitude_gcj02;
alter table wvp_device_channel
drop column latitude_gcj02;
alter table wvp_device_channel
drop column longitude_wgs84;
alter table wvp_device_channel
drop column latitude_wgs84;
alter table wvp_device_channel
rename column manufacture to manufacturer;
alter table wvp_device_channel
modify column parental integer;
alter table wvp_device_channel
modify column secrecy integer;
alter table wvp_device_channel
modify column status character varying(50);
alter table wvp_device_channel
modify column device_id character varying(50);
alter table wvp_device_channel
add position_type integer;
alter table wvp_device_channel
add room_type integer;
alter table wvp_device_channel
add use_type integer;
alter table wvp_device_channel
add supply_light_type integer;
alter table wvp_device_channel
add direction_type integer;
alter table wvp_device_channel
add resolution character varying(255);
alter table wvp_device_channel
modify column business_group_id character varying(255);
alter table wvp_device_channel
add download_speed character varying(255);
alter table wvp_device_channel
add svc_space_support_mod integer;
alter table wvp_device_channel
add svc_time_support_mode integer;
alter table wvp_device_channel
add device_db_id integer;
create table wvp_user_api_key (
id serial primary key ,
user_id bigint,
app character varying(255) ,
api_key text,
expired_at bigint,
remark character varying(255),
enable bool default true,
create_time character varying(50),
update_time character varying(50)
);