diff --git a/hzims-service/equipment/src/main/resources/db/1.0.0.sql b/hzims-service/equipment/src/main/resources/db/1.0.0.sql index 8d1b707..9bf95e7 100644 --- a/hzims-service/equipment/src/main/resources/db/1.0.0.sql +++ b/hzims-service/equipment/src/main/resources/db/1.0.0.sql @@ -768,4 +768,55 @@ BEGIN END ;; -DELIMITER ; \ No newline at end of file +DELIMITER ; + +alter table hzims_em_param add COLUMN NAME VARCHAR(100) comment '参数名称'; + +-- HZ100C参数下发 设备表添加参数最后下发时间字段 +alter table `hzims_em_info` add column `LAST_DISTRIBUTE_TIME` DATETIME DEFAULT NULL COMMENT '最后下发时间'; +-- HZ100C参数下发 设备表添加字段机组类别 +alter table `hzims_em_info` add column `SET_CATEGORY` VARCHAR(2) DEFAULT NULL COMMENT '机组类别'; + +CREATE TABLE `hzims_param_backups` ( + `ID` bigint(20) NOT NULL, + `NAME` varchar(255) DEFAULT NULL, + `STATION_CODE` varchar(64) DEFAULT NULL, + `EM_CODE` varchar(64) DEFAULT NULL, + `DELAY` tinyint(1) DEFAULT NULL, + `MACHINE_CODE` varchar(255) DEFAULT NULL, + `TENANT_ID` varchar(12) DEFAULT NULL COMMENT '租户ID', + `CREATE_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATE_TIME` datetime DEFAULT NULL COMMENT '更新时间', + `CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', + `UPDATE_USER` bigint(20) DEFAULT NULL COMMENT '更新人', + `IS_DELETED` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除', + `STATUS` tinyint(4) DEFAULT NULL COMMENT '状态 ', + `CREATE_DEPT` bigint(20) DEFAULT NULL COMMENT '创建部门', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; + +CREATE TABLE `hzims_param_backups_detail` ( + `ID` bigint(20) NOT NULL, + `BACKUPS_ID` bigint(20) DEFAULT NULL COMMENT '备份主表ID', + `NAME` varchar(255) DEFAULT NULL COMMENT '参数名称', + `SIGNAGE` varchar(128) DEFAULT NULL COMMENT '标识', + `FAC_DEVICE_ID` varchar(64) DEFAULT NULL COMMENT '关联设备', + `FAC_DEVICE_FUNC_ID` varchar(64) DEFAULT NULL COMMENT 'hz3000关联id', + `PARAMETER_TAG` varchar(128) DEFAULT NULL COMMENT '参数标识', + `PARAMETER_NAME` varchar(255) DEFAULT NULL COMMENT '参数名称', + `VALUE` varchar(16) DEFAULT NULL COMMENT '值', + `MAX_VALUE` varchar(16) DEFAULT NULL COMMENT '最大值', + `MIN_VALUE` varchar(16) DEFAULT NULL COMMENT '最小值', + `TENANT_ID` varchar(12) DEFAULT NULL COMMENT '租户ID', + `CREATE_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATE_TIME` datetime DEFAULT NULL COMMENT '更新时间', + `CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', + `UPDATE_USER` bigint(20) DEFAULT NULL COMMENT '更新人', + `IS_DELETED` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除', + `STATUS` tinyint(4) DEFAULT NULL COMMENT '状态 ', + `CREATE_DEPT` bigint(20) DEFAULT NULL COMMENT '创建部门', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +alter table `HZIMS_PARAM_BACKUPS_DETAIL` add COLUMN `KEEP_FIGURES` INT(11) COMMENT '小数点位数'; +alter table `HZIMS_PARAM_BACKUPS_DETAIL` add COLUMN `DESCS` VARCHAR(255) COMMENT '描述'; \ No newline at end of file diff --git a/hzims-service/equipment/src/main/resources/db/1.0.1.sql b/hzims-service/equipment/src/main/resources/db/1.0.1.sql deleted file mode 100644 index e6d4742..0000000 --- a/hzims-service/equipment/src/main/resources/db/1.0.1.sql +++ /dev/null @@ -1,72 +0,0 @@ -alter table hzims_em_param add COLUMN NAME VARCHAR(100) comment '参数名称'; - --- HZ100C参数下发 设备表添加参数最后下发时间字段 -alter table `hzims_em_info` add column `LAST_DISTRIBUTE_TIME` DATETIME DEFAULT NULL COMMENT '最后下发时间'; --- HZ100C参数下发 设备表添加字段机组类别 -alter table `hzims_em_info` add column `SET_CATEGORY` VARCHAR(2) DEFAULT NULL COMMENT '机组类别'; - -CREATE TABLE `hzims_param_backups` ( - `ID` bigint(20) NOT NULL, - `NAME` varchar(255) DEFAULT NULL, - `STATION_CODE` varchar(64) DEFAULT NULL, - `EM_CODE` varchar(64) DEFAULT NULL, - `DELAY` tinyint(1) DEFAULT NULL, - `MACHINE_CODE` varchar(255) DEFAULT NULL, - `TENANT_ID` varchar(12) DEFAULT NULL COMMENT '租户ID', - `CREATE_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATE_TIME` datetime DEFAULT NULL COMMENT '更新时间', - `CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', - `UPDATE_USER` bigint(20) DEFAULT NULL COMMENT '更新人', - `IS_DELETED` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除', - `STATUS` tinyint(4) DEFAULT NULL COMMENT '状态 ', - `CREATE_DEPT` bigint(20) DEFAULT NULL COMMENT '创建部门', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; - -CREATE TABLE `hzims_param_backups_detail` ( - `ID` bigint(20) NOT NULL, - `BACKUPS_ID` bigint(20) DEFAULT NULL COMMENT '备份主表ID', - `NAME` varchar(255) DEFAULT NULL COMMENT '参数名称', - `SIGNAGE` varchar(128) DEFAULT NULL COMMENT '标识', - `FAC_DEVICE_ID` varchar(64) DEFAULT NULL COMMENT '关联设备', - `FAC_DEVICE_FUNC_ID` varchar(64) DEFAULT NULL COMMENT 'hz3000关联id', - `PARAMETER_TAG` varchar(128) DEFAULT NULL COMMENT '参数标识', - `PARAMETER_NAME` varchar(255) DEFAULT NULL COMMENT '参数名称', - `VALUE` varchar(16) DEFAULT NULL COMMENT '值', - `MAX_VALUE` varchar(16) DEFAULT NULL COMMENT '最大值', - `MIN_VALUE` varchar(16) DEFAULT NULL COMMENT '最小值', - `TENANT_ID` varchar(12) DEFAULT NULL COMMENT '租户ID', - `CREATE_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATE_TIME` datetime DEFAULT NULL COMMENT '更新时间', - `CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', - `UPDATE_USER` bigint(20) DEFAULT NULL COMMENT '更新人', - `IS_DELETED` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除', - `STATUS` tinyint(4) DEFAULT NULL COMMENT '状态 ', - `CREATE_DEPT` bigint(20) DEFAULT NULL COMMENT '创建部门', - PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -alter table `HZIMS_PARAM_BACKUPS_DETAIL` add COLUMN `KEEP_FIGURES` INT(11) COMMENT '小数点位数'; -alter table `HZIMS_PARAM_BACKUPS_DETAIL` add COLUMN `DESCS` VARCHAR(255) COMMENT '描述'; --- 设备视频绑定关系表 -CREATE TABLE `hzims_em_video_banding` ( - `ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', - `EM_CODE` varchar(50) NOT NULL COMMENT '设备编号', - `EM_NAME` varchar(80) NOT NULL COMMENT '设备名称', - `POINT_CODE` varchar(100) NOT NULL COMMENT '视频设备编码', - `VIDEO_NAME` varchar(255) NOT NULL COMMENT '视频名称', - `VIDEO_HOST` varchar(100) NOT NULL COMMENT '视频服务器host', - `VIDEO_APP_SECRET` varchar(100) NOT NULL COMMENT '运管中心appSecret', - `VIDEO_APP_KEY` varchar(100) NOT NULL COMMENT '运管中心appKey', - `TENANT_ID` varchar(12) NOT NULL COMMENT '租户ID', - `CREATE_DEPT` bigint(20) DEFAULT NULL COMMENT '创建单位', - `CREATE_USER` bigint(20) NOT NULL COMMENT '创建人', - `CREATE_TIME` datetime NOT NULL COMMENT '创建时间', - `UPDATE_USER` bigint(20) DEFAULT NULL COMMENT '修改人', - `UPDATE_TIME` datetime DEFAULT NULL COMMENT '修改时间', - `STATUS` tinyint(4) DEFAULT NULL COMMENT '业务状态', - `IS_DELETED` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除 0-正常 1-删除', - `DURATION` mediumint(9) DEFAULT NULL COMMENT '多长时间内的推送', - `TIME_UNIT` varchar(50) DEFAULT NULL COMMENT '时间单位', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1533708371949543427 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; diff --git a/hzims-service/equipment/src/main/resources/db/1.0.2.sql b/hzims-service/equipment/src/main/resources/db/1.0.2.sql deleted file mode 100644 index b0913eb..0000000 --- a/hzims-service/equipment/src/main/resources/db/1.0.2.sql +++ /dev/null @@ -1,4 +0,0 @@ --- 参数分组还原添加字段 -alter table `HZIMS_PARAM_BACKUPS_DETAIL` add column `model_classify_id` BIGINT(20) COMMENT '参数分组'; -alter table `HZIMS_PARAM_BACKUPS_DETAIL` add column `model_classify_name` BIGINT(20) COMMENT '参数分组名称'; -alter table `HZIMS_PARAM_BACKUPS_DETAIL` modify column `model_classify_name` varchar(100) NULL COMMENT '参数分组名称'; \ No newline at end of file diff --git a/hzims-service/equipment/src/main/resources/db/2.0.0.sql b/hzims-service/equipment/src/main/resources/db/2.0.0.sql.1 similarity index 100% rename from hzims-service/equipment/src/main/resources/db/2.0.0.sql rename to hzims-service/equipment/src/main/resources/db/2.0.0.sql.1 diff --git a/hzims-service/hzims-middle/src/main/resources/db/2.0.0.sql b/hzims-service/hzims-middle/src/main/resources/db/2.0.0.sql.1 similarity index 100% rename from hzims-service/hzims-middle/src/main/resources/db/2.0.0.sql rename to hzims-service/hzims-middle/src/main/resources/db/2.0.0.sql.1 diff --git a/hzims-service/inspect/src/main/resources/db/1.0.1.sql b/hzims-service/inspect/src/main/resources/db/1.0.1.sql deleted file mode 100644 index f5d29b5..0000000 --- a/hzims-service/inspect/src/main/resources/db/1.0.1.sql +++ /dev/null @@ -1,72 +0,0 @@ --- 创建巡检内容定义表结构 -CREATE TABLE IF NOT EXISTS `hz_st_re_content_definition` ( - `ID` bigint(64) NOT NULL COMMENT 'ID', - `CODE` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '内容编码:由系统自动生成自动生成', - `NAME` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '内容名称', - `DESCRIPTION` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '内容描述', - `RECORD_TYPE` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录类型 0不记录 1仅选择 2仅记值 3选择并记值', - `CHECK_TYPE` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '检测类型 原来数据字典 暂时设计只支持99个类型', - `CREATE_USER` bigint(64) NULL DEFAULT NULL COMMENT '创建人', - `CREATE_DEPT` bigint(64) NULL DEFAULT NULL COMMENT '创建部门', - `CREATE_TIME` datetime NULL DEFAULT NULL COMMENT '创建时间', - `UPDATE_USER` bigint(64) NULL DEFAULT NULL COMMENT '修改人', - `UPDATE_TIME` datetime NULL DEFAULT NULL COMMENT '修改时间', - `STATUS` int(2) NULL DEFAULT 0 COMMENT '状态', - `IS_DELETED` int(2) NOT NULL DEFAULT 0 COMMENT '是否已删除', - `TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户', - `CLOCK_ID` bigint(20) NULL DEFAULT NULL COMMENT '表针识别,表盘ID', - `CAMERA_ID` bigint(20) NULL DEFAULT NULL COMMENT '视频巡检摄像机ID', - `DICT_TYPE` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记值方式为选择时选择值', - `UP_LIMIT` double NULL DEFAULT NULL COMMENT '上限值', - `DOWN_LIMIT` double NULL DEFAULT NULL COMMENT '下限值', - `SUGGESTION` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '问题排除建议', - `SORT` int(11) NULL DEFAULT 0 COMMENT '排序', - `SUPPORT_AUTO_VIDEO` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是支持的巡检类型 0普通巡检 1视频自动巡检 2机器人巡检', - `CHECK_TYPE_SON` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '存字典表key 检测类型子类 子类的子类通过-隔开例如:1-12', - `CAMERA_ADDR` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开关/灯/表盘在摄像机可视面二维坐标位置 例如:2 1 表示第三行第二列 行列均从0开始记录 默认 0 0 如果有多张图则:0 0 1( 最后一位表示所在图片 最后一位1表示第二张图) 默认0 0 0', - `OTHER_PARAM` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '其他参数 例如多联断路器内断路器的个数', - `CHECK_VAL` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '校验值 用来判断当前值是否正确:枚举数据通过 “ ”隔开 区间通过~隔开', - PRIMARY KEY (`ID`) USING BTREE, - UNIQUE INDEX `UK_OBJECT_CONTENT_CODE`(`CODE`) USING BTREE, - INDEX `idx_is_deleted_tenant_id`(`IS_DELETED`, `TENANT_ID`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '巡检对象内容' ROW_FORMAT = Dynamic; -SET FOREIGN_KEY_CHECKS = 1; - --- 巡检内容定义添加物模型标识字段 -alter table hz_st_re_content_definition add COLUMN `model_signage` VARCHAR(64) comment '模型标识'; --- 巡检内容定义添加物模型属性标识字段 -alter table hz_st_re_content_definition add COLUMN `attr_signage` VARCHAR(50) comment '属性标识'; --- 巡检内容定义添加物模型属性名称字段 -alter table hz_st_re_content_definition add COLUMN `attr_name` VARCHAR(64) comment '属性名称'; - --- 设备巡检内容添加物模型标识字段 -alter table hz_st_re_content add COLUMN `model_signage` VARCHAR(64) comment '模型标识'; --- 设备巡检内容添加物模型属性标识字段 -alter table hz_st_re_content add COLUMN `attr_signage` VARCHAR(50) comment '属性标识'; --- 设备巡检内容添加物模型属性名称字段 -alter table hz_st_re_content add COLUMN `attr_name` VARCHAR(64) comment '属性名称'; --- 设备巡检内容添加采集点ID字段 -alter table hz_st_re_content add COLUMN `fac_device_id` VARCHAR(64) comment '关联的hz3000设备id'; --- 设备巡检内容添加采集点名称字段 -alter table hz_st_re_content add COLUMN `fac_device_name` VARCHAR(64) comment '关联的hz3000设备名称'; - --- 设备巡检项目添加设备编号字段 -alter table hz_st_re_project add COLUMN `em_code` VARCHAR(50) comment '设备编号'; - --- 设备巡检对象添加设备字段 -alter table hz_st_re_object add COLUMN `em_codes` VARCHAR(255) comment '设备编号,按逗号分隔'; - --- 巡检模板添加巡检对象 -alter table hz_st_re_template add COLUMN `object_id` BIGINT(20) comment '巡检对象ID'; - --- 巡检任务中巡检内容执行情况添加模型属性标识、名称字段 -alter table hz_st_ex_object_project_content add COLUMN `attr_signage` VARCHAR(50) comment '属性标识'; -alter table hz_st_ex_object_project_content add COLUMN `attr_name` VARCHAR(64) comment '属性名称'; - --- 巡检路径添加类型 -alter table hz_st_re_route add COLUMN `type` VARCHAR(2) comment '巡检路线 字典:routeType 1-值班 2-通用'; - --- 巡检路径类型字典 -INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1684523371508834306, 0, 'routeType', '-1', '巡检路径类型', 23, '', 0, 0, 0, -1, 'inspect'); -INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1684523447710949377, 1684523371508834306, 'routeType', '1', '值班', 1, '', 0, 0, 0, -1, 'inspect'); -INSERT INTO `bladex`.`blade_dict` (`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`, `dict_type`, `app_id`, `app_code`) VALUES (1684523498650771458, 1684523371508834306, 'routeType', '2', '计划', 2, '', 0, 0, 0, -1, 'inspect'); diff --git a/hzims-service/message/src/main/resources/db/2.0.0.sql b/hzims-service/message/src/main/resources/db/2.0.0.sql deleted file mode 100644 index ac22225..0000000 --- a/hzims-service/message/src/main/resources/db/2.0.0.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter table `hzims_message_push_record` add column `fault_result` varchar(1000) comment '推送失败信息'; -alter table `hzims_message_push_record` MODIFY `TASK_ID` BIGINT(20) NULL; \ No newline at end of file diff --git a/hzims-service/message/src/main/resources/db/1.0.1.sql b/hzims-service/message/src/main/resources/db/2.0.0.sql.1 similarity index 100% rename from hzims-service/message/src/main/resources/db/1.0.1.sql rename to hzims-service/message/src/main/resources/db/2.0.0.sql.1 diff --git a/hzims-service/operational/src/main/resources/db/2.0.0.sql b/hzims-service/operational/src/main/resources/db/2.0.0.sql.1 similarity index 100% rename from hzims-service/operational/src/main/resources/db/2.0.0.sql rename to hzims-service/operational/src/main/resources/db/2.0.0.sql.1 diff --git a/hzims-service/safeproduct/src/main/resources/db/2.0.0.sql b/hzims-service/safeproduct/src/main/resources/db/2.0.0.sql.1 similarity index 100% rename from hzims-service/safeproduct/src/main/resources/db/2.0.0.sql rename to hzims-service/safeproduct/src/main/resources/db/2.0.0.sql.1 diff --git a/hzims-service/ticket/src/main/resources/db/3.0.0.sql b/hzims-service/ticket/src/main/resources/db/3.0.0.sql.1 similarity index 100% rename from hzims-service/ticket/src/main/resources/db/3.0.0.sql rename to hzims-service/ticket/src/main/resources/db/3.0.0.sql.1