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
afba4432
Commit
afba4432
authored
Sep 01, 2022
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:沂南预案联调
parent
2f292c3f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
781 additions
and
754 deletions
+781
-754
ContingencyPlanController.java
...os/fas/business/controller/ContingencyPlanController.java
+6
-0
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+3
-5
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+7
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+14
-9
IContingencyPlanService.java
...s/fas/business/service/intfc/IContingencyPlanService.java
+1
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+1
-1
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+749
-739
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyPlanController.java
View file @
afba4432
...
@@ -232,4 +232,10 @@ public class ContingencyPlanController extends BaseController {
...
@@ -232,4 +232,10 @@ public class ContingencyPlanController extends BaseController {
return
CommonResponseUtil2
.
success
(
bool
);
return
CommonResponseUtil2
.
success
(
bool
);
}
}
@ApiOperation
(
value
=
"获取预案状态"
)
@RequestMapping
(
value
=
"/getPlanStatus"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
getPlanStatus
()
{
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
getPlanStatus
());
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
afba4432
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.fas.dao.entity.TextPlan;
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.fas.dao.entity.TextPlan;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -152,13 +153,10 @@ public class PlanVisual3dController extends BaseController {
...
@@ -152,13 +153,10 @@ public class PlanVisual3dController extends BaseController {
@Permission
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的步骤"
,
notes
=
"根据批次号获取预案的步骤"
)
@ApiOperation
(
value
=
"根据批次号获取预案的步骤"
,
notes
=
"根据批次号获取预案的步骤"
)
@GetMapping
(
value
=
"/plan/getPlanStep"
)
@GetMapping
(
value
=
"/plan/getPlanStep"
)
public
ResponseModel
getPlanStep
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
public
ResponseModel
getPlanStep
(
@RequestParam
(
value
=
"batchNo"
,
required
=
false
)
String
batchNo
)
{
if
(
!
StringUtil
.
isNot
Empty
(
batchNo
))
{
if
(
StringUtils
.
is
Empty
(
batchNo
))
{
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
}
}
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
}
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlanStepByBatchNo
(
batchNo
));
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlanStepByBatchNo
(
batchNo
));
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
afba4432
...
@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Value;
...
@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -814,4 +815,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -814,4 +815,9 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
return
bool
;
return
bool
;
}
}
@Override
public
Boolean
getPlanStatus
()
{
return
CollectionUtils
.
isEmpty
(
planOperationRecordDao
.
findByStatus
(
0
));
}
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
afba4432
...
@@ -7,10 +7,7 @@ import com.yeejoin.amos.fas.business.constants.FasConstant;
...
@@ -7,10 +7,7 @@ import com.yeejoin.amos.fas.business.constants.FasConstant;
import
com.yeejoin.amos.fas.business.dao.mapper.DictMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.DictMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
import
com.yeejoin.amos.fas.business.dao.repository.IPlanRuleDao
;
import
com.yeejoin.amos.fas.business.dao.repository.ITextPlanDao
;
import
com.yeejoin.amos.fas.business.feign.IMaasVisualServer
;
import
com.yeejoin.amos.fas.business.feign.IMaasVisualServer
;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
...
@@ -62,6 +59,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -62,6 +59,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Autowired
@Autowired
private
IPlanRuleDao
planRuleDao
;
private
IPlanRuleDao
planRuleDao
;
@Autowired
private
IPlanOperationRecordDao
planOperationRecordDao
;
@Override
@Override
public
List
<
TreeSubjectVo
>
getPlanTree
()
{
public
List
<
TreeSubjectVo
>
getPlanTree
()
{
...
@@ -318,10 +318,15 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -318,10 +318,15 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Override
@Override
@Transactional
@Transactional
public
PlanRule
updatePlanStep
(
PlanStepVo
planStepVo
)
{
public
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
)
{
// 根据批次号查询预案步骤
// 运行中的设置为重置
PlanRule
planRule
=
planOperationRecordMapper
.
getPlanRuleByBatchNo
(
planStepVo
.
getBatchNo
());
List
<
PlanOperationRecord
>
planList
=
planOperationRecordDao
.
findByStatus
(
0
);
planRule
.
setPlanStep
(
planStepVo
.
getPlanStep
());
if
(!
CollectionUtils
.
isEmpty
(
planList
))
{
return
planRuleDao
.
save
(
planRule
);
// 根据批次号查询预案步骤
PlanRule
planRule
=
planOperationRecordMapper
.
getPlanRuleByBatchNo
(
planStepVo
.
getBatchNo
());
planRule
.
setPlanStep
(
planStepVo
.
getPlanStep
());
planRuleDao
.
save
(
planRule
);
}
return
planStepVo
;
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyPlanService.java
View file @
afba4432
...
@@ -135,4 +135,5 @@ public interface IContingencyPlanService {
...
@@ -135,4 +135,5 @@ public interface IContingencyPlanService {
AtomicBoolean
planReset
();
AtomicBoolean
planReset
();
Boolean
getPlanStatus
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
afba4432
...
@@ -71,5 +71,5 @@ public interface IPlanVisual3dService {
...
@@ -71,5 +71,5 @@ public interface IPlanVisual3dService {
*/
*/
ToipResponse
getPlaneRecordOneByBatchNo
(
String
batchNo
);
ToipResponse
getPlaneRecordOneByBatchNo
(
String
batchNo
);
Plan
Rule
updatePlanStep
(
PlanStepVo
planStepVo
);
Plan
StepVo
updatePlanStep
(
PlanStepVo
planStepVo
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
afba4432
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd"
>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-1"
>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"ue4_location"
/>
<columnExists
tableName=
"f_risk_source"
columnName=
"ue4_location"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_risk_source add column ue4_location
</comment>
<comment>
f_risk_source add column ue4_location
</comment>
<sql>
<sql>
alter table `f_risk_source` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
alter table `f_risk_source` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-2"
>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"ue4_rotation"
/>
<columnExists
tableName=
"f_risk_source"
columnName=
"ue4_rotation"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_risk_source add column ue4_rotation
</comment>
<comment>
f_risk_source add column ue4_rotation
</comment>
<sql>
<sql>
alter table `f_risk_source` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
alter table `f_risk_source` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-3"
>
<changeSet
author=
"suhuiguang"
id=
"1587349916716-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"ue4_extent"
/>
<columnExists
tableName=
"f_risk_source"
columnName=
"ue4_extent"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_risk_source add column ue4_extent
</comment>
<comment>
f_risk_source add column ue4_extent
</comment>
<sql>
<sql>
alter table `f_risk_source` add column `ue4_extent` text default null comment 'ue4缩放' after `position3d`;
alter table `f_risk_source` add column `ue4_extent` text default null comment 'ue4缩放' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587351415717-1"
>
<changeSet
author=
"suhuiguang"
id=
"1587351415717-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_equipment"
columnName=
"ue4_location"
/>
<columnExists
tableName=
"f_equipment"
columnName=
"ue4_location"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_equipment add column ue4_location
</comment>
<comment>
f_equipment add column ue4_location
</comment>
<sql>
<sql>
alter table `f_equipment` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
alter table `f_equipment` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587351415717-2"
>
<changeSet
author=
"suhuiguang"
id=
"1587351415717-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_equipment"
columnName=
"ue4_rotation"
/>
<columnExists
tableName=
"f_equipment"
columnName=
"ue4_rotation"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_equipment add column ue4_rotation
</comment>
<comment>
f_equipment add column ue4_rotation
</comment>
<sql>
<sql>
alter table `f_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
alter table `f_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-1"
>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"ue4_location"
/>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"ue4_location"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_fire_equipment add column ue4_location
</comment>
<comment>
f_fire_equipment add column ue4_location
</comment>
<sql>
<sql>
alter table `f_fire_equipment` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
alter table `f_fire_equipment` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-2"
>
<changeSet
author=
"suhuiguang"
id=
"1587350552716-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"ue4_rotation"
/>
<columnExists
tableName=
"f_fire_equipment"
columnName=
"ue4_rotation"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_fire_equipment add column ue4_rotation
</comment>
<comment>
f_fire_equipment add column ue4_rotation
</comment>
<sql>
<sql>
alter table `f_fire_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
alter table `f_fire_equipment` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350593716-1"
>
<changeSet
author=
"suhuiguang"
id=
"1587350593716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_fire_station"
columnName=
"ue4_location"
/>
<columnExists
tableName=
"f_fire_station"
columnName=
"ue4_location"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_fire_station add column ue4_location
</comment>
<comment>
f_fire_station add column ue4_location
</comment>
<sql>
<sql>
alter table `f_fire_station` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
alter table `f_fire_station` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350593716-2"
>
<changeSet
author=
"suhuiguang"
id=
"1587350593716-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_fire_station"
columnName=
"ue4_rotation"
/>
<columnExists
tableName=
"f_fire_station"
columnName=
"ue4_rotation"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_fire_station add column ue4_rotation
</comment>
<comment>
f_fire_station add column ue4_rotation
</comment>
<sql>
<sql>
alter table `f_fire_station` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
alter table `f_fire_station` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350759717-1"
>
<changeSet
author=
"suhuiguang"
id=
"1587350759717-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_water_resource"
columnName=
"ue4_location"
/>
<columnExists
tableName=
"f_water_resource"
columnName=
"ue4_location"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_water_resource add column ue4_location
</comment>
<comment>
f_water_resource add column ue4_location
</comment>
<sql>
<sql>
alter table `f_water_resource` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
alter table `f_water_resource` add column `ue4_location` text default null comment 'ue4位置' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350759717-2"
>
<changeSet
author=
"suhuiguang"
id=
"1587350759717-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_water_resource"
columnName=
"ue4_rotation"
/>
<columnExists
tableName=
"f_water_resource"
columnName=
"ue4_rotation"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_water_resource add column ue4_rotation
</comment>
<comment>
f_water_resource add column ue4_rotation
</comment>
<sql>
<sql>
alter table `f_water_resource` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
alter table `f_water_resource` add column `ue4_rotation` text default null comment 'ue4旋转' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1587350860716-1"
>
<changeSet
author=
"suhuiguang"
id=
"1587350860716-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"f_safety_index_change_log"
/>
<tableExists
tableName=
"f_safety_index_change_log"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create f_safety_index_change_log
</comment>
<comment>
create f_safety_index_change_log
</comment>
<sql>
<sql>
create table f_safety_index_change_log
create table f_safety_index_change_log
(
(
id bigint(20) not null auto_increment comment '物理主键',
id bigint(20) not null auto_increment comment '物理主键',
safety_index decimal(4,1) comment '安全指数',
safety_index decimal(4,1) comment '安全指数',
collect_date date comment '统计日期',
collect_date date comment '统计日期',
org_code varchar(100) comment '机构',
org_code varchar(100) comment '机构',
remark varchar(255) comment '备注',
remark varchar(255) comment '备注',
primary key (id)
primary key (id)
);
);
alter table f_safety_index_change_log comment '安全指数日流水';
alter table f_safety_index_change_log comment '安全指数日流水';
create index Index_org_code on f_safety_index_change_log
create index Index_org_code on f_safety_index_change_log
(
(
org_code
org_code
);
);
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
id=
"1587882668719-1"
author=
"suhuiguang"
>
<changeSet
id=
"1587882668719-1"
author=
"suhuiguang"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<indexExists
indexName=
"idx_type"
/>
<indexExists
indexName=
"idx_type"
/>
</not>
</not>
</preConditions>
</preConditions>
<createIndex
<createIndex
indexName=
"idx_type"
indexName=
"idx_type"
tableName=
"f_fire_station"
tableName=
"f_fire_station"
tablespace=
"A String"
tablespace=
"A String"
unique=
"false"
>
unique=
"false"
>
<column
name=
"type"
/>
<column
name=
"type"
/>
</createIndex>
</createIndex>
</changeSet>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1588067351000-1"
>
<changeSet
author=
"shanqiyun"
id=
"1588067351000-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"route_path"
/>
<columnExists
tableName=
"f_risk_source"
columnName=
"route_path"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_risk_source add column route_path
</comment>
<comment>
f_risk_source add column route_path
</comment>
<sql>
<sql>
alter table f_risk_source add column `route_path` varchar(2000) DEFAULT NULL COMMENT '路径坐标' after `position3d`;
alter table f_risk_source add column `route_path` varchar(2000) DEFAULT NULL COMMENT '路径坐标' after `position3d`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1588140925893-1"
>
<changeSet
author=
"suhuiguang"
id=
"1588140925893-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_safety_index_change_log"
columnName=
"create_date"
/>
<columnExists
tableName=
"f_safety_index_change_log"
columnName=
"create_date"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_safety_index_change_log add column create_date
</comment>
<comment>
f_safety_index_change_log add column create_date
</comment>
<sql>
<sql>
alter table `f_safety_index_change_log` add column `create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间';
alter table `f_safety_index_change_log` add column `create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1588990926789-1"
>
<changeSet
author=
"suhuiguang"
id=
"1588990926789-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_risk_level "
columnName=
"manage_level"
/>
<columnExists
tableName=
"f_risk_level "
columnName=
"manage_level"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_risk_level add column manage_level 管控级别
</comment>
<comment>
f_risk_level add column manage_level 管控级别
</comment>
<sql>
<sql>
ALTER TABLE `f_risk_level`
ALTER TABLE `f_risk_level`
add COLUMN `manage_level` tinyint(4) DEFAULT NULL COMMENT '管控级别';
add COLUMN `manage_level` tinyint(4) DEFAULT NULL COMMENT '管控级别';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1589165258908-1"
>
<changeSet
author=
"suhuiguang"
id=
"1589165258908-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_rpn_change_log "
columnName=
"trigger_type"
/>
<columnExists
tableName=
"f_rpn_change_log "
columnName=
"trigger_type"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_rpn_change_log add column trigger_type 触发类型
</comment>
<comment>
f_rpn_change_log add column trigger_type 触发类型
</comment>
<sql>
<sql>
ALTER TABLE `f_rpn_change_log`
ALTER TABLE `f_rpn_change_log`
add COLUMN `trigger_type` varchar(20) DEFAULT NULL COMMENT '触发类型:巡检、告警、评价、删除' after `trigger_by`;
add COLUMN `trigger_type` varchar(20) DEFAULT NULL COMMENT '触发类型:巡检、告警、评价、删除' after `trigger_by`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1589165258908-2"
>
<changeSet
author=
"suhuiguang"
id=
"1589165258908-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_risk_source "
columnName=
"flicker_frequency"
/>
<columnExists
tableName=
"f_risk_source "
columnName=
"flicker_frequency"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_risk_source add column flicker_frequency 闪烁频率
</comment>
<comment>
f_risk_source add column flicker_frequency 闪烁频率
</comment>
<sql>
<sql>
ALTER TABLE `f_risk_source`
ALTER TABLE `f_risk_source`
add COLUMN `flicker_frequency` int(11) DEFAULT 0 COMMENT '闪烁频率' after `status`;
add COLUMN `flicker_frequency` int(11) DEFAULT 0 COMMENT '闪烁频率' after `status`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"zhouyi"
id=
"1589444792916-1"
>
<changeSet
author=
"zhouyi"
id=
"1589444792916-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"f_station_info"
/>
<tableExists
tableName=
"f_station_info"
/>
</preConditions>
</preConditions>
<comment>
create table f_station_info
</comment>
<comment>
create table f_station_info
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS f_station_info;
DROP TABLE IF EXISTS f_station_info;
CREATE TABLE `f_station_info` (
CREATE TABLE `f_station_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(20) DEFAULT NULL COMMENT '名称',
`name` varchar(20) DEFAULT NULL COMMENT '名称',
`station_code` varchar(32) NOT NULL COMMENT '环流站编码',
`station_code` varchar(32) NOT NULL COMMENT '环流站编码',
`code` varchar(10) DEFAULT NULL COMMENT '后三位编码',
`code` varchar(10) DEFAULT NULL COMMENT '后三位编码',
`elec_type` tinyint(4) DEFAULT NULL COMMENT '换流站类型:1-发电类型;2-收电类型',
`elec_type` tinyint(4) DEFAULT NULL COMMENT '换流站类型:1-发电类型;2-收电类型',
`use_type` tinyint(4) NOT NULL COMMENT '用途类型:1-电厂升压变电站;2-公用普通变电站;3-公用换流变电站;4-企业自备变电站;5-其他',
`use_type` tinyint(4) NOT NULL COMMENT '用途类型:1-电厂升压变电站;2-公用普通变电站;3-公用换流变电站;4-企业自备变电站;5-其他',
`province_code` varchar(32) DEFAULT NULL COMMENT '省份编码',
`province_code` varchar(32) DEFAULT NULL COMMENT '省份编码',
`city_code` varchar(32) DEFAULT NULL COMMENT '市区编码',
`city_code` varchar(32) DEFAULT NULL COMMENT '市区编码',
`district_code` varchar(32) DEFAULT NULL COMMENT '区县编码',
`district_code` varchar(32) DEFAULT NULL COMMENT '区县编码',
`address` varchar(255) DEFAULT NULL COMMENT '详细地址',
`address` varchar(255) DEFAULT NULL COMMENT '详细地址',
`status` bit(1) NOT NULL DEFAULT b'0' COMMENT '0-启用;1-停用',
`status` bit(1) NOT NULL DEFAULT b'0' COMMENT '0-启用;1-停用',
`longitude` double DEFAULT NULL COMMENT '经度',
`longitude` double DEFAULT NULL COMMENT '经度',
`latitude` double DEFAULT NULL COMMENT '纬度',
`latitude` double DEFAULT NULL COMMENT '纬度',
`station_charge_user_id` varchar(50) DEFAULT NULL COMMENT '换流站负责人',
`station_charge_user_id` varchar(50) DEFAULT NULL COMMENT '换流站负责人',
`safety_charge_user_id` varchar(50) DEFAULT NULL COMMENT '安全负责人',
`safety_charge_user_id` varchar(50) DEFAULT NULL COMMENT '安全负责人',
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
`create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建日期',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`),
PRIMARY KEY (`id`),
UNIQUE KEY `f_station_info_uniq` (`station_code`)
UNIQUE KEY `f_station_info_uniq` (`station_code`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COMMENT='站端信息表';
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COMMENT='站端信息表';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1589769364577-1"
>
<changeSet
author=
"suhuiguang"
id=
"1589769364577-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_risk_level "
columnName=
"manage_level"
/>
<columnExists
tableName=
"f_risk_level "
columnName=
"manage_level"
/>
</preConditions>
</preConditions>
<comment>
f_risk_level 增加管控级别 初始化数据
</comment>
<comment>
f_risk_level 增加管控级别 初始化数据
</comment>
<sql>
<sql>
update f_risk_level set manage_level = 1 where level = '1';
update f_risk_level set manage_level = 1 where level = '1';
update f_risk_level set manage_level = 2 where level = '2';
update f_risk_level set manage_level = 2 where level = '2';
update f_risk_level set manage_level = 3 where level = '3';
update f_risk_level set manage_level = 3 where level = '3';
update f_risk_level set manage_level = 4 where level = '4';
update f_risk_level set manage_level = 4 where level = '4';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"maoying"
id=
"11590390304001-1"
>
<changeSet
author=
"maoying"
id=
"11590390304001-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"f_fire_equipment_point "
columnName=
"fire_equipment_id"
/>
<columnExists
tableName=
"f_fire_equipment_point "
columnName=
"fire_equipment_id"
/>
</preConditions>
</preConditions>
<comment>
修改fire_equipment_id可为空
</comment>
<comment>
修改fire_equipment_id可为空
</comment>
<sql>
<sql>
ALTER TABLE `f_fire_equipment_point`
ALTER TABLE `f_fire_equipment_point`
MODIFY COLUMN `fire_equipment_id` bigint(20) NULL COMMENT '消防装备id' AFTER `code`;
MODIFY COLUMN `fire_equipment_id` bigint(20) NULL COMMENT '消防装备id' AFTER `code`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1591672147780-1"
>
<changeSet
author=
"shanqiyun"
id=
"1591672147780-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<viewExists
viewName=
"toip_biz_message"
/>
<viewExists
viewName=
"toip_biz_message"
/>
</preConditions>
</preConditions>
<comment>
create view toip_biz_message
</comment>
<comment>
create view toip_biz_message
</comment>
<sql>
<sql>
DROP VIEW IF EXISTS toip_biz_message;
DROP VIEW IF EXISTS toip_biz_message;
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `toip_biz_message` AS SELECT
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `toip_biz_message` AS SELECT
`m`.`id` AS `id`,
`m`.`id` AS `id`,
`m`.`time` AS `time`,
`m`.`time` AS `time`,
`m`.`content` AS `content`,
`m`.`content` AS `content`,
`m`.`title` AS `title`,
`m`.`title` AS `title`,
`m`.`type` AS `type`,
`m`.`type` AS `type`,
`m`.`sender` AS `sender`,
`m`.`sender` AS `sender`,
`m`.`receiver` AS `receiver`,
`m`.`receiver` AS `receiver`,
`m`.`reader` AS `reader`,
`m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`,
`m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`,
`m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code`
`n`.`org_code` AS `org_code`
FROM
FROM
( `toip_sys_message` `m` JOIN `f_equipment` `n` )
( `toip_sys_message` `m` JOIN `f_equipment` `n` )
WHERE
WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo' ) ) UNION ALL
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.FireEquimentDataRo' ) ) UNION ALL
SELECT
SELECT
`m`.`id` AS `id`,
`m`.`id` AS `id`,
`m`.`time` AS `time`,
`m`.`time` AS `time`,
`m`.`content` AS `content`,
`m`.`content` AS `content`,
`m`.`title` AS `title`,
`m`.`title` AS `title`,
`m`.`type` AS `type`,
`m`.`type` AS `type`,
`m`.`sender` AS `sender`,
`m`.`sender` AS `sender`,
`m`.`receiver` AS `receiver`,
`m`.`receiver` AS `receiver`,
`m`.`reader` AS `reader`,
`m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`,
`m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`,
`m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code`
`n`.`org_code` AS `org_code`
FROM
FROM
( `toip_sys_message` `m` JOIN `p_point` `n` )
( `toip_sys_message` `m` JOIN `p_point` `n` )
WHERE
WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.ProtalDataRo' ) ) UNION ALL
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.ProtalDataRo' ) ) UNION ALL
SELECT
SELECT
`m`.`id` AS `id`,
`m`.`id` AS `id`,
`m`.`time` AS `time`,
`m`.`time` AS `time`,
`m`.`content` AS `content`,
`m`.`content` AS `content`,
`m`.`title` AS `title`,
`m`.`title` AS `title`,
`m`.`type` AS `type`,
`m`.`type` AS `type`,
`m`.`sender` AS `sender`,
`m`.`sender` AS `sender`,
`m`.`receiver` AS `receiver`,
`m`.`receiver` AS `receiver`,
`m`.`reader` AS `reader`,
`m`.`reader` AS `reader`,
`m`.`biz_id` AS `biz_id`,
`m`.`biz_id` AS `biz_id`,
`m`.`bizclass_name` AS `bizclass_name`,
`m`.`bizclass_name` AS `bizclass_name`,
`n`.`org_code` AS `org_code`
`n`.`org_code` AS `org_code`
FROM
FROM
( `toip_sys_message` `m` JOIN `f_risk_source` `n` )
( `toip_sys_message` `m` JOIN `f_risk_source` `n` )
WHERE
WHERE
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo' ) );
( ( `n`.`id` = `m`.`biz_id` ) AND ( `m`.`bizclass_name` = 'class com.yeejoin.amos.fas.business.service.model.RiskSourceRuleRo' ) );
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-1"
>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"contingency_original_data"
/>
<tableExists
tableName=
"contingency_original_data"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create table contingency_original_data
</comment>
<comment>
create table contingency_original_data
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS contingency_original_data;
DROP TABLE IF EXISTS contingency_original_data;
CREATE TABLE `contingency_original_data` (
CREATE TABLE `contingency_original_data` (
`id` varchar(36) NOT NULL COMMENT 'rule',
`id` varchar(36) NOT NULL COMMENT 'rule',
`fire_Equipment_Name` varchar(32) NOT NULL COMMENT '记录类型:消息MESSAGE,操作OPERATE',
`fire_Equipment_Name` varchar(32) NOT NULL COMMENT '记录类型:消息MESSAGE,操作OPERATE',
`fire_Equipment_Id` varchar(500) NOT NULL COMMENT '记录内容:文本信息或者json数据',
`fire_Equipment_Id` varchar(500) NOT NULL COMMENT '记录内容:文本信息或者json数据',
`layer` int(11) NOT NULL COMMENT '一级分类',
`layer` int(11) NOT NULL COMMENT '一级分类',
`fire_Equipment_Layer` int(11) NOT NULL COMMENT '二级分类',
`fire_Equipment_Layer` int(11) NOT NULL COMMENT '二级分类',
`fire_Equipment_Position` varchar(255) DEFAULT NULL COMMENT '图标,url,或者文件名',
`fire_Equipment_Position` varchar(255) DEFAULT NULL COMMENT '图标,url,或者文件名',
`equipment_Id` int(11) NOT NULL COMMENT '排序',
`equipment_Id` int(11) NOT NULL COMMENT '排序',
`equipment_Name` varchar(255) DEFAULT NULL,
`equipment_Name` varchar(255) DEFAULT NULL,
`mobile` varchar(255) DEFAULT NULL,
`mobile` varchar(255) DEFAULT NULL,
`admin_Name` varchar(255) DEFAULT NULL,
`admin_Name` varchar(255) DEFAULT NULL,
`camera_Codes` varchar(255) DEFAULT NULL,
`camera_Codes` varchar(255) DEFAULT NULL,
`camera_Ids` varchar(255) DEFAULT NULL,
`camera_Ids` varchar(255) DEFAULT NULL,
`fire_Count` int(11) DEFAULT NULL,
`fire_Count` int(11) DEFAULT NULL,
`confirm` varchar(255) DEFAULT NULL,
`confirm` varchar(255) DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`create_user` varchar(50) DEFAULT NULL,
`create_user` varchar(50) DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_user` varchar(50) DEFAULT NULL,
`update_user` varchar(50) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`batch_No` varchar(36) NOT NULL,
`batch_No` varchar(36) NOT NULL,
`picture1` varchar(255) DEFAULT NULL,
`picture1` varchar(255) DEFAULT NULL,
`picture2` varchar(255) DEFAULT NULL,
`picture2` varchar(255) DEFAULT NULL,
`picture4` varchar(255) DEFAULT NULL,
`picture4` varchar(255) DEFAULT NULL,
`picture3` varchar(255) DEFAULT NULL,
`picture3` varchar(255) DEFAULT NULL,
`fire_Truck_Route` varchar(2000) DEFAULT NULL,
`fire_Truck_Route` varchar(2000) DEFAULT NULL,
`runstep` bit(1) DEFAULT NULL,
`runstep` bit(1) DEFAULT NULL,
`step_state` varchar(255) DEFAULT NULL,
`step_state` varchar(255) DEFAULT NULL,
`step` varchar(255) DEFAULT NULL,
`step` varchar(255) DEFAULT NULL,
`equipment_position3d` varchar(255) DEFAULT NULL,
`equipment_position3d` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
PRIMARY KEY (`id`),
UNIQUE KEY `INDEX_BATCH_NO` (`batch_No`)
UNIQUE KEY `INDEX_BATCH_NO` (`batch_No`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-2"
>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"contingency_plan"
/>
<tableExists
tableName=
"contingency_plan"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create table contingency_plan
</comment>
<comment>
create table contingency_plan
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS contingency_plan;
DROP TABLE IF EXISTS contingency_plan;
CREATE TABLE `contingency_plan` (
CREATE TABLE `contingency_plan` (
`id` varchar(36) NOT NULL COMMENT 'rule',
`id` varchar(36) NOT NULL COMMENT 'rule',
`record_type` varchar(32) NOT NULL COMMENT '记录类型:消息MESSAGE,操作OPERATE',
`record_type` varchar(32) NOT NULL COMMENT '记录类型:消息MESSAGE,操作OPERATE',
`content` varchar(500) NOT NULL COMMENT '记录内容:文本信息或者json数据',
`content` varchar(500) NOT NULL COMMENT '记录内容:文本信息或者json数据',
`category` varchar(36) NOT NULL COMMENT '一级分类',
`category` varchar(36) NOT NULL COMMENT '一级分类',
`sub_category` varchar(36) NOT NULL COMMENT '二级分类',
`sub_category` varchar(36) NOT NULL COMMENT '二级分类',
`icon` varchar(255) DEFAULT NULL COMMENT '图标,url,或者文件名',
`icon` varchar(255) DEFAULT NULL COMMENT '图标,url,或者文件名',
`sort` int(11) NOT NULL COMMENT '排序',
`sort` int(11) NOT NULL COMMENT '排序',
PRIMARY KEY (`id`)
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案信息节点定义';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-3"
>
<changeSet
author=
"shanqiyun"
id=
"1593309428780-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"contingency_plan_instance"
/>
<tableExists
tableName=
"contingency_plan_instance"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create table contingency_plan_instance
</comment>
<comment>
create table contingency_plan_instance
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS contingency_plan_instance;
DROP TABLE IF EXISTS contingency_plan_instance;
CREATE TABLE `contingency_plan_instance` (
CREATE TABLE `contingency_plan_instance` (
`id` varchar(36) NOT NULL COMMENT 'rule',
`id` varchar(36) NOT NULL COMMENT 'rule',
`record_type` varchar(32) NOT NULL COMMENT '记录类型:消息MESSAGE,操作OPERATE',
`record_type` varchar(32) NOT NULL COMMENT '记录类型:消息MESSAGE,操作OPERATE',
`category` varchar(36) DEFAULT NULL COMMENT '一级分类',
`category` varchar(36) DEFAULT NULL COMMENT '一级分类',
`content` varchar(2000) NOT NULL COMMENT '记录内容:文本信息或者json数据',
`content` varchar(2000) NOT NULL COMMENT '记录内容:文本信息或者json数据',
`icon` varchar(255) DEFAULT NULL COMMENT '图标,url,或者文件名',
`icon` varchar(255) DEFAULT NULL COMMENT '图标,url,或者文件名',
`sort` int(11) DEFAULT NULL COMMENT '所有节点一起的排序号',
`sort` int(11) DEFAULT NULL COMMENT '所有节点一起的排序号',
`sequence_num` int(11) DEFAULT NULL COMMENT '用于显示的序号',
`sequence_num` int(11) DEFAULT NULL COMMENT '用于显示的序号',
`batch_no` varchar(36) NOT NULL COMMENT '预案实例编号,暂时无法区分多个火灾,暂时存储报警设备id',
`batch_no` varchar(36) NOT NULL COMMENT '预案实例编号,暂时无法区分多个火灾,暂时存储报警设备id',
`create_date` datetime DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`create_user` varchar(50) DEFAULT NULL,
`create_user` varchar(50) DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_user` varchar(50) DEFAULT NULL,
`update_user` varchar(50) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`tips` varchar(255) DEFAULT NULL,
`tips` varchar(255) DEFAULT NULL,
`runstate` bit(1) DEFAULT NULL,
`runstate` bit(1) DEFAULT NULL,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案执行记录实例';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应急预案执行记录实例';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1605924681-1"
>
<changeSet
author=
"keyong"
id=
"1605924681-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"station_charge_user_name"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"station_charge_user_name"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<comment>
修改f_station_info表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `station_charge_user_name` varchar(20) NULL COMMENT '换流站负责人姓名';
ALTER TABLE `f_station_info` ADD COLUMN `station_charge_user_name` varchar(20) NULL COMMENT '换流站负责人姓名';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1605924681-2"
>
<changeSet
author=
"keyong"
id=
"1605924681-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"safety_charge_user_name"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"safety_charge_user_name"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<comment>
修改f_station_info表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `safety_charge_user_name` varchar(20) NULL COMMENT '安全负责人姓名';
ALTER TABLE `f_station_info` ADD COLUMN `safety_charge_user_name` varchar(20) NULL COMMENT '安全负责人姓名';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1605924681-3"
>
<changeSet
author=
"keyong"
id=
"1605924681-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"create_user_name"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"create_user_name"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<comment>
修改f_station_info表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `create_user_name` varchar(20) NULL COMMENT '创建人姓名';
ALTER TABLE `f_station_info` ADD COLUMN `create_user_name` varchar(20) NULL COMMENT '创建人姓名';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1606290088-1"
>
<changeSet
author=
"keyong"
id=
"1606290088-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"create_user_phone_num"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"create_user_phone_num"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<comment>
修改f_station_info表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `create_user_phone_num` varchar(20) NULL COMMENT '创建人联系方式';
ALTER TABLE `f_station_info` ADD COLUMN `create_user_phone_num` varchar(20) NULL COMMENT '创建人联系方式';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1606290088-2"
>
<changeSet
author=
"keyong"
id=
"1606290088-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"station_user_phone_num"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"station_user_phone_num"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<comment>
修改f_station_info表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `station_user_phone_num` varchar(20) NULL COMMENT '换流站负责人联系方式';
ALTER TABLE `f_station_info` ADD COLUMN `station_user_phone_num` varchar(20) NULL COMMENT '换流站负责人联系方式';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1606290088-3"
>
<changeSet
author=
"keyong"
id=
"1606290088-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"safety_user_phone_num"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"safety_user_phone_num"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<comment>
修改f_station_info表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `safety_user_phone_num` varchar(20) NULL COMMENT '安全负责人联系方式';
ALTER TABLE `f_station_info` ADD COLUMN `safety_user_phone_num` varchar(20) NULL COMMENT '安全负责人联系方式';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1608279637-1"
>
<changeSet
author=
"keyong"
id=
"1608279637-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"fire_captain_name"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"fire_captain_name"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<comment>
修改f_station_info表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_name` varchar(20) NULL COMMENT '驻站消防队队长姓名';
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_name` varchar(20) NULL COMMENT '驻站消防队队长姓名';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1608279637-2"
>
<changeSet
author=
"keyong"
id=
"1608279637-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"fire_captain_phone_num"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"fire_captain_phone_num"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<comment>
修改f_station_info表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_phone_num` varchar(20) NULL COMMENT '驻站消防队队长电话';
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_phone_num` varchar(20) NULL COMMENT '驻站消防队队长电话';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1608279637-3"
>
<changeSet
author=
"keyong"
id=
"1608279637-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_station_info"
columnName=
"fire_captain_user_id"
/>
<columnExists
tableName=
"f_station_info"
columnName=
"fire_captain_user_id"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_station_info表结构
</comment>
<comment>
修改f_station_info表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_user_id` varchar(20) NULL COMMENT '驻站消防队队长';
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_user_id` varchar(20) NULL COMMENT '驻站消防队队长';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shg"
id=
"1609226808866-1"
>
<changeSet
author=
"shg"
id=
"1609226808866-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_risk_source"
columnName=
"source_id"
/>
<columnExists
tableName=
"f_risk_source"
columnName=
"source_id"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_risk_source add column source_id
</comment>
<comment>
f_risk_source add column source_id
</comment>
<sql>
<sql>
alter table `f_risk_source` add column `source_id` bigint(20) DEFAULT NULL AFTER `status`;
alter table `f_risk_source` add column `source_id` bigint(20) DEFAULT NULL AFTER `status`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shg"
id=
"1609226808867-2"
>
<changeSet
author=
"shg"
id=
"1609226808867-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<indexExists
indexName=
"unique_idx_source_id"
/>
<indexExists
indexName=
"unique_idx_source_id"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
f_risk_source add UNIQUE source_id
</comment>
<comment>
f_risk_source add UNIQUE source_id
</comment>
<sql>
<sql>
ALTER TABLE `f_risk_source` ADD UNIQUE unique_idx_source_id(source_id);
ALTER TABLE `f_risk_source` ADD UNIQUE unique_idx_source_id(source_id);
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"1609989898-1"
>
<changeSet
author=
"gaojianqiang"
id=
"1609989898-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"f_equipment"
columnName=
"status"
/>
<columnExists
tableName=
"f_equipment"
columnName=
"status"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
修改f_equipment表结构
</comment>
<comment>
修改f_equipment表结构
</comment>
<sql>
<sql>
ALTER TABLE `f_equipment` ADD COLUMN `status` tinyint(4) NULL DEFAULT 0 COMMENT '预案状态:1-启动,0-未启动';
ALTER TABLE `f_equipment` ADD COLUMN `status` tinyint(4) NULL DEFAULT 0 COMMENT '预案状态:1-启动,0-未启动';
ALTER TABLE `f_equipment` ADD COLUMN `start_time` datetime(0) NULL DEFAULT NULL COMMENT '预案开始时间';
ALTER TABLE `f_equipment` ADD COLUMN `start_time` datetime(0) NULL DEFAULT NULL COMMENT '预案开始时间';
ALTER TABLE `f_equipment` ADD COLUMN `end_time` datetime(0) NULL DEFAULT NULL COMMENT '预案结束时间';
ALTER TABLE `f_equipment` ADD COLUMN `end_time` datetime(0) NULL DEFAULT NULL COMMENT '预案结束时间';
ALTER TABLE `f_equipment` ADD COLUMN `reserve_source` tinyint(4) NULL DEFAULT 0 COMMENT '预案来源:1-手动触发,0-自动触发(默认)';
ALTER TABLE `f_equipment` ADD COLUMN `reserve_source` tinyint(4) NULL DEFAULT 0 COMMENT '预案来源:1-手动触发,0-自动触发(默认)';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-1"
>
<changeSet
author=
"wujunkai"
id=
"1612272587000-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"c_plan_classify_tree"
/>
<tableExists
tableName=
"c_plan_classify_tree"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create table c_plan_classify_tree
</comment>
<comment>
create table c_plan_classify_tree
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS c_plan_classify_tree;
DROP TABLE IF EXISTS c_plan_classify_tree;
CREATE TABLE `c_plan_classify_tree` (
CREATE TABLE `c_plan_classify_tree` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`classify_name` varchar(255) DEFAULT NULL COMMENT '预案分类名称',
`classify_name` varchar(255) DEFAULT NULL COMMENT '预案分类名称',
`parent_id` bigint(20) DEFAULT NULL COMMENT '父类id',
`parent_id` bigint(20) DEFAULT NULL COMMENT '父类id',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`creator` varchar(255) DEFAULT NULL COMMENT '创建人',
`creator` varchar(255) DEFAULT NULL COMMENT '创建人',
`org_code` varchar(255) DEFAULT NULL COMMENT '组织机构',
`org_code` varchar(255) DEFAULT NULL COMMENT '组织机构',
PRIMARY KEY (`id`) USING BTREE
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='预案分类树';
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='预案分类树';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-2"
>
<changeSet
author=
"wujunkai"
id=
"1612272587000-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"c_plan_detail"
/>
<tableExists
tableName=
"c_plan_detail"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create table c_plan_detail
</comment>
<comment>
create table c_plan_detail
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS c_plan_detail;
DROP TABLE IF EXISTS c_plan_detail;
CREATE TABLE `c_plan_detail` (
CREATE TABLE `c_plan_detail` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '数字预案ID',
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '数字预案ID',
`plan_name` varchar(255) DEFAULT NULL COMMENT '预案名称',
`plan_name` varchar(255) DEFAULT NULL COMMENT '预案名称',
`code` varchar(255) DEFAULT NULL COMMENT '预案编号',
`code` varchar(255) DEFAULT NULL COMMENT '预案编号',
`classify_id` bigint(20) DEFAULT NULL COMMENT '预案类型',
`classify_id` bigint(20) DEFAULT NULL COMMENT '预案类型',
`plan_range` varchar(255) DEFAULT NULL COMMENT '适用范围',
`plan_range` varchar(255) DEFAULT NULL COMMENT '适用范围',
`edit_org_name` varchar(255) DEFAULT NULL COMMENT '编写部门',
`edit_org_name` varchar(255) DEFAULT NULL COMMENT '编写部门',
`edition` varchar(255) DEFAULT NULL COMMENT '版次',
`edition` varchar(255) DEFAULT NULL COMMENT '版次',
`implementation_time` datetime DEFAULT NULL COMMENT '实施时间',
`implementation_time` datetime DEFAULT NULL COMMENT '实施时间',
`create_date` datetime NOT NULL COMMENT '录入时间',
`create_date` datetime NOT NULL COMMENT '录入时间',
`remark` text COMMENT '备注',
`remark` text COMMENT '备注',
`status` int(255) DEFAULT NULL COMMENT '预案状态',
`status` int(255) DEFAULT NULL COMMENT '预案状态',
`creator` varchar(255) DEFAULT NULL COMMENT '创建人',
`creator` varchar(255) DEFAULT NULL COMMENT '创建人',
`reviser` varchar(255) DEFAULT NULL COMMENT '修改人',
`reviser` varchar(255) DEFAULT NULL COMMENT '修改人',
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
`update_time` datetime DEFAULT NULL COMMENT '修改时间',
`org_code` varchar(255) DEFAULT NULL COMMENT '部门code',
`org_code` varchar(255) DEFAULT NULL COMMENT '部门code',
`is_delete` tinyint(1) DEFAULT '0' COMMENT '删除状态(0、正常,1、删除)',
`is_delete` tinyint(1) DEFAULT '0' COMMENT '删除状态(0、正常,1、删除)',
`input_time` datetime DEFAULT NULL COMMENT '录入时间',
`input_time` datetime DEFAULT NULL COMMENT '录入时间',
PRIMARY KEY (`id`) USING BTREE
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='预案详情表';
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='预案详情表';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-3"
>
<changeSet
author=
"wujunkai"
id=
"1612272587000-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"c_plan_doc"
/>
<tableExists
tableName=
"c_plan_doc"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create table c_plan_doc
</comment>
<comment>
create table c_plan_doc
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS c_plan_doc;
DROP TABLE IF EXISTS c_plan_doc;
CREATE TABLE `c_plan_doc` (
CREATE TABLE `c_plan_doc` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`doc_id` bigint(20) DEFAULT NULL COMMENT '文档ID',
`doc_id` bigint(20) DEFAULT NULL COMMENT '文档ID',
`create_date` datetime NOT NULL COMMENT '创建时间',
`create_date` datetime NOT NULL COMMENT '创建时间',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '删除状态',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '删除状态',
PRIMARY KEY (`id`) USING BTREE
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='预案文档关系表';
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='预案文档关系表';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-4"
>
<changeSet
author=
"wujunkai"
id=
"1612272587000-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"c_plan_equipment"
/>
<tableExists
tableName=
"c_plan_equipment"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create table c_plan_equipment
</comment>
<comment>
create table c_plan_equipment
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS c_plan_equipment;
DROP TABLE IF EXISTS c_plan_equipment;
CREATE TABLE `c_plan_equipment` (
CREATE TABLE `c_plan_equipment` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`fire_equipment_id` bigint(20) DEFAULT NULL COMMENT '电力装备ID',
`fire_equipment_id` bigint(20) DEFAULT NULL COMMENT '电力装备ID',
`create_date` datetime NOT NULL COMMENT '创建时间',
`create_date` datetime NOT NULL COMMENT '创建时间',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '删除状态',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '删除状态',
PRIMARY KEY (`id`) USING BTREE
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='预案电力设备关系表';
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COMMENT='预案电力设备关系表';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-5"
>
<changeSet
author=
"wujunkai"
id=
"1612272587000-5"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"c_plan_operation_record"
/>
<tableExists
tableName=
"c_plan_operation_record"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create table c_plan_operation_record
</comment>
<comment>
create table c_plan_operation_record
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS c_plan_operation_record;
DROP TABLE IF EXISTS c_plan_operation_record;
CREATE TABLE `c_plan_operation_record` (
CREATE TABLE `c_plan_operation_record` (
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`plan_pattern` tinyint(4) DEFAULT NULL COMMENT '运行模式(4、模拟,5、自动)',
`plan_pattern` tinyint(4) DEFAULT NULL COMMENT '运行模式(4、模拟,5、自动)',
`status` tinyint(4) DEFAULT NULL COMMENT '运行状态(0、运行中,1、完毕,3、中断)',
`status` tinyint(4) DEFAULT NULL COMMENT '运行状态(0、运行中,1、完毕,3、中断)',
`execution_type` tinyint(4) DEFAULT NULL COMMENT '执行方式(0、预案验证 1、火灾处置)',
`execution_type` tinyint(4) DEFAULT NULL COMMENT '执行方式(0、预案验证 1、火灾处置)',
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`batch_no` varchar(255) DEFAULT NULL COMMENT '批次号',
`batch_no` varchar(255) DEFAULT NULL COMMENT '批次号',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '是否删除',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '是否删除',
`start_user_name` varchar(255) DEFAULT NULL COMMENT '启动人名称',
`start_user_name` varchar(255) DEFAULT NULL COMMENT '启动人名称',
`start_user_id` varchar(255) DEFAULT NULL COMMENT '启动人id',
`start_user_id` varchar(255) DEFAULT NULL COMMENT '启动人id',
`equipment_code` varchar(20) DEFAULT NULL COMMENT '装备code',
`equipment_code` varchar(20) DEFAULT NULL COMMENT '装备code',
`equipment_name` varchar(255) DEFAULT NULL COMMENT '装备名称',
`equipment_name` varchar(255) DEFAULT NULL COMMENT '装备名称',
`equipment_id` bigint(11) DEFAULT NULL COMMENT '装备ID',
`equipment_id` bigint(11) DEFAULT NULL COMMENT '装备ID',
`fire_equipment_id` bigint(255) DEFAULT NULL COMMENT '电力设备ID',
`fire_equipment_id` bigint(255) DEFAULT NULL COMMENT '电力设备ID',
PRIMARY KEY (`id`) USING BTREE
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8mb4 COMMENT='预案运行记录表';
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8mb4 COMMENT='预案运行记录表';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"wujunkai"
id=
"1612272587000-6"
>
<changeSet
author=
"wujunkai"
id=
"1612272587000-6"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<tableExists
tableName=
"c_plan_rule"
/>
<tableExists
tableName=
"c_plan_rule"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
create table c_plan_rule
</comment>
<comment>
create table c_plan_rule
</comment>
<sql>
<sql>
DROP TABLE IF EXISTS c_plan_rule;
DROP TABLE IF EXISTS c_plan_rule;
CREATE TABLE `c_plan_rule` (
CREATE TABLE `c_plan_rule` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`rule_id` varchar(32) DEFAULT NULL COMMENT '规则ID',
`rule_id` varchar(32) DEFAULT NULL COMMENT '规则ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`plan_id` bigint(20) DEFAULT NULL COMMENT '预案ID',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '是否删除',
`is_delete` tinyint(1) DEFAULT NULL COMMENT '是否删除',
`rule_name` varchar(100) DEFAULT NULL COMMENT '规则名称',
`rule_name` varchar(100) DEFAULT NULL COMMENT '规则名称',
`pic_url` varchar(100) DEFAULT NULL COMMENT '规则树形图路径',
`pic_url` varchar(100) DEFAULT NULL COMMENT '规则树形图路径',
PRIMARY KEY (`id`) USING BTREE
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4;
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"maoying"
id=
"1612272587000-7"
>
<changeSet
author=
"maoying"
id=
"1612272587000-7"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"c_plan_operation_record"
columnName=
"equipment_code"
/>
<columnExists
tableName=
"c_plan_operation_record"
columnName=
"equipment_code"
/>
</preConditions>
</preConditions>
<comment>
c_plan_operation_record table equipment_code MODIFY
</comment>
<comment>
c_plan_operation_record table equipment_code MODIFY
</comment>
<sql>
<sql>
ALTER TABLE `c_plan_operation_record`
ALTER TABLE `c_plan_operation_record`
MODIFY COLUMN `equipment_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '装备code' ;
MODIFY COLUMN `equipment_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '装备code' ;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"xixinzhao"
id=
"xxz-2022-07-07-01"
>
<changeSet
author=
"xixinzhao"
id=
"xxz-2022-07-07-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<not>
<columnExists
tableName=
"c_plan_rule"
columnName=
"plan_step"
/>
<columnExists
tableName=
"c_plan_rule"
columnName=
"plan_step"
/>
</not>
</not>
</preConditions>
</preConditions>
<comment>
c_plan_rule add column plan_step
</comment>
<comment>
c_plan_rule add column plan_step
</comment>
<sql>
<sql>
alter table `c_plan_rule` add column `plan_step` json DEFAULT NULL COMMENT '预案步骤';
alter table `c_plan_rule` add column `plan_step` json DEFAULT NULL COMMENT '预案步骤';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"20220901-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"toip_rm_snapshot"
columnName=
"method_param"
/>
</preConditions>
<comment>
修改属性字段 method_param
</comment>
<sql>
ALTER TABLE `toip_rm_snapshot` MODIFY COLUMN `method_param` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '方法参数' AFTER `equipment_id`;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
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