From 1e7d82f0e62786cb11dfe0b76fc7f403fb662305 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Tue, 16 Apr 2024 16:38:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:operational=E8=84=9A=E6=9C=AC=E6=95=B4?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspect/src/main/resources/db/1.0.0.sql.1 | 78 ---------------------- .../operational/src/main/resources/db/2.0.0.sql | 8 +++ 2 files changed, 8 insertions(+), 78 deletions(-) delete mode 100644 hzims-service/inspect/src/main/resources/db/1.0.0.sql.1 create mode 100644 hzims-service/operational/src/main/resources/db/2.0.0.sql diff --git a/hzims-service/inspect/src/main/resources/db/1.0.0.sql.1 b/hzims-service/inspect/src/main/resources/db/1.0.0.sql.1 deleted file mode 100644 index 61ae645..0000000 --- a/hzims-service/inspect/src/main/resources/db/1.0.0.sql.1 +++ /dev/null @@ -1,78 +0,0 @@ -SET FOREIGN_KEY_CHECKS=0; - -ALTER TABLE `hzims_inspect`.`hz_st_ex_task` ADD COLUMN `push_status` bigint(1) NULL DEFAULT NULL COMMENT '推送状态' AFTER `message_template_id`; - -SET FOREIGN_KEY_CHECKS=1; - --- 创建巡检内容定义表结构 -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/operational/src/main/resources/db/2.0.0.sql b/hzims-service/operational/src/main/resources/db/2.0.0.sql new file mode 100644 index 0000000..d6b55ed --- /dev/null +++ b/hzims-service/operational/src/main/resources/db/2.0.0.sql @@ -0,0 +1,8 @@ +alter table `hzims_oper_maintenance_library` add column `duty_class_tree` VARCHAR(100) NULL COMMENT '班次树,机构/班次类型/班次'; +alter table `hzims_station` add COLUMN `deleted_id` BIGINT(20) DEFAULT null COMMENT '删除记录ID'; +update `hzims_station` set `deleted_id` = id where `IS_DELETED` = 1; +ALTER TABLE `hzims_station` ADD CONSTRAINT index_code_deleted UNIQUE (`code`, `deleted_id`); +alter table `hzims_station` add column `is_push_project` tinyint(2) default 0 comment '是否推送数据平台'; +alter table `hzims_station` add column `is_push_fdp` tinyint(2) default 0 comment '是否推送FDP'; +alter table hzims_oper_maintenance_plan add column station_code varchar(60) comment '站点编码'; +alter table `hzims_oper_maintenance_task` add column `is_delay` tinyint(2) DEFAULT 0 COMMENT '是否逾期'; \ No newline at end of file