Commit 6923b4f7 authored by 吴俊凯's avatar 吴俊凯

脚本提交

parent 56688d36
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<databaseChangeLog <databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"> http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet author="suhuiguang" id="1587349916716-1"> <changeSet author="suhuiguang" id="1587349916716-1">
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
alter table `f_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`; alter table `f_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="suhuiguang" id="1587350552716-1"> <changeSet author="suhuiguang" id="1587350552716-1">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
<not> <not>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
); );
</sql> </sql>
</changeSet> </changeSet>
<changeSet id="1587882668719-1" author="suhuiguang"> <changeSet id="1587882668719-1" author="suhuiguang">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
<not> <not>
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
MODIFY COLUMN `fire_equipment_id` bigint(20) NULL COMMENT '消防装备id' AFTER `code`; MODIFY COLUMN `fire_equipment_id` bigint(20) NULL COMMENT '消防装备id' AFTER `code`;
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="shanqiyun" id="1591672147780-1"> <changeSet author="shanqiyun" id="1591672147780-1">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
<viewExists viewName="toip_biz_message"/> <viewExists viewName="toip_biz_message"/>
...@@ -298,9 +298,9 @@ ...@@ -298,9 +298,9 @@
`m`.`reader` AS `reader`, `m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`, `m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`, `m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code` `n`.`org_code` AS `org_code`
FROM FROM
( `toip_sys_message` `m` JOIN `f_equipment` `n` ) ( `toip_sys_message` `m` JOIN `f_equipment` `n` )
WHERE WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo' ) ) UNION ALL ( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo' ) ) UNION ALL
SELECT SELECT
...@@ -314,9 +314,9 @@ ...@@ -314,9 +314,9 @@
`m`.`reader` AS `reader`, `m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`, `m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`, `m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code` `n`.`org_code` AS `org_code`
FROM FROM
( `toip_sys_message` `m` JOIN `p_point` `n` ) ( `toip_sys_message` `m` JOIN `p_point` `n` )
WHERE WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.ProtalDataRo' ) ) UNION ALL ( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.ProtalDataRo' ) ) UNION ALL
SELECT SELECT
...@@ -330,9 +330,9 @@ ...@@ -330,9 +330,9 @@
`m`.`reader` AS `reader`, `m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`, `m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`, `m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code` `n`.`org_code` AS `org_code`
FROM FROM
( `toip_sys_message` `m` JOIN `f_risk_source` `n` ) ( `toip_sys_message` `m` JOIN `f_risk_source` `n` )
WHERE WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo' ) ); ( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo' ) );
</sql> </sql>
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="shanqiyun" id="1593309428780-2"> <changeSet author="shanqiyun" id="1593309428780-2">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
<not> <not>
...@@ -404,7 +404,7 @@ ...@@ -404,7 +404,7 @@
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="shanqiyun" id="1593309428780-3"> <changeSet author="shanqiyun" id="1593309428780-3">
<preConditions onFail="MARK_RAN"> <preConditions onFail="MARK_RAN">
<not> <not>
...@@ -573,4 +573,144 @@ ...@@ -573,4 +573,144 @@
ALTER TABLE `f_equipment` ADD COLUMN `reserve_source` tinyint(4) NULL DEFAULT 0 COMMENT '预案来源:1-手动触发,0-自动触发(默认)'; ALTER TABLE `f_equipment` ADD COLUMN `reserve_source` tinyint(4) NULL DEFAULT 0 COMMENT '预案来源:1-手动触发,0-自动触发(默认)';
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="wujunkai" id="1612272587000-1">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="c_plan_classify_tree" />
</not>
</preConditions>
<comment>create table c_plan_classify_tree</comment>
<sql>
DROP TABLE IF EXISTS c_plan_classify_tree;
CREATE TABLE `c_plan_classify_tree` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`classify_name` varchar(255) DEFAULT NULL COMMENT '预案分类名称',
`parent_id` bigint(20) DEFAULT NULL COMMENT '父类id',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`creator` varchar(255) DEFAULT NULL COMMENT '创建人',
`org_code` varchar(255) DEFAULT NULL COMMENT '组织机构',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='预案分类树';
</sql>
</changeSet>
<changeSet author="wujunkai" id="1612272587000-2">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="c_plan_detail" />
</not>
</preConditions>
<comment>create table c_plan_detail</comment>
<sql>
DROP TABLE IF EXISTS c_plan_detail;
CREATE TABLE `c_plan_detail` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '数字预案ID',
`plan_name` varchar(255) DEFAULT NULL COMMENT '预案名称',
`code` varchar(255) DEFAULT NULL COMMENT '预案编号',
`classify_id` bigint(20) DEFAULT NULL COMMENT '预案类型',
`plan_range` varchar(255) DEFAULT NULL COMMENT '适用范围',
`edit_org_name` varchar(255) DEFAULT NULL COMMENT '编写部门',
`edition` varchar(255) DEFAULT NULL COMMENT '版次',
`implementation_time` datetime DEFAULT NULL COMMENT '实施时间',
`create_date` datetime NOT NULL COMMENT '录入时间',
`remark` text COMMENT '备注',
`status` int(255) DEFAULT NULL COMMENT '预案状态',
`creator` varchar(255) DEFAULT NULL COMMENT '创建人',
`reviser` varchar(255) DEFAULT NULL COMMENT '修改人',
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
`org_code` varchar(255) DEFAULT NULL COMMENT '部门code',
`is_delete` tinyint(1) DEFAULT '0' COMMENT '删除状态(0、正常,1、删除)',
`input_time` datetime DEFAULT NULL COMMENT '录入时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='预案详情表';
</sql>
</changeSet>
<changeSet author="wujunkai" id="1612272587000-3">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="c_plan_doc" />
</not>
</preConditions>
<comment>create table c_plan_doc</comment>
<sql>
DROP TABLE IF EXISTS c_plan_doc;
CREATE TABLE `c_plan_doc` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`doc_id` bigint(20) DEFAULT NULL COMMENT '文档ID',
`create_date` datetime NOT NULL COMMENT '创建时间',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '删除状态',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='预案文档关系表';
</sql>
</changeSet>
<changeSet author="wujunkai" id="1612272587000-4">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="c_plan_equipment" />
</not>
</preConditions>
<comment>create table c_plan_equipment</comment>
<sql>
DROP TABLE IF EXISTS c_plan_equipment;
CREATE TABLE `c_plan_equipment` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`fire_equipment_id` bigint(20) DEFAULT NULL COMMENT '电力装备ID',
`create_date` datetime NOT NULL COMMENT '创建时间',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '删除状态',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='预案电力设备关系表';
</sql>
</changeSet>
<changeSet author="wujunkai" id="1612272587000-5">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="c_plan_operation_record" />
</not>
</preConditions>
<comment>create table c_plan_operation_record</comment>
<sql>
DROP TABLE IF EXISTS c_plan_operation_record;
CREATE TABLE `c_plan_operation_record` (
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`plan_pattern` tinyint(4) DEFAULT NULL COMMENT '运行模式(4、模拟,5、自动)',
`status` tinyint(4) DEFAULT NULL COMMENT '运行状态(0、运行中,1、完毕,3、中断)',
`execution_type` tinyint(4) DEFAULT NULL COMMENT '执行方式(0、预案验证 1、火灾处置)',
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`batch_no` varchar(255) DEFAULT NULL COMMENT '批次号',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '是否删除',
`start_user_name` varchar(255) DEFAULT NULL COMMENT '启动人名称',
`start_user_id` varchar(255) DEFAULT NULL COMMENT '启动人id',
`equipment_code` varchar(20) DEFAULT NULL COMMENT '装备code',
`equipment_name` varchar(255) DEFAULT NULL COMMENT '装备名称',
`equipment_id` bigint(11) DEFAULT NULL COMMENT '装备ID',
`fire_equipment_id` bigint(255) DEFAULT NULL COMMENT '电力设备ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8mb4 COMMENT='预案运行记录表';
</sql>
</changeSet>
<changeSet author="wujunkai" id="1612272587000-6">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="c_plan_rule" />
</not>
</preConditions>
<comment>create table c_plan_rule</comment>
<sql>
DROP TABLE IF EXISTS c_plan_rule;
CREATE TABLE `c_plan_rule` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`rule_id` varchar(32) DEFAULT NULL COMMENT '规则ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '是否删除',
`rule_name` varchar(100) DEFAULT NULL COMMENT '规则名称',
`pic_url` varchar(100) DEFAULT NULL COMMENT '规则树形图路径',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4;
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment