From a786da2184f8f1badd58e537cfd3a05e27e1f3d6 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 21 Feb 2024 10:12:19 +0800 Subject: [PATCH] =?UTF-8?q?sql=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims-alarm/src/main/resources/db/1.0.0.sql | 86 +++++++++--- .../operational/src/main/resources/db/1.0.1.sql | 156 +++++++++++++++++++++ .../ticket/src/main/resources/db/1.0.0.sql | 34 +++++ 3 files changed, 258 insertions(+), 18 deletions(-) diff --git a/hzims-service/hzims-alarm/src/main/resources/db/1.0.0.sql b/hzims-service/hzims-alarm/src/main/resources/db/1.0.0.sql index ae22619..30ba7e5 100644 --- a/hzims-service/hzims-alarm/src/main/resources/db/1.0.0.sql +++ b/hzims-service/hzims-alarm/src/main/resources/db/1.0.0.sql @@ -101,24 +101,32 @@ CREATE TABLE `HZIMS_ALARM_CONFIG_DETAIL` ( -- ---------------------------- DROP TABLE IF EXISTS `HZIMS_ALARM_HANDLE`; CREATE TABLE `HZIMS_ALARM_HANDLE` ( - `ID` BIGINT(20) NOT NULL COMMENT '主键ID', - `ALARM_ID` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警主键ID', - `STATION_CODE` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点编号', - `ALARM_TYPE` SMALLINT(6) NULL DEFAULT NULL COMMENT '告警类型', - `ALARM_TIME` DATETIME NULL DEFAULT NULL COMMENT '告警时间', - `ALARM_CONTENT` VARCHAR(1024) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '告警内容', - `TYPE` TINYINT(1) NULL DEFAULT NULL COMMENT '类型:0-系统告警 1-智能告警', - `HANDLE_WAY` SMALLINT(6) NULL DEFAULT NULL COMMENT '处理方式', - `DETAIL_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '处理详情ID', - `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) NOT NULL COMMENT '状态', - `CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门', - PRIMARY KEY (`ID`) USING BTREE + `ID` bigint(20) NOT NULL COMMENT '主键ID', + `ALARM_ID` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警主键ID', + `STATION_CODE` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点编号', + `ALARM_TYPE` smallint(6) NULL DEFAULT NULL COMMENT '告警类型', + `ALARM_TIME` datetime(0) NULL DEFAULT NULL COMMENT '告警时间', + `ALARM_CONTENT` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警内容', + `TYPE` tinyint(1) NULL DEFAULT NULL COMMENT '类型:0-系统告警 1-智能告警', + `HANDLE_WAY` smallint(6) NULL DEFAULT NULL COMMENT '处理方式', + `TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID', + `CREATE_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATE_TIME` datetime(0) 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) NOT NULL DEFAULT 0 COMMENT '状态', + `CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `HANDLE_USER` bigint(20) NULL DEFAULT NULL COMMENT '通知处理人', + `PHENOMENON_ID` bigint(20) NULL DEFAULT NULL COMMENT '现象ID', + `ACCESS_ID` bigint(20) NULL DEFAULT NULL COMMENT '检修ID', + `DELAY_TIME` datetime(0) NULL DEFAULT NULL COMMENT '延后时间', + `DELAY_CAUSE` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '延后原因', + `FALSE_ALARM_DESC` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '误报描述', + `FILE_PATH` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件路径', + `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户姓名', + `CREATE_DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建机构名称', + PRIMARY KEY (`ID`) USING BTREE ) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC; -- ---------------------------- @@ -219,4 +227,46 @@ CREATE TABLE `HZIMS_INTERRUPTION_ALARM` ( `UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '更新时间', `IS_DELETED` TINYINT(4) NOT NULL COMMENT '是否删除', PRIMARY KEY (`ID`) USING BTREE +) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC; + +DROP TABLE IF EXISTS `hzims_alarm_handle_flow`; +CREATE TABLE `hzims_alarm_handle_flow` ( + `ID` bigint(20) NOT NULL COMMENT '主键ID', + `ALARM_ID` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警主键ID', + `STATION_CODE` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '站点编号', + `ALARM_TYPE` smallint(6) NULL DEFAULT NULL COMMENT '告警类型', + `ALARM_TIME` datetime(0) NULL DEFAULT NULL COMMENT '告警时间', + `ALARM_CONTENT` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '告警内容', + `TYPE` tinyint(1) NULL DEFAULT NULL COMMENT '类型:0-系统告警 1-智能告警', + `HANDLE_WAY` smallint(6) NULL DEFAULT NULL COMMENT '告警状态 1L,2L,3L,4L,5L 误报 、延后、缺陷 、检修、处理', + `HANDLE_USER` bigint(20) NULL DEFAULT NULL COMMENT '通知处理人', + `PHENOMENON_ID` bigint(20) NULL DEFAULT NULL COMMENT '现象ID', + `ACCESS_ID` bigint(20) NULL DEFAULT NULL COMMENT '检修ID', + `DELAY_TIME` datetime(0) NULL DEFAULT NULL COMMENT '延后时间', + `DELAY_CAUSE` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '延后原因', + `FALSE_ALARM_DESC` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '误报描述', + `FILE_PATH` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件路径', + `DEAL_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理方式', + `DEAL_RESULT` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理结果', + `DEAL_DESC` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理描述', + `DEAL_PATH` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理附件', + `CHECK_FLAG` tinyint(4) NULL DEFAULT NULL COMMENT '审批结果 0,不通过;1为通过', + `CHECK_DESC` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批说明', + `CURRENT_OPERATOR` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '当前处理环节', + `CURRENT_LINK_HANDLER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '当前环节处理人', + `PROCESS_INSTANCE_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程实例', + `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户姓名', + `HANDLE_USER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理人姓名', + `APPROVAL_USER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审批人', + `APPROVAL_USER_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', + `CREATE_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATE_TIME` datetime(0) 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 DEFAULT 0 COMMENT '是否删除', + `STATUS` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态', + `CREATE_DEPT` bigint(20) NULL DEFAULT NULL COMMENT '创建部门', + `CREATE_DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建机构名称', + PRIMARY KEY (`ID`) USING BTREE ) ENGINE = INNODB CHARACTER SET = UTF8 COLLATE = UTF8_GENERAL_CI ROW_FORMAT = DYNAMIC; \ No newline at end of file diff --git a/hzims-service/operational/src/main/resources/db/1.0.1.sql b/hzims-service/operational/src/main/resources/db/1.0.1.sql index a981cd1..7e016a8 100644 --- a/hzims-service/operational/src/main/resources/db/1.0.1.sql +++ b/hzims-service/operational/src/main/resources/db/1.0.1.sql @@ -9,3 +9,159 @@ alter table `hzims_oper_maintenance_plan` add column `create_user_name` varchar( alter table `hzims_oper_maintenance_plan` add column `update_user_name` varchar(255) comment '更新人姓名'; -- 日常维护任务添加工作票名称 alter table `hzims_oper_maintenance_task` add COLUMN `ticket_name` VARCHAR(255) comment '票据名称'; + +CREATE TABLE `hzims_operation`.`hz_ims_duty_log` ( + `id` bigint(20) NOT NULL, + `duty_id` bigint(20) NULL DEFAULT NULL, + `time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `duty_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `class_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `operation_finish` tinyint(6) NULL DEFAULT NULL, + `operation_un_finish` tinyint(6) NULL DEFAULT NULL, + `operation_cancel` tinyint(6) NULL DEFAULT NULL, + `work_doing` tinyint(6) NULL DEFAULT NULL, + `work_un_finish` tinyint(6) NULL DEFAULT NULL, + `work_finish` tinyint(6) NULL DEFAULT NULL, + `work_cancel` tinyint(6) NULL DEFAULT NULL, + `hand_master` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `hand_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `hand_time` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `carry_master` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `carry_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `carry_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `duty_pic` varchar(1800) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `duty_status` varchar(1800) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `notice` varchar(1800) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `STATUS` tinyint(4) NULL DEFAULT NULL COMMENT '状态(1 未提交,2流程审核中,3已完成。)', + `CREATE_TIME` datetime(0) NOT NULL COMMENT '创建时间', + `UPDATE_TIME` datetime(0) 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 DEFAULT 0 COMMENT '是否删除', + `CREATE_DEPT` bigint(20) NULL DEFAULT NULL, + `TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户ID', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_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 COMMENT '站点编码' AFTER `PLAN_ID`; + +ALTER TABLE `hzims_oper_access_content` 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_content` 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_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`; + +ALTER TABLE `hzims_oper_appearance` ADD COLUMN `FINDER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '问题发现人' AFTER `EXIST_DEFECT_ID`; + +ALTER TABLE `hzims_oper_appearance` ADD COLUMN `DISCRIMINATOR_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '甄别人' AFTER `FINDER_NAME`; + +ALTER TABLE `hzims_oper_appearance` ADD COLUMN `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `DISCRIMINATOR_NAME`; + +ALTER TABLE `hzims_oper_appearance` ADD COLUMN `DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称' AFTER `CREATE_USER_NAME`; + +ALTER TABLE `hzims_oper_defect` ADD COLUMN `HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '检修任务处理人' AFTER `CONCLUSION_TIME`; + +ALTER TABLE `hzims_oper_defect` ADD COLUMN `FINDER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发现人' AFTER `HANDLER_NAME`; + +ALTER TABLE `hzims_oper_defect` ADD COLUMN `CONCLUSION_PEOPLE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定论人' AFTER `FINDER_NAME`; + +ALTER TABLE `hzims_oper_defect` ADD COLUMN `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CONCLUSION_PEOPLE_NAME`; + +ALTER TABLE `hzims_oper_defect` ADD COLUMN `DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称' AFTER `CREATE_USER_NAME`; + +ALTER TABLE `hzims_oper_defect` ADD COLUMN `PRINCIPAL_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作票负责人' AFTER `DEPT_NAME`; + +ALTER TABLE `hzims_oper_defect` ADD COLUMN `PLAN_HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消缺处理人' AFTER `PRINCIPAL_NAME`; + +ALTER TABLE `hzims_oper_defect_statistics` ADD COLUMN `DISCRIMINATOR_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '甄别人' AFTER `TICKET_ID`; + +ALTER TABLE `hzims_oper_defect_statistics` ADD COLUMN `FINDER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发现人' AFTER `DISCRIMINATOR_NAME`; + +ALTER TABLE `hzims_oper_defect_statistics` ADD COLUMN `HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '检修任务处理人' AFTER `FINDER_NAME`; + +ALTER TABLE `hzims_oper_defect_statistics` ADD COLUMN `DISPOSER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '处理人' AFTER `HANDLER_NAME`; + +ALTER TABLE `hzims_oper_defect_statistics` ADD COLUMN `CONCLUSION_PEOPLE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定论人' AFTER `DISPOSER_NAME`; + +ALTER TABLE `hzims_oper_defect_statistics` ADD COLUMN `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CONCLUSION_PEOPLE_NAME`; + +ALTER TABLE `hzims_oper_defect_statistics` ADD COLUMN `DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称' AFTER `CREATE_USER_NAME`; + +ALTER TABLE `hzims_oper_defect_statistics` ADD COLUMN `PRINCIPAL_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作票负责人' AFTER `DEPT_NAME`; + +ALTER TABLE `hzims_oper_defect_statistics` ADD COLUMN `PLAN_HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消缺处理人' AFTER `PRINCIPAL_NAME`; + +ALTER TABLE `hzims_oper_maintenance_plan` ADD COLUMN `disposer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行人姓名' AFTER `station_code`; + +ALTER TABLE `hzims_oper_maintenance_plan` ADD COLUMN `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `disposer_name`; + +ALTER TABLE `hzims_oper_maintenance_plan` ADD COLUMN `UPDATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `CREATE_USER_NAME`; + +ALTER TABLE `hzims_oper_maintenance_task` DROP INDEX `idx_id`; + +ALTER TABLE `hzims_oper_maintenance_task` ADD COLUMN `is_delay` tinyint(2) NULL DEFAULT 0 COMMENT '是否逾期' AFTER `flow_description`; + +ALTER TABLE `hzims_oper_maintenance_task` ADD COLUMN `disposer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行人姓名' AFTER `is_delay`; + +ALTER TABLE `hzims_oper_maintenance_task` ADD COLUMN `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `disposer_name`; + +ALTER TABLE `hzims_oper_maintenance_task` ADD COLUMN `UPDATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `CREATE_USER_NAME`; + +ALTER TABLE `hzims_oper_maintenance_task` ADD COLUMN `ticket_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '票据名称' AFTER `UPDATE_USER_NAME`; + +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `FINDER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '问题发现人' AFTER `TICKET_ID`; + +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `DISCRIMINATOR_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '甄别人' AFTER `FINDER_NAME`; + +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `HANDLE_PROGRAMME_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '决策处理方案人' AFTER `DISCRIMINATOR_NAME`; + +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '检修任务处理人' AFTER `HANDLE_PROGRAMME_NAME`; + +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `CONCLUSION_PEOPLE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定论人' AFTER `HANDLER_NAME`; + +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CONCLUSION_PEOPLE_NAME`; + +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称' AFTER `CREATE_USER_NAME`; + +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `PRINCIPAL_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作票负责人' AFTER `DEPT_NAME`; + +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `PLAN_HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消缺处理人' AFTER `PRINCIPAL_NAME`; + diff --git a/hzims-service/ticket/src/main/resources/db/1.0.0.sql b/hzims-service/ticket/src/main/resources/db/1.0.0.sql index b4913a0..242d0f6 100644 --- a/hzims-service/ticket/src/main/resources/db/1.0.0.sql +++ b/hzims-service/ticket/src/main/resources/db/1.0.0.sql @@ -616,3 +616,37 @@ CREATE TABLE `HZIMS_WORK_TICKET_TEMPLATE` ( DROP VIEW IF EXISTS `V_HZIMS_TICKET_INFO`; CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `V_HZIMS_TICKET_INFO` AS SELECT `HZIMS_TICKET_INFO`.`ID` AS `ID`,`HZIMS_TICKET_INFO`.`PROCESS_INSTANCE_ID` AS `PROCESS_INSTANCE_ID`,`HZIMS_TICKET_INFO`.`TYPE` AS `TYPE`,`HZIMS_TICKET_INFO`.`COMPANY` AS `COMPANY`,`HZIMS_TICKET_INFO`.`CODE` AS `CODE`,`HZIMS_TICKET_INFO`.`TASK_TYPE` AS `TASK_TYPE`,`HZIMS_TICKET_INFO`.`TASK_ID` AS `TASK_ID`,`HZIMS_TICKET_INFO`.`TASK_NAME` AS `TASK_NAME`,`HZIMS_TICKET_INFO`.`PLAN_START_TIME` AS `PLAN_START_TIME`,`HZIMS_TICKET_INFO`.`PLAN_END_TIME` AS `PLAN_END_TIME`,`HZIMS_TICKET_INFO`.`STATUS` AS `STATUS`,`HZIMS_TICKET_INFO`.`TENANT_ID` AS `TENANT_ID`,`HZIMS_TICKET_INFO`.`CREATE_USER` AS `CREATE_USER`,`HZIMS_TICKET_INFO`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS_TICKET_INFO`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS_TICKET_INFO`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS_TICKET_INFO`.`IS_DELETED` AS `IS_DELETED`,`HZIMS_TICKET_INFO`.`CREATE_DEPT` AS `CREATE_DEPT`,`HZIMS_TICKET_INFO`.`FLOW_DESCRIPTION` AS `FLOW_DESCRIPTION` FROM (SELECT `HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`ID` AS `ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`PROCESS_INSTANCE_ID` AS `PROCESS_INSTANCE_ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TYPE` AS `TYPE`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`COMPANY` AS `COMPANY`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CODE` AS `CODE`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TASK_TYPE` AS `TASK_TYPE`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TASK_ID` AS `TASK_ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TASK_NAME` AS `TASK_NAME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`PLAN_START_TIME` AS `PLAN_START_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`PLAN_END_TIME` AS `PLAN_END_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`STATUS` AS `STATUS`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`TENANT_ID` AS `TENANT_ID`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CREATE_USER` AS `CREATE_USER`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`IS_DELETED` AS `IS_DELETED`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`CREATE_DEPT` AS `CREATE_DEPT`,`HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO`.`FLOW_DESCRIPTION` AS `FLOW_DESCRIPTION` FROM `HZIMS-TICKET`.`HZIMS_WORK_TICKET_INFO` UNION ALL SELECT `HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`ID` AS `ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`PROCESS_INSTANCE_ID` AS `PROCESS_INSTANCE_ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TICKET_TYPE` AS `TYPE`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`COMPANY` AS `COMPANY`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CODE` AS `CODE`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TASK_TYPE` AS `TASK_TYPE`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TASK_ID` AS `TASK_ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TASK_NAME` AS `TASK_NAME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`START_TIME` AS `PLAN_START_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`END_TIME` AS `PLAN_END_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`STATUS` AS `STATUS`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`TENANT_ID` AS `TENANT_ID`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CREATE_USER` AS `CREATE_USER`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CREATE_TIME` AS `CREATE_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`UPDATE_USER` AS `UPDATE_USER`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`UPDATE_TIME` AS `UPDATE_TIME`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`IS_DELETED` AS `IS_DELETED`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`CREATE_DEPT` AS `CREATE_DEPT`,`HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`.`FLOW_DESCRIPTION` AS `FLOW_DESCRIPTION` FROM `HZIMS-TICKET`.`HZIMS_STANDARD_TICKET_INFO`) `HZIMS_TICKET_INFO` WHERE (`HZIMS_TICKET_INFO`.`IS_DELETED` = 0); + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人姓名' AFTER `class_group_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人姓名' AFTER `create_user_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `issue_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发令人名称' AFTER `update_user_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `access_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '受令人名称' AFTER `issue_order_person_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `guardian_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `access_order_person_name`; + +ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人名称' AFTER `guardian_name`; + + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `end_principal_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结负责人' AFTER `other_items`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `end_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结许可人' AFTER `end_principal_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `finish_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作票终结许可人' AFTER `end_licensor_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_offline` tinyint(2) NULL DEFAULT 0 COMMENT '是否线下 : 1-线下,0-线上' AFTER `is_start`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `signer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签发人名称' AFTER `is_offline`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `licensor_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `signer_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `watch_principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '值班负责人名称' AFTER `licensor_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `implement_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行状态字段:0未执行,1为执行(运行人员确认过)' AFTER `watch_principal_name`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人名称' AFTER `implement_status`; + +ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `update_user_name`; +