wangyinsheng
2 months ago
12 changed files with 241 additions and 12 deletions
@ -0,0 +1,86 @@ |
|||||||
|
-- 历史曲线模板表 |
||||||
|
CREATE TABLE IF NOT EXISTS `hzims_history_template` ( |
||||||
|
`ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', |
||||||
|
`TEMPLATE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板名称', |
||||||
|
`STATION_ID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点编码', |
||||||
|
`STATION_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点名称', |
||||||
|
`FACTORY_ID1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '厂租点ID1', |
||||||
|
`REAL_ID1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性I', |
||||||
|
`REAL_NAME1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性1名称', |
||||||
|
`FACTORY_ID2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '厂租点ID2', |
||||||
|
`REAL_ID2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性2', |
||||||
|
`REAL_NAME2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性2名称', |
||||||
|
`FACTORY_ID3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '厂租点ID3', |
||||||
|
`REAL_ID3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性3', |
||||||
|
`REAL_NAME3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性3名称', |
||||||
|
`FACTORY_ID4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '厂租点ID4', |
||||||
|
`REAL_ID4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性I', |
||||||
|
`REAL_NAME4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性1名称', |
||||||
|
`TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '租户ID', |
||||||
|
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门ID', |
||||||
|
`CREATE_TIME` datetime NULL DEFAULT NULL COMMENT '创建时间', |
||||||
|
`UPDATE_TIME` datetime NULL DEFAULT NULL COMMENT '更新时间', |
||||||
|
`CREATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '创建人', |
||||||
|
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人', |
||||||
|
`IS_DELETED` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否删除', |
||||||
|
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态', |
||||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||||
|
) ENGINE = InnoDB AUTO_INCREMENT = 1833037921308483587 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; |
||||||
|
|
||||||
|
-- 历史曲线常用点位记录表 |
||||||
|
CREATE TABLE IF NOT EXISTS `hzims_history_point_record` ( |
||||||
|
`ID` bigint(20) NOT NULL COMMENT '主键ID', |
||||||
|
`STATION_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点ID', |
||||||
|
`STATION_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点名称', |
||||||
|
`HISTORY_POINT` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '点位ID', |
||||||
|
`HISTORY_POINT_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '点位名称', |
||||||
|
`NUMBER` int(6) NULL DEFAULT NULL COMMENT '查询次数', |
||||||
|
`TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID', |
||||||
|
`CREATE_TIME` datetime NOT NULL COMMENT '创建时间', |
||||||
|
`UPDATE_TIME` datetime NULL DEFAULT NULL COMMENT '更新时间', |
||||||
|
`CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', |
||||||
|
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人', |
||||||
|
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除', |
||||||
|
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态 ', |
||||||
|
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', |
||||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
||||||
|
|
||||||
|
-- 开关机时长单日统计表 |
||||||
|
CREATE TABLE IF NOT EXISTS `hzims_em_start_stop_duration` ( |
||||||
|
`ID` bigint(20) NOT NULL COMMENT '主键ID', |
||||||
|
`STATION_ID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '站点编码', |
||||||
|
`STATION_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点名称', |
||||||
|
`DEVICE_CODE` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编号', |
||||||
|
`DEVICE_NAME` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称', |
||||||
|
`STR_DAY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期: yyyy-MM-dd', |
||||||
|
`START_DURATION` double(6, 2) NULL DEFAULT NULL COMMENT '开机时长', |
||||||
|
`STOP_DURATION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '停机时长', |
||||||
|
`TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '租户ID', |
||||||
|
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门ID', |
||||||
|
`CREATE_TIME` datetime NULL DEFAULT NULL COMMENT '创建时间', |
||||||
|
`UPDATE_TIME` datetime NULL DEFAULT NULL COMMENT '更新时间', |
||||||
|
`CREATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '创建人', |
||||||
|
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人', |
||||||
|
`IS_DELETED` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否删除', |
||||||
|
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态', |
||||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; |
||||||
|
|
||||||
|
-- 运行报表模板表 |
||||||
|
CREATE TABLE IF NOT EXISTS `hzims_run_template` ( |
||||||
|
`ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', |
||||||
|
`TEMPLATE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板名称', |
||||||
|
`STATION_ID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点编码', |
||||||
|
`STATION_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点名称', |
||||||
|
`SIGNAGES` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '属性点json对象', |
||||||
|
`TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '租户ID', |
||||||
|
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门ID', |
||||||
|
`CREATE_TIME` datetime NULL DEFAULT NULL COMMENT '创建时间', |
||||||
|
`UPDATE_TIME` datetime NULL DEFAULT NULL COMMENT '更新时间', |
||||||
|
`CREATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '创建人', |
||||||
|
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人', |
||||||
|
`IS_DELETED` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否删除', |
||||||
|
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态', |
||||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||||
|
) ENGINE = InnoDB AUTO_INCREMENT = 1839133347595427843 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; |
@ -0,0 +1,76 @@ |
|||||||
|
-- 用户实时画面记录表 |
||||||
|
CREATE TABLE IF NOT EXISTS `hzims_station_frame_record` ( |
||||||
|
`ID` bigint(20) NOT NULL COMMENT '主键ID', |
||||||
|
`STATION_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点ID', |
||||||
|
`STATION_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点名称', |
||||||
|
`FRAME_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实时画面ID', |
||||||
|
`FRAME_NAME` varchar(516) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实时画面名称', |
||||||
|
`FRAME_ADDRESS` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实时画面地址', |
||||||
|
`TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点类型: 区分站点v3、v4', |
||||||
|
`PIC_SOURCE` tinyint(2) NULL DEFAULT NULL COMMENT '画面来源: 0云组态 、1 hz3000v3.0、 2 hz3000v4.0', |
||||||
|
`TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID', |
||||||
|
`CREATE_TIME` datetime NOT NULL COMMENT '创建时间', |
||||||
|
`UPDATE_TIME` datetime NULL DEFAULT NULL COMMENT '更新时间', |
||||||
|
`CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', |
||||||
|
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人', |
||||||
|
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除', |
||||||
|
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态 ', |
||||||
|
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', |
||||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; |
||||||
|
|
||||||
|
-- 用户站点视频记录 |
||||||
|
CREATE TABLE IF NOT EXISTS `hzims_station_video_record` ( |
||||||
|
`ID` bigint(20) NOT NULL COMMENT '主键ID', |
||||||
|
`STATION_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点ID', |
||||||
|
`STATION_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点名称', |
||||||
|
`VIDEO_IDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频保存配置ID,用逗号分割', |
||||||
|
`VIDEO_NAMES` varchar(516) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频保存名称,用逗号分割', |
||||||
|
`TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID', |
||||||
|
`CREATE_TIME` datetime NOT NULL COMMENT '创建时间', |
||||||
|
`UPDATE_TIME` datetime NULL DEFAULT NULL COMMENT '更新时间', |
||||||
|
`CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', |
||||||
|
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人', |
||||||
|
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除', |
||||||
|
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态 ', |
||||||
|
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', |
||||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; |
||||||
|
|
||||||
|
-- 用户站点视频轮播方案表 |
||||||
|
CREATE TABLE IF NOT EXISTS `hzims_station_video_carousel` ( |
||||||
|
`ID` bigint(20) NOT NULL COMMENT '主键ID', |
||||||
|
`CAROUSEL_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频轮播保存配置ID', |
||||||
|
`CAROUSEL_NAME` varchar(516) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '视频轮播保存配置名称', |
||||||
|
`TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID', |
||||||
|
`CREATE_TIME` datetime NOT NULL COMMENT '创建时间', |
||||||
|
`UPDATE_TIME` datetime NULL DEFAULT NULL COMMENT '更新时间', |
||||||
|
`CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', |
||||||
|
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人', |
||||||
|
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除', |
||||||
|
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态 ', |
||||||
|
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', |
||||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; |
||||||
|
|
||||||
|
-- 用户默认机构配置表 |
||||||
|
CREATE TABLE IF NOT EXISTS `hzims_user_dept_config` ( |
||||||
|
`ID` bigint(20) NOT NULL COMMENT '主键ID', |
||||||
|
`DEPT_ID` bigint(20) NULL DEFAULT NULL COMMENT '机构ID', |
||||||
|
`DEPT_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构名称', |
||||||
|
`DEPT_CATEGORY` int(2) NULL DEFAULT NULL COMMENT '机构类型', |
||||||
|
`STATION_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点编号', |
||||||
|
`STATION_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点名称', |
||||||
|
`TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID', |
||||||
|
`CREATE_TIME` datetime NOT NULL COMMENT '创建时间', |
||||||
|
`UPDATE_TIME` datetime NULL DEFAULT NULL COMMENT '更新时间', |
||||||
|
`CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', |
||||||
|
`UPDATE_USER` bigint(20) NULL DEFAULT NULL COMMENT '更新人', |
||||||
|
`IS_DELETED` tinyint(4) NOT NULL COMMENT '是否删除', |
||||||
|
`STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态 ', |
||||||
|
`CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', |
||||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||||
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; |
||||||
|
|
||||||
|
-- 站点表增加离线状态 |
||||||
|
ALTER TABLE `hzims_operation`.`hzims_station` ADD COLUMN `ON_LINE` tinyint(1) UNSIGNED ZEROFILL NULL DEFAULT 0 COMMENT '站点在线状态 0-在线 1-离线' AFTER `DISCHARGE`; |
Loading…
Reference in new issue