Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
YeeAmosFireAutoSysRoot
Commits
982ff9b8
Commit
982ff9b8
authored
Apr 20, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.数据库脚本整理
parent
0242dcc5
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
823 additions
and
1559 deletions
+823
-1559
changelog-master.xml
...tart/src/main/resources/db/changelog/changelog-master.xml
+4
-4
fas-1.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-1.0.1.xml
+0
-979
fas-1.0.2.xml
...utoSysStart/src/main/resources/db/changelog/fas-1.0.2.xml
+0
-282
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+178
-0
fas-init-table.xml
...sStart/src/main/resources/db/changelog/fas-init-table.xml
+7
-2
fas-create-table.sql
...src/main/resources/db/changelog/init/fas-create-table.sql
+589
-0
fas-init-data.sql
...rt/src/main/resources/db/changelog/init/fas-init-data.sql
+44
-0
fas_create_table.sql
...src/main/resources/db/changelog/init/fas_create_table.sql
+0
-291
pom.xml
pom.xml
+1
-1
No files found.
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/changelog-master.xml
View file @
982ff9b8
...
...
@@ -6,10 +6,9 @@
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
<!--初始化表结构
<include file="fas-init-table.xml" relativeToChangelogFile="true"/>-->
<include
file=
"fas-1.0.1.xml"
relativeToChangelogFile=
"true"
/>
<include
file=
"fas-1.0.2.xml"
relativeToChangelogFile=
"true"
/>
<!--初始化表结构-->
<!-- <include file="fas-init-table.xml" relativeToChangelogFile="true"/>-->
<include
file=
"fas-2.0.1.xml"
relativeToChangelogFile=
"true"
/>
<!-- 系统函数脚本 -->
<include
file=
"fas-sql-task.xml"
relativeToChangelogFile=
"true"
/>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-1.0.1.xml
deleted
100644 → 0
View file @
0242dcc5
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
<changeSet
author=
"maoying"
id=
"1557134646001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment_point"
columnName=
"type"
/>
</not>
</preConditions>
<comment>
f_fire_equipment_point add column type
</comment>
<sql>
ALTER TABLE `f_fire_equipment_point`
ADD COLUMN `type` varchar(32) NOT NULL COMMENT '类型:模拟量ANALOGUE,开关量SWITCH';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557134646001-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment_point"
columnName=
"value"
/>
</not>
</preConditions>
<comment>
f_fire_equipment_point add column value
</comment>
<sql>
ALTER TABLE `f_fire_equipment_point`
ADD COLUMN `value` double DEFAULT NULL COMMENT '当前值保存时若为开关量(1,0)默认为1';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557211821001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_water_resource"
/>
</not>
</preConditions>
<comment>
create f_water_resource
</comment>
<sql>
CREATE TABLE `f_water_resource` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(100) NOT NULL COMMENT '名称',
`code` varchar(50) DEFAULT NULL COMMENT '编码',
`type` varchar(10) DEFAULT NULL COMMENT '类型: 1:消火栓,2:消防水池,3:喷淋',
`production_area` varchar(255) DEFAULT NULL COMMENT '区域',
`floor` varchar(255) DEFAULT NULL COMMENT '楼层',
`room` varchar(255) DEFAULT NULL COMMENT '房间',
`address` varchar(255) DEFAULT NULL COMMENT '位置',
`position` varchar(50) DEFAULT NULL COMMENT '三维点',
`org_code` varchar(50) DEFAULT NULL COMMENT '组织',
`create_by` bigint(20) DEFAULT '0' COMMENT '维护人员',
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='水资源表';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557211821001-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_fire_station"
/>
</not>
</preConditions>
<comment>
create f_fire_station
</comment>
<sql>
CREATE TABLE `f_fire_station` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(100) NOT NULL COMMENT '名称',
`code` varchar(50) DEFAULT NULL COMMENT '编码',
`type` varchar(10) DEFAULT NULL COMMENT '类型 1:消防小室,2:消防泡沫间',
`address` varchar(255) DEFAULT NULL COMMENT '位置',
`position` varchar(50) DEFAULT NULL COMMENT '三维点',
`org_code` varchar(50) DEFAULT NULL COMMENT '组织',
`create_by` bigint(20) DEFAULT '0' COMMENT '维护人员',
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消防站点';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557211821001-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_fire_strength"
/>
</not>
</preConditions>
<comment>
create f_fire_strength
</comment>
<sql>
CREATE TABLE `f_fire_strength` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`username` varchar(50) NOT NULL COMMENT '名称',
`code` varchar(50) DEFAULT NULL COMMENT '编码',
`position` varchar(50) DEFAULT NULL COMMENT '职位',
`tel` varchar(20) DEFAULT NULL COMMENT '固话',
`phone_num` varchar(20) DEFAULT NULL COMMENT '移动号码',
`job_des` varchar(500) DEFAULT NULL COMMENT '工作描述',
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
`org_code` varchar(255) DEFAULT NULL COMMENT '组织',
`create_by` bigint(20) DEFAULT '0' COMMENT '维护人员',
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消防力量';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557211821001-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_equipment"
columnName=
"fire_station_id"
/>
</not>
</preConditions>
<comment>
f_equipment add column fire_station_id
</comment>
<sql>
ALTER TABLE `f_equipment`
ADD COLUMN `fire_station_id` bigint(20) DEFAULT NULL COMMENT '消防小室id';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557211821001-5"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_fire_station_equipment"
/>
</not>
</preConditions>
<comment>
create f_fire_station_equipment
</comment>
<sql>
CREATE TABLE `f_fire_station_equipment` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`fire_station_id` bigint(20) NOT NULL COMMENT '消防站id',
`fire_equipment_id` bigint(20) NOT NULL COMMENT '消防物资id',
`number` double DEFAULT NULL COMMENT '个数',
`create_by` bigint(20) DEFAULT '0' COMMENT '维护人员',
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消防站点资源表';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557211821001-6"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source_equipment"
columnName=
"fire_equipment_id"
/>
</not>
</preConditions>
<comment>
f_risk_source_equipment add column fire_equipment_id
</comment>
<sql>
ALTER TABLE `f_risk_source_equipment`
ADD COLUMN `fire_equipment_id` bigint(20) NOT NULL COMMENT '消防装备id';
</sql>
</changeSet>
<changeSet
author=
"tianbo"
id=
"1557214006001"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_car"
columnName=
"photo_path"
/>
</not>
</preConditions>
<comment>
f_fire_car add column photo_path
</comment>
<sql>
ALTER TABLE `f_fire_car`
ADD COLUMN `photo_path` varchar(1000) DEFAULT NULL COMMENT '消防车图片路径';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557306523600-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source_equipment"
columnName=
"create_date"
/>
</not>
</preConditions>
<comment>
f_risk_source_equipment add column create_date
</comment>
<sql>
ALTER TABLE `f_risk_source_equipment`
ADD COLUMN `create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557733022001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_fire_equipment_data"
/>
</not>
</preConditions>
<comment>
create f_fire_equipment_data
</comment>
<sql>
CREATE TABLE `f_fire_equipment_data` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`fire_equipment_id` bigint(20) NOT NULL COMMENT '消防监测设备id',
`fire_equipment_point_id` bigint(20) NOT NULL COMMENT '消防监测设备信息地址id',
`eq_point_name` varchar(255) DEFAULT NULL COMMENT '指标名称',
`eq_point_unit` varchar(255) DEFAULT NULL COMMENT '指标单位',
`type` varchar(50) DEFAULT NULL COMMENT '数据类型:alarm(报警),monitor(监测)',
`common_address` int(11) DEFAULT NULL COMMENT '公共地址',
`infomation_address` bigint(11) DEFAULT NULL COMMENT '信息地址',
`e_value` varchar(255) DEFAULT NULL COMMENT '值',
`data_type` int(11) DEFAULT NULL COMMENT '数据类型:浮点型,整数,布尔类型',
`created_time` datetime DEFAULT NULL COMMENT '创建时间',
`occur_time` datetime DEFAULT NULL COMMENT '品质描述',
`quality` longtext,
`is_blocked` bit(1) DEFAULT b'0' COMMENT '是否被锁',
`isSubstituted` bit(1) DEFAULT b'0' COMMENT '是否被取代',
`isNotTopical` bit(1) DEFAULT b'0' COMMENT '是否非当前值',
`isInvalid` bit(1) DEFAULT b'0' COMMENT '是否有效',
`isOverflow` bit(1) DEFAULT b'0' COMMENT '是否越界',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消防站点资源表';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1557733022001-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment_point"
columnName=
"unit"
/>
</not>
</preConditions>
<comment>
f_fire_equipment_point add column unit
</comment>
<sql>
ALTER TABLE `f_fire_equipment_point`
ADD COLUMN `unit` varchar(50) DEFAULT NULL COMMENT '指标项名称';
</sql>
</changeSet>
<changeSet
author=
"gaodongdong"
id=
"1558082420001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"p_point_config"
/>
</not>
</preConditions>
<comment>
create p_point_config
</comment>
<sql>
CREATE TABLE `p_point_config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(1000) DEFAULT NULL COMMENT '转发名称',
`point_id` bigint(20) DEFAULT NULL COMMENT '巡检点ID',
`point_code` int(11) DEFAULT NULL COMMENT '0:正常和漏检状态,1:合格不合格状态',
`infomation_address` int(20) DEFAULT NULL COMMENT '转发信息地址依次递增(唯一)',
`status` bit(1) DEFAULT NULL COMMENT '巡检点状态(code=0时,status=1漏检,status=0正常;code=1时,status=1不合格,status=0合格)',
`update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
`is_delete` bit(1) DEFAULT b'0' COMMENT '是否已经删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1041 DEFAULT CHARSET=utf8;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"equip_status"
/>
</not>
</preConditions>
<comment>
f_fire_equipment add column equip_status
</comment>
<sql>
ALTER TABLE `f_fire_equipment`
ADD COLUMN `equip_status` int(11) DEFAULT '0' COMMENT '设备状态(1,告警; 0,正常; )';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source_point_inputitem"
columnName=
"status"
/>
</not>
</preConditions>
<comment>
f_risk_source_point_inputitem add column status
</comment>
<sql>
ALTER TABLE `f_risk_source_point_inputitem`
ADD COLUMN `status` varchar(32) DEFAULT NULL COMMENT '检查项状态;合格/不合格/漏检';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_fire_car"
columnName=
"floor_config"
/>
</preConditions>
<comment>
f_fire_car CHANGE column floor_config
</comment>
<sql>
ALTER TABLE `f_fire_car`
CHANGE COLUMN `floor_config` `floor3d` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '楼层' AFTER `position`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_fire_car"
columnName=
"position"
/>
</preConditions>
<comment>
f_fire_car CHANGE column position
</comment>
<sql>
ALTER TABLE `f_fire_car`
CHANGE COLUMN `position` `position3d` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '3维坐标' AFTER `name`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-5"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_car"
columnName=
"is_indoor"
/>
</not>
</preConditions>
<comment>
f_fire_car CHANGE column position
</comment>
<sql>
ALTER TABLE `f_fire_car`
ADD COLUMN `is_indoor` bit(1) NULL DEFAULT 1 COMMENT '是否室内点:默认是' AFTER `photo_path`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-6"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_water_resource"
columnName=
"floor"
/>
</preConditions>
<comment>
f_water_resource CHANGE column floor
</comment>
<sql>
ALTER TABLE `f_water_resource`
CHANGE COLUMN `floor` `floor3d` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '楼层';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-7"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_water_resource"
columnName=
"position"
/>
</preConditions>
<comment>
f_water_resource CHANGE column position
</comment>
<sql>
ALTER TABLE `f_water_resource`
CHANGE COLUMN `position` `position3d` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '3维坐标';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-8"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_water_resource"
columnName=
"is_indoor"
/>
</not>
</preConditions>
<comment>
f_water_resource add column is_indoor
</comment>
<sql>
ALTER TABLE `f_water_resource`
ADD COLUMN `is_indoor` bit(1) NULL DEFAULT 1 COMMENT '是否室内点:默认是';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-9"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_station"
columnName=
"floor3d"
/>
</not>
</preConditions>
<comment>
f_fire_station add column floor3d
</comment>
<sql>
ALTER TABLE `f_fire_station`
ADD COLUMN `floor3d` varchar(100) NULL COMMENT '楼层' AFTER `address`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-10"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_fire_station"
columnName=
"position"
/>
</preConditions>
<comment>
f_fire_station CHANGE column position
</comment>
<sql>
ALTER TABLE `f_fire_station`
CHANGE COLUMN `position` `position3d` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '3维坐标';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-11"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_station"
columnName=
"is_indoor"
/>
</not>
</preConditions>
<comment>
f_fire_station add column is_indoor
</comment>
<sql>
ALTER TABLE `f_fire_station`
ADD COLUMN `is_indoor` bit(1) NULL DEFAULT 1 COMMENT '是否室内点:默认是' AFTER `position3d`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558405597001-12"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source_point_inputitem"
columnName=
"check_inputitem_id"
/>
</not>
</preConditions>
<comment>
f_risk_source_point_inputitem add column check_inputitem_id
</comment>
<sql>
ALTER TABLE `f_risk_source_point_inputitem`
ADD COLUMN `check_inputitem_id` bigint(32) NULL DEFAULT NULL COMMENT '检查项检查记录id(p_check_input 表id)' AFTER `status`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_evaluation_model"
columnName=
"coefficient"
/>
</not>
</preConditions>
<comment>
f_evaluation_model add column coefficient
</comment>
<sql>
ALTER TABLE `f_evaluation_model`
ADD COLUMN `coefficient` varchar(50) NULL COMMENT '系数' AFTER `remark`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_evaluation_model"
columnName=
"influence"
/>
</not>
</preConditions>
<comment>
f_evaluation_model add column influence
</comment>
<sql>
ALTER TABLE `f_evaluation_model`
ADD COLUMN `influence` varchar(500) NULL COMMENT '影响' AFTER `coefficient`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_evaluation_model"
columnName=
"describe"
/>
</not>
</preConditions>
<comment>
f_evaluation_model add column describe
</comment>
<sql>
ALTER TABLE `f_evaluation_model`
ADD COLUMN `describe` varchar(500) NULL COMMENT '描述' AFTER `influence`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_accident_type"
columnName=
"evaluation_sid"
/>
</not>
</preConditions>
<comment>
f_accident_type add column evaluation_sid
</comment>
<sql>
ALTER TABLE `f_accident_type`
ADD COLUMN `evaluation_sid` bigint(32) NULL COMMENT 'evaluation_model 中 type 为s 的id' AFTER `name`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-5"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_evaluation_model"
columnName=
"type"
/>
</not>
</preConditions>
<comment>
f_evaluation_model add column type
</comment>
<sql>
ALTER TABLE `f_evaluation_model`
ADD COLUMN `type` varchar(50) NULL COMMENT '类型:S,D,O' AFTER `describe`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-6"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment_data"
columnName=
"soe"
/>
</not>
</preConditions>
<comment>
f_fire_equipment_data add column soe
</comment>
<sql>
ALTER TABLE `f_fire_equipment_data`
ADD COLUMN `soe` varchar(50) DEFAULT NULL COMMENT '数据类型:alarm(报警),monitor(监测)';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-7"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"is_region"
/>
</not>
</preConditions>
<comment>
f_risk_source add column is_region
</comment>
<sql>
ALTER TABLE `f_risk_source`
ADD COLUMN `is_region` varchar(16) DEFAULT 'FALSE' COMMENT '是否区域节点(TRUE,FALSE)';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-8"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_station_equipment"
columnName=
"unit"
/>
</not>
</preConditions>
<comment>
f_fire_station_equipment add column unit
</comment>
<sql>
ALTER TABLE `f_fire_station_equipment`
ADD COLUMN `unit` varchar(16) DEFAULT NULL COMMENT '单位';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-9"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"status"
/>
</not>
</preConditions>
<comment>
f_risk_source add column status
</comment>
<sql>
ALTER TABLE `f_risk_source`
ADD COLUMN `status` varchar(16) NULL COMMENT '状态(正常NORMAL,异常ANOMALY)';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-10"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source_point_inputitem"
columnName=
"create_date"
/>
</not>
</preConditions>
<comment>
f_risk_source_point_inputitem add column create_date
</comment>
<sql>
ALTER TABLE `f_risk_source_point_inputitem`
ADD COLUMN `create_date` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间' AFTER `check_inputitem_id`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-11"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_equipment_fire_equipment "
columnName=
"create_date"
/>
</not>
</preConditions>
<comment>
"f_equipment_fire_equipment " add column create_date
</comment>
<sql>
ALTER TABLE `f_equipment_fire_equipment`
ADD COLUMN `create_date` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-12"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment_data "
columnName=
"org_code"
/>
</not>
</preConditions>
<comment>
"f_fire_equipment_data " add column org_code
</comment>
<sql>
ALTER TABLE `f_fire_equipment_data`
ADD COLUMN `org_code` varchar(50) NULL COMMENT '组织';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-13"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_fire_equipment_point "
columnName=
"value"
/>
</preConditions>
<comment>
"f_fire_equipment_point " change column value
</comment>
<sql>
ALTER TABLE `f_fire_equipment_point`
MODIFY COLUMN `value` varchar(50) NULL DEFAULT NULL COMMENT '当前值保存时若为开关量(1,0)默认为1' AFTER `type`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1558969804001-14"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment_point "
columnName=
"org_code"
/>
</not>
</preConditions>
<comment>
"f_fire_equipment_point " add column org_code
</comment>
<sql>
ALTER TABLE `f_fire_equipment_point`
ADD COLUMN `org_code` varchar(50) NULL COMMENT '组织';
</sql>
</changeSet>
<changeSet
author=
"suhg"
id=
"1560909443001-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_equipment "
columnName=
"reserve_plan"
/>
</not>
</preConditions>
<comment>
"f_equipment " add column reserve_plan
</comment>
<sql>
ALTER TABLE `f_equipment`
ADD COLUMN `reserve_plan` varchar(100) DEFAULT NULL COMMENT '预案配置';
</sql>
</changeSet>
<changeSet
author=
"suhg"
id=
"1560909443001-02"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_station"
columnName=
"picture"
/>
</not>
</preConditions>
<comment>
f_fire_station add column picture
</comment>
<sql>
ALTER TABLE `f_fire_station`
ADD COLUMN `picture` varchar(1000) DEFAULT NULL COMMENT '图片';
</sql>
</changeSet>
<changeSet
author=
"lierwei"
id=
"1561430802-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"rpni"
/>
</not>
</preConditions>
<comment>
f_risk_source add column rpni
</comment>
<sql>
ALTER TABLE `f_risk_source`
ADD COLUMN `rpni` decimal(10,2) DEFAULT 0.00 COMMENT 'rpni属性';
</sql>
</changeSet>
<changeSet
author=
"tianbo"
id=
"1562294199-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_risk_source"
columnName=
"status"
/>
</preConditions>
<comment>
f_risk_source 历史数据status设置默认值为NORMAL
</comment>
<sql>
UPDATE f_risk_source
SET `status` = 'NORMAL'
WHERE ISNULL(`status`)
</sql>
</changeSet>
<changeSet
author=
"suhg"
id=
"1561455346001-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source_equipment"
columnName=
"status"
/>
</not>
</preConditions>
<comment>
f_risk_source_equipment add column status
</comment>
<sql>
ALTER TABLE `f_risk_source_equipment`
ADD COLUMN `status` int(11) DEFAULT 0 COMMENT '设备状态(1,告警; 0,正常; )';
</sql>
</changeSet>
<changeSet
author=
"suhg"
id=
"1561455346001-02"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_risk_source_point_inputitem"
columnName=
"status"
/>
</preConditions>
<comment>
f_risk_source_point_inputitem修改status默认值
</comment>
<sql>
ALTER TABLE f_risk_source_point_inputitem ALTER status SET DEFAULT '1';
</sql>
</changeSet>
<changeSet
author=
"tb"
id=
"1561455346001-111"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"increment"
/>
</not>
</preConditions>
<comment>
f_risk_source add column increment
</comment>
<sql>
ALTER TABLE `f_risk_source`
ADD COLUMN `increment` decimal(10,2) DEFAULT 0.0 COMMENT 'rpn增量';
</sql>
</changeSet>
<changeSet
author=
"tb"
id=
"1564644336001"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_equipment"
columnName=
"fire_truck_route"
/>
</not>
</preConditions>
<comment>
f_equipment add column fire_truck_route
</comment>
<sql>
ALTER TABLE `f_equipment`
ADD COLUMN `fire_truck_route` varchar(255) DEFAULT NULL COMMENT '消防车到重点设备行车路线';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1565597367001"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_equipment"
columnName=
"sort_num"
/>
</not>
</preConditions>
<comment>
f_equipment add column sort_num
</comment>
<sql>
ALTER TABLE `f_equipment`
ADD COLUMN `sort_num` int(11) DEFAULT '0' COMMENT '排序编号';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1565597367002"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"video_url"
/>
</not>
</preConditions>
<comment>
f_fire_equipment add column video_url
</comment>
<sql>
ALTER TABLE `f_fire_equipment`
ADD COLUMN `video_url` varchar(255) DEFAULT '' COMMENT '视频路径';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1565597367003"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_strength"
columnName=
"day_end"
/>
</not>
</preConditions>
<comment>
f_fire_strength add column day_end
</comment>
<sql>
ALTER TABLE `f_fire_strength`
ADD COLUMN `day_end` time DEFAULT NULL COMMENT '结束时间';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1565597367004"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_strength"
columnName=
"day_begin"
/>
</not>
</preConditions>
<comment>
f_fire_strength add column day_begin
</comment>
<sql>
ALTER TABLE `f_fire_strength`
ADD COLUMN `day_begin` time DEFAULT NULL COMMENT '开始时间';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1566271224001"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"weight"
/>
</not>
</preConditions>
<comment>
f_fire_equipment add column weight
</comment>
<sql>
ALTER TABLE `f_fire_equipment`
ADD COLUMN `weight` decimal(10,2) DEFAULT 0.0 COMMENT '重量';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1566271224002"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"action_state"
/>
</not>
</preConditions>
<comment>
f_fire_equipment add column action_state
</comment>
<sql>
ALTER TABLE `f_fire_equipment`
ADD COLUMN `action_state` varchar(50) DEFAULT '' COMMENT '动作状态';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1566271224003"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"eruption_state"
/>
</not>
</preConditions>
<comment>
f_fire_equipment add column eruption_state
</comment>
<sql>
ALTER TABLE `f_fire_equipment`
ADD COLUMN `eruption_state` varchar(50) DEFAULT '' COMMENT '喷发状态';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1568796274001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"sort_num"
/>
</not>
</preConditions>
<comment>
f_risk_source add column sort_num
</comment>
<sql>
ALTER TABLE `f_risk_source`
ADD COLUMN `sort_num` int(10) NULL DEFAULT 500 AFTER `rpni`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_car"
columnName=
"risk_source_id"
/>
</not>
</preConditions>
<comment>
f_fire_car add column risk_source_id
</comment>
<sql>
ALTER TABLE `f_fire_car`
ADD COLUMN `risk_source_id` bigint(20) DEFAULT '0' COMMENT '风险区域id';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"risk_source_id"
/>
</not>
</preConditions>
<comment>
f_fire_equipment add column risk_source_id
</comment>
<sql>
ALTER TABLE `f_fire_equipment`
ADD COLUMN `risk_source_id` bigint(20) DEFAULT '0' COMMENT '风险区域id';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_station"
columnName=
"risk_source_id"
/>
</not>
</preConditions>
<comment>
f_fire_station add column risk_source_id
</comment>
<sql>
ALTER TABLE `f_fire_station`
ADD COLUMN `risk_source_id` bigint(20) DEFAULT '0' COMMENT '风险区域id';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_water_resource"
columnName=
"risk_source_id"
/>
</not>
</preConditions>
<comment>
f_water_resource add column risk_source_id
</comment>
<sql>
ALTER TABLE `f_water_resource`
ADD COLUMN `risk_source_id` bigint(20) DEFAULT '0' COMMENT '风险区域id';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-5"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"risk_source_id"
/>
</preConditions>
<comment>
update f_fire_equipment risk_source_id
</comment>
<sql>
UPDATE f_fire_equipment AS fe
SET fe.risk_source_id = (
SELECT
IFNULL(MIN(frs.id),0)
FROM
f_risk_source frs
WHERE
TRIM(frs.`name`) = TRIM(fe.production_area)
)
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-6"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_equipment"
columnName=
"risk_source_id"
/>
</not>
</preConditions>
<comment>
f_equipment add column risk_source_id
</comment>
<sql>
ALTER TABLE `f_equipment`
ADD COLUMN `risk_source_id` bigint(20) DEFAULT '0' COMMENT '风险区域id';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-7"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_water_resource_equipment"
/>
</not>
</preConditions>
<comment>
create f_water_resource_equipment
</comment>
<sql>
CREATE TABLE `f_water_resource_equipment` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`water_resource_id` bigint(20) NOT NULL,
`fire_equipment_id` bigint(20) NOT NULL,
`number` double DEFAULT NULL COMMENT '个数',
`unit` varchar(16) DEFAULT NULL COMMENT '单位',
`create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '维护时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='水资源设备表';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-8"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"f_fire_equipment_data"
/>
</preConditions>
<comment>
MODIFY f_fire_equipment_data
</comment>
<sql>
ALTER TABLE `f_fire_equipment_data`
CHANGE COLUMN `infomation_address` `information_address` bigint(11) NULL DEFAULT NULL COMMENT '信息地址' AFTER `common_address`,
CHANGE COLUMN `created_time` `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间' AFTER `data_type`,
MODIFY COLUMN `isInvalid` int(11) NULL DEFAULT b'0' COMMENT '是否有效' AFTER `isNotTopical`,
MODIFY COLUMN `soe` int(11) NULL DEFAULT b'0' AFTER `isOverflow`;
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-9"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment_data"
columnName=
"eq_point_code"
/>
</not>
</preConditions>
<comment>
f_fire_equipment_data add column eq_point_code
</comment>
<sql>
ALTER TABLE `f_fire_equipment_data`
ADD COLUMN `eq_point_code` varchar(225) DEFAULT '' COMMENT '点位编码';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-10"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment_data"
columnName=
"is_invalid"
/>
</not>
</preConditions>
<comment>
f_fire_equipment_data add column is_invalid
</comment>
<sql>
ALTER TABLE `f_fire_equipment_data`
ADD COLUMN `is_invalid` int(11) DEFAULT b'0' COMMENT '是否有效';
</sql>
</changeSet>
<changeSet
author=
"maoying"
id=
"1571118242011-11"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment_point"
columnName=
"alarm_type"
/>
</not>
</preConditions>
<comment>
f_fire_equipment_point add column alarm_type
</comment>
<sql>
ALTER TABLE `f_fire_equipment_point`
ADD COLUMN `alarm_type` bigint(20) DEFAULT b'0' COMMENT '是否有效';
</sql>
</changeSet>
<changeSet
author=
"gaodongdong"
id=
"1572575313001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_dict"
/>
</not>
</preConditions>
<comment>
create f_dict
</comment>
<sql>
CREATE TABLE `f_dict` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`dict_name` varchar(255) DEFAULT NULL COMMENT '名称',
`dict_code` varchar(255) DEFAULT NULL COMMENT '编码',
`parent_id` bigint(11) DEFAULT NULL COMMENT '父ID',
`is_delete` bit(1) DEFAULT b'0' COMMENT '是否已经删除',
`dict_value` varchar(255) DEFAULT NULL COMMENT '值',
`dict_order` bigint(11) DEFAULT NULL COMMENT '序号',
`remark` longtext COMMENT '说明',
`dict_type` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
INSERT INTO `f_dict` (dict_name, dict_code, parent_id, is_delete, dict_value, dict_order, remark, dict_type) VALUES ('火灾告警', 'fire_equipment_switch', '0', '\0', 'alarm_type_fire', '0', '火灾探测器告警', null);
INSERT INTO `f_dict` (dict_name, dict_code, parent_id, is_delete, dict_value, dict_order, remark, dict_type) VALUES ('电源开关', 'fire_equipment_switch', '0', '\0', 'alarm_type_power', '1', '电源开关', null);
INSERT INTO `f_dict` (dict_name, dict_code, parent_id, is_delete, dict_value, dict_order, remark, dict_type) VALUES ('液位', 'fire_equipment_analogue', '0', '\0', 'analogue_water_level', '0', '液位', null);
INSERT INTO `f_dict` (dict_name, dict_code, parent_id, is_delete, dict_value, dict_order, remark, dict_type) VALUES ('流量', 'fire_equipment_analogue', '0', '\0', 'analogue_water_flow', '1', '流量', null);
INSERT INTO `f_dict` (dict_name, dict_code, parent_id, is_delete, dict_value, dict_order, remark, dict_type) VALUES ('容量', 'fire_equipment_analogue', '0', '\0', 'analogue_water_capacity', '2', '容量', null);
INSERT INTO `f_dict` (dict_name, dict_code, parent_id, is_delete, dict_value, dict_order, remark, dict_type) VALUES ('换流变', 'fire_equipment_switch', '0', '\0', 'alarm_type_rheology', '2', '换流变', null);
</sql>
</changeSet>
<changeSet
author=
"gaodongdong"
id=
"1572575313002-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_water_resource"
columnName=
"max_level"
/>
</not>
</preConditions>
<comment>
f_water_resource add column max_level
</comment>
<sql>
ALTER TABLE `f_water_resource`
ADD COLUMN `max_level` varchar(255) DEFAULT '0' COMMENT '最大液位';
</sql>
</changeSet>
<changeSet
author=
"gaodongdong"
id=
"1572575313002-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_water_resource"
columnName=
"alarm_level"
/>
</not>
</preConditions>
<comment>
f_water_resource add column alarm_level
</comment>
<sql>
ALTER TABLE `f_water_resource`
ADD COLUMN `alarm_level` varchar(255) DEFAULT '0' COMMENT '告警液位';
</sql>
</changeSet>
<changeSet
author=
"gaodongdong"
id=
"1572575313002-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_water_resource"
columnName=
"area"
/>
</not>
</preConditions>
<comment>
f_water_resource add column area
</comment>
<sql>
ALTER TABLE `f_water_resource`
ADD COLUMN `area` varchar(255) DEFAULT '0' COMMENT '水池面積';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-1.0.2.xml
deleted
100644 → 0
View file @
0242dcc5
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea"
columnName=
"rpn"
/>
</not>
</preConditions>
<comment>
f_fmea add column rpn
</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `rpn` decimal(10,2) DEFAULT NULL COMMENT '实时rpn';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea"
columnName=
"new_evaluation_oid"
/>
</not>
</preConditions>
<comment>
f_fmea add column new_evaluation_oid
</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `new_evaluation_oid` bigint(20) DEFAULT NULL COMMENT '最新故障频数';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_fmea_equipment_point"
/>
</not>
</preConditions>
<comment>
create f_fmea_equipment_point
</comment>
<sql>
CREATE TABLE `f_fmea_equipment_point` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`fmea_id` bigint(20) NOT NULL COMMENT 'fmea编号',
`equipment_point_id` bigint(20) NOT NULL COMMENT '装备指标编号',
`state` tinyint(4) NOT NULL DEFAULT '0' COMMENT '装备指标状态(0:正常;1:告警)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8 COMMENT='fmea和装备指标的关系';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_fmea_point_inputitem"
/>
</not>
</preConditions>
<comment>
create f_fmea_point_inputitem
</comment>
<sql>
CREATE TABLE `f_fmea_point_inputitem` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`fmea_id` bigint(20) NOT NULL COMMENT 'fmea编号',
`point_inputitem_id` bigint(20) NOT NULL COMMENT '检查点和项关系编号',
`state` tinyint(4) NOT NULL DEFAULT '0' COMMENT '检查项状态(0:正常;1:不合格)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8 COMMENT='fmea和检查项的关系';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-5"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_level"
columnName=
"top_limit"
/>
</not>
</preConditions>
<comment>
f_risk_level add column top_limit
</comment>
<sql>
ALTER TABLE `f_risk_level` ADD COLUMN `top_limit` decimal(10,2) DEFAULT NULL COMMENT '上限';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-6"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_level"
columnName=
"down_limit"
/>
</not>
</preConditions>
<comment>
f_risk_level add column down_limit
</comment>
<sql>
ALTER TABLE `f_risk_level` ADD COLUMN `down_limit` decimal(10,2) DEFAULT NULL COMMENT '下限';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-7"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_rpn_change_log"
columnName=
"fmea_id"
/>
</not>
</preConditions>
<comment>
f_rpn_change_log add column fmea_id
</comment>
<sql>
ALTER TABLE `f_rpn_change_log` ADD COLUMN `fmea_id` bigint(20) NOT NULL COMMENT 'fmeaId';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-8"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea"
columnName=
"risk_level_id"
/>
</not>
</preConditions>
<comment>
f_fmea add column risk_level_id
</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `risk_level_id` bigint(20) DEFAULT NULL COMMENT '风险等级id';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-9"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea"
columnName=
"company_leader"
/>
</not>
</preConditions>
<comment>
f_fmea add column company_leader
</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `company_leader` bigint(20) DEFAULT NULL COMMENT '公司负责人';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-10"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea"
columnName=
"department_leader"
/>
</not>
</preConditions>
<comment>
f_fmea add column department_leader
</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `department_leader` bigint(20) DEFAULT NULL COMMENT '部门负责人';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-11"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea"
columnName=
"group_leader"
/>
</not>
</preConditions>
<comment>
f_fmea add column group_leader
</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `group_leader` bigint(20) DEFAULT NULL COMMENT '班组负责人';
</sql>
</changeSet>
<changeSet
author=
"xukaiqiang"
id=
"1557134646002-12"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea"
columnName=
"person_leader"
/>
</not>
</preConditions>
<comment>
f_fmea add column person_leader
</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `person_leader` bigint(20) DEFAULT NULL COMMENT '个人负责人';
</sql>
</changeSet>
<changeSet
author=
"tianbo"
id=
"1582104676000-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea"
columnName=
"identify_user"
/>
</not>
</preConditions>
<comment>
f_fmea add column identify_user
</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `identify_user` int(11) DEFAULT NULL COMMENT '辨识人';
</sql>
</changeSet>
<changeSet
author=
"tianbo"
id=
"1582104676000-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea"
columnName=
"identify_method"
/>
</not>
</preConditions>
<comment>
f_fmea add column identify_method
</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `identify_method` varchar(255) DEFAULT NULL COMMENT '辨识方法';
</sql>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1583217856000-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_topography_node"
/>
</not>
</preConditions>
<comment>
create f_topography_node
</comment>
<sql>
CREATE TABLE `f_topography_node` (
`id` varchar(36) NOT NULL,
`create_date` datetime DEFAULT NULL,
`create_user` varchar(255) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_user` varchar(255) DEFAULT NULL,
`category` varchar(32) DEFAULT NULL COMMENT '类别',
`group` varchar(32) DEFAULT '' COMMENT '分组',
`is_group` bit(1) DEFAULT NULL COMMENT '是否是组',
`key` varchar(32) DEFAULT NULL COMMENT 'key',
`loc` varchar(255) DEFAULT NULL COMMENT '位置',
`picture` varchar(32) DEFAULT NULL COMMENT '图片',
`size` varchar(32) DEFAULT NULL COMMENT '大小',
`source_id` varchar(32) DEFAULT NULL COMMENT '资源id',
`text` varchar(32) DEFAULT NULL COMMENT '文本',
`app_id` varchar(32) DEFAULT NULL COMMENT 'appid',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1583217856000-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_topography_line"
/>
</not>
</preConditions>
<comment>
create f_topography_line
</comment>
<sql>
CREATE TABLE `f_topography_line` (
`id` varchar(36) NOT NULL,
`create_date` datetime DEFAULT NULL,
`create_user` varchar(255) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_user` varchar(255) DEFAULT NULL,
`app_id` varchar(32) DEFAULT NULL COMMENT 'appid',
`clickable` bit(1) DEFAULT NULL COMMENT '可点击',
`from` varchar(32) DEFAULT NULL COMMENT '起点',
`has_arrow` bit(1) DEFAULT NULL COMMENT '有箭头',
`is_dash` bit(1) DEFAULT NULL COMMENT '是虚线',
`line_color` int(11) DEFAULT NULL COMMENT '线颜色',
`to` varchar(32) DEFAULT NULL COMMENT '终点',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1583217856000-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_topography_node_detail"
/>
</not>
</preConditions>
<comment>
create f_topography_node_detail
</comment>
<sql>
CREATE TABLE `f_topography_node_detail` (
`id` varchar(36) NOT NULL,
`create_date` datetime DEFAULT NULL,
`create_user` varchar(255) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_user` varchar(255) DEFAULT NULL,
`node_detail` text COMMENT '详情',
`nodeid` varchar(32) DEFAULT NULL COMMENT '节点id',
`nodekey` varchar(32) DEFAULT NULL COMMENT '节点key',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
<changeSet
author=
"tianbo"
id=
"1583068193000-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fmea_equipment_point"
columnName=
"important_equipment_id"
/>
</not>
</preConditions>
<comment>
f_fmea_equipment_point add column important_equipment_id
</comment>
<sql>
ALTER TABLE `f_fmea_equipment_point` ADD COLUMN `important_equipment_id` bigint(20) NOT NULL COMMENT '所属重点设备id';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
0 → 100644
View file @
982ff9b8
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"ue4_location"
/>
</not>
</preConditions>
<comment>
f_risk_source add column ue4_location
</comment>
<sql>
alter table `f_risk_source` add column `ue4_location` json default null comment 'ue4位置' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"ue4_rotation"
/>
</not>
</preConditions>
<comment>
f_risk_source add column ue4_rotation
</comment>
<sql>
alter table `f_risk_source` add column `ue4_rotation` json default null comment 'ue4旋转' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"ue4_extent"
/>
</not>
</preConditions>
<comment>
f_risk_source add column ue4_extent
</comment>
<sql>
alter table `f_risk_source` add column `ue4_extent` json default null comment 'ue4缩放' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587351415717-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_equipment"
columnName=
"ue4_location"
/>
</not>
</preConditions>
<comment>
f_equipment add column ue4_location
</comment>
<sql>
alter table `f_equipment` add column `ue4_location` json default null comment 'ue4位置' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587351415717-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_equipment"
columnName=
"ue4_rotation"
/>
</not>
</preConditions>
<comment>
f_equipment add column ue4_rotation
</comment>
<sql>
alter table `f_equipment` add column `ue4_rotation` json default null comment 'ue4旋转' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350445716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_car"
columnName=
"ue4_location"
/>
</not>
</preConditions>
<comment>
f_fire_car add column ue4_location
</comment>
<sql>
alter table `f_fire_car` add column `ue4_location` json default null comment 'ue4位置' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350445716-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_car"
columnName=
"ue4_rotation"
/>
</not>
</preConditions>
<comment>
f_fire_car add column ue4_rotation
</comment>
<sql>
alter table `f_fire_car` add column `ue4_rotation` json default null comment 'ue4旋转' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"ue4_location"
/>
</not>
</preConditions>
<comment>
f_fire_equipment add column ue4_location
</comment>
<sql>
alter table `f_fire_equipment` add column `ue4_location` json default null comment 'ue4位置' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"ue4_rotation"
/>
</not>
</preConditions>
<comment>
f_fire_equipment add column ue4_rotation
</comment>
<sql>
alter table `f_fire_equipment` add column `ue4_rotation` json default null comment 'ue4旋转' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350593716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_station"
columnName=
"ue4_location"
/>
</not>
</preConditions>
<comment>
f_fire_station add column ue4_location
</comment>
<sql>
alter table `f_fire_station` add column `ue4_location` json default null comment 'ue4位置' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350593716-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_fire_station"
columnName=
"ue4_rotation"
/>
</not>
</preConditions>
<comment>
f_fire_station add column ue4_rotation
</comment>
<sql>
alter table `f_fire_station` add column `ue4_rotation` json default null comment 'ue4旋转' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350759717-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_water_resource"
columnName=
"ue4_location"
/>
</not>
</preConditions>
<comment>
f_water_resource add column ue4_location
</comment>
<sql>
alter table `f_water_resource` add column `ue4_location` json default null comment 'ue4位置' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350759717-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"f_water_resource"
columnName=
"ue4_rotation"
/>
</not>
</preConditions>
<comment>
f_water_resource add column ue4_rotation
</comment>
<sql>
alter table `f_water_resource` add column `ue4_rotation` json default null comment 'ue4旋转' after `position3d`;
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350860716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"f_safety_index_change_log"
/>
</not>
</preConditions>
<comment>
create f_safety_index_change_log
</comment>
<sql>
create table f_safety_index_change_log
(
id bigint(20) not null auto_increment comment '物理主键',
safety_index decimal(4,1) comment '安全指数',
collect_date date comment '统计日期',
org_code varchar(100) comment '机构',
remark varchar(255) comment '备注',
primary key (id)
);
alter table f_safety_index_change_log comment '安全指数日流水';
create index Index_org_code on f_safety_index_change_log
(
org_code
);
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-init-table.xml
View file @
982ff9b8
...
...
@@ -10,8 +10,12 @@
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"
>
<!-- 插入基础表结构 -->
<changeSet
author=
"suhuiguang"
id=
"15
56423311
001-1"
>
<changeSet
author=
"suhuiguang"
id=
"15
87349724
001-1"
>
<comment>
init database
</comment>
<sqlFile
path=
"./init/fas_create_table.sql"
relativeToChangelogFile=
"true"
/>
<sqlFile
path=
"./init/fas-create-table.sql"
relativeToChangelogFile=
"true"
/>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587349740715-1"
>
<comment>
init data
</comment>
<sqlFile
path=
"./init/fas-init-data.sql"
relativeToChangelogFile=
"true"
/>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/init/fas-create-table.sql
0 → 100644
View file @
982ff9b8
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for f_accident_type
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_accident_type`
;
CREATE
TABLE
`f_accident_type`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'事故类型'
,
`evaluation_sid`
bigint
(
32
)
DEFAULT
NULL
COMMENT
'evaluation_model 中 type 为s 的id'
,
`influence`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'失效/事故影响'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
20
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'事故类型表'
;
-- ----------------------------
-- Table structure for f_alarm
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_alarm`
;
CREATE
TABLE
`f_alarm`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
DEFAULT
'0'
COMMENT
'消防设备id'
,
`metric`
text
COMMENT
'指标'
,
`alarm_time`
datetime
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'报警时间'
,
`alarm_type`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'报警类别:真实;误报'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'报警信息表'
;
-- ----------------------------
-- Table structure for f_dict
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_dict`
;
CREATE
TABLE
`f_dict`
(
`id`
bigint
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`dict_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`dict_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编码'
,
`parent_id`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'父ID'
,
`is_delete`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否已经删除'
,
`dict_value`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'值'
,
`dict_order`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'序号'
,
`remark`
longtext
COMMENT
'说明'
,
`dict_type`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
44
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- Table structure for f_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_equipment`
;
CREATE
TABLE
`f_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'设备名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3位坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`building`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'建筑物'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间号'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`charge_dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'责任部门'
,
`charge_user_id`
int
(
1
)
DEFAULT
'0'
COMMENT
'责任人'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`fire_station_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'消防小室id'
,
`reserve_plan`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'预案配置'
,
`sort_num`
int
(
11
)
DEFAULT
NULL
,
`fire_truck_route`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'消防车到重点设备行车路线'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
80
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备表'
;
-- ----------------------------
-- Table structure for f_equipment_fire_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_equipment_fire_equipment`
;
CREATE
TABLE
`f_equipment_fire_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'设备id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_date`
datetime
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
970
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备与消防设备关联中间表'
;
-- ----------------------------
-- Table structure for f_evaluation_model
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_evaluation_model`
;
CREATE
TABLE
`f_evaluation_model`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'模型名称'
,
`standard`
text
COMMENT
'模型内容'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`coefficient`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'系数'
,
`influence`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'影响'
,
`describe`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'描述'
,
`type`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'类型:S,D,O'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
52
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'评价模型表'
;
-- ----------------------------
-- Table structure for f_fire_car
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_car`
;
CREATE
TABLE
`f_fire_car`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`dept_id`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'部门id'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆类别'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`car_num`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车牌号'
,
`engine_num`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'发动机号'
,
`model`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'厂牌型号'
,
`country`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'国别'
,
`state`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆状态'
,
`performance_index`
longtext
COMMENT
'性能指标'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者id'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`photo_path`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'消防车图片路径'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
7
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防车表'
;
-- ----------------------------
-- Table structure for f_fire_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment`
;
CREATE
TABLE
`f_fire_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`equip_classify`
int
(
11
)
DEFAULT
'0'
COMMENT
'装备分类:0-设备类;1-耗材类;2-视频监控;3-灭火器材'
,
`equip_type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备类型'
,
`equip_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备编码'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`model`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'规格型号'
,
`maintenance_cycle`
int
(
11
)
DEFAULT
'0'
COMMENT
'保养周期'
,
`manufacturer`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'厂商'
,
`brand`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'品牌'
,
`production_date`
date
DEFAULT
NULL
COMMENT
'生产日期'
,
`effective_date`
date
DEFAULT
NULL
COMMENT
'有效时间'
,
`number`
int
(
11
)
DEFAULT
'0'
COMMENT
'数量'
,
`unit`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'单位'
,
`production_area`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'区域'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`equip_status`
int
(
11
)
DEFAULT
'0'
COMMENT
'设备状态(1,告警; 0,正常; )'
,
`video_url`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'视频路径'
,
`weight`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'重量'
,
`action_state`
varchar
(
50
)
DEFAULT
''
COMMENT
'动作状态'
,
`eruption_state`
varchar
(
50
)
DEFAULT
''
COMMENT
'喷发状态'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2833
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防装备表'
;
-- ----------------------------
-- Table structure for f_fire_equipment_data
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment_data`
;
CREATE
TABLE
`f_fire_equipment_data`
(
`id`
bigint
(
20
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防监测设备id'
,
`fire_equipment_point_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防监测设备信息地址id'
,
`eq_point_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'指标名称'
,
`eq_point_unit`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'指标单位'
,
`type`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'数据类型:alarm(报警),monitor(监测)'
,
`common_address`
int
(
11
)
DEFAULT
NULL
COMMENT
'公共地址'
,
`information_address`
bigint
(
11
)
DEFAULT
NULL
COMMENT
'信息地址'
,
`e_value`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'值'
,
`data_type`
int
(
11
)
DEFAULT
NULL
COMMENT
'数据类型:浮点型,整数,布尔类型'
,
`create_date`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`occur_time`
datetime
DEFAULT
NULL
COMMENT
'品质描述'
,
`quality`
longtext
,
`is_blocked`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否被锁'
,
`isSubstituted`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否被取代'
,
`isNotTopical`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否非当前值'
,
`isInvalid`
int
(
11
)
DEFAULT
'0'
COMMENT
'是否有效'
,
`isOverflow`
bit
(
1
)
DEFAULT
b
'0'
COMMENT
'是否越界'
,
`soe`
int
(
11
)
DEFAULT
'0'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`alarm_type`
varchar
(
255
)
DEFAULT
NULL
,
`eq_point_code`
varchar
(
225
)
DEFAULT
''
COMMENT
'点位编码'
,
`is_invalid`
int
(
11
)
DEFAULT
'0'
COMMENT
'是否有效'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
14912
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点资源表'
;
-- ----------------------------
-- Table structure for f_fire_equipment_point
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment_point`
;
CREATE
TABLE
`f_fire_equipment_point`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_by`
varchar
(
225
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建日期'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
,
`type`
varchar
(
32
)
NOT
NULL
COMMENT
'类型:模拟量ANALOGUE,开关量SWITCH'
,
`value`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'当前值保存时若为开关量(1,0)默认为1'
,
`unit`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'指标项名称'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`alarm_type`
bigint
(
20
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5734
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防装备点表'
;
-- ----------------------------
-- Table structure for f_fire_station
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_station`
;
CREATE
TABLE
`f_fire_station`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
`type`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'类型 1:消防小室,2:消防泡沫间'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`picture`
varchar
(
1000
)
DEFAULT
NULL
COMMENT
'图片'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
23
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点'
;
-- ----------------------------
-- Table structure for f_fire_station_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_station_equipment`
;
CREATE
TABLE
`f_fire_station_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`fire_station_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防站id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防物资id'
,
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`unit`
varchar
(
32
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
56
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防站点资源表'
;
-- ----------------------------
-- Table structure for f_fire_strength
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_strength`
;
CREATE
TABLE
`f_fire_strength`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`username`
varchar
(
50
)
NOT
NULL
COMMENT
'名称'
,
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
`position`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'职位'
,
`tel`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'固话'
,
`phone_num`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'移动号码'
,
`job_des`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'工作描述'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`org_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`day_end`
time
DEFAULT
NULL
COMMENT
'结束时间'
,
`day_begin`
time
DEFAULT
NULL
COMMENT
'开始时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
40
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'消防力量'
;
-- ----------------------------
-- Table structure for f_fmea
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea`
;
CREATE
TABLE
`f_fmea`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`risk_factors_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'危险因素id'
,
`evaluation_sid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'危险程度'
,
`evaluation_oid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'故障频数'
,
`evaluation_did`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'探测度'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'固有rpn'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`new_evaluation_oid`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'最新故障频数'
,
`engineering`
text
COMMENT
'工程措施'
,
`management`
text
COMMENT
'管理措施'
,
`train`
text
COMMENT
'培训教育'
,
`protection`
text
COMMENT
'个体防护'
,
`disposal`
text
COMMENT
'应急处置'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`company_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'公司负责人'
,
`department_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'部门负责人'
,
`group_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'班组负责人'
,
`person_leader`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'个人负责人'
,
`identify_user`
int
(
11
)
DEFAULT
NULL
COMMENT
'辨识人'
,
`identify_method`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'辨识方法'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`create_by`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'创建者'
,
`risk_level_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'风险等级id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
406
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'FEMA表'
;
-- ----------------------------
-- Table structure for f_fmea_equipment_point
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea_equipment_point`
;
CREATE
TABLE
`f_fmea_equipment_point`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键自增'
,
`fmea_id`
bigint
(
20
)
NOT
NULL
COMMENT
'fmea编号'
,
`equipment_point_id`
bigint
(
20
)
NOT
NULL
COMMENT
'装备指标编号'
,
`state`
tinyint
(
4
)
NOT
NULL
DEFAULT
'0'
COMMENT
'装备指标状态(0:正常;1:告警)'
,
`important_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'所属重点设备id'
,
`create_date`
datetime
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
110
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'fmea和装备指标的关系'
;
-- ----------------------------
-- Table structure for f_fmea_point_inputitem
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea_point_inputitem`
;
CREATE
TABLE
`f_fmea_point_inputitem`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键自增'
,
`fmea_id`
bigint
(
20
)
NOT
NULL
COMMENT
'fmea编号'
,
`point_inputitem_id`
bigint
(
20
)
NOT
NULL
COMMENT
'检查点和项关系编号'
,
`state`
tinyint
(
4
)
NOT
NULL
DEFAULT
'0'
COMMENT
'检查项状态(0:正常;1:不合格)'
,
`create_date`
datetime
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
151
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'fmea和检查项的关系'
;
-- ----------------------------
-- Table structure for f_preplan_picture
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_preplan_picture`
;
CREATE
TABLE
`f_preplan_picture`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'设备编号'
,
`type`
int
(
11
)
NOT
NULL
COMMENT
'类型'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`picture`
text
COMMENT
'图片路径地址'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
161
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'重点设备预案图'
;
-- ----------------------------
-- Table structure for f_risk_factor
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_factor`
;
CREATE
TABLE
`f_risk_factor`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`accident_type_id`
bigint
(
20
)
NOT
NULL
COMMENT
'失效/事故影响'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'分类'
,
`dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
136
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'危险因素表'
;
-- ----------------------------
-- Table structure for f_risk_level
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_level`
;
CREATE
TABLE
`f_risk_level`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`level`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'等级'
,
`evaluation_model_id`
bigint
(
20
)
DEFAULT
'1'
COMMENT
'评价模型id'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'结果描述'
,
`color`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'图标颜色'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`top_limit`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'上限'
,
`down_limit`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'下限'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
6
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险等级表'
;
-- ----------------------------
-- Table structure for f_risk_source
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source`
;
CREATE
TABLE
`f_risk_source`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`parent_id`
bigint
(
20
)
NOT
NULL
DEFAULT
'0'
COMMENT
'上级编号id'
,
`risk_level_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险等级id'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`is_region`
varchar
(
16
)
DEFAULT
NULL
,
`status`
varchar
(
16
)
DEFAULT
NULL
COMMENT
'状态(正常NORMAL,异常ANOMALY)'
,
`increment`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'rpn增量'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'rpni属性'
,
`sort_num`
int
(
10
)
DEFAULT
'0'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
263
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险点表'
;
-- ----------------------------
-- Table structure for f_risk_source_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source_equipment`
;
CREATE
TABLE
`f_risk_source_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`equipment_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'设备指标id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`status`
int
(
11
)
DEFAULT
'0'
COMMENT
'设备状态(1,告警; 0,正常; )'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
13
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险点关联重点设备表'
;
-- ----------------------------
-- Table structure for f_risk_source_point_inputitem
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source_point_inputitem`
;
CREATE
TABLE
`f_risk_source_point_inputitem`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`point_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'巡检点id'
,
`point_inputitem_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'巡检点检查项id'
,
`status`
varchar
(
32
)
DEFAULT
'1'
COMMENT
'检查项状态;合格/不合格/漏检'
,
`check_inputitem_id`
bigint
(
32
)
DEFAULT
NULL
COMMENT
'检查项检查记录id(p_check_input 表id)'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
491
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'风险点关联检查项表'
;
-- ----------------------------
-- Table structure for f_rpn_change_log
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_rpn_change_log`
;
CREATE
TABLE
`f_rpn_change_log`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`fmea_id`
bigint
(
20
)
NOT
NULL
COMMENT
'fmeaId'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'固有rpn'
,
`type`
int
(
11
)
DEFAULT
'0'
COMMENT
'变化类型:0-上升;1-下降'
,
`trigger_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'触发风险id'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
330
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'rpn变化流水表'
;
-- ----------------------------
-- Table structure for f_text_plan
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_text_plan`
;
CREATE
TABLE
`f_text_plan`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`app_id`
varchar
(
255
)
NOT
NULL
COMMENT
'预案id'
,
`text_name`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'文本预案名称'
,
`file_path`
varchar
(
255
)
NOT
NULL
COMMENT
'预案路径'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_date`
datetime
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
88
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'文本预案'
;
-- ----------------------------
-- Table structure for f_topography_line
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_topography_line`
;
CREATE
TABLE
`f_topography_line`
(
`id`
varchar
(
36
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`create_user`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
bit
(
1
)
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`update_user`
varchar
(
255
)
DEFAULT
NULL
,
`app_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'appid'
,
`clickable`
bit
(
1
)
DEFAULT
NULL
COMMENT
'可点击'
,
`from`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'起点'
,
`has_arrow`
bit
(
1
)
DEFAULT
NULL
COMMENT
'有箭头'
,
`is_dash`
bit
(
1
)
DEFAULT
NULL
COMMENT
'是虚线'
,
`line_color`
int
(
11
)
DEFAULT
NULL
COMMENT
'线颜色'
,
`to`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'终点'
,
`from_port`
varchar
(
32
)
DEFAULT
NULL
,
`to_port`
varchar
(
32
)
DEFAULT
NULL
,
`type`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'1 领导架构 | 2 任务流程'
,
`category`
varchar
(
32
)
DEFAULT
''
COMMENT
'类别'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for f_topography_node
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_topography_node`
;
CREATE
TABLE
`f_topography_node`
(
`id`
varchar
(
36
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`create_user`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
bit
(
1
)
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`update_user`
varchar
(
255
)
DEFAULT
NULL
,
`category`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'类别'
,
`group`
varchar
(
32
)
DEFAULT
''
COMMENT
'分组'
,
`is_group`
bit
(
1
)
DEFAULT
NULL
COMMENT
'是否是组'
,
`key`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'key'
,
`loc`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`picture`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'图片'
,
`size`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'大小'
,
`source_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'资源id'
,
`text`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'文本'
,
`app_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'appid'
,
`type`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'1 领导架构 | 2 任务流程'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for f_topography_node_detail
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_topography_node_detail`
;
CREATE
TABLE
`f_topography_node_detail`
(
`id`
varchar
(
36
)
NOT
NULL
,
`create_date`
datetime
DEFAULT
NULL
,
`create_user`
varchar
(
255
)
DEFAULT
NULL
,
`is_delete`
bit
(
1
)
DEFAULT
NULL
,
`update_date`
datetime
DEFAULT
NULL
,
`update_user`
varchar
(
255
)
DEFAULT
NULL
,
`node_detail`
text
COMMENT
'详情'
,
`nodeid`
varchar
(
36
)
DEFAULT
NULL
,
`nodekey`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'节点key'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
;
-- ----------------------------
-- Table structure for f_water_resource
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_water_resource`
;
CREATE
TABLE
`f_water_resource`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
100
)
NOT
NULL
COMMENT
'名称'
,
`code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'编码'
,
`type`
varchar
(
10
)
DEFAULT
NULL
COMMENT
'类型: 1:消火栓,2:消防水池,3:喷淋'
,
`production_area`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'区域'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`org_code`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'组织'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`is_indoor`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'是否室内点:默认是'
,
`risk_source_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险区域id'
,
`max_level`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'最大液位'
,
`alarm_level`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'告警液位'
,
`area`
varchar
(
255
)
DEFAULT
'0'
COMMENT
'水池面積'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
36
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'水资源表'
;
-- ----------------------------
-- Table structure for f_water_resource_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_water_resource_equipment`
;
CREATE
TABLE
`f_water_resource_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`water_resource_id`
bigint
(
20
)
NOT
NULL
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
,
`number`
double
DEFAULT
NULL
COMMENT
'个数'
,
`unit`
varchar
(
16
)
DEFAULT
NULL
COMMENT
'单位'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
5
DEFAULT
CHARSET
=
utf8
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'水资源设备表'
;
SET
FOREIGN_KEY_CHECKS
=
1
;
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/init/fas-init-data.sql
0 → 100644
View file @
982ff9b8
SET
FOREIGN_KEY_CHECKS
=
0
;
INSERT
INTO
`f_dict`
VALUES
(
'1'
,
'火灾告警'
,
'fire_equipment_switch'
,
'0'
,
'
\0
'
,
'alarm_type_fire'
,
'0'
,
'火灾探测器告警'
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'2'
,
'电源开关'
,
'fire_equipment_switch'
,
'0'
,
'
\0
'
,
'alarm_type_power'
,
'1'
,
'电源开关'
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'3'
,
'液位'
,
'fire_equipment_analogue'
,
'0'
,
'
\0
'
,
'analogue_water_level'
,
'0'
,
'液位'
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'4'
,
'流量'
,
'fire_equipment_analogue'
,
'0'
,
'
\0
'
,
'analogue_water_flow'
,
'1'
,
'流量'
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'5'
,
'容量'
,
'fire_equipment_analogue'
,
'0'
,
'
\0
'
,
'analogue_water_capacity'
,
'2'
,
'容量'
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'6'
,
'换流变'
,
'fire_equipment_switch'
,
'0'
,
'
\0
'
,
'alarm_type_rheology'
,
'2'
,
'换流变'
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'7'
,
'故障告警'
,
'fire_equipment_switch'
,
'0'
,
'
\0
'
,
'alarm_type_trouble'
,
'2'
,
'故障告警'
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'8'
,
'消防车'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'fireCar'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'9'
,
'探测器'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'monitorEquipment'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'10'
,
'消防耗材'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'fireConsumables'
,
'2'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'11'
,
'视频监控'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'video'
,
'3'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'12'
,
'灭火器材'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'fireEquipment'
,
'4'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'13'
,
'重点装备'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'impEquipment'
,
'5'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'14'
,
'消防力量'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'fireStrength'
,
'6'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'15'
,
'消防小室'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'fireChamber'
,
'7'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'16'
,
'消防泡沫间'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'fireFoamRoom'
,
'8'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'17'
,
'消火栓'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'hydrant'
,
'9'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'18'
,
'消防水池'
,
'plan_source_type'
,
'0'
,
'
\0
'
,
'pool'
,
'10'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'19'
,
'名称'
,
'fireCar'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'20'
,
'车牌号'
,
'fireCar'
,
'0'
,
'
\0
'
,
'car_num'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'21'
,
'发动机编号'
,
'fireCar'
,
'0'
,
'
\0
'
,
'engine_num'
,
'2'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'22'
,
'名称'
,
'monitorEquipment'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'23'
,
'编号'
,
'monitorEquipment'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'24'
,
'名称'
,
'fireConsumables'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'25'
,
'编号'
,
'fireConsumables'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'26'
,
'名称'
,
'video'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'27'
,
'编号'
,
'video'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'30'
,
'名称'
,
'fireEquipment'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'31'
,
'编号'
,
'fireEquipment'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'32'
,
'名称'
,
'impEquipment'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'33'
,
'编号'
,
'impEquipment'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'34'
,
'名称'
,
'fireStrength'
,
'0'
,
'
\0
'
,
'username'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'35'
,
'编号'
,
'fireStrength'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'36'
,
'名称'
,
'fireChamber'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'37'
,
'编号'
,
'fireChamber'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'38'
,
'名称'
,
'fireFoamRoom'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'39'
,
'编号'
,
'fireFoamRoom'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'40'
,
'名称'
,
'hydrant'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'41'
,
'编号'
,
'hydrant'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'42'
,
'名称'
,
'pool'
,
'0'
,
'
\0
'
,
'name'
,
'0'
,
null
,
null
);
INSERT
INTO
`f_dict`
VALUES
(
'43'
,
'编号'
,
'pool'
,
'0'
,
'
\0
'
,
'code'
,
'1'
,
null
,
null
);
SET
FOREIGN_KEY_CHECKS
=
1
;
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/init/fas_create_table.sql
deleted
100644 → 0
View file @
0242dcc5
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for f_accident_type
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_accident_type`
;
CREATE
TABLE
`f_accident_type`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'事故类型'
,
`influence`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'失效/事故影响'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'事故类型表'
;
-- ----------------------------
-- Table structure for f_alarm
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_alarm`
;
CREATE
TABLE
`f_alarm`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
DEFAULT
'0'
COMMENT
'消防设备id'
,
`metric`
text
COMMENT
'指标'
,
`alarm_time`
datetime
DEFAULT
NULL
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'报警时间'
,
`alarm_type`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'报警类别:真实;误报'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'报警信息表'
;
-- ----------------------------
-- Table structure for f_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_equipment`
;
CREATE
TABLE
`f_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'设备名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3位坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`building`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'建筑物'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间号'
,
`address`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'位置'
,
`charge_dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'责任部门'
,
`charge_user_id`
int
(
1
)
DEFAULT
'0'
COMMENT
'责任人'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'重点设备表'
;
-- ----------------------------
-- Table structure for f_equipment_fire_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_equipment_fire_equipment`
;
CREATE
TABLE
`f_equipment_fire_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'设备id'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'重点设备与消防设备关联中间表'
;
-- ----------------------------
-- Table structure for f_evaluation_model
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_evaluation_model`
;
CREATE
TABLE
`f_evaluation_model`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'模型名称'
,
`standard`
text
COMMENT
'模型内容'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'评价模型表'
;
-- ----------------------------
-- Table structure for f_fire_car
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_car`
;
CREATE
TABLE
`f_fire_car`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`dept_id`
int
(
100
)
DEFAULT
'0'
COMMENT
'部门id'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆类别'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆名称'
,
`position`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor_config`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'楼层'
,
`car_num`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车牌号'
,
`engine_num`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'发动机号'
,
`model`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'厂牌型号'
,
`country`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'国别'
,
`state`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'车辆状态'
,
`performance_index`
longtext
COMMENT
'性能指标'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者id'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'消防车表'
;
-- ----------------------------
-- Table structure for f_fire_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment`
;
CREATE
TABLE
`f_fire_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`equip_classify`
int
(
11
)
DEFAULT
'0'
COMMENT
'装备分类:0-设备类;1-耗材类;2-视频监控'
,
`equip_type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备类型'
,
`equip_code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备编码'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`model`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'规格型号'
,
`maintenance_cycle`
int
(
11
)
DEFAULT
'0'
COMMENT
'保养周期'
,
`manufacturer`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'厂商'
,
`brand`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'品牌'
,
`production_date`
date
DEFAULT
NULL
COMMENT
'生产日期'
,
`effective_date`
date
DEFAULT
NULL
COMMENT
'有效时间'
,
`number`
int
(
11
)
DEFAULT
'0'
COMMENT
'数量'
,
`unit`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'单位'
,
`production_area`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'区域'
,
`room`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'房间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'消防装备表'
;
-- ----------------------------
-- Table structure for f_fire_equipment_point
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fire_equipment_point`
;
CREATE
TABLE
`f_fire_equipment_point`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`fire_equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'消防装备id'
,
`create_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建日期'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'消防装备点表'
;
-- ----------------------------
-- Table structure for f_fmea
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_fmea`
;
CREATE
TABLE
`f_fmea`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`risk_factors_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'危险因素id'
,
`evaluation_sid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'危险程度'
,
`evaluation_oid`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'故障频数'
,
`evaluation_did`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'探测度'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
'0.00'
COMMENT
'固有rpn'
,
`engineering`
text
COMMENT
'工程措施'
,
`management`
text
COMMENT
'管理措施'
,
`train`
text
COMMENT
'培训教育'
,
`protection`
text
COMMENT
'个体防护'
,
`disposal`
text
COMMENT
'应急处置'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'FMEA表'
;
-- ----------------------------
-- Table structure for f_preplan_picture
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_preplan_picture`
;
CREATE
TABLE
`f_preplan_picture`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`equipment_id`
bigint
(
20
)
NOT
NULL
COMMENT
'设备编号'
,
`type`
int
(
11
)
NOT
NULL
COMMENT
'类型'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`picture`
text
COMMENT
'图片路径地址'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'重点设备预案图'
;
-- ----------------------------
-- Table structure for f_risk_factor
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_factor`
;
CREATE
TABLE
`f_risk_factor`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'名称'
,
`accident_type_id`
bigint
(
20
)
NOT
NULL
COMMENT
'失效/事故影响'
,
`type`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'分类'
,
`dept_id`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护部门'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'危险因素表'
;
-- ----------------------------
-- Table structure for f_risk_level
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_level`
;
CREATE
TABLE
`f_risk_level`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`level`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'等级'
,
`evaluation_model_id`
bigint
(
20
)
DEFAULT
'1'
COMMENT
'评价模型id'
,
`severity`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'严重度'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'结果描述'
,
`color`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'图标颜色'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'维护人员'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'维护时间'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'风险等级表'
;
-- ----------------------------
-- Table structure for f_risk_source
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source`
;
CREATE
TABLE
`f_risk_source`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`org_code`
varchar
(
100
)
NOT
NULL
COMMENT
'机构编号'
,
`code`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'编号'
,
`name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'装备名称'
,
`position3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维坐标'
,
`floor3d`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'3维楼层'
,
`is_indoor`
bit
(
1
)
NOT
NULL
DEFAULT
b
'1'
COMMENT
'是否室内:0-否;1-是'
,
`parent_id`
bigint
(
20
)
NOT
NULL
DEFAULT
'0'
COMMENT
'上级编号id'
,
`risk_level_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'风险等级id'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_by`
int
(
11
)
DEFAULT
'0'
COMMENT
'创建者'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'风险点表'
;
-- ----------------------------
-- Table structure for f_risk_source_equipment
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source_equipment`
;
CREATE
TABLE
`f_risk_source_equipment`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`equipment_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'设备id'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'风险点关联重点设备表'
;
-- ----------------------------
-- Table structure for f_risk_source_point_inputitem
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_risk_source_point_inputitem`
;
CREATE
TABLE
`f_risk_source_point_inputitem`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`point_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'巡检点id'
,
`point_inputitem_id`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'巡检点检查项id'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'风险点关联检查项表'
;
-- ----------------------------
-- Table structure for f_rpn_change_log
-- ----------------------------
DROP
TABLE
IF
EXISTS
`f_rpn_change_log`
;
CREATE
TABLE
`f_rpn_change_log`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`risk_source_id`
bigint
(
20
)
NOT
NULL
COMMENT
'风险点id'
,
`rpn`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'实时rpn'
,
`rpni`
decimal
(
10
,
2
)
DEFAULT
NULL
COMMENT
'固有rpn'
,
`type`
int
(
11
)
DEFAULT
'0'
COMMENT
'变化类型:0-上升;1-下降'
,
`trigger_by`
bigint
(
20
)
DEFAULT
'0'
COMMENT
'触发风险id'
,
`remark`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'备注'
,
`create_date`
datetime
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'rpn变化流水表'
;
SET
FOREIGN_KEY_CHECKS
=
1
;
pom.xml
View file @
982ff9b8
...
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
1.0
.0
</version>
<version>
2.1
.0
</version>
<packaging>
pom
</packaging>
<name>
YeeAmosFireAutoSysRoot
</name>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment