From da7920e48f749f785f0cf189d03faf9d9ee6a5dc Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 16 Apr 2024 16:33:54 +0800 Subject: [PATCH 1/7] =?UTF-8?q?#=E5=88=9D=E5=A7=8Bsql?= 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 | 2 +- .../hzims-middle/src/main/resources/db/2.0.0.sql | 11 +- .../inspect/src/main/resources/db/1.0.0.sql | 123 +++++++-------------- 3 files changed, 46 insertions(+), 90 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 5cd79a5..85c309f 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 @@ -266,4 +266,4 @@ CREATE TABLE IF NOT EXISTS `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; \ No newline at end of file +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; \ No newline at end of file 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 index 85817cf..3510c9b 100644 --- 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,6 +1,5 @@ -INSERT INTO `process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (9, 9, 'offlineWorkTicket', 'offlineWorkTicket', '线下工作票', '线下工作票', 'Y', 0, NULL, '2023-12-28 16:35:10', '2023-12-28 16:35:14', '线下工作票流程'); - -INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (9, 9, 'WORK_TASK', 'WORK_TASK', '工作任务单V4', '工作任务单', 'Y', 0, NULL, '2023-07-25 18:35:01', '2024-01-09 14:48:18', '工作任务单流程'); -INSERT INTO `PROCESS_DICT`(`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (10, 10, 'HAZARD_RISK', 'HAZARD_RISK', '风险排查', '风险排查', 'Y', 0, NULL, '2023-07-25 18:35:01', '2023-09-19 22:35:40', '风险排查流程'); -INSERT INTO `PROCESS_DICT`(`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (11, 11, 'DEALALARM', 'DEALALARM', '告警处理流程', '告警处理流程', 'Y', 0, NULL, '2024-02-19 16:56:10', '2024-02-19 16:56:34', '告警处理流程'); -INSERT INTO `PROCESS_DICT`(`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (12, 12, 'HIDDENDANGERCHECK', 'HIDDENDANGERCHECK', '隐患排查', '隐患排查', 'Y', 0, NULL, '2023-07-25 18:35:01', '2023-07-25 18:35:01', '隐患排查流程'); \ No newline at end of file +INSERT INTO `process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (10, 10, 'offlineWorkTicket', 'offlineWorkTicket', '线下工作票', '线下工作票', 'Y', 0, NULL, '2023-12-28 16:35:10', '2023-12-28 16:35:14', '线下工作票流程'); +INSERT INTO `PROCESS_DICT`(`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (11, 11, 'HAZARD_RISK', 'HAZARD_RISK', '风险排查', '风险排查', 'Y', 0, NULL, '2023-07-25 18:35:01', '2023-09-19 22:35:40', '风险排查流程'); +INSERT INTO `PROCESS_DICT`(`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (12, 12, 'DEALALARM', 'DEALALARM', '告警处理流程', '告警处理流程', 'Y', 0, NULL, '2024-02-19 16:56:10', '2024-02-19 16:56:34', '告警处理流程'); +INSERT INTO `PROCESS_DICT`(`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (13, 13, 'HIDDENDANGERCHECK', 'HIDDENDANGERCHECK', '隐患排查', '隐患排查', 'Y', 0, NULL, '2023-07-25 18:35:01', '2023-07-25 18:35:01', '隐患排查流程'); +INSERT INTO `PROCESS_DICT` (`DICT_CODE`, `DICT_SORT`, `DICT_KEY`, `DICT_VALUE`, `DICT_LABEL`, `DICT_TYPE`, `IS_DEFAULT`, `STATUS`, `CREATE_DEPT`, `CREATE_TIME`, `UPDATE_TIME`, `REMARK`) VALUES (14, 14, 'WORK_TASK', 'WORK_TASK', '工作任务单V4', '工作任务单', 'Y', 0, NULL, '2023-07-25 18:35:01', '2024-01-09 14:48:18', '工作任务单流程'); diff --git a/hzims-service/inspect/src/main/resources/db/1.0.0.sql b/hzims-service/inspect/src/main/resources/db/1.0.0.sql index 451c14a..45e932a 100644 --- a/hzims-service/inspect/src/main/resources/db/1.0.0.sql +++ b/hzims-service/inspect/src/main/resources/db/1.0.0.sql @@ -1,8 +1,7 @@ -- ---------------------------- -- Table structure for blade_module_version -- ---------------------------- -DROP TABLE IF EXISTS `blade_module_version`; -CREATE TABLE `blade_module_version` ( +CREATE TABLE IF NOT EXISTS `blade_module_version` ( `MODULE_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `VERSION` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `HISTORY` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, @@ -12,8 +11,7 @@ CREATE TABLE `blade_module_version` ( -- ---------------------------- -- Table structure for hz_inspect_temp -- ---------------------------- -DROP TABLE IF EXISTS `hz_inspect_temp`; -CREATE TABLE `hz_inspect_temp` ( +CREATE TABLE IF NOT EXISTS `hz_inspect_temp` ( `id` int(11) NOT NULL, `temp_time` datetime NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE @@ -22,8 +20,7 @@ CREATE TABLE `hz_inspect_temp` ( -- ---------------------------- -- Table structure for hz_offline_task -- ---------------------------- -DROP TABLE IF EXISTS `hz_offline_task`; -CREATE TABLE `hz_offline_task` ( +CREATE TABLE IF NOT EXISTS `hz_offline_task` ( `ID` bigint(20) NOT NULL COMMENT '主键', `TASK_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '任务名称', `TASK_STATUS` bigint(1) NULL DEFAULT NULL COMMENT '任务状态 0 - 任务开启 1 - 任务处理 2 - 任务完成 ', @@ -43,8 +40,7 @@ CREATE TABLE `hz_offline_task` ( -- ---------------------------- -- Table structure for hz_st_camera_info -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_camera_info`; -CREATE TABLE `hz_st_camera_info` ( +CREATE TABLE IF NOT EXISTS `hz_st_camera_info` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `TYPE` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '摄像头类型cameraType,1视频摄像头,2机器人摄像头,数据字典', `TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '租户ID', @@ -77,8 +73,7 @@ CREATE TABLE `hz_st_camera_info` ( -- ---------------------------- -- Table structure for hz_st_clock -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_clock`; -CREATE TABLE `hz_st_clock` ( +CREATE TABLE IF NOT EXISTS `hz_st_clock` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `CLOCK_TYPE_ID` bigint(20) NULL DEFAULT NULL COMMENT '表针类型ID', @@ -99,8 +94,7 @@ CREATE TABLE `hz_st_clock` ( -- ---------------------------- -- Table structure for hz_st_clock_type -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_clock_type`; -CREATE TABLE `hz_st_clock_type` ( +CREATE TABLE IF NOT EXISTS `hz_st_clock_type` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `CLOCK_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表盘名称', @@ -123,8 +117,7 @@ CREATE TABLE `hz_st_clock_type` ( -- ---------------------------- -- Table structure for hz_st_event_attachment -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_event_attachment`; -CREATE TABLE `hz_st_event_attachment` ( +CREATE TABLE IF NOT EXISTS `hz_st_event_attachment` ( `ID` bigint(64) NOT NULL, `EVENT_ID` bigint(20) NOT NULL COMMENT '事件ID', `FILE_URL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件路径', @@ -142,8 +135,7 @@ CREATE TABLE `hz_st_event_attachment` ( -- ---------------------------- -- Table structure for hz_st_ex_event -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_event`; -CREATE TABLE `hz_st_ex_event` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_event` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `TASK_ID` bigint(20) NULL DEFAULT NULL COMMENT '任务ID', `OBJECT_ID` bigint(20) NULL DEFAULT NULL COMMENT '对象ID', @@ -175,8 +167,7 @@ CREATE TABLE `hz_st_ex_event` ( -- ---------------------------- -- Table structure for hz_st_ex_event_record -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_event_record`; -CREATE TABLE `hz_st_ex_event_record` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_event_record` ( `ID` bigint(64) NOT NULL, `EVENT_ID` bigint(20) NOT NULL COMMENT '事件ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -212,8 +203,7 @@ CREATE TABLE `hz_st_ex_event_record` ( -- ---------------------------- -- Table structure for hz_st_ex_object -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_object`; -CREATE TABLE `hz_st_ex_object` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_object` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NOT NULL COMMENT '任务ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -238,8 +228,7 @@ CREATE TABLE `hz_st_ex_object` ( -- ---------------------------- -- Table structure for hz_st_ex_object_project -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_object_project`; -CREATE TABLE `hz_st_ex_object_project` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_object_project` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(64) NOT NULL COMMENT '任务ID', `OBJECT_ID` bigint(64) NOT NULL COMMENT '对象ID', @@ -262,8 +251,7 @@ CREATE TABLE `hz_st_ex_object_project` ( -- ---------------------------- -- Table structure for hz_st_ex_object_project_content -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_object_project_content`; -CREATE TABLE `hz_st_ex_object_project_content` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_object_project_content` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NOT NULL COMMENT '任务ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -299,8 +287,7 @@ CREATE TABLE `hz_st_ex_object_project_content` ( -- ---------------------------- -- Table structure for hz_st_ex_task -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_task`; -CREATE TABLE `hz_st_ex_task` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_task` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `PLAN_ID` bigint(20) NULL DEFAULT NULL COMMENT '计划ID', `TYPE` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '计划模式 0 人员 1岗位 2机构 3自由模式 4 自由人模式', @@ -339,8 +326,7 @@ CREATE TABLE `hz_st_ex_task` ( -- ---------------------------- -- Table structure for hz_st_ex_task_user -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_task_user`; -CREATE TABLE `hz_st_ex_task_user` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_task_user` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NOT NULL COMMENT '任务ID', `USER_ID` bigint(20) NOT NULL COMMENT '用户ID', @@ -363,8 +349,7 @@ CREATE TABLE `hz_st_ex_task_user` ( -- ---------------------------- -- Table structure for hz_st_hi_task_gather -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_hi_task_gather`; -CREATE TABLE `hz_st_hi_task_gather` ( +CREATE TABLE IF NOT EXISTS `hz_st_hi_task_gather` ( `USER_ID` bigint(20) NULL DEFAULT NULL COMMENT '用户id', `USER_NAME` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名称', `ROUTE_ID` bigint(20) NULL DEFAULT NULL COMMENT '路径id', @@ -402,8 +387,7 @@ CREATE TABLE `hz_st_hi_task_gather` ( -- ---------------------------- -- Table structure for hz_st_hi_task_result -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_hi_task_result`; -CREATE TABLE `hz_st_hi_task_result` ( +CREATE TABLE IF NOT EXISTS `hz_st_hi_task_result` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `PLAN_ID` bigint(20) NULL DEFAULT NULL COMMENT '计划ID', `BATCH_NUMBER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '批次号', @@ -422,8 +406,7 @@ CREATE TABLE `hz_st_hi_task_result` ( -- ---------------------------- -- Table structure for hz_st_offline_record -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_offline_record`; -CREATE TABLE `hz_st_offline_record` ( +CREATE TABLE IF NOT EXISTS `hz_st_offline_record` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `USER_ID` bigint(20) NOT NULL COMMENT '用户ID', `TERMINAL_CODE` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '终端设备标识imei', @@ -441,8 +424,7 @@ CREATE TABLE `hz_st_offline_record` ( -- ---------------------------- -- Table structure for hz_st_re_content -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_content`; -CREATE TABLE `hz_st_re_content` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_content` ( `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 '内容名称', @@ -482,8 +464,7 @@ CREATE TABLE `hz_st_re_content` ( -- ---------------------------- -- Table structure for hz_st_re_content_definition -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_content_definition`; -CREATE TABLE `hz_st_re_content_definition` ( +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 '内容名称', @@ -521,8 +502,7 @@ CREATE TABLE `hz_st_re_content_definition` ( -- ---------------------------- -- Table structure for hz_st_re_object -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_object`; -CREATE TABLE `hz_st_re_object` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_object` ( `ID` bigint(20) NOT NULL, `CODE` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对象编码', `EM_CODE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码', @@ -551,8 +531,7 @@ CREATE TABLE `hz_st_re_object` ( -- ---------------------------- -- Table structure for hz_st_re_object_danger -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_object_danger`; -CREATE TABLE `hz_st_re_object_danger` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_object_danger` ( `ID` bigint(20) NOT NULL, `OBJECT_ID` bigint(20) NULL DEFAULT NULL COMMENT '巡检对象ID', `DANGER_ID` bigint(20) NULL DEFAULT NULL COMMENT '危险点ID', @@ -572,8 +551,7 @@ CREATE TABLE `hz_st_re_object_danger` ( -- ---------------------------- -- Table structure for hz_st_re_object_template -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_object_template`; -CREATE TABLE `hz_st_re_object_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_object_template` ( `ID` bigint(64) NOT NULL, `OBJECT_ID` bigint(20) NULL DEFAULT NULL COMMENT '对象ID', `TEMPLATE_ID` bigint(20) NULL DEFAULT NULL COMMENT '模板ID', @@ -590,8 +568,7 @@ CREATE TABLE `hz_st_re_object_template` ( -- ---------------------------- -- Table structure for hz_st_re_object_user -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_object_user`; -CREATE TABLE `hz_st_re_object_user` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_object_user` ( `ID` bigint(64) NOT NULL, `OBJECT_ID` bigint(64) NOT NULL COMMENT '对象ID', `USER_ID` bigint(64) NOT NULL COMMENT '用户ID', @@ -610,8 +587,7 @@ CREATE TABLE `hz_st_re_object_user` ( -- ---------------------------- -- Table structure for hz_st_re_plan -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan`; -CREATE TABLE `hz_st_re_plan` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan` ( `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 '计划名称', @@ -650,8 +626,7 @@ CREATE TABLE `hz_st_re_plan` ( -- ---------------------------- -- Table structure for hz_st_re_plan_class -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_class`; -CREATE TABLE `hz_st_re_plan_class` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_class` ( `ID` bigint(20) NOT NULL, `PLAN_ID` bigint(20) NOT NULL COMMENT '计划ID', `CLASS_ID` bigint(20) NOT NULL COMMENT '班次ID', @@ -669,8 +644,7 @@ CREATE TABLE `hz_st_re_plan_class` ( -- ---------------------------- -- Table structure for hz_st_re_plan_object_template -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_object_template`; -CREATE TABLE `hz_st_re_plan_object_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_object_template` ( `ID` bigint(20) NOT NULL, `PLAN_ID` bigint(20) NOT NULL COMMENT '计划ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -689,8 +663,7 @@ CREATE TABLE `hz_st_re_plan_object_template` ( -- ---------------------------- -- Table structure for hz_st_re_plan_org -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_org`; -CREATE TABLE `hz_st_re_plan_org` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_org` ( `ID` bigint(64) NOT NULL, `PLAN_ID` bigint(20) NOT NULL COMMENT '计划ID', `ORG_ID` bigint(20) NOT NULL COMMENT '机构ID', @@ -708,8 +681,7 @@ CREATE TABLE `hz_st_re_plan_org` ( -- ---------------------------- -- Table structure for hz_st_re_plan_position -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_position`; -CREATE TABLE `hz_st_re_plan_position` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_position` ( `ID` bigint(64) NOT NULL, `PLAN_ID` bigint(64) NOT NULL COMMENT '计划ID', `POSITION_ID` bigint(64) NOT NULL COMMENT '岗位ID', @@ -727,8 +699,7 @@ CREATE TABLE `hz_st_re_plan_position` ( -- ---------------------------- -- Table structure for hz_st_re_plan_user -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_user`; -CREATE TABLE `hz_st_re_plan_user` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_user` ( `ID` bigint(20) NOT NULL, `PLAN_ID` bigint(20) NOT NULL COMMENT '计划ID', `USER_ID` bigint(20) NOT NULL COMMENT '用户ID', @@ -746,8 +717,7 @@ CREATE TABLE `hz_st_re_plan_user` ( -- ---------------------------- -- Table structure for hz_st_re_project -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_project`; -CREATE TABLE `hz_st_re_project` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_project` ( `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 '项目名称', @@ -770,8 +740,7 @@ CREATE TABLE `hz_st_re_project` ( -- ---------------------------- -- Table structure for hz_st_re_project_content -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_project_content`; -CREATE TABLE `hz_st_re_project_content` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_project_content` ( `ID` bigint(64) NOT NULL AUTO_INCREMENT, `PROJECT_ID` bigint(64) NOT NULL COMMENT '目标ID', `CONTENT_ID` bigint(64) NOT NULL COMMENT '内容ID', @@ -789,8 +758,7 @@ CREATE TABLE `hz_st_re_project_content` ( -- ---------------------------- -- Table structure for hz_st_re_route -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_route`; -CREATE TABLE `hz_st_re_route` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_route` ( `ID` bigint(20) NOT NULL, `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `ROUTE_NAME` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路线名称', @@ -810,8 +778,7 @@ CREATE TABLE `hz_st_re_route` ( -- ---------------------------- -- Table structure for hz_st_re_route_gather -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_route_gather`; -CREATE TABLE `hz_st_re_route_gather` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_route_gather` ( `ID` bigint(20) NOT NULL, `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `ROUTE_NAME` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路线名称', @@ -830,8 +797,7 @@ CREATE TABLE `hz_st_re_route_gather` ( -- ---------------------------- -- Table structure for hz_st_re_template -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_template`; -CREATE TABLE `hz_st_re_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_template` ( `ID` bigint(64) NOT NULL, `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 '模板名称', @@ -854,8 +820,7 @@ CREATE TABLE `hz_st_re_template` ( -- ---------------------------- -- Table structure for hz_st_re_template_project -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_template_project`; -CREATE TABLE `hz_st_re_template_project` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_template_project` ( `ID` bigint(64) NOT NULL, `TEMPLATE_ID` bigint(20) NOT NULL COMMENT '模板ID', `PROJECT_ID` bigint(20) NOT NULL COMMENT '项目ID', @@ -874,8 +839,7 @@ CREATE TABLE `hz_st_re_template_project` ( -- ---------------------------- -- Table structure for hz_st_robot -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_robot`; -CREATE TABLE `hz_st_robot` ( +CREATE TABLE IF NOT EXISTS `hz_st_robot` ( `ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `USER_ID` bigint(20) NULL DEFAULT NULL COMMENT '机器人用户ID', @@ -897,8 +861,7 @@ CREATE TABLE `hz_st_robot` ( -- ---------------------------- -- Table structure for hz_st_robot_task -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_robot_task`; -CREATE TABLE `hz_st_robot_task` ( +CREATE TABLE IF NOT EXISTS `hz_st_robot_task` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务名称', `CHECK_TYPE_SON` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务类型 : 0图片,1识别,10热成像', @@ -922,8 +885,7 @@ CREATE TABLE `hz_st_robot_task` ( -- ---------------------------- -- Table structure for hz_st_robot_task_identify -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_robot_task_identify`; -CREATE TABLE `hz_st_robot_task_identify` ( +CREATE TABLE IF NOT EXISTS `hz_st_robot_task_identify` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `ROBOT_TASK_ID` bigint(20) NOT NULL COMMENT '机器人任务ID', `IDENTIFY_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '识别类型:11表针识别,13灯识别,', @@ -943,8 +905,7 @@ CREATE TABLE `hz_st_robot_task_identify` ( -- ---------------------------- -- Table structure for hz_st_task_record -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_task_record`; -CREATE TABLE `hz_st_task_record` ( +CREATE TABLE IF NOT EXISTS `hz_st_task_record` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NULL DEFAULT NULL COMMENT '任务ID', `CREATE_TIME` datetime NULL DEFAULT NULL COMMENT '报备时间', @@ -965,8 +926,7 @@ CREATE TABLE `hz_st_task_record` ( -- ---------------------------- -- Table structure for hz_st_user_face_data -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_user_face_data`; -CREATE TABLE `hz_st_user_face_data` ( +CREATE TABLE IF NOT EXISTS `hz_st_user_face_data` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `USER_ID` bigint(20) NOT NULL COMMENT '用户ID', @@ -985,7 +945,6 @@ CREATE TABLE `hz_st_user_face_data` ( -- ---------------------------- -- View structure for hz_st_other_object -- ---------------------------- -DROP VIEW IF EXISTS `hz_st_other_object`; CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `hz_st_other_object` AS select `equipment`.`hzims_em_info`.`TENANT_ID` AS `TENANT_ID`,`equipment`.`hzims_em_info`.`NUMBER` AS `CODE`,`equipment`.`hzims_em_info`.`NAME` AS `NAME`,`equipment`.`hzims_em_info`.`INS_LOCATION` AS `ADDRESS`,`equipment`.`hzims_em_info`.`LGTD` AS `LGTD`,`equipment`.`hzims_em_info`.`LTTD` AS `LTTD`,'hzims_em_info' AS `TABLE_CODE`,'设备' AS `TYPE`,`equipment`.`hzims_em_info`.`CREATE_USER` AS `CREATE_USER`,`equipment`.`hzims_em_info`.`CREATE_DEPT` AS `CREATE_DEPT`,`equipment`.`hzims_em_info`.`ID` AS `REAL_ID` from `equipment`.`hzims_em_info` where (`equipment`.`hzims_em_info`.`IS_DELETED` = 0); -- ---------------------------- @@ -1020,7 +979,6 @@ delimiter ; -- ---------------------------- -- Procedure structure for p_gn_demonstration_data -- ---------------------------- -DROP PROCEDURE IF EXISTS `p_gn_demonstration_data`; delimiter ;; CREATE PROCEDURE `p_gn_demonstration_data`(in initDate VARCHAR(20),in showDate VARCHAR(20)) COMMENT '广宁演示数据脚本' @@ -1051,7 +1009,6 @@ delimiter ; -- ---------------------------- -- Procedure structure for p_gn_demonstration_task -- ---------------------------- -DROP PROCEDURE IF EXISTS `p_gn_demonstration_task`; delimiter ;; CREATE PROCEDURE `p_gn_demonstration_task`(in oldPlanId BIGINT(20),in newPlanId BIGINT(20),in initDate VARCHAR(20),in showDate VARCHAR(20)) COMMENT '广宁制造巡检任务数据脚本' From b5428e12f2943b51eba14d4eb886f830c0951b83 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Tue, 16 Apr 2024 18:55:03 +0800 Subject: [PATCH 2/7] =?UTF-8?q?operation=E8=84=9A=E6=9C=AC=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/src/main/resources/db/2.0.0.sql | 2 +- .../operational/src/main/resources/db/2.0.1.sql | 85 +++++++++------------- .../operational/src/main/resources/db/2.0.2.sql | 62 ++++++++-------- 3 files changed, 68 insertions(+), 81 deletions(-) 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 index d6b55ed..9c5be8e 100644 --- a/hzims-service/operational/src/main/resources/db/2.0.0.sql +++ b/hzims-service/operational/src/main/resources/db/2.0.0.sql @@ -4,5 +4,5 @@ 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_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 diff --git a/hzims-service/operational/src/main/resources/db/2.0.1.sql b/hzims-service/operational/src/main/resources/db/2.0.1.sql index 5c5d97c..4344ceb 100644 --- a/hzims-service/operational/src/main/resources/db/2.0.1.sql +++ b/hzims-service/operational/src/main/resources/db/2.0.1.sql @@ -1,14 +1,3 @@ -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 '是否逾期'; --- 补充执行人、创建人、更新人名称 -alter table `hzims_oper_maintenance_task` add column `disposer_name` varchar(255) comment '执行人姓名'; -alter table `hzims_oper_maintenance_task` add column `create_user_name` varchar(255) comment '创建人姓名'; -alter table `hzims_oper_maintenance_task` add column `update_user_name` varchar(255) comment '更新人姓名'; -alter table `hzims_oper_maintenance_plan` add column `disposer_name` varchar(255) comment '执行人姓名'; -alter table `hzims_oper_maintenance_plan` add column `create_user_name` varchar(255) comment '创建人姓名'; -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 IF NOT EXISTS `hz_ims_duty_log` ( `id` bigint(20) NOT NULL, `duty_id` bigint(20) NULL DEFAULT NULL, @@ -43,77 +32,75 @@ CREATE TABLE IF NOT EXISTS `hz_ims_duty_log` ( ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -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 `FINDER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '问题发现人'; -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 `DISCRIMINATOR_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '甄别人' ; -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 `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称'; -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_appearance` ADD COLUMN `DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称' ; -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 `HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '检修任务处理人'; -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 `FINDER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发现人'; -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 `CONCLUSION_PEOPLE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定论人'; -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 `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称'; -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 `DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称'; -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 `PRINCIPAL_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作票负责人'; -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` ADD COLUMN `PLAN_HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消缺处理人'; -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 `DISCRIMINATOR_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '甄别人'; -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 `FINDER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发现人'; -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 `HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '检修任务处理人'; -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 `DISPOSER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '处理人'; -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 `CONCLUSION_PEOPLE_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定论人'; -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 `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称'; -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 `DEPT_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机构名称'; -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 `PRINCIPAL_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作票负责人'; -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_defect_statistics` ADD COLUMN `PLAN_HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消缺处理人'; -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 `disposer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行人姓名'; -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 `CREATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; -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_plan` ADD COLUMN `UPDATE_USER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ; -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 '执行人姓名'; -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 ; -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 ; -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 '票据名称' ; -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 '问题发现人'; -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 '甄别人' ; -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 '决策处理方案人' ; -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 '检修任务处理人'; -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 '定论人'; -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 '创建人名称' ; -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 '机构名称' ; -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 '操作票负责人'; -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`; +ALTER TABLE `hzims_oper_phenomenon` ADD COLUMN `PLAN_HANDLER_NAME` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消缺处理人'; 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 index 9adf641..5a45e4b 100644 --- a/hzims-service/operational/src/main/resources/db/2.0.2.sql +++ b/hzims-service/operational/src/main/resources/db/2.0.2.sql @@ -28,64 +28,64 @@ CREATE TABLE IF NOT EXISTS `HZIMS_OPER_CONSTRUCTION` ( 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_CODE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL ; -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 `STATION_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL ; -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` ADD COLUMN `EM_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL ; -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_CONTENT` MODIFY COLUMN `EM_CODE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '设备编码'; -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` ADD COLUMN `EM_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称'; -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 `EM_CODE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备编码' ; -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 `PERIOD` INT(11) NULL DEFAULT NULL COMMENT '检修间隔' ; -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 `WORK_STANDARDS` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '操作规范'; -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 `SAFE_INFOS` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '安全警告' ; -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 `STOP_HOURS` INT(11) NULL DEFAULT NULL COMMENT '停用时间'; -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_LIBRARY` MODIFY COLUMN `DESCRIPITON` VARCHAR(500) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT '' COMMENT '描述' ; -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 `UPDATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '修改人名称' ; -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 `CREATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建人名称'; -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 `MANAGER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL ; -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_PLAN` ADD COLUMN `TECH_LEAD_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL ; -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 `EM_CODE` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备编号'; -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 `PLAN_HOURS` INT(11) NULL DEFAULT NULL COMMENT '计划工时' ; -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 `UPDATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '修改人名称' ; -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 `CREATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建人名称' ; -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 `MANAGER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '负责人名称'; -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_STATISTICS` ADD COLUMN `EM_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称' ; -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_CODE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点编码' ; -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 `STATION_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '站点名称' ; -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 `EM_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '设备名称' ; -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 `PLAN_HOURS` INT(11) NULL DEFAULT NULL COMMENT '计划工时' ; -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 `CONSTRUCTION_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '施工日志ID' ; -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 `UPDATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '修改人名称' ; -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 `CREATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '创建人名称' ; -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` ADD COLUMN `HANDLER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL ; -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 `UPDATE_USER_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '修改人名称' ; -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 +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 '创建人名称' ; \ No newline at end of file From f355496b3b4da1032152d4876be74374cffd38bb Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Tue, 16 Apr 2024 18:56:48 +0800 Subject: [PATCH 3/7] =?UTF-8?q?operation=E8=84=9A=E6=9C=AC=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hzims-service/operational/src/main/resources/db/2.0.0.sql | 1 - 1 file changed, 1 deletion(-) 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 index 9c5be8e..657bcf7 100644 --- a/hzims-service/operational/src/main/resources/db/2.0.0.sql +++ b/hzims-service/operational/src/main/resources/db/2.0.0.sql @@ -4,5 +4,4 @@ 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 From ff5bcdc2e4e4a5647884ca36f2ba7dc7ddd00841 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Tue, 16 Apr 2024 19:36:22 +0800 Subject: [PATCH 4/7] =?UTF-8?q?operation=E8=84=9A=E6=9C=AC=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/src/main/resources/db/2.0.2.sql | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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 index 5a45e4b..375171c 100644 --- a/hzims-service/operational/src/main/resources/db/2.0.2.sql +++ b/hzims-service/operational/src/main/resources/db/2.0.2.sql @@ -88,4 +88,25 @@ ALTER TABLE `HZIMS_OPER_ACCESS_TASK` ADD COLUMN `HANDLER_NAME` VARCHAR(255) CHAR 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 '修改人名称' ; -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 '创建人名称' ; \ No newline at end of file +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 '创建人名称' ; + +CREATE TABLE IF NOT EXISTS `hzims_run_month_report` ( + `ID` bigint(20) NOT NULL COMMENT '主键ID', + `STATION_CODE` varchar(64) DEFAULT NULL COMMENT '站点编码', + `STATION_NAME` varchar(255) DEFAULT NULL COMMENT '站点名称', + `MONTH` varchar(255) DEFAULT NULL COMMENT '月份 : "yyyy-MM"', + `RUN_DATA` text COMMENT '运行数据', + `ALARM_DATA` text COMMENT '告警数据', + `CURVE_DATA` text COMMENT '曲线数据', + `ANALYSIS_DATA` text COMMENT '分析数据', + `RUN_PROPOSE` text COMMENT '运行建议', + `TENANT_ID` varchar(12) DEFAULT NULL COMMENT '租户ID', + `STATUS` tinyint(4) DEFAULT NULL COMMENT '业务状态', + `CREATE_DEPT` bigint(20) DEFAULT NULL COMMENT '创建单位', + `IS_DELETED` tinyint(4) NOT NULL DEFAULT '0', + `CREATE_USER` bigint(20) DEFAULT NULL COMMENT '创建人', + `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间', + `UPDATE_USER` bigint(20) DEFAULT NULL COMMENT '修改人', + `UPDATE_TIME` datetime DEFAULT NULL COMMENT '修改时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file From e17d0856b0e4076503ce3ff1e1096e80d25b8e94 Mon Sep 17 00:00:00 2001 From: liwen Date: Tue, 16 Apr 2024 19:44:52 +0800 Subject: [PATCH 5/7] =?UTF-8?q?update:=20=E5=B7=A1=E6=A3=80/=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E6=9C=8D=E5=8A=A1sql=E8=84=9A=E6=9C=AC=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspect/src/main/resources/db/1.0.0.sql | 120 +++++++-------------- .../inspect/src/main/resources/db/2.0.0.sql | 20 ++-- .../safeproduct/src/main/resources/db/1.0.0.sql | 84 +++++---------- 3 files changed, 75 insertions(+), 149 deletions(-) diff --git a/hzims-service/inspect/src/main/resources/db/1.0.0.sql b/hzims-service/inspect/src/main/resources/db/1.0.0.sql index 451c14a..cb8edff 100644 --- a/hzims-service/inspect/src/main/resources/db/1.0.0.sql +++ b/hzims-service/inspect/src/main/resources/db/1.0.0.sql @@ -1,8 +1,7 @@ -- ---------------------------- -- Table structure for blade_module_version -- ---------------------------- -DROP TABLE IF EXISTS `blade_module_version`; -CREATE TABLE `blade_module_version` ( +CREATE TABLE IF NOT EXISTS `blade_module_version` ( `MODULE_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `VERSION` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `HISTORY` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, @@ -12,8 +11,7 @@ CREATE TABLE `blade_module_version` ( -- ---------------------------- -- Table structure for hz_inspect_temp -- ---------------------------- -DROP TABLE IF EXISTS `hz_inspect_temp`; -CREATE TABLE `hz_inspect_temp` ( +CREATE TABLE IF NOT EXISTS `hz_inspect_temp` ( `id` int(11) NOT NULL, `temp_time` datetime NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE @@ -22,8 +20,7 @@ CREATE TABLE `hz_inspect_temp` ( -- ---------------------------- -- Table structure for hz_offline_task -- ---------------------------- -DROP TABLE IF EXISTS `hz_offline_task`; -CREATE TABLE `hz_offline_task` ( +CREATE TABLE IF NOT EXISTS `hz_offline_task` ( `ID` bigint(20) NOT NULL COMMENT '主键', `TASK_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '任务名称', `TASK_STATUS` bigint(1) NULL DEFAULT NULL COMMENT '任务状态 0 - 任务开启 1 - 任务处理 2 - 任务完成 ', @@ -43,8 +40,7 @@ CREATE TABLE `hz_offline_task` ( -- ---------------------------- -- Table structure for hz_st_camera_info -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_camera_info`; -CREATE TABLE `hz_st_camera_info` ( +CREATE TABLE IF NOT EXISTS `hz_st_camera_info` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `TYPE` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '摄像头类型cameraType,1视频摄像头,2机器人摄像头,数据字典', `TENANT_ID` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '租户ID', @@ -77,8 +73,7 @@ CREATE TABLE `hz_st_camera_info` ( -- ---------------------------- -- Table structure for hz_st_clock -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_clock`; -CREATE TABLE `hz_st_clock` ( +CREATE TABLE IF NOT EXISTS `hz_st_clock` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `CLOCK_TYPE_ID` bigint(20) NULL DEFAULT NULL COMMENT '表针类型ID', @@ -99,8 +94,7 @@ CREATE TABLE `hz_st_clock` ( -- ---------------------------- -- Table structure for hz_st_clock_type -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_clock_type`; -CREATE TABLE `hz_st_clock_type` ( +CREATE TABLE IF NOT EXISTS `hz_st_clock_type` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `CLOCK_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表盘名称', @@ -123,8 +117,7 @@ CREATE TABLE `hz_st_clock_type` ( -- ---------------------------- -- Table structure for hz_st_event_attachment -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_event_attachment`; -CREATE TABLE `hz_st_event_attachment` ( +CREATE TABLE IF NOT EXISTS `hz_st_event_attachment` ( `ID` bigint(64) NOT NULL, `EVENT_ID` bigint(20) NOT NULL COMMENT '事件ID', `FILE_URL` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件路径', @@ -142,8 +135,7 @@ CREATE TABLE `hz_st_event_attachment` ( -- ---------------------------- -- Table structure for hz_st_ex_event -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_event`; -CREATE TABLE `hz_st_ex_event` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_event` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `TASK_ID` bigint(20) NULL DEFAULT NULL COMMENT '任务ID', `OBJECT_ID` bigint(20) NULL DEFAULT NULL COMMENT '对象ID', @@ -175,8 +167,7 @@ CREATE TABLE `hz_st_ex_event` ( -- ---------------------------- -- Table structure for hz_st_ex_event_record -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_event_record`; -CREATE TABLE `hz_st_ex_event_record` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_event_record` ( `ID` bigint(64) NOT NULL, `EVENT_ID` bigint(20) NOT NULL COMMENT '事件ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -212,8 +203,7 @@ CREATE TABLE `hz_st_ex_event_record` ( -- ---------------------------- -- Table structure for hz_st_ex_object -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_object`; -CREATE TABLE `hz_st_ex_object` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_object` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NOT NULL COMMENT '任务ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -238,8 +228,7 @@ CREATE TABLE `hz_st_ex_object` ( -- ---------------------------- -- Table structure for hz_st_ex_object_project -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_object_project`; -CREATE TABLE `hz_st_ex_object_project` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_object_project` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(64) NOT NULL COMMENT '任务ID', `OBJECT_ID` bigint(64) NOT NULL COMMENT '对象ID', @@ -262,8 +251,7 @@ CREATE TABLE `hz_st_ex_object_project` ( -- ---------------------------- -- Table structure for hz_st_ex_object_project_content -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_object_project_content`; -CREATE TABLE `hz_st_ex_object_project_content` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_object_project_content` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NOT NULL COMMENT '任务ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -299,8 +287,7 @@ CREATE TABLE `hz_st_ex_object_project_content` ( -- ---------------------------- -- Table structure for hz_st_ex_task -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_task`; -CREATE TABLE `hz_st_ex_task` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_task` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `PLAN_ID` bigint(20) NULL DEFAULT NULL COMMENT '计划ID', `TYPE` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '计划模式 0 人员 1岗位 2机构 3自由模式 4 自由人模式', @@ -339,8 +326,7 @@ CREATE TABLE `hz_st_ex_task` ( -- ---------------------------- -- Table structure for hz_st_ex_task_user -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_ex_task_user`; -CREATE TABLE `hz_st_ex_task_user` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_task_user` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NOT NULL COMMENT '任务ID', `USER_ID` bigint(20) NOT NULL COMMENT '用户ID', @@ -363,8 +349,7 @@ CREATE TABLE `hz_st_ex_task_user` ( -- ---------------------------- -- Table structure for hz_st_hi_task_gather -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_hi_task_gather`; -CREATE TABLE `hz_st_hi_task_gather` ( +CREATE TABLE IF NOT EXISTS `hz_st_hi_task_gather` ( `USER_ID` bigint(20) NULL DEFAULT NULL COMMENT '用户id', `USER_NAME` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名称', `ROUTE_ID` bigint(20) NULL DEFAULT NULL COMMENT '路径id', @@ -402,8 +387,7 @@ CREATE TABLE `hz_st_hi_task_gather` ( -- ---------------------------- -- Table structure for hz_st_hi_task_result -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_hi_task_result`; -CREATE TABLE `hz_st_hi_task_result` ( +CREATE TABLE IF NOT EXISTS `hz_st_hi_task_result` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `PLAN_ID` bigint(20) NULL DEFAULT NULL COMMENT '计划ID', `BATCH_NUMBER` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '批次号', @@ -422,8 +406,7 @@ CREATE TABLE `hz_st_hi_task_result` ( -- ---------------------------- -- Table structure for hz_st_offline_record -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_offline_record`; -CREATE TABLE `hz_st_offline_record` ( +CREATE TABLE IF NOT EXISTS `hz_st_offline_record` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `USER_ID` bigint(20) NOT NULL COMMENT '用户ID', `TERMINAL_CODE` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '终端设备标识imei', @@ -441,8 +424,7 @@ CREATE TABLE `hz_st_offline_record` ( -- ---------------------------- -- Table structure for hz_st_re_content -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_content`; -CREATE TABLE `hz_st_re_content` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_content` ( `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 '内容名称', @@ -482,8 +464,7 @@ CREATE TABLE `hz_st_re_content` ( -- ---------------------------- -- Table structure for hz_st_re_content_definition -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_content_definition`; -CREATE TABLE `hz_st_re_content_definition` ( +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 '内容名称', @@ -521,8 +502,7 @@ CREATE TABLE `hz_st_re_content_definition` ( -- ---------------------------- -- Table structure for hz_st_re_object -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_object`; -CREATE TABLE `hz_st_re_object` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_object` ( `ID` bigint(20) NOT NULL, `CODE` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对象编码', `EM_CODE` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备编码', @@ -551,8 +531,7 @@ CREATE TABLE `hz_st_re_object` ( -- ---------------------------- -- Table structure for hz_st_re_object_danger -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_object_danger`; -CREATE TABLE `hz_st_re_object_danger` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_object_danger` ( `ID` bigint(20) NOT NULL, `OBJECT_ID` bigint(20) NULL DEFAULT NULL COMMENT '巡检对象ID', `DANGER_ID` bigint(20) NULL DEFAULT NULL COMMENT '危险点ID', @@ -572,8 +551,7 @@ CREATE TABLE `hz_st_re_object_danger` ( -- ---------------------------- -- Table structure for hz_st_re_object_template -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_object_template`; -CREATE TABLE `hz_st_re_object_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_object_template` ( `ID` bigint(64) NOT NULL, `OBJECT_ID` bigint(20) NULL DEFAULT NULL COMMENT '对象ID', `TEMPLATE_ID` bigint(20) NULL DEFAULT NULL COMMENT '模板ID', @@ -590,8 +568,7 @@ CREATE TABLE `hz_st_re_object_template` ( -- ---------------------------- -- Table structure for hz_st_re_object_user -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_object_user`; -CREATE TABLE `hz_st_re_object_user` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_object_user` ( `ID` bigint(64) NOT NULL, `OBJECT_ID` bigint(64) NOT NULL COMMENT '对象ID', `USER_ID` bigint(64) NOT NULL COMMENT '用户ID', @@ -610,8 +587,7 @@ CREATE TABLE `hz_st_re_object_user` ( -- ---------------------------- -- Table structure for hz_st_re_plan -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan`; -CREATE TABLE `hz_st_re_plan` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan` ( `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 '计划名称', @@ -650,8 +626,7 @@ CREATE TABLE `hz_st_re_plan` ( -- ---------------------------- -- Table structure for hz_st_re_plan_class -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_class`; -CREATE TABLE `hz_st_re_plan_class` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_class` ( `ID` bigint(20) NOT NULL, `PLAN_ID` bigint(20) NOT NULL COMMENT '计划ID', `CLASS_ID` bigint(20) NOT NULL COMMENT '班次ID', @@ -669,8 +644,7 @@ CREATE TABLE `hz_st_re_plan_class` ( -- ---------------------------- -- Table structure for hz_st_re_plan_object_template -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_object_template`; -CREATE TABLE `hz_st_re_plan_object_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_object_template` ( `ID` bigint(20) NOT NULL, `PLAN_ID` bigint(20) NOT NULL COMMENT '计划ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -689,8 +663,7 @@ CREATE TABLE `hz_st_re_plan_object_template` ( -- ---------------------------- -- Table structure for hz_st_re_plan_org -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_org`; -CREATE TABLE `hz_st_re_plan_org` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_org` ( `ID` bigint(64) NOT NULL, `PLAN_ID` bigint(20) NOT NULL COMMENT '计划ID', `ORG_ID` bigint(20) NOT NULL COMMENT '机构ID', @@ -708,8 +681,7 @@ CREATE TABLE `hz_st_re_plan_org` ( -- ---------------------------- -- Table structure for hz_st_re_plan_position -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_position`; -CREATE TABLE `hz_st_re_plan_position` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_position` ( `ID` bigint(64) NOT NULL, `PLAN_ID` bigint(64) NOT NULL COMMENT '计划ID', `POSITION_ID` bigint(64) NOT NULL COMMENT '岗位ID', @@ -727,8 +699,7 @@ CREATE TABLE `hz_st_re_plan_position` ( -- ---------------------------- -- Table structure for hz_st_re_plan_user -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_plan_user`; -CREATE TABLE `hz_st_re_plan_user` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_user` ( `ID` bigint(20) NOT NULL, `PLAN_ID` bigint(20) NOT NULL COMMENT '计划ID', `USER_ID` bigint(20) NOT NULL COMMENT '用户ID', @@ -746,8 +717,7 @@ CREATE TABLE `hz_st_re_plan_user` ( -- ---------------------------- -- Table structure for hz_st_re_project -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_project`; -CREATE TABLE `hz_st_re_project` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_project` ( `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 '项目名称', @@ -770,8 +740,7 @@ CREATE TABLE `hz_st_re_project` ( -- ---------------------------- -- Table structure for hz_st_re_project_content -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_project_content`; -CREATE TABLE `hz_st_re_project_content` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_project_content` ( `ID` bigint(64) NOT NULL AUTO_INCREMENT, `PROJECT_ID` bigint(64) NOT NULL COMMENT '目标ID', `CONTENT_ID` bigint(64) NOT NULL COMMENT '内容ID', @@ -789,8 +758,7 @@ CREATE TABLE `hz_st_re_project_content` ( -- ---------------------------- -- Table structure for hz_st_re_route -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_route`; -CREATE TABLE `hz_st_re_route` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_route` ( `ID` bigint(20) NOT NULL, `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `ROUTE_NAME` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路线名称', @@ -810,8 +778,7 @@ CREATE TABLE `hz_st_re_route` ( -- ---------------------------- -- Table structure for hz_st_re_route_gather -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_route_gather`; -CREATE TABLE `hz_st_re_route_gather` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_route_gather` ( `ID` bigint(20) NOT NULL, `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `ROUTE_NAME` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路线名称', @@ -830,8 +797,7 @@ CREATE TABLE `hz_st_re_route_gather` ( -- ---------------------------- -- Table structure for hz_st_re_template -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_template`; -CREATE TABLE `hz_st_re_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_template` ( `ID` bigint(64) NOT NULL, `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 '模板名称', @@ -854,8 +820,7 @@ CREATE TABLE `hz_st_re_template` ( -- ---------------------------- -- Table structure for hz_st_re_template_project -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_re_template_project`; -CREATE TABLE `hz_st_re_template_project` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_template_project` ( `ID` bigint(64) NOT NULL, `TEMPLATE_ID` bigint(20) NOT NULL COMMENT '模板ID', `PROJECT_ID` bigint(20) NOT NULL COMMENT '项目ID', @@ -874,8 +839,7 @@ CREATE TABLE `hz_st_re_template_project` ( -- ---------------------------- -- Table structure for hz_st_robot -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_robot`; -CREATE TABLE `hz_st_robot` ( +CREATE TABLE IF NOT EXISTS `hz_st_robot` ( `ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `USER_ID` bigint(20) NULL DEFAULT NULL COMMENT '机器人用户ID', @@ -897,8 +861,7 @@ CREATE TABLE `hz_st_robot` ( -- ---------------------------- -- Table structure for hz_st_robot_task -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_robot_task`; -CREATE TABLE `hz_st_robot_task` ( +CREATE TABLE IF NOT EXISTS `hz_st_robot_task` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务名称', `CHECK_TYPE_SON` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务类型 : 0图片,1识别,10热成像', @@ -922,8 +885,7 @@ CREATE TABLE `hz_st_robot_task` ( -- ---------------------------- -- Table structure for hz_st_robot_task_identify -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_robot_task_identify`; -CREATE TABLE `hz_st_robot_task_identify` ( +CREATE TABLE IF NOT EXISTS `hz_st_robot_task_identify` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `ROBOT_TASK_ID` bigint(20) NOT NULL COMMENT '机器人任务ID', `IDENTIFY_KEY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '识别类型:11表针识别,13灯识别,', @@ -943,8 +905,7 @@ CREATE TABLE `hz_st_robot_task_identify` ( -- ---------------------------- -- Table structure for hz_st_task_record -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_task_record`; -CREATE TABLE `hz_st_task_record` ( +CREATE TABLE IF NOT EXISTS `hz_st_task_record` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NULL DEFAULT NULL COMMENT '任务ID', `CREATE_TIME` datetime NULL DEFAULT NULL COMMENT '报备时间', @@ -965,8 +926,7 @@ CREATE TABLE `hz_st_task_record` ( -- ---------------------------- -- Table structure for hz_st_user_face_data -- ---------------------------- -DROP TABLE IF EXISTS `hz_st_user_face_data`; -CREATE TABLE `hz_st_user_face_data` ( +CREATE TABLE IF NOT EXISTS `hz_st_user_face_data` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `TENANT_ID` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租户ID', `USER_ID` bigint(20) NOT NULL COMMENT '用户ID', diff --git a/hzims-service/inspect/src/main/resources/db/2.0.0.sql b/hzims-service/inspect/src/main/resources/db/2.0.0.sql index 1736e4f..97b793e 100644 --- a/hzims-service/inspect/src/main/resources/db/2.0.0.sql +++ b/hzims-service/inspect/src/main/resources/db/2.0.0.sql @@ -9,7 +9,7 @@ alter table `hz_st_ex_task` add column `video_url` varchar(255) default null com alter table `hz_st_ex_task` add column `hik_video_task_id` varchar(50) default null comment '海康录制视频任务ID'; -- 巡检计划模板表 -CREATE TABLE `hz_st_re_plan_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_re_plan_template` ( `ID` bigint(64) NOT NULL COMMENT 'ID', `CODE` varchar(18) DEFAULT NULL COMMENT '计划编码', `NAME` varchar(128) DEFAULT NULL COMMENT '计划名称', @@ -47,7 +47,7 @@ CREATE TABLE `hz_st_re_plan_template` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='巡检计划模板表(专供演示数据使用)'; -- 巡检任务模板表 -CREATE TABLE `hz_st_ex_task_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_task_template` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `PLAN_ID` bigint(20) DEFAULT NULL COMMENT '计划ID', `TYPE` char(1) DEFAULT NULL COMMENT '计划模式 0 人员 1岗位 2机构 3自由模式 4 自由人模式', @@ -83,7 +83,7 @@ CREATE TABLE `hz_st_ex_task_template` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='巡检任务模板表(专供演示数据使用)'; -- 巡检任务对象模板表 -CREATE TABLE `hz_st_ex_object_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_object_template` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NOT NULL COMMENT '任务ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -107,7 +107,7 @@ CREATE TABLE `hz_st_ex_object_template` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='巡检任务对象模板表(专供演示数据使用)'; -- 巡检任务对象项目模板表 -CREATE TABLE `hz_st_ex_object_project_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_object_project_template` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(64) NOT NULL COMMENT '任务ID', `OBJECT_ID` bigint(64) NOT NULL COMMENT '对象ID', @@ -128,7 +128,7 @@ CREATE TABLE `hz_st_ex_object_project_template` ( KEY `idx_task_id` (`TASK_ID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='巡检任务对象项目模板表(专供演示数据使用)'; -CREATE TABLE `hz_st_ex_object_project_content_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_object_project_content_template` ( `ID` bigint(64) NOT NULL, `TASK_ID` bigint(20) NOT NULL COMMENT '任务ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -161,7 +161,7 @@ CREATE TABLE `hz_st_ex_object_project_content_template` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='巡检任务对象项目内容模板表(专供演示数据使用)'; -- 巡检情况列模板表 -CREATE TABLE `hz_st_ex_event_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_event_template` ( `ID` bigint(20) NOT NULL COMMENT 'ID', `TASK_ID` bigint(20) DEFAULT NULL COMMENT '任务ID', `OBJECT_ID` bigint(20) DEFAULT NULL COMMENT '对象ID', @@ -192,7 +192,7 @@ CREATE TABLE `hz_st_ex_event_template` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='巡检情况列模板表(专供演示数据使用)'; -- 巡检情况记录模板表 -CREATE TABLE `hz_st_ex_event_record_template` ( +CREATE TABLE IF NOT EXISTS `hz_st_ex_event_record_template` ( `ID` bigint(64) NOT NULL, `EVENT_ID` bigint(20) NOT NULL COMMENT '事件ID', `OBJECT_ID` bigint(20) NOT NULL COMMENT '对象ID', @@ -230,13 +230,7 @@ ALTER TABLE `hz_st_ex_task_user` MODIFY COLUMN `CLAIM_STATUS` char(1) CHARACTER ALTER TABLE `hz_st_ex_task_user` ADD COLUMN `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `TENANT_ID`; -alter table `hz_st_ex_task` add column `hik_video_task_id` varchar(50) default null comment '海康录制视频任务ID'; -alter table `hz_st_ex_task` add column `video_start_time` datetime default null comment '视频录制开始时间'; -alter table `hz_st_ex_task` add column `video_end_time` datetime default null comment '视频录制开始时间'; -alter table `hz_st_ex_task` add column `video_url` varchar(255) default null comment '手动录制视频地址'; -- 巡检摄像头管理添加设备编号 -alter table `hz_st_camera_info` add column `em_code` varchar(50) default null comment '设备编号'; -alter table `hz_st_robot` add column `code` varchar(50) default null comment '机器人编号'; alter table `hz_st_robot` add column `station_code` varchar(50) default null comment '站点编号'; alter table `hz_st_robot` add column `is_device_instance` tinyint(2) default 0 comment '是否绑定设备实例'; alter table `hz_st_re_object` change COLUMN `EM_CODE` `EM_CODE` VARCHAR(50) COMMENT '设备编号'; \ No newline at end of file diff --git a/hzims-service/safeproduct/src/main/resources/db/1.0.0.sql b/hzims-service/safeproduct/src/main/resources/db/1.0.0.sql index c571cf6..ce9d309 100644 --- a/hzims-service/safeproduct/src/main/resources/db/1.0.0.sql +++ b/hzims-service/safeproduct/src/main/resources/db/1.0.0.sql @@ -1,8 +1,7 @@ -- ---------------------------- -- TABLE STRUCTURE FOR BLADE_MODULE_VERSION -- ---------------------------- -DROP TABLE IF EXISTS `BLADE_MODULE_VERSION`; -CREATE TABLE `BLADE_MODULE_VERSION` ( +CREATE TABLE IF NOT EXISTS `BLADE_MODULE_VERSION` ( `MODULE_NAME` VARCHAR(64) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL, `VERSION` VARCHAR(8) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL, `HISTORY` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL, @@ -12,8 +11,7 @@ CREATE TABLE `BLADE_MODULE_VERSION` ( -- ---------------------------- -- TABLE STRUCTURE FOR DOCUMENT_MANAGEMENT -- ---------------------------- -DROP TABLE IF EXISTS `DOCUMENT_MANAGEMENT`; -CREATE TABLE `DOCUMENT_MANAGEMENT` ( +CREATE TABLE IF NOT EXISTS `DOCUMENT_MANAGEMENT` ( `ID` BIGINT(20) NOT NULL AUTO_INCREMENT, `DOCUMENT_NAME` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '文档名称', `DOCUMENT_URL` VARCHAR(300) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '文档路径', @@ -28,8 +26,7 @@ CREATE TABLE `DOCUMENT_MANAGEMENT` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZ_IMS_MON_ALARM_INFO -- ---------------------------- -DROP TABLE IF EXISTS `HZ_IMS_MON_ALARM_INFO`; -CREATE TABLE `HZ_IMS_MON_ALARM_INFO` ( +CREATE TABLE IF NOT EXISTS `HZ_IMS_MON_ALARM_INFO` ( `ID` BIGINT(20) NOT NULL COMMENT '主键ID', `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `CAMERA_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '告警摄像头ID', @@ -54,8 +51,7 @@ CREATE TABLE `HZ_IMS_MON_ALARM_INFO` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZ_IMS_MON_CAMERA_INFO -- ---------------------------- -DROP TABLE IF EXISTS `HZ_IMS_MON_CAMERA_INFO`; -CREATE TABLE `HZ_IMS_MON_CAMERA_INFO` ( +CREATE TABLE IF NOT EXISTS `HZ_IMS_MON_CAMERA_INFO` ( `ID` BIGINT(20) NOT NULL COMMENT '主键ID', `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `NAME` VARCHAR(127) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '摄像头名称', @@ -87,8 +83,7 @@ CREATE TABLE `HZ_IMS_MON_CAMERA_INFO` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_ACCIDENT -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_ACCIDENT`; -CREATE TABLE `HZIMS_ACCIDENT` ( +CREATE TABLE IF NOT EXISTS `HZIMS_ACCIDENT` ( `ID` BIGINT(20) NOT NULL COMMENT '主键ID', `NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '事故名称', `TYPE` TINYINT(4) NULL DEFAULT NULL COMMENT '事故分类(事件、一般事故、重大及以上事故))', @@ -117,8 +112,7 @@ CREATE TABLE `HZIMS_ACCIDENT` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_REVIEW -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_REVIEW`; -CREATE TABLE `HZIMS_REVIEW` ( +CREATE TABLE IF NOT EXISTS `HZIMS_REVIEW` ( `ID` BIGINT(20) NOT NULL COMMENT '主键ID', `STATION_CODE` VARCHAR(100) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '站点ID', `SCORE` DOUBLE(6, 2) NULL DEFAULT NULL COMMENT '分数', @@ -142,8 +136,7 @@ CREATE TABLE `HZIMS_REVIEW` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_REVIEW_STANDARD -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_REVIEW_STANDARD`; -CREATE TABLE `HZIMS_REVIEW_STANDARD` ( +CREATE TABLE IF NOT EXISTS `HZIMS_REVIEW_STANDARD` ( `ID` BIGINT(20) NOT NULL COMMENT '主键ID', `REVIEW_ID` BIGINT(20) NOT NULL COMMENT '评审ID', `STANDARD_ID` TINYINT(4) NOT NULL COMMENT '标准ID', @@ -163,8 +156,7 @@ CREATE TABLE `HZIMS_REVIEW_STANDARD` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_COMPANY -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_COMPANY`; -CREATE TABLE `HZIMS_SAFE_CHECK_COMPANY` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_CHECK_COMPANY` ( `ID` BIGINT(20) NOT NULL, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `START_TIME` DATETIME NULL DEFAULT NULL COMMENT '开始时间', @@ -184,8 +176,7 @@ CREATE TABLE `HZIMS_SAFE_CHECK_COMPANY` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_ITEM -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_ITEM`; -CREATE TABLE `HZIMS_SAFE_CHECK_ITEM` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_CHECK_ITEM` ( `ID` BIGINT(20) NOT NULL, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `PARENT_ITEM` BIGINT(20) NULL DEFAULT NULL COMMENT '父级检查项', @@ -206,8 +197,7 @@ CREATE TABLE `HZIMS_SAFE_CHECK_ITEM` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_ITEM_INSTANCE -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_ITEM_INSTANCE`; -CREATE TABLE `HZIMS_SAFE_CHECK_ITEM_INSTANCE` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_CHECK_ITEM_INSTANCE` ( `ID` BIGINT(20) NOT NULL, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `OID` BIGINT(20) NULL DEFAULT NULL COMMENT '原始ID,用于维持父子结构', @@ -234,8 +224,7 @@ CREATE TABLE `HZIMS_SAFE_CHECK_ITEM_INSTANCE` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_MONTH -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_MONTH`; -CREATE TABLE `HZIMS_SAFE_CHECK_MONTH` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_CHECK_MONTH` ( `ID` BIGINT(20) NOT NULL, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `MONTH` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '自查月份', @@ -254,8 +243,7 @@ CREATE TABLE `HZIMS_SAFE_CHECK_MONTH` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_NOTICE -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_NOTICE`; -CREATE TABLE `HZIMS_SAFE_CHECK_NOTICE` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_CHECK_NOTICE` ( `ID` BIGINT(20) NOT NULL, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `YEAR` INT(11) NULL DEFAULT NULL COMMENT '年度', @@ -278,8 +266,7 @@ CREATE TABLE `HZIMS_SAFE_CHECK_NOTICE` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_CHECK_QUARTER -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_CHECK_QUARTER`; -CREATE TABLE `HZIMS_SAFE_CHECK_QUARTER` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_CHECK_QUARTER` ( `ID` BIGINT(20) NOT NULL, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `YEAR` INT(11) NULL DEFAULT NULL COMMENT '年度', @@ -299,8 +286,7 @@ CREATE TABLE `HZIMS_SAFE_CHECK_QUARTER` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_DANGER_SOURCE -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_DANGER_SOURCE`; -CREATE TABLE `HZIMS_SAFE_DANGER_SOURCE` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_DANGER_SOURCE` ( `ID` BIGINT(20) NOT NULL, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `TYPE` TINYINT(4) NOT NULL COMMENT '危险源类型 1=作业活动 2=设备', @@ -324,8 +310,7 @@ CREATE TABLE `HZIMS_SAFE_DANGER_SOURCE` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_DANGER_SOURCE_LEVEL_RECORD -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_DANGER_SOURCE_LEVEL_RECORD`; -CREATE TABLE `HZIMS_SAFE_DANGER_SOURCE_LEVEL_RECORD` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_DANGER_SOURCE_LEVEL_RECORD` ( `SOURCE_ID` BIGINT(20) NOT NULL COMMENT '危险源ID', `ORGI_LEVEL` TINYINT(4) NOT NULL COMMENT '原等级', `NEW_LEVEL` TINYINT(4) NOT NULL COMMENT '新等级', @@ -342,8 +327,7 @@ CREATE TABLE `HZIMS_SAFE_DANGER_SOURCE_LEVEL_RECORD` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_DANGER_SOURCE_POSITION -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_DANGER_SOURCE_POSITION`; -CREATE TABLE `HZIMS_SAFE_DANGER_SOURCE_POSITION` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_DANGER_SOURCE_POSITION` ( `SOURCE_ID` BIGINT(20) NOT NULL COMMENT '危险源ID', `PADDING_TOP` DOUBLE(11, 2) NULL DEFAULT NULL COMMENT '平面图顶部距离', `PADDING_LEFT` DOUBLE(11, 2) NULL DEFAULT NULL COMMENT '平面图左边距', @@ -355,8 +339,7 @@ CREATE TABLE `HZIMS_SAFE_DANGER_SOURCE_POSITION` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_EMERGENCY_PLAN -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_EMERGENCY_PLAN`; -CREATE TABLE `HZIMS_SAFE_EMERGENCY_PLAN` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_EMERGENCY_PLAN` ( `ID` BIGINT(20) NOT NULL, `TYPE_ID` BIGINT(20) NOT NULL COMMENT '应急预案类型ID', `FILE_PATH` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件路径', @@ -378,8 +361,7 @@ CREATE TABLE `HZIMS_SAFE_EMERGENCY_PLAN` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_EMERGENCY_PLAN_TYPE -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_EMERGENCY_PLAN_TYPE`; -CREATE TABLE `HZIMS_SAFE_EMERGENCY_PLAN_TYPE` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_EMERGENCY_PLAN_TYPE` ( `ID` BIGINT(20) NOT NULL, `NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '类型名称', `PARENT_ID` BIGINT(20) NOT NULL DEFAULT -1 COMMENT '父类型ID', @@ -398,8 +380,7 @@ CREATE TABLE `HZIMS_SAFE_EMERGENCY_PLAN_TYPE` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_EQUIPMENT_TRIAL -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_EQUIPMENT_TRIAL`; -CREATE TABLE `HZIMS_SAFE_EQUIPMENT_TRIAL` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_EQUIPMENT_TRIAL` ( `ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `FILE_PATH` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件路径', `FILE_NAME` VARCHAR(200) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件名称', @@ -417,8 +398,7 @@ CREATE TABLE `HZIMS_SAFE_EQUIPMENT_TRIAL` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_SAFETY_TOOL -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_SAFETY_TOOL`; -CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_SAFETY_TOOL` ( `ID` BIGINT(20) NOT NULL AUTO_INCREMENT, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `TYPE_ID` BIGINT(20) NOT NULL, @@ -446,8 +426,7 @@ CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_SAFETY_TOOL_RECHECK -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_SAFETY_TOOL_RECHECK`; -CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL_RECHECK` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_SAFETY_TOOL_RECHECK` ( `TOOL_ID` BIGINT(20) NOT NULL COMMENT '工器具ID', `CHECK_USER_ID` BIGINT(20) NOT NULL COMMENT '复核人ID', `CHECK_USER_NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '复核人名称', @@ -460,8 +439,7 @@ CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL_RECHECK` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_SAFETY_TOOL_TYPE -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_SAFETY_TOOL_TYPE`; -CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL_TYPE` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_SAFETY_TOOL_TYPE` ( `ID` BIGINT(20) NOT NULL AUTO_INCREMENT, `TENANT_ID` BIGINT(12) NOT NULL, `TYPE_NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '类型名称', @@ -481,8 +459,7 @@ CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL_TYPE` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_SAFETY_TOOL_TYPE_USER -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_SAFETY_TOOL_TYPE_USER`; -CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL_TYPE_USER` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_SAFETY_TOOL_TYPE_USER` ( `TYPE_ID` BIGINT(20) NOT NULL COMMENT '安全工器具类型ID', `USER_ID` BIGINT(20) NOT NULL COMMENT '账户ID', INDEX `IDX_TYPE_ID`(`TYPE_ID`) USING BTREE, @@ -492,8 +469,7 @@ CREATE TABLE `HZIMS_SAFE_SAFETY_TOOL_TYPE_USER` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_SYSTEM_FILE -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_SYSTEM_FILE`; -CREATE TABLE `HZIMS_SAFE_SYSTEM_FILE` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_SYSTEM_FILE` ( `ID` BIGINT(20) NOT NULL AUTO_INCREMENT, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '租户ID', `FILE_TYPE_ID` BIGINT(20) NOT NULL COMMENT '文件类型ID', @@ -516,8 +492,7 @@ CREATE TABLE `HZIMS_SAFE_SYSTEM_FILE` ( -- ---------------------------- -- TABLE STRUCTURE FOR HZIMS_SAFE_SYSTEM_FILE_TYPE -- ---------------------------- -DROP TABLE IF EXISTS `HZIMS_SAFE_SYSTEM_FILE_TYPE`; -CREATE TABLE `HZIMS_SAFE_SYSTEM_FILE_TYPE` ( +CREATE TABLE IF NOT EXISTS `HZIMS_SAFE_SYSTEM_FILE_TYPE` ( `ID` BIGINT(20) NOT NULL DEFAULT -1, `TENANT_ID` VARCHAR(12) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '租户ID', `NAME` VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '文件类型名称', @@ -536,8 +511,7 @@ CREATE TABLE `HZIMS_SAFE_SYSTEM_FILE_TYPE` ( -- ---------------------------- -- TABLE STRUCTURE FOR INDICATOR_MANAGEMENT -- ---------------------------- -DROP TABLE IF EXISTS `INDICATOR_MANAGEMENT`; -CREATE TABLE `INDICATOR_MANAGEMENT` ( +CREATE TABLE IF NOT EXISTS `INDICATOR_MANAGEMENT` ( `ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号', `PRODUCT_NAME` VARCHAR(5000) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '项目名称', `STANDARD_SCORE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '标准分值', @@ -552,8 +526,7 @@ CREATE TABLE `INDICATOR_MANAGEMENT` ( -- ---------------------------- -- TABLE STRUCTURE FOR RATING_SCALE -- ---------------------------- -DROP TABLE IF EXISTS `RATING_SCALE`; -CREATE TABLE `RATING_SCALE` ( +CREATE TABLE IF NOT EXISTS `RATING_SCALE` ( `ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号', `INDICATOR_MANAGEMENT_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '指标项管理ID', `GOAL` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '得分', @@ -567,8 +540,7 @@ CREATE TABLE `RATING_SCALE` ( -- ---------------------------- -- TABLE STRUCTURE FOR TARGET_MANAGEMENT -- ---------------------------- -DROP TABLE IF EXISTS `TARGET_MANAGEMENT`; -CREATE TABLE `TARGET_MANAGEMENT` ( +CREATE TABLE IF NOT EXISTS `TARGET_MANAGEMENT` ( `ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '编号', `NAME` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NOT NULL COMMENT '名称', `SCORE` VARCHAR(50) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '分值', From 507a5444c4a05eeee42e54b792fb9fd3eba3852b Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 16 Apr 2024 19:45:20 +0800 Subject: [PATCH 6/7] =?UTF-8?q?#=E5=88=9D=E5=A7=8Bsql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hzims-service/hzims-alarm/src/main/resources/db/1.0.0.sql | 6 ++---- 1 file changed, 2 insertions(+), 4 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 85c309f..07babed 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 @@ -5,9 +5,7 @@ CREATE TABLE IF NOT EXISTS `blade_module_version` ( PRIMARY KEY (`MODULE_NAME`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; --- ---------------------------- --- Table structure for hzims_alarm --- ---------------------------- + CREATE TABLE IF NOT EXISTS `hzims_alarm` ( `ID` bigint(20) NOT NULL COMMENT '主键ID', `STATION_ID` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '站点编码', @@ -44,7 +42,7 @@ CREATE TABLE IF NOT EXISTS `hzims_alarm` ( `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 = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Table structure for hzims_alarm_config From da5f54459bcea0d35582b2690b856d2d2886b23d Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 16 Apr 2024 19:52:16 +0800 Subject: [PATCH 7/7] =?UTF-8?q?#=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/2.0.2.sql | 56 ++++++++++++++-------- 1 file changed, 37 insertions(+), 19 deletions(-) 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 index 375171c..dacfe93 100644 --- a/hzims-service/operational/src/main/resources/db/2.0.2.sql +++ b/hzims-service/operational/src/main/resources/db/2.0.2.sql @@ -28,6 +28,24 @@ CREATE TABLE IF NOT EXISTS `HZIMS_OPER_CONSTRUCTION` ( PRIMARY KEY (`ID`) USING BTREE ) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC; + +CREATE TABLE IF NOT EXISTS `HZIMS_AREA_MAP_CONFIG` ( + `ID` BIGINT(20) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT COMMENT '主键ID', + `AREA_ID` BIGINT(20) NULL DEFAULT NULL COMMENT '区域机构ID', + `MAP_CODE` VARCHAR(255) CHARACTER SET UTF8MB4 COLLATE UTF8MB4_GENERAL_CI NULL DEFAULT NULL COMMENT '地图编码', + `MAP_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 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 '状态 0-启用 1-停用', + `CREATE_DEPT` BIGINT(20) NULL DEFAULT NULL COMMENT '创建部门', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE = INNODB AUTO_INCREMENT = 1763477308557029378 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 ; ALTER TABLE `HZIMS_OPER_ACCESS_CONTENT` ADD COLUMN `STATION_NAME` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL ; @@ -90,23 +108,23 @@ ALTER TABLE `HZIMS_OPER_ACCESS_TASK_DETAIL` ADD COLUMN `UPDATE_USER_NAME` VARCHA 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 '创建人名称' ; -CREATE TABLE IF NOT EXISTS `hzims_run_month_report` ( - `ID` bigint(20) NOT NULL COMMENT '主键ID', - `STATION_CODE` varchar(64) DEFAULT NULL COMMENT '站点编码', - `STATION_NAME` varchar(255) DEFAULT NULL COMMENT '站点名称', - `MONTH` varchar(255) DEFAULT NULL COMMENT '月份 : "yyyy-MM"', - `RUN_DATA` text COMMENT '运行数据', - `ALARM_DATA` text COMMENT '告警数据', - `CURVE_DATA` text COMMENT '曲线数据', - `ANALYSIS_DATA` text COMMENT '分析数据', - `RUN_PROPOSE` text COMMENT '运行建议', - `TENANT_ID` varchar(12) DEFAULT NULL COMMENT '租户ID', - `STATUS` tinyint(4) DEFAULT NULL COMMENT '业务状态', - `CREATE_DEPT` bigint(20) DEFAULT NULL COMMENT '创建单位', - `IS_DELETED` tinyint(4) NOT NULL DEFAULT '0', - `CREATE_USER` bigint(20) DEFAULT NULL COMMENT '创建人', - `CREATE_TIME` datetime DEFAULT NULL COMMENT '创建时间', - `UPDATE_USER` bigint(20) DEFAULT NULL COMMENT '修改人', - `UPDATE_TIME` datetime DEFAULT NULL COMMENT '修改时间', +CREATE TABLE IF NOT EXISTS `HZIMS_RUN_MONTH_REPORT` ( + `ID` BIGINT(20) NOT NULL COMMENT '主键ID', + `STATION_CODE` VARCHAR(64) DEFAULT NULL COMMENT '站点编码', + `STATION_NAME` VARCHAR(255) DEFAULT NULL COMMENT '站点名称', + `MONTH` VARCHAR(255) DEFAULT NULL COMMENT '月份 : "YYYY-MM"', + `RUN_DATA` TEXT COMMENT '运行数据', + `ALARM_DATA` TEXT COMMENT '告警数据', + `CURVE_DATA` TEXT COMMENT '曲线数据', + `ANALYSIS_DATA` TEXT COMMENT '分析数据', + `RUN_PROPOSE` TEXT COMMENT '运行建议', + `TENANT_ID` VARCHAR(12) DEFAULT NULL COMMENT '租户ID', + `STATUS` TINYINT(4) DEFAULT NULL COMMENT '业务状态', + `CREATE_DEPT` BIGINT(20) DEFAULT NULL COMMENT '创建单位', + `IS_DELETED` TINYINT(4) NOT NULL DEFAULT '0', + `CREATE_USER` BIGINT(20) DEFAULT NULL COMMENT '创建人', + `CREATE_TIME` DATETIME DEFAULT NULL COMMENT '创建时间', + `UPDATE_USER` BIGINT(20) DEFAULT NULL COMMENT '修改人', + `UPDATE_TIME` DATETIME DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file +) ENGINE=INNODB DEFAULT CHARSET=UTF8; \ No newline at end of file