From f6a409c177b3ade93fb67ba0d0b15b2b20180e43 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 16 Apr 2024 15:37:16 +0800 Subject: [PATCH] =?UTF-8?q?#operational=E5=88=9D=E5=A7=8Bsql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/src/main/resources/db/1.0.0.sql | 35 --------- .../operational/src/main/resources/db/2.0.2.sql | 91 ++++++++++++++++++++++ 2 files changed, 91 insertions(+), 35 deletions(-) create mode 100644 hzims-service/operational/src/main/resources/db/2.0.2.sql diff --git a/hzims-service/operational/src/main/resources/db/1.0.0.sql b/hzims-service/operational/src/main/resources/db/1.0.0.sql index 7a8f34d..cb48513 100644 --- a/hzims-service/operational/src/main/resources/db/1.0.0.sql +++ b/hzims-service/operational/src/main/resources/db/1.0.0.sql @@ -1965,41 +1965,6 @@ CREATE TABLE `SCREEN_MAIN_PAGE_CONFIGURE` ( ) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI COMMENT = '大屏首页配置' ROW_FORMAT = DYNAMIC; -- ---------------------------- --- TABLE STRUCTURE FOR HZIMS_OPER_CONSTRUCTION --- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_OPER_CONSTRUCTION`; -CREATE TABLE `HZIMS_OPER_CONSTRUCTION` ( - `ID` BIGINT(20) NOT NULL COMMENT '主键ID', - `CODE` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '施工编号', - `CONSTRUCTION_TIME` DATETIME NULL DEFAULT NULL COMMENT '施工时间', - `OVERHAUL_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '检修名称', - `CONSTRUCTION_LOCATION` VARCHAR(1024) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '施工地点', - `OVERHAUL_HEAD` BIGINT(20) NULL DEFAULT NULL COMMENT '检修负责人', - `OVERHAUL_HEAD_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '检修负责人名称', - `OVERHAUL_PERSONNEL` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '检修人员: 根据“,”分割', - `OVERHAUL_PERSONNEL_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '检修人员名称: 根据“,”分割', - `OVERHAUL_TIME` DATETIME NULL DEFAULT NULL COMMENT '检修时间', - `COMPLETE_WORK_DESC` VARCHAR(2048) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NOT NULL COMMENT '今日完成任务描述', - `PLAN_WORK_DESC` VARCHAR(2048) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '明日工作计划描述', - `CONSTRUCTION_IMG` VARCHAR(512) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '施工图片: 根据“,”分割', - `CONSTRUCTION_ATTACHMENT` VARCHAR(512) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '施工附件', - `RECORDER` BIGINT(20) NULL DEFAULT NULL COMMENT '记录人', - `RECORDER_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '记录人名称', - `REVIEWER` BIGINT(20) NULL DEFAULT NULL COMMENT '审核人', - `REVIEWER_NAME` VARCHAR(255) 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', - `STATUS` TINYINT(4) NULL DEFAULT 0 COMMENT '业务状态', - `CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位', - `IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除', - `CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人', - `CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间', - `UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人', - `UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间', - PRIMARY KEY (`ID`) USING BTREE -) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI COMMENT = '施工日志' ROW_FORMAT = DYNAMIC; - - --- ---------------------------- -- TABLE STRUCTURE FOR TEMP_HIK_POINT -- ---------------------------- DROP TABLE IF EXISTS `TEMP_HIK_POINT`; diff --git a/hzims-service/operational/src/main/resources/db/2.0.2.sql b/hzims-service/operational/src/main/resources/db/2.0.2.sql new file mode 100644 index 0000000..9adf641 --- /dev/null +++ b/hzims-service/operational/src/main/resources/db/2.0.2.sql @@ -0,0 +1,91 @@ +CREATE TABLE IF NOT EXISTS `HZIMS_OPER_CONSTRUCTION` ( + `ID` BIGINT(20) NOT NULL COMMENT '主键ID', + `CODE` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '施工编号', + `CONSTRUCTION_TIME` DATETIME NULL DEFAULT NULL COMMENT '施工时间', + `OVERHAUL_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '检修名称', + `CONSTRUCTION_LOCATION` VARCHAR(1024) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '施工地点', + `OVERHAUL_HEAD` BIGINT(20) NULL DEFAULT NULL COMMENT '检修负责人', + `OVERHAUL_HEAD_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '检修负责人名称', + `OVERHAUL_PERSONNEL` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '检修人员: 根据“,”分割', + `OVERHAUL_PERSONNEL_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '检修人员名称: 根据“,”分割', + `OVERHAUL_TIME` DATETIME NULL DEFAULT NULL COMMENT '检修时间', + `COMPLETE_WORK_DESC` VARCHAR(2048) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NOT NULL COMMENT '今日完成任务描述', + `PLAN_WORK_DESC` VARCHAR(2048) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '明日工作计划描述', + `CONSTRUCTION_IMG` VARCHAR(512) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '施工图片: 根据“,”分割', + `CONSTRUCTION_ATTACHMENT` VARCHAR(512) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '施工附件', + `RECORDER` BIGINT(20) NULL DEFAULT NULL COMMENT '记录人', + `RECORDER_NAME` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '记录人名称', + `REVIEWER` BIGINT(20) NULL DEFAULT NULL COMMENT '审核人', + `REVIEWER_NAME` VARCHAR(255) 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', + `STATUS` TINYINT(4) NULL DEFAULT 0 COMMENT '业务状态', + `CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建单位', + `IS_DELETED` TINYINT(4) NOT NULL DEFAULT 0 COMMENT '是否删除', + `CREATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '创建人', + `CREATE_TIME` DATETIME NOT NULL COMMENT '创建时间', + `UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人', + `UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC; + +ALTER TABLE `HZIMS_OPER_ACCESS_CONTENT` ADD COLUMN `STATION_CODE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL AFTER `TICKET_TEMPLATE_ID`; + +ALTER TABLE `HZIMS_OPER_ACCESS_CONTENT` ADD COLUMN `STATION_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL AFTER `STATION_CODE`; + +ALTER TABLE `HZIMS_OPER_ACCESS_CONTENT` ADD COLUMN `EM_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL AFTER `STATION_NAME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_CONTENT` MODIFY COLUMN `EM_CODE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '设备编码' AFTER `PLAN_ID`; + +ALTER TABLE `HZIMS_OPER_ACCESS_LIBRARY` ADD COLUMN `EM_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称' AFTER `EM_CODE`; + +ALTER TABLE `HZIMS_OPER_ACCESS_LIBRARY` MODIFY COLUMN `EM_CODE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备编码' AFTER `ID`; + +ALTER TABLE `HZIMS_OPER_ACCESS_LIBRARY` MODIFY COLUMN `PERIOD` INT(11) NULL DEFAULT NULL COMMENT '检修间隔' AFTER `GRADE_CODE`; + +ALTER TABLE `HZIMS_OPER_ACCESS_LIBRARY` MODIFY COLUMN `WORK_STANDARDS` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '操作规范' AFTER `PERIOD`; + +ALTER TABLE `HZIMS_OPER_ACCESS_LIBRARY` MODIFY COLUMN `SAFE_INFOS` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '安全警告' AFTER `WORK_STANDARDS`; + +ALTER TABLE `HZIMS_OPER_ACCESS_LIBRARY` MODIFY COLUMN `STOP_HOURS` INT(11) NULL DEFAULT NULL COMMENT '停用时间' AFTER `SAFE_INFOS`; + +ALTER TABLE `HZIMS_OPER_ACCESS_LIBRARY` MODIFY COLUMN `DESCRIPITON` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '描述' AFTER `LAST_SERVICE_TIME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_PLAN` ADD COLUMN `UPDATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '修改人名称' AFTER `NEXT_STEP_OPERATOR`; + +ALTER TABLE `HZIMS_OPER_ACCESS_PLAN` ADD COLUMN `CREATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建人名称' AFTER `UPDATE_USER_NAME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_PLAN` ADD COLUMN `MANAGER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL AFTER `CREATE_USER_NAME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_PLAN` ADD COLUMN `TECH_LEAD_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL AFTER `MANAGER_NAME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_STATISTICS` ADD COLUMN `EM_CODE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备编号' AFTER `TASK_ID`; + +ALTER TABLE `HZIMS_OPER_ACCESS_STATISTICS` ADD COLUMN `PLAN_HOURS` INT(11) NULL DEFAULT NULL COMMENT '计划工时' AFTER `PLAN_END_TIME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_STATISTICS` ADD COLUMN `UPDATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '修改人名称' AFTER `UPDATE_TIME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_STATISTICS` ADD COLUMN `CREATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建人名称' AFTER `UPDATE_USER_NAME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_STATISTICS` ADD COLUMN `MANAGER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '负责人名称' AFTER `CREATE_USER_NAME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_STATISTICS` ADD COLUMN `EM_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称' AFTER `MANAGER_NAME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK` ADD COLUMN `STATION_CODE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点编码' AFTER `ID`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK` ADD COLUMN `STATION_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点名称' AFTER `STATION_CODE`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK` ADD COLUMN `EM_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称' AFTER `EM_CODE`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK` ADD COLUMN `PLAN_HOURS` INT(11) NULL DEFAULT NULL COMMENT '计划工时' AFTER `PLAN_END_TIME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK` ADD COLUMN `CONSTRUCTION_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '施工日志ID' AFTER `NEXT_STEP_OPERATOR`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK` ADD COLUMN `UPDATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '修改人名称' AFTER `CONSTRUCTION_ID`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK` ADD COLUMN `CREATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建人名称' AFTER `UPDATE_USER_NAME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK` ADD COLUMN `HANDLER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL AFTER `CREATE_USER_NAME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK_DETAIL` ADD COLUMN `UPDATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '修改人名称' AFTER `UPDATE_TIME`; + +ALTER TABLE `HZIMS_OPER_ACCESS_TASK_DETAIL` ADD COLUMN `CREATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建人名称' AFTER `UPDATE_USER_NAME`; \ No newline at end of file