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
1e3b8f04
Commit
1e3b8f04
authored
Jul 14, 2023
by
maoying
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
ef097bf2
824e5c01
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
2060 additions
and
86 deletions
+2060
-86
pom.xml
YeeAmosFireAutoSysCommon/pom.xml
+1
-1
ContingencyPlanInstance.java
.../yeejoin/amos/fas/dao/entity/ContingencyPlanInstance.java
+22
-2
EmergencyRelation.java
...va/com/yeejoin/amos/fas/dao/entity/EmergencyRelation.java
+38
-0
EmergencyRelationTree.java
...om/yeejoin/amos/fas/dao/entity/EmergencyRelationTree.java
+39
-0
EmergencyTaskContent.java
...com/yeejoin/amos/fas/dao/entity/EmergencyTaskContent.java
+39
-0
pom.xml
YeeAmosFireAutoSysService/pom.xml
+2
-2
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+73
-22
ContingencyPlanController.java
...os/fas/business/controller/ContingencyPlanController.java
+40
-1
EmergencyTaskController.java
...amos/fas/business/controller/EmergencyTaskController.java
+182
-0
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+56
-3
TimeLineController.java
...join/amos/fas/business/controller/TimeLineController.java
+10
-0
ContingencyInstanceInfoMapper.java
...as/business/dao/mapper/ContingencyInstanceInfoMapper.java
+12
-0
ContingencyPlanInstanceMapper.java
...as/business/dao/mapper/ContingencyPlanInstanceMapper.java
+6
-0
EmergencyTaskMapper.java
...oin/amos/fas/business/dao/mapper/EmergencyTaskMapper.java
+31
-0
PlanMessageMapper.java
...ejoin/amos/fas/business/dao/mapper/PlanMessageMapper.java
+3
-0
PlanOperationRecordMapper.java
...os/fas/business/dao/mapper/PlanOperationRecordMapper.java
+13
-0
IContingencyPlanInstanceRepository.java
...ss/dao/repository/IContingencyPlanInstanceRepository.java
+1
-1
BizContingencyHandler.java
...eejoin/amos/fas/business/event/BizContingencyHandler.java
+13
-1
FireContingencyHandler.java
...ejoin/amos/fas/business/event/FireContingencyHandler.java
+52
-4
JcsFeign.java
...in/java/com/yeejoin/amos/fas/business/feign/JcsFeign.java
+9
-1
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+0
-0
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+0
-0
EmergencyTaskServiceImpl.java
...s/fas/business/service/impl/EmergencyTaskServiceImpl.java
+200
-0
EquipmentFireEquipmentServiceImpl.java
...iness/service/impl/EquipmentFireEquipmentServiceImpl.java
+27
-20
PlanStepServiceImpl.java
...n/amos/fas/business/service/impl/PlanStepServiceImpl.java
+6
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+0
-0
IContingencyInstance.java
...amos/fas/business/service/intfc/IContingencyInstance.java
+3
-0
IContingencyPlanService.java
...s/fas/business/service/intfc/IContingencyPlanService.java
+5
-4
IEmergencyTaskService.java
...mos/fas/business/service/intfc/IEmergencyTaskService.java
+32
-0
IPlanStepService.java
...oin/amos/fas/business/service/intfc/IPlanStepService.java
+2
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+17
-2
ContingencyPlanInstanceVO.java
...ejoin/amos/fas/business/vo/ContingencyPlanInstanceVO.java
+5
-1
EmergencyRelationVo.java
...com/yeejoin/amos/fas/business/vo/EmergencyRelationVo.java
+16
-0
EmergencyTaskContentVo.java
.../yeejoin/amos/fas/business/vo/EmergencyTaskContentVo.java
+44
-0
pom.xml
YeeAmosFireAutoSysStart/pom.xml
+2
-2
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+2
-2
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+83
-0
fas-sql-task.xml
...SysStart/src/main/resources/db/changelog/fas-sql-task.xml
+11
-10
ContingencyInstanceInfoMapper.xml
...ain/resources/db/mapper/ContingencyInstanceInfoMapper.xml
+0
-0
ContingencyPlanInstanceMapper.xml
...ain/resources/db/mapper/ContingencyPlanInstanceMapper.xml
+62
-0
PlanMessage.xml
...AutoSysStart/src/main/resources/db/mapper/PlanMessage.xml
+18
-0
PlanOperationRecordMapper.xml
...rc/main/resources/db/mapper/PlanOperationRecordMapper.xml
+11
-0
dbTemplate_emergency_task.xml
...rc/main/resources/db/mapper/dbTemplate_emergency_task.xml
+134
-0
dbTemplate_equipment_specific_index.xml
...sources/db/mapper/dbTemplate_equipment_specific_index.xml
+2
-2
dbTemplate_fire_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
+5
-2
plan-setp-qiantangjiang.json
...tart/src/main/resources/json/plan-setp-qiantangjiang.json
+255
-0
plan-step-poyanghu.json
...oSysStart/src/main/resources/json/plan-step-poyanghu.json
+2
-2
plan-step-shaoxing.json
...oSysStart/src/main/resources/json/plan-step-shaoxing.json
+255
-0
plan-step-yinan-yingji1.0.json
...rt/src/main/resources/json/plan-step-yinan-yingji1.0.json
+218
-0
plan-step.json
...osFireAutoSysStart/src/main/resources/json/plan-step.json
+0
-0
pom.xml
pom.xml
+1
-1
No files found.
YeeAmosFireAutoSysCommon/pom.xml
View file @
1e3b8f04
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<parent>
<parent>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
3.7.0.
8
</version>
<version>
3.7.0.
9
</version>
</parent>
</parent>
<!-- <dependencies>
<!-- <dependencies>
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/ContingencyPlanInstance.java
View file @
1e3b8f04
...
@@ -79,6 +79,28 @@ public class ContingencyPlanInstance extends BusinessEntity{
...
@@ -79,6 +79,28 @@ public class ContingencyPlanInstance extends BusinessEntity{
@Column
(
name
=
"person_img"
)
@Column
(
name
=
"person_img"
)
private
String
personImg
;
private
String
personImg
;
@Column
(
name
=
"task_sort"
)
private
Integer
taskSort
;
@Column
(
name
=
"step_code"
)
private
String
stepCode
;
public
void
setTaskSort
(
Integer
taskSort
)
{
this
.
taskSort
=
taskSort
;
}
public
void
setStepCode
(
String
stepCode
)
{
this
.
stepCode
=
stepCode
;
}
public
Integer
getTaskSort
()
{
return
taskSort
;
}
public
String
getStepCode
()
{
return
stepCode
;
}
public
String
getPersonImg
()
{
public
String
getPersonImg
()
{
return
personImg
;
return
personImg
;
}
}
...
@@ -184,8 +206,6 @@ public class ContingencyPlanInstance extends BusinessEntity{
...
@@ -184,8 +206,6 @@ public class ContingencyPlanInstance extends BusinessEntity{
this
.
content
=
content
;
this
.
content
=
content
;
}
}
public
String
getIcon
()
{
public
String
getIcon
()
{
return
icon
;
return
icon
;
}
}
...
...
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/EmergencyRelation.java
0 → 100644
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* The persistent class for the equipment_fire_equipment database table.
*/
@Entity
@Data
@Table
(
name
=
"c_emergency_relation"
)
@NamedQuery
(
name
=
"EmergencyRelation.findAll"
,
query
=
"SELECT e FROM EmergencyRelation e"
)
public
class
EmergencyRelation
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
//职责id
@Column
(
name
=
"obligationId"
)
private
Long
obligationId
;
//人员id
@Column
(
name
=
"person_id"
)
private
Long
personId
;
//分工内容id
@Column
(
name
=
"amos_id"
)
private
Long
amosOrgId
;
//人员名称
@Column
(
name
=
"person_name"
)
private
String
personName
;
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/EmergencyRelationTree.java
0 → 100644
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* The persistent class for the equipment_fire_equipment database table.
*/
@Data
public
class
EmergencyRelationTree
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
sequenceNbr
;
//职责id
private
Long
obligationId
;
//人员名称
private
String
name
;
//子级
private
List
<
EmergencyRelationTree
>
children
=
new
ArrayList
<>();
//树节点展示标识
private
String
type
;
private
String
code
;
}
\ No newline at end of file
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/EmergencyTaskContent.java
0 → 100644
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
/**
* The persistent class for the c_emergency_task_content database table.
*/
@Entity
@Table
(
name
=
"c_emergency_task_content"
)
@Data
public
class
EmergencyTaskContent
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
//分工内容id
@Column
(
name
=
"content"
)
private
String
content
;
//人员名称
@Column
(
name
=
"code"
)
private
String
code
;
//人员名称
@Column
(
name
=
"obligation_id"
)
private
Long
obligationId
;
//人员名称
@Column
(
name
=
"obligation_name"
)
private
String
obligationName
;
}
\ No newline at end of file
YeeAmosFireAutoSysService/pom.xml
View file @
1e3b8f04
...
@@ -14,14 +14,14 @@
...
@@ -14,14 +14,14 @@
<parent>
<parent>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
3.7.0.
8
</version>
<version>
3.7.0.
9
</version>
</parent>
</parent>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysCommon
</artifactId>
<artifactId>
YeeAmosFireAutoSysCommon
</artifactId>
<version>
3.7.0.
8
</version>
<version>
3.7.0.
9
</version>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
1e3b8f04
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/ContingencyPlanController.java
View file @
1e3b8f04
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.controller;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyPlanService
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyPlanService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEmergencyTaskService
;
import
com.yeejoin.amos.fas.business.vo.*
;
import
com.yeejoin.amos.fas.business.vo.*
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
...
@@ -28,6 +29,9 @@ public class ContingencyPlanController extends BaseController {
...
@@ -28,6 +29,9 @@ public class ContingencyPlanController extends BaseController {
@Autowired
@Autowired
private
IContingencyPlanService
contingencyPlanService
;
private
IContingencyPlanService
contingencyPlanService
;
@Autowired
private
IEmergencyTaskService
emergencyTaskService
;
/**
/**
* 创建数字预案
* 创建数字预案
*/
*/
...
@@ -171,7 +175,7 @@ public class ContingencyPlanController extends BaseController {
...
@@ -171,7 +175,7 @@ public class ContingencyPlanController extends BaseController {
vo
.
setUserName
(
user
.
getRealName
());
vo
.
setUserName
(
user
.
getRealName
());
ContingencyPlanResponseVo
result
=
null
;
ContingencyPlanResponseVo
result
=
null
;
try
{
try
{
result
=
contingencyPlanService
.
planStart
(
vo
,
toke
);
result
=
contingencyPlanService
.
planStart
(
vo
,
toke
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
e
.
printStackTrace
();
e
.
printStackTrace
();
return
CommonResponseUtil2
.
failure
();
return
CommonResponseUtil2
.
failure
();
...
@@ -257,4 +261,39 @@ public class ContingencyPlanController extends BaseController {
...
@@ -257,4 +261,39 @@ public class ContingencyPlanController extends BaseController {
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
getUserOperateCountAndPlanName
(
roleModelList
));
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
getUserOperateCountAndPlanName
(
roleModelList
));
}
}
@ApiOperation
(
value
=
"获取当前登录人待处置任务及预案信息"
)
@RequestMapping
(
value
=
"/getUserOperateCountAndTaskName"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
getUserOperateCountAndTaskName
()
{
AgencyUserModel
user
=
getUserInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
String
obligationIds
=
emergencyTaskService
.
getRolesByUserId
(
user
.
getUserId
());
map
.
put
(
"roleCodes"
,
obligationIds
);
List
<
String
>
list
=
new
ArrayList
<>();
if
(!
StringUtils
.
isEmpty
(
obligationIds
))
{
String
[]
ids
=
new
String
(
obligationIds
).
split
(
","
);
list
=
Arrays
.
asList
(
ids
);
}
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
getUserOperateCountAndTaskName
(
list
,
map
));
}
@ApiOperation
(
value
=
"获取当前登录人待处置任务及预案信息"
)
@GetMapping
(
value
=
"/task/page"
)
public
ResponseModel
selectTaskActionPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"batchNo"
,
required
=
false
)
String
batchNo
,
@RequestParam
(
value
=
"runState"
,
required
=
false
)
String
runState
,
@RequestParam
(
value
=
"updateDate"
,
required
=
false
)
String
updateDate
,
@RequestParam
(
value
=
"roleName"
,
required
=
false
)
String
roleName
)
{
if
(
current
<
1
||
size
<
1
)
{
throw
new
YeeException
(
"分页参数有误"
);
}
List
<
String
>
list
=
new
ArrayList
<>();
if
(!
StringUtils
.
isEmpty
(
roleName
))
{
String
[]
ids
=
new
String
(
roleName
).
split
(
","
);
list
=
Arrays
.
asList
(
ids
);
}
return
CommonResponseUtil2
.
success
(
contingencyPlanService
.
selectTaskActionPage
(
current
,
size
,
batchNo
,
runState
,
updateDate
,
list
));
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EmergencyTaskController.java
0 → 100644
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.fas.business.feign.JcsFeign
;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IEmergencyTaskService
;
import
com.yeejoin.amos.fas.business.vo.EmergencyRelationVo
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.dao.entity.Dict
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelation
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelationTree
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyTaskContent
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.data.domain.Page
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Controller
@RequestMapping
(
"/api/emergency"
)
@Api
(
tags
=
"应急人员分工Api"
)
public
class
EmergencyTaskController
extends
BaseController
{
@Autowired
JcsFeign
jcsFeign
;
@Lazy
@Autowired
IEmergencyTaskService
iEmergencyTaskService
;
@Autowired
private
IDictService
dictService
;
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"岗位人员树"
,
notes
=
"岗位人员树"
)
@RequestMapping
(
value
=
"/tree"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
tree
(){
Dict
dict
=
new
Dict
();
dict
.
setDictCode
(
"YJZC"
);
//查询应急角色
List
<
Dict
>
dictList
=
dictService
.
getDictList
(
dict
);
List
<
EmergencyRelationTree
>
list
=
new
ArrayList
<>();
List
<
EmergencyRelationTree
>
root
=
new
ArrayList
<>();
List
<
EmergencyRelationTree
>
treeNodes
=
iEmergencyTaskService
.
treeList
();
//组装对应人员节点
dictList
.
forEach
(
e
->{
EmergencyRelationTree
tree
=
new
EmergencyRelationTree
();
tree
.
setId
(
e
.
getId
());
tree
.
setName
(
e
.
getDictName
());
tree
.
setType
(
"0"
);
tree
.
setSequenceNbr
(
String
.
valueOf
(
e
.
getId
()));
tree
.
setCode
(
e
.
getDictValue
());
tree
.
setChildren
(
treeNodes
.
stream
().
filter
(
t
->
t
.
getObligationId
().
equals
(
e
.
getId
())).
collect
(
Collectors
.
toList
()));
list
.
add
(
tree
);
});
//增加根节点
EmergencyRelationTree
tree
=
new
EmergencyRelationTree
();
tree
.
setId
(
0
);
tree
.
setSequenceNbr
(
"0"
);
tree
.
setName
(
"全部"
);
tree
.
setType
(
"3"
);
tree
.
setCode
(
"0"
);
tree
.
setChildren
(
list
);
root
.
add
(
tree
);
return
CommonResponseUtil
.
success
(
root
);
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分工内容列表"
,
notes
=
"分工内容列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
list
(
Long
obligationId
,
@RequestParam
int
pageNumber
,
@RequestParam
int
pageSize
){
if
(
pageNumber
>=
1
){
pageNumber
=
pageNumber
-
1
;
}
if
(
obligationId
==
0
){
obligationId
=
null
;
}
CommonPageable
commonPageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
Page
<
EmergencyTaskContent
>
list
=
iEmergencyTaskService
.
list
(
obligationId
,
commonPageable
);
return
CommonResponseUtil
.
success
(
list
);
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"树人员节点删除"
,
notes
=
"树人员节点删除"
)
@RequestMapping
(
value
=
"/deleteTreeNode"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResponse
deleteTreeNode
(
Long
obligationId
,
Long
id
){
iEmergencyTaskService
.
deleteTreeNode
(
obligationId
,
id
);
return
CommonResponseUtil
.
success
();
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增树人员节点"
,
notes
=
"新增树人员节点"
)
@PostMapping
(
value
=
"/savePerson"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
savePerson
(
@RequestBody
EmergencyRelationVo
vo
){
List
<
Long
>
personIds
=
vo
.
getPersonIds
();
List
<
Long
>
oldPersonIds
=
iEmergencyTaskService
.
getPersonIds
(
vo
.
getObligationId
());
String
ids
=
StringUtils
.
join
(
oldPersonIds
,
","
);
List
<
Object
>
objects
=
jcsFeign
.
listCompanyByIds
(
personIds
);
StringBuffer
stringBuffer
=
new
StringBuffer
();
for
(
Object
e
:
objects
)
{
String
json
=
JSONObject
.
toJSONString
(
e
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
json
);
if
(
ids
.
contains
(
jsonObject
.
get
(
"sequenceNbr"
).
toString
())){
stringBuffer
.
append
(
jsonObject
.
get
(
"bizOrgName"
).
toString
()+
" "
);
continue
;
}
EmergencyRelation
emergencyRelation
=
new
EmergencyRelation
();
emergencyRelation
.
setObligationId
(
vo
.
getObligationId
());
emergencyRelation
.
setPersonId
(
Long
.
valueOf
(
jsonObject
.
get
(
"sequenceNbr"
).
toString
()));
emergencyRelation
.
setPersonName
(
jsonObject
.
get
(
"bizOrgName"
).
toString
());
emergencyRelation
.
setAmosOrgId
(
Long
.
valueOf
(
jsonObject
.
get
(
"amosOrgId"
).
toString
()));
emergencyRelation
.
setCreateDate
(
new
Date
());
iEmergencyTaskService
.
save
(
emergencyRelation
);
}
if
(
stringBuffer
.
length
()>
0
){
stringBuffer
.
append
(
"已存在"
);
return
CommonResponseUtil
.
failure
(
stringBuffer
.
toString
());
}
return
CommonResponseUtil
.
success
();
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"编辑树人员节点"
,
notes
=
"编辑树人员节点"
)
@PostMapping
(
value
=
"/editPerson"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
editPerson
(
@RequestBody
EmergencyRelationVo
vo
){
this
.
deleteTreeNode
(
vo
.
getObligationId
(),
null
);
List
<
Long
>
personIds
=
vo
.
getPersonIds
();
List
<
Object
>
objects
=
jcsFeign
.
listCompanyByIds
(
personIds
);
objects
.
forEach
(
e
->
{
String
json
=
JSONObject
.
toJSONString
(
e
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
json
);
EmergencyRelation
emergencyRelation
=
new
EmergencyRelation
();
emergencyRelation
.
setObligationId
(
vo
.
getObligationId
());
emergencyRelation
.
setPersonId
(
Long
.
valueOf
(
jsonObject
.
get
(
"sequenceNbr"
).
toString
()));
emergencyRelation
.
setPersonName
(
jsonObject
.
get
(
"bizOrgName"
).
toString
());
emergencyRelation
.
setAmosOrgId
(
Long
.
valueOf
(
jsonObject
.
get
(
"amosOrgId"
).
toString
()));
emergencyRelation
.
setCreateDate
(
new
Date
());
iEmergencyTaskService
.
save
(
emergencyRelation
);
}
);
return
CommonResponseUtil
.
success
();
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前节点绑定人员"
,
notes
=
"获取当前节点绑定人员"
)
@RequestMapping
(
value
=
"/getPersons"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPersons
(
@RequestParam
Long
obligationId
){
EmergencyRelationVo
emergencyRelationVo
=
new
EmergencyRelationVo
();
emergencyRelationVo
.
setPersonIds
(
iEmergencyTaskService
.
getPersonIds
(
obligationId
));
return
CommonResponseUtil
.
success
(
emergencyRelationVo
);
}
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增流程任务"
,
notes
=
"新增流程任务"
)
@PostMapping
(
value
=
"/task/add"
,
produces
=
"application/json; charset=UTF-8"
)
public
CommonResponse
addTaskContent
(
@RequestBody
String
stepCode
){
iEmergencyTaskService
.
saveTask
(
stepCode
,
null
);
return
CommonResponseUtil
.
success
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
controller
;
import
com.yeejoin.amos.fas.business.service.intfc.IEmergencyTaskService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
...
@@ -27,9 +28,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -27,9 +28,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.io.*
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RestController
@RequestMapping
(
value
=
"/api/visual"
)
@RequestMapping
(
value
=
"/api/visual"
)
...
@@ -46,6 +45,9 @@ public class PlanVisual3dController extends BaseController {
...
@@ -46,6 +45,9 @@ public class PlanVisual3dController extends BaseController {
private
IPlanVisual3dService
planVisual3dService
;
private
IPlanVisual3dService
planVisual3dService
;
@Autowired
@Autowired
private
IEmergencyTaskService
emergencyTaskService
;
@Autowired
HttpServletResponse
response
;
HttpServletResponse
response
;
@Autowired
@Autowired
HttpServletRequest
request
;
HttpServletRequest
request
;
...
@@ -251,9 +253,60 @@ public class PlanVisual3dController extends BaseController {
...
@@ -251,9 +253,60 @@ public class PlanVisual3dController extends BaseController {
}
}
@Permission
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询预案下处置动作列表"
,
notes
=
"分页查询预案下处置动作列表"
)
@GetMapping
(
value
=
"/plan/selectTaskActionPage"
)
public
ResponseModel
selectTaskActionPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"batchNo"
)
String
batchNo
,
@RequestParam
(
value
=
"dataType"
)
int
dataType
)
{
if
(
current
<
1
||
size
<
1
)
{
throw
new
YeeException
(
"分页参数有误"
);
}
AgencyUserModel
user
=
getUserInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
String
obligationIds
=
emergencyTaskService
.
getRolesByUserId
(
user
.
getUserId
());
map
.
put
(
"roleCodes"
,
obligationIds
);
List
<
String
>
list
=
new
ArrayList
<>();
if
(!
StringUtils
.
isEmpty
(
obligationIds
))
{
String
[]
ids
=
new
String
(
obligationIds
).
split
(
","
);
list
=
Arrays
.
asList
(
ids
);
}
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectTaskActionPage
(
current
,
size
,
batchNo
,
list
,
dataType
));
}
@Permission
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询预案下处置动作列表"
,
notes
=
"查询预案下处置动作列表"
)
@GetMapping
(
value
=
"/plan/selectTaskActionList"
)
public
ResponseModel
selectTaskActionList
(
@RequestParam
(
value
=
"batchNo"
)
String
batchNo
,
@RequestParam
(
value
=
"dataType"
)
int
dataType
)
{
AgencyUserModel
user
=
getUserInfo
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
String
obligationIds
=
emergencyTaskService
.
getRolesByUserId
(
user
.
getUserId
());
map
.
put
(
"roleCodes"
,
obligationIds
);
List
<
String
>
list
=
new
ArrayList
<>();
if
(!
StringUtils
.
isEmpty
(
obligationIds
))
{
String
[]
ids
=
new
String
(
obligationIds
).
split
(
","
);
list
=
Arrays
.
asList
(
ids
);
}
return
CommonResponseUtil2
.
success
(
planVisual3dService
.
selectTaskActionList
(
batchNo
,
list
,
dataType
));
}
@Permission
@ApiOperation
(
value
=
"修改动作执行状态"
,
notes
=
"修改动作执行状态"
)
@ApiOperation
(
value
=
"修改动作执行状态"
,
notes
=
"修改动作执行状态"
)
@PostMapping
(
value
=
"/updateStatusById"
)
@PostMapping
(
value
=
"/updateStatusById"
)
public
ResponseModel
updateStatusById
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"runStatus"
)
Boolean
runStatus
)
{
public
ResponseModel
updateStatusById
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"runStatus"
)
Boolean
runStatus
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateStatusById
(
id
,
runStatus
));
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateStatusById
(
id
,
runStatus
));
}
}
@Permission
@ApiOperation
(
value
=
"修改任务动作执行状态"
,
notes
=
"修改任务动作执行状态"
)
@PostMapping
(
value
=
"/status/modify"
)
public
ResponseModel
updateTaskStatusById
(
@RequestParam
(
"id"
)
String
id
,
@RequestParam
(
"runStatus"
)
Boolean
runStatus
)
{
AgencyUserModel
user
=
getUserInfo
();
String
roleNames
=
emergencyTaskService
.
getRolesNameByUserId
(
user
.
getUserId
());
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateTaskStatusById
(
id
,
runStatus
,
user
.
getRealName
(),
user
.
getUserId
(),
roleNames
));
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/TimeLineController.java
View file @
1e3b8f04
...
@@ -79,6 +79,16 @@ public class TimeLineController extends BaseController {
...
@@ -79,6 +79,16 @@ public class TimeLineController extends BaseController {
}
}
@Permission
@Permission
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"点击按钮"
,
notes
=
"点击按钮"
)
@RequestMapping
(
value
=
"/click"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
clickButton
(
@RequestBody
PlanExecuteVo
vo
)
throws
Exception
{
AgencyUserModel
userInfo
=
getUserInfo
();
String
user
=
userInfo
.
getRealName
();
iContingencyInstance
.
clickButton
(
vo
.
getBatchNo
(),
vo
.
getStepCode
(),
vo
.
getButtonJson
(),
vo
.
getContingencyPlanId
(),
vo
.
getButtonCode
(),
vo
.
getConfirm
(),
vo
.
getStepState
(),
"true"
,
"false"
,
getToken
(),
getProduct
(),
getAppKey
(),
user
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
}
@Permission
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"点击按钮"
,
notes
=
"点击按钮"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"点击按钮"
,
notes
=
"点击按钮"
)
@RequestMapping
(
value
=
"/fire/exit"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"/fire/exit"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
fireExit
(
@RequestParam
(
"batchNo"
)
String
batchNo
,
public
CommonResponse
fireExit
(
@RequestParam
(
"batchNo"
)
String
batchNo
,
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ContingencyInstanceInfoMapper.java
View file @
1e3b8f04
...
@@ -26,8 +26,20 @@ public interface ContingencyInstanceInfoMapper extends BaseMapper<ContingencyIns
...
@@ -26,8 +26,20 @@ public interface ContingencyInstanceInfoMapper extends BaseMapper<ContingencyIns
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
int
selectCountDisposalActionPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
int
selectCountDisposalActionPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
int
selectCountTaskActionPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionList
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionList
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstanceVO
>
selectTaskActionList
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"list"
)
List
<
String
>
roles
,
@Param
(
"batchNo"
)
String
batchNo
);
List
<
ContingencyPlanInstanceVO
>
getTaskActionList
(
@Param
(
"type"
)
String
type
,
@Param
(
"status"
)
String
status
,
@Param
(
"batchNo"
)
String
batchNo
);
int
countTaskPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"list"
)
List
<
String
>
roles
);
List
<
ContingencyPlanInstanceVO
>
getTaskActionPage
(
@Param
(
"current"
)
int
current
,
@Param
(
"size"
)
int
size
,
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"type"
)
String
type
,
@Param
(
"runState"
)
String
runState
,
@Param
(
"updateDate"
)
String
updateDate
,
@Param
(
"list"
)
List
<
String
>
roles
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ContingencyPlanInstanceMapper.java
View file @
1e3b8f04
...
@@ -44,4 +44,10 @@ public interface ContingencyPlanInstanceMapper extends BaseMapper<ContingencyPla
...
@@ -44,4 +44,10 @@ public interface ContingencyPlanInstanceMapper extends BaseMapper<ContingencyPla
long
countWater
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
long
countWater
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Integer
getPlanInstanceCountByCondition
(
@Param
(
"category"
)
String
category
,
@Param
(
"recordType"
)
String
recordType
,
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"content"
)
String
content
);
Integer
getPlanInstanceCountByCondition
(
@Param
(
"category"
)
String
category
,
@Param
(
"recordType"
)
String
recordType
,
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"content"
)
String
content
);
String
getInstanceIdByBatchNOAndCategory
(
@Param
(
"recordType"
)
String
recordType
,
@Param
(
"category"
)
String
category
,
@Param
(
"batchNo"
)
String
batchNo
);
Boolean
updateTaskStatusById
(
@Param
(
"id"
)
String
id
,
@Param
(
"content"
)
String
content
,
Boolean
runStatus
,
@Param
(
"userName"
)
String
userName
,
@Param
(
"userId"
)
String
userId
,
@Param
(
"personImg"
)
String
personImg
,
@Param
(
"fileType"
)
String
fileType
,
@Param
(
"roleNames"
)
String
roleNames
);
Integer
getPlanInstanceByRunState
(
@Param
(
"stepCode"
)
String
stepCode
,
@Param
(
"batchNo"
)
String
batchNo
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/EmergencyTaskMapper.java
0 → 100644
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.fas.business.vo.EmergencyTaskContentVo
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelation
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelationTree
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyTaskContent
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
EmergencyTaskMapper
extends
BaseMapper
{
List
<
EmergencyTaskContent
>
getEmergencyTaskList
(
Long
obligationId
,
Long
offset
,
int
pageSize
);
int
getEmergencyTaskCount
(
Long
obligationId
);
List
<
EmergencyRelationTree
>
treeList
();
void
deleteTreeNode
(
Long
obligationId
,
Long
personId
);
void
save
(
EmergencyRelation
emergencyRelation
);
List
<
String
>
roleCodes
(
String
amosOrgId
);
List
<
Long
>
getPersonIds
(
Long
obligationId
);
List
<
String
>
roleNames
(
String
amosOrgId
);
List
<
EmergencyTaskContentVo
>
getContentList
(
@Param
(
"stepCode"
)
String
stepCode
);
List
<
EmergencyTaskContentVo
>
getMustTaskList
(
@Param
(
"stepCode"
)
String
stepCode
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanMessageMapper.java
View file @
1e3b8f04
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.yeejoin.amos.fas.dao.entity.PlanMessage
;
import
com.yeejoin.amos.fas.dao.entity.PlanMessage
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -17,4 +18,6 @@ import java.util.Map;
...
@@ -17,4 +18,6 @@ import java.util.Map;
public
interface
PlanMessageMapper
extends
BaseMapper
<
PlanMessage
>
{
public
interface
PlanMessageMapper
extends
BaseMapper
<
PlanMessage
>
{
List
<
Map
<
String
,
String
>>
getPlanMessageList
(
String
batchNo
,
Integer
stepIndex
);
List
<
Map
<
String
,
String
>>
getPlanMessageList
(
String
batchNo
,
Integer
stepIndex
);
int
getPlanMessageCount
(
String
batchNo
,
Integer
stepIndex
,
Date
indexUpdateTime
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanOperationRecordMapper.java
View file @
1e3b8f04
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.fas.dao.entity.PlanRule;
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.fas.dao.entity.PlanRule;
import
com.yeejoin.amos.fas.datasync.bo.PlanOperationRecordSyncBo
;
import
com.yeejoin.amos.fas.datasync.bo.PlanOperationRecordSyncBo
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -42,6 +43,18 @@ public interface PlanOperationRecordMapper {
...
@@ -42,6 +43,18 @@ public interface PlanOperationRecordMapper {
*/
*/
String
getLastBatchNo
();
String
getLastBatchNo
();
/**
* 获取userId
* @return
*/
List
<
String
>
getArraysUserIds
(
String
roleCode
);
/**
* 获取用户名称
* @return
*/
List
<
String
>
getArraysUserName
(
String
roleCode
);
Map
<
String
,
Object
>
getLatestFireEquipId
();
Map
<
String
,
Object
>
getLatestFireEquipId
();
PlanRule
getPlanRuleByBatchNo
(
String
batchNo
);
PlanRule
getPlanRuleByBatchNo
(
String
batchNo
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/repository/IContingencyPlanInstanceRepository.java
View file @
1e3b8f04
...
@@ -29,7 +29,7 @@ public interface IContingencyPlanInstanceRepository extends BaseDao<ContingencyP
...
@@ -29,7 +29,7 @@ public interface IContingencyPlanInstanceRepository extends BaseDao<ContingencyP
" t.batch_no = ?"
+
" t.batch_no = ?"
+
" AND t.record_type = ?"
+
" AND t.record_type = ?"
+
" ORDER BY"
+
" ORDER BY"
+
" t.
sort
ASC"
,
nativeQuery
=
true
)
" t.
create_date
ASC"
,
nativeQuery
=
true
)
List
<
ContingencyPlanInstance
>
queryForCategory
(
String
batch_no
,
String
recordType
);
List
<
ContingencyPlanInstance
>
queryForCategory
(
String
batch_no
,
String
recordType
);
@Query
(
value
=
@Query
(
value
=
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/event/BizContingencyHandler.java
View file @
1e3b8f04
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.fas.business.service.impl.RiskSourceServiceImpl;
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.fas.business.service.impl.RiskSourceServiceImpl;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
import
com.yeejoin.amos.fas.business.service.model.Operate
;
import
com.yeejoin.amos.fas.business.service.model.Operate
;
import
com.yeejoin.amos.fas.business.service.model.OperateGroup
;
import
com.yeejoin.amos.fas.business.service.model.OperateGroup
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
...
@@ -116,7 +117,7 @@ public class BizContingencyHandler implements EventHandler{
...
@@ -116,7 +117,7 @@ public class BizContingencyHandler implements EventHandler{
event
.
getPlanExecute
().
getButtonCode
(),
event
.
getPlanExecute
().
getButtonCode
(),
event
.
getPlanExecute
().
getIsExecute
(),
event
.
getPlanExecute
().
getIsExecute
(),
event
.
getPlanExecute
().
getIsAuto
());
event
.
getPlanExecute
().
getIsAuto
());
setButtonExecuted
(
event
.
getPlanExecute
().
getBatchNo
(),
setButtonExecuted
(
event
.
getPlanExecute
().
getBatchNo
(),
event
.
getPlanExecute
().
getContingencyPlanId
(),
event
.
getPlanExecute
().
getContingencyPlanId
(),
event
.
getPlanExecute
().
getButtonCode
(),
event
.
getPlanExecute
().
getButtonCode
(),
event
.
getPlanExecute
().
getConfirm
(),
event
.
getPlanExecute
().
getConfirm
(),
...
@@ -220,6 +221,17 @@ public class BizContingencyHandler implements EventHandler{
...
@@ -220,6 +221,17 @@ public class BizContingencyHandler implements EventHandler{
result
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
result
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
result
.
put
(
"msgType"
,
"getStepList"
);
result
.
put
(
"msgType"
,
"getStepList"
);
result
.
put
(
"planStep"
,
objects
);
result
.
put
(
"planStep"
,
objects
);
String
planTask
=
""
;
if
(
redisTemplate
.
hasKey
(
"planTask"
))
{
planTask
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planTask"
)).
toString
();
}
else
{
List
<
ContingencyPlanInstanceVO
>
list
=
planVisual3dService
.
getTaskActionList
(
batchNo
,
1
);
if
(
0
<
list
.
size
())
{
planTask
=
JSON
.
toJSONString
(
list
);
}
}
JSONArray
taskObjects
=
JSON
.
parseArray
(
planTask
);
result
.
put
(
"planTask"
,
taskObjects
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
result
));
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
result
));
}
}
});
});
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/event/FireContingencyHandler.java
View file @
1e3b8f04
...
@@ -5,12 +5,16 @@ import com.yeejoin.amos.component.rule.RuleTrigger;
...
@@ -5,12 +5,16 @@ import com.yeejoin.amos.component.rule.RuleTrigger;
import
com.yeejoin.amos.fas.business.action.ContingencyAction
;
import
com.yeejoin.amos.fas.business.action.ContingencyAction
;
import
com.yeejoin.amos.fas.business.action.model.ContingencyEvent
;
import
com.yeejoin.amos.fas.business.action.model.ContingencyEvent
;
import
com.yeejoin.amos.fas.business.action.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.action.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.action.result.SafteyPlanResult
;
import
com.yeejoin.amos.fas.business.action.util.ContingencyLogPublisher
;
import
com.yeejoin.amos.fas.business.action.util.ContingencyLogPublisher
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.vo.ContingencyInstanceInfoVO
;
import
com.yeejoin.amos.fas.business.vo.ContingencyInstanceInfoVO
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -25,6 +29,8 @@ import org.springframework.stereotype.Component;
...
@@ -25,6 +29,8 @@ import org.springframework.stereotype.Component;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -63,12 +69,22 @@ public class FireContingencyHandler implements EventHandler{
...
@@ -63,12 +69,22 @@ public class FireContingencyHandler implements EventHandler{
@Autowired
@Autowired
private
ContingencyInstanceInfoService
contingencyInstanceInfoService
;
private
ContingencyInstanceInfoService
contingencyInstanceInfoService
;
@Autowired
@Autowired
private
RuleTrigger
ruleTrigger
;
private
IContingencyInstance
iContingencyInstance
;
@Autowired
@Autowired
ContingencyAction
contingencyAction
;
ContingencyAction
contingencyAction
;
@Autowired
IContingencyOriginalDataDao
contingencyOriginalDataDao
;
@Autowired
private
ContingencyInstanceInfoMapper
contingencyInstanceInfoMapper
;
@Autowired
private
RuleTrigger
ruleTrigger
;
private
static
Map
<
String
,
String
>
stepMap
=
new
HashMap
<>();
private
static
Map
<
String
,
String
>
stepMap
=
new
HashMap
<>();
@Value
(
"${spring.application.name}"
)
@Value
(
"${spring.application.name}"
)
...
@@ -88,7 +104,8 @@ public class FireContingencyHandler implements EventHandler{
...
@@ -88,7 +104,8 @@ public class FireContingencyHandler implements EventHandler{
event
.
getPlanExecute
().
getContingencyPlanId
(),
event
.
getPlanExecute
().
getContingencyPlanId
(),
event
.
getPlanExecute
().
getButtonCode
(),
event
.
getPlanExecute
().
getButtonCode
(),
event
.
getPlanExecute
().
getConfirm
(),
event
.
getPlanExecute
().
getConfirm
(),
event
.
getPlanExecute
().
getStepState
());
event
.
getPlanExecute
().
getStepState
(),
event
.
getPlanExecute
().
getIsAuto
());
}
}
@Override
@Override
...
@@ -97,7 +114,7 @@ public class FireContingencyHandler implements EventHandler{
...
@@ -97,7 +114,7 @@ public class FireContingencyHandler implements EventHandler{
}
}
public
void
fire
(
String
batchNo
,
String
stepCode
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
)
throws
Exception
{
public
void
fire
(
String
batchNo
,
String
stepCode
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isAuto
)
throws
Exception
{
//火灾误报
//火灾误报
ContingencyOriginalData
contingencyOriginalData
=
iContingencyOriginalDataDao
.
findByBatchNo
(
batchNo
);
ContingencyOriginalData
contingencyOriginalData
=
iContingencyOriginalDataDao
.
findByBatchNo
(
batchNo
);
...
@@ -134,7 +151,13 @@ public class FireContingencyHandler implements EventHandler{
...
@@ -134,7 +151,13 @@ public class FireContingencyHandler implements EventHandler{
ContingencyRo
contingencyRo
=
new
ContingencyRo
();
ContingencyRo
contingencyRo
=
new
ContingencyRo
();
contingencyRo
.
setButtonCode
(
buttonCode
);
contingencyRo
.
setButtonCode
(
buttonCode
);
contingencyRo
.
setButtonState
(
buttonState
);
contingencyRo
.
setButtonState
(
buttonState
);
if
(
"true"
.
equals
(
isAuto
))
{
// 用路线字段标识是否是自动执行
contingencyRo
.
setFireTruckRoute
(
"true"
);
}
else
{
contingencyRo
.
setFireTruckRoute
(
"false"
);
}
// //需要优化
// //需要优化
// ContingencyInstanceInfoVO infoVO = contingencyInstanceInfoService.selectDisposalDetails(batchNo);
// ContingencyInstanceInfoVO infoVO = contingencyInstanceInfoService.selectDisposalDetails(batchNo);
// if (!ObjectUtils.isEmpty(infoVO.getPosition())) {
// if (!ObjectUtils.isEmpty(infoVO.getPosition())) {
...
@@ -186,6 +209,31 @@ public class FireContingencyHandler implements EventHandler{
...
@@ -186,6 +209,31 @@ public class FireContingencyHandler implements EventHandler{
batchNo
batchNo
);
);
SafteyPlanResult
result
=
new
SafteyPlanResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
try
{
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
List
<
ContingencyPlanInstance
>
list
=
iContingencyInstance
.
queryForTimeLine
(
contingencyRo
.
getBatchNo
(),
"MESSAGE"
);
ArrayList
records
=
new
ArrayList
<>();
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
list
.
forEach
(
action
->
{
HashMap
map
=
new
HashMap
();
map
.
put
(
"time"
,
sdf1
.
format
(
action
.
getCreateDate
().
getTime
()));
map
.
put
(
"stepName"
,
action
.
getContent
());
records
.
add
(
map
);
});
}
tempmap1
.
put
(
"content"
,
records
);
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
result
.
add
(
tempmap1
);
ContingencyRo
paramObj
=
new
ContingencyRo
();
paramObj
.
setBatchNo
(
contingencyRo
.
getBatchNo
());
paramObj
.
setEquipmentId
(
contingencyRo
.
getEquipmentId
());
contingencyAction
.
sendcmdT
(
"recordarea"
,
paramObj
,
result
);
if
(
StringUtils
.
isNotEmpty
(
contingencyOriginalData
.
getEquipmentName
()))
{
if
(
StringUtils
.
isNotEmpty
(
contingencyOriginalData
.
getEquipmentName
()))
{
publisherPlanLog
(
stepCode
,
buttonCode
,
batchNo
);
publisherPlanLog
(
stepCode
,
buttonCode
,
batchNo
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/JcsFeign.java
View file @
1e3b8f04
...
@@ -6,6 +6,8 @@ import com.yeejoin.amos.fas.core.util.ResponseModel;
...
@@ -6,6 +6,8 @@ import com.yeejoin.amos.fas.core.util.ResponseModel;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
/**
* 消息推送
* 消息推送
...
@@ -34,5 +36,11 @@ public interface JcsFeign {
...
@@ -34,5 +36,11 @@ public interface JcsFeign {
*/
*/
@RequestMapping
(
value
=
"/jcs/common/duty-person/person/on_duty/list"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
@RequestMapping
(
value
=
"/jcs/common/duty-person/person/on_duty/list"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
dutyPersonList
();
ResponseModel
dutyPersonList
();
@RequestMapping
(
value
=
"/jcs//org-person/listCompanyByIds"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
List
<
Object
>
listCompanyByIds
(
@RequestParam
List
<
Long
>
ids
);
@RequestMapping
(
value
=
"/jcs/org-person/person/img/{id}"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
ResponseModel
getPersonImage
(
@PathVariable
String
id
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
1e3b8f04
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
1e3b8f04
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EmergencyTaskServiceImpl.java
0 → 100644
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.yeejoin.amos.fas.business.action.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.dao.mapper.EmergencyTaskMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
import
com.yeejoin.amos.fas.business.dao.repository.IPlanOperationRecordDao
;
import
com.yeejoin.amos.fas.business.service.intfc.IContingencyInstance
;
import
com.yeejoin.amos.fas.business.service.intfc.IEmergencyTaskService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanStepService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.business.vo.EmergencyTaskContentVo
;
import
com.yeejoin.amos.fas.business.vo.MessageVO
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.StringUtil
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelation
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelationTree
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyTaskContent
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.CollectionUtils
;
import
java.util.*
;
@Service
public
class
EmergencyTaskServiceImpl
implements
IEmergencyTaskService
{
@Autowired
private
EmergencyTaskMapper
emergencyTaskMapper
;
@Autowired
private
IContingencyInstance
iContingencyInstance
;
@Autowired
private
IPlanOperationRecordDao
planOperationRecordDao
;
@Autowired
private
IContingencyPlanInstanceRepository
contingencyPlanInstanceRepository
;
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
IPlanVisual3dService
planVisual3dService
;
@Autowired
private
IPlanStepService
planStepService
;
@Autowired
private
WebMqttComponent
webMqttComponent
;
@Autowired
private
PlanOperationRecordMapper
planOperationRecordMapper
;
@Value
(
"${spring.application.name}"
)
private
String
serviceName
;
@Value
(
"${station.name}"
)
private
String
stationName
;
@Override
public
Page
<
EmergencyTaskContent
>
list
(
Long
obligationId
,
CommonPageable
pageable
)
{
int
total
=
emergencyTaskMapper
.
getEmergencyTaskCount
(
obligationId
);
List
<
EmergencyTaskContent
>
emergencyTaskList
=
emergencyTaskMapper
.
getEmergencyTaskList
(
obligationId
,
pageable
.
getOffset
(),
pageable
.
getPageSize
());
Page
<
EmergencyTaskContent
>
result
=
new
PageImpl
<>(
emergencyTaskList
,
pageable
,
total
);
return
result
;
}
@Override
public
List
<
EmergencyRelationTree
>
treeList
()
{
return
emergencyTaskMapper
.
treeList
();
}
@Override
public
void
deleteTreeNode
(
Long
obligationId
,
Long
personId
)
{
emergencyTaskMapper
.
deleteTreeNode
(
obligationId
,
personId
);
}
@Override
public
void
save
(
EmergencyRelation
emergencyRelation
)
{
emergencyTaskMapper
.
save
(
emergencyRelation
);
}
@Override
public
String
getRolesByUserId
(
String
userId
)
{
List
<
String
>
list
=
emergencyTaskMapper
.
roleCodes
(
userId
);
String
roleCodes
=
String
.
join
(
","
,
list
);
return
roleCodes
;
}
@Override
public
String
getRolesNameByUserId
(
String
userId
)
{
List
<
String
>
list
=
emergencyTaskMapper
.
roleNames
(
userId
);
String
roleNames
=
String
.
join
(
","
,
list
);
return
roleNames
;
}
@Override
public
List
<
Long
>
getPersonIds
(
Long
obligationId
)
{
return
emergencyTaskMapper
.
getPersonIds
(
obligationId
);
}
@Async
@Transactional
@Override
public
void
saveTask
(
String
stepCode
,
String
batchId
)
{
List
<
EmergencyTaskContentVo
>
list
=
emergencyTaskMapper
.
getContentList
(
stepCode
);
if
(
0
<
list
.
size
())
{
String
batchNo
=
StringUtil
.
isNotEmpty
(
batchId
)
?
batchId
:
planOperationRecordMapper
.
getLastBatchNo
();
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
for
(
EmergencyTaskContentVo
vo
:
list
)
{
String
taskName
=
vo
.
getContent
();
String
roleCode
=
vo
.
getRoleCode
();
Integer
taskNum
=
Integer
.
valueOf
(
vo
.
getTaskNum
());
String
buttonJson
=
vo
.
getButtonJson
();
String
instanceId
=
iContingencyInstance
.
getInstanceIdByBatchNOAndCategory
(
"TASKOPERATE"
,
taskName
,
batchNo
);
if
(!
StringUtils
.
isEmpty
(
instanceId
))
{
return
;
}
ContingencyPlanInstance
contingencyPlanInstance
=
new
ContingencyPlanInstance
();
contingencyPlanInstance
.
setBatchNo
(
batchNo
);
contingencyPlanInstance
.
setRecordType
(
"TASKOPERATE"
);
contingencyPlanInstance
.
setRoleCode
(
roleCode
);
contingencyPlanInstance
.
setCategory
(
taskName
);
contingencyPlanInstance
.
setCreateDate
(
new
Date
());
contingencyPlanInstance
.
setTaskSort
(
taskNum
);
contingencyPlanInstance
.
setStepCode
(
stepCode
);
contingencyPlanInstance
.
setContent
(
buttonJson
);
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
if
(
"0"
.
equals
(
stepCode
))
{
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
public
void
afterCommit
()
{
String
planStep
=
""
;
if
(
redisTemplate
.
hasKey
(
"planStep"
))
{
planStep
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planStep"
)).
toString
();
}
else
{
planStep
=
planStepService
.
getPlanStep
();
}
JSONArray
objects
=
JSON
.
parseArray
(
planStep
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"contingency"
,
new
ContingencyRo
());
result
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
result
.
put
(
"msgType"
,
"getStepList"
);
result
.
put
(
"planStep"
,
objects
);
String
planTask
=
""
;
if
(
redisTemplate
.
hasKey
(
"planTask"
))
{
planTask
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planTask"
)).
toString
();
}
else
{
List
<
ContingencyPlanInstanceVO
>
lists
=
planVisual3dService
.
getTaskActionList
(
batchNo
,
1
);
planTask
=
JSON
.
toJSONString
(
lists
);
}
JSONArray
taskObjects
=
JSON
.
parseArray
(
planTask
);
result
.
put
(
"planTask"
,
taskObjects
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
result
));
}
});
}
MessageVO
messageVO
=
new
MessageVO
();
messageVO
.
setTitle
(
"应急处置事项提醒"
);
messageVO
.
setBody
(
"【"
+
taskName
+
"】"
+
DateFormatUtils
.
format
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
));
messageVO
.
setMsgType
(
"emergencyPlan"
);
messageVO
.
setCategory
(
1
);
messageVO
.
setIsSendApp
(
true
);
messageVO
.
setIsSendWeb
(
true
);
messageVO
.
setRelationId
(
batchNo
);
planVisual3dService
.
sendMessage
(
roleCode
,
messageVO
);
}
}
}
}
private
Boolean
findByBatchNoAndStatus
(
String
batchNo
)
{
return
CollectionUtils
.
isEmpty
(
planOperationRecordDao
.
findByBatchNoAndStatus
(
batchNo
,
0
));
}
@Override
public
List
<
EmergencyTaskContentVo
>
getMustTaskList
(
String
stepCode
)
{
return
emergencyTaskMapper
.
getMustTaskList
(
stepCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentFireEquipmentServiceImpl.java
View file @
1e3b8f04
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificIndexMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificIndexMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanMessageMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanMessageMapper
;
...
@@ -190,20 +191,20 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
...
@@ -190,20 +191,20 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
String
fireEquipId
=
String
.
valueOf
(
map
.
get
(
"fireEquipId"
));
String
fireEquipId
=
String
.
valueOf
(
map
.
get
(
"fireEquipId"
));
List
<
Long
>
fireEquipments
=
new
ArrayList
<>();
List
<
Long
>
fireEquipments
=
new
ArrayList
<>();
// 若是停运本极对端换流器,则需查出本极对应的电力设备列表,暂用电力设备名称过滤出本极电力设备,注意此处的电力设备按照标准有两极(极I,极II)
// 若是停运本极对端换流器,则需查出本极对应的电力设备列表,暂用电力设备名称过滤出本极电力设备,注意此处的电力设备按照标准有两极(极I,极II)
if
(
stepIndex
==
index
)
{
//
if (stepIndex == index) {
Optional
<
Equipment
>
equipment
=
iEquipmentDao
.
findById
(
Long
.
valueOf
(
fireEquipId
));
//
Optional<Equipment> equipment = iEquipmentDao.findById(Long.valueOf(fireEquipId));
if
(
equipment
.
get
()
!=
null
)
{
//
if (equipment.get() != null) {
String
fireEquipNamePrefix
=
equipment
.
get
().
getName
().
substring
(
0
,
2
);
//
String fireEquipNamePrefix = equipment.get().getName().substring(0, 2);
List
<
String
>
fireEquipIdList
=
equipmentSpecificMapper
.
getFireEquipIdsByNamePrefix
(
fireEquipNamePrefix
);
//
List<String> fireEquipIdList = equipmentSpecificMapper.getFireEquipIdsByNamePrefix(fireEquipNamePrefix);
String
[]
strings
=
fireEquipIdList
.
toArray
(
new
String
[
fireEquipIdList
.
size
()]);
//
String[] strings = fireEquipIdList.toArray(new String[fireEquipIdList.size()]);
// 获取消防设备id列表
//
// 获取消防设备id列表
fireEquipments
=
equipmentFireEquipmentService
.
findFireEquipmentIdsByEquipmentId
(
strings
);
//
fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(strings);
}
//
}
}
else
{
//
} else {
String
[]
fireEquipIds
=
new
String
[]{
fireEquipId
};
String
[]
fireEquipIds
=
new
String
[]{
fireEquipId
};
// 获取消防设备id列表
// 获取消防设备id列表
fireEquipments
=
equipmentFireEquipmentService
.
findFireEquipmentIdsByEquipmentId
(
fireEquipIds
);
fireEquipments
=
equipmentFireEquipmentService
.
findFireEquipmentIdsByEquipmentId
(
fireEquipIds
);
}
//
}
PlanStepJsonVO
vo
=
result
.
stream
().
filter
(
x
->
x
.
getIndex
()
==
index
).
collect
(
Collectors
.
toList
()).
get
(
0
);
PlanStepJsonVO
vo
=
result
.
stream
().
filter
(
x
->
x
.
getIndex
()
==
index
).
collect
(
Collectors
.
toList
()).
get
(
0
);
List
<
ConditionVO
>
list
=
vo
.
getCondition
();
List
<
ConditionVO
>
list
=
vo
.
getCondition
();
...
@@ -223,13 +224,19 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
...
@@ -223,13 +224,19 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
planMessage
.
setStepIndex
(
vo
.
getIndex
());
planMessage
.
setStepIndex
(
vo
.
getIndex
());
return
planMessage
;
return
planMessage
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
planMessageDao
.
saveAll
(
messages
);
for
(
PlanMessage
message
:
messages
)
{
}
int
count
=
planMessageMapper
.
getPlanMessageCount
(
String
.
valueOf
(
map
.
get
(
"batchNo"
)),
index
,
message
.
getIndexCreateTime
());
if
(
pumpStepIndex
==
index
)
{
if
(
0
<
count
)
{
return
0
<
resultSize
;
continue
;
}
else
{
}
return
(
0
<
resultSize
&&
num
==
resultSize
);
planMessageDao
.
save
(
message
);
}
}
}
// if (pumpStepIndex == index) {
// return 0 < resultSize;
// } else {
return
(
0
<
resultSize
&&
num
==
resultSize
);
// }
}
else
{
}
else
{
return
false
;
return
false
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanStepServiceImpl.java
View file @
1e3b8f04
...
@@ -77,4 +77,10 @@ public class PlanStepServiceImpl implements IPlanStepService {
...
@@ -77,4 +77,10 @@ public class PlanStepServiceImpl implements IPlanStepService {
redisTemplate
.
opsForValue
().
set
(
"planStep"
,
getPlanStep
());
redisTemplate
.
opsForValue
().
set
(
"planStep"
,
getPlanStep
());
redisTemplate
.
delete
(
"isMock"
);
redisTemplate
.
delete
(
"isMock"
);
}
}
@Override
public
void
initPlanTask
()
{
redisTemplate
.
delete
(
"planTask"
);
// redisTemplate.opsForValue().set("planTask", "");
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
1e3b8f04
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyInstance.java
View file @
1e3b8f04
...
@@ -25,6 +25,8 @@ public interface IContingencyInstance {
...
@@ -25,6 +25,8 @@ public interface IContingencyInstance {
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
isAuto
,
String
token
,
String
product
,
String
appKey
,
String
startUserName
)
throws
Exception
;
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
isAuto
,
String
token
,
String
product
,
String
appKey
,
String
startUserName
)
throws
Exception
;
Optional
<
Equipment
>
clickButton
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
isAuto
,
String
token
,
String
product
,
String
appKey
,
String
startUserName
)
throws
Exception
;
/**
/**
* 扩展属性赋值
* 扩展属性赋值
* @param contingencyPlanInstance
* @param contingencyPlanInstance
...
@@ -39,4 +41,5 @@ public interface IContingencyInstance {
...
@@ -39,4 +41,5 @@ public interface IContingencyInstance {
*/
*/
ContingencyPlanInstance
getMessageById
(
String
id
);
ContingencyPlanInstance
getMessageById
(
String
id
);
String
getInstanceIdByBatchNOAndCategory
(
String
type
,
String
name
,
String
batchNo
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyPlanService.java
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanParamVo
;
import
com.yeejoin.amos.fas.business.vo.*
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanResponseVo
;
import
com.yeejoin.amos.fas.business.vo.PlanDetailVo
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.dao.entity.PlanDetail
;
import
com.yeejoin.amos.fas.dao.entity.PlanDetail
;
import
com.yeejoin.amos.fas.dao.entity.PlanOperationRecord
;
import
com.yeejoin.amos.fas.dao.entity.PlanOperationRecord
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
...
@@ -141,5 +138,9 @@ public interface IContingencyPlanService {
...
@@ -141,5 +138,9 @@ public interface IContingencyPlanService {
Map
<
String
,
Object
>
getUserOperateCountAndPlanName
(
List
<
RoleModel
>
roleModelList
);
Map
<
String
,
Object
>
getUserOperateCountAndPlanName
(
List
<
RoleModel
>
roleModelList
);
Map
<
String
,
Object
>
getUserOperateCountAndTaskName
(
List
<
String
>
list
,
Map
<
String
,
Object
>
map
);
String
getPlanBatchNo
();
String
getPlanBatchNo
();
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
batchNo
,
String
runState
,
String
updateDate
,
List
<
String
>
roleList
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IEmergencyTaskService.java
0 → 100644
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.fas.business.vo.EmergencyTaskContentVo
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelation
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelationTree
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyTaskContent
;
import
org.springframework.data.domain.Page
;
import
java.util.List
;
public
interface
IEmergencyTaskService
{
Page
<
EmergencyTaskContent
>
list
(
Long
obligationId
,
CommonPageable
pageable
);
List
<
EmergencyRelationTree
>
treeList
();
void
deleteTreeNode
(
Long
obligationId
,
Long
personId
);
void
save
(
EmergencyRelation
emergencyRelation
);
String
getRolesByUserId
(
String
userId
);
List
<
Long
>
getPersonIds
(
Long
obligationId
);
String
getRolesNameByUserId
(
String
userId
);
void
saveTask
(
String
stepCode
,
String
batchNo
);
List
<
EmergencyTaskContentVo
>
getMustTaskList
(
String
stepCode
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanStepService.java
View file @
1e3b8f04
...
@@ -27,4 +27,6 @@ public interface IPlanStepService {
...
@@ -27,4 +27,6 @@ public interface IPlanStepService {
String
getPlanStep
();
String
getPlanStep
();
void
initPlanStep
();
void
initPlanStep
();
void
initPlanTask
();
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
1e3b8f04
...
@@ -91,6 +91,8 @@ public interface IPlanVisual3dService {
...
@@ -91,6 +91,8 @@ public interface IPlanVisual3dService {
Page
<
ContingencyPlanInstanceVO
>
selectDisposalActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
Page
<
ContingencyPlanInstanceVO
>
selectDisposalActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
Page
<
ContingencyPlanInstanceVO
>
selectTaskActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
String
>
roleModelList
,
int
dataType
);
/**
/**
* 根据批次号获取预案的消息等记录
* 根据批次号获取预案的消息等记录
*
*
...
@@ -103,13 +105,24 @@ public interface IPlanVisual3dService {
...
@@ -103,13 +105,24 @@ public interface IPlanVisual3dService {
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
List
<
ContingencyPlanInstanceVO
>
selectTaskActionList
(
String
batchNo
,
List
<
String
>
roleModelList
,
int
dataType
);
List
<
ContingencyPlanInstanceVO
>
getTaskActionList
(
String
batchNo
,
int
dataType
);
/**
/**
* 极光推送消息
* 极光推送消息
*
*
* @param
button
Code
* @param
role
Code
* @param messageVO
* @param messageVO
*/
*/
void
sendMessage
(
String
buttonCode
,
MessageVO
messageVO
);
void
sendMessage
(
String
roleCode
,
MessageVO
messageVO
);
/**
* 获取用户名称
*
* @param roleCode
*/
List
<
String
>
getUserName
(
String
roleCode
);
/**
/**
...
@@ -120,6 +133,8 @@ public interface IPlanVisual3dService {
...
@@ -120,6 +133,8 @@ public interface IPlanVisual3dService {
*/
*/
boolean
updateStatusById
(
String
id
,
Boolean
runStatus
);
boolean
updateStatusById
(
String
id
,
Boolean
runStatus
);
boolean
updateTaskStatusById
(
String
id
,
Boolean
runStatus
,
String
userName
,
String
userId
,
String
roleNames
);
/**
/**
* 修改动作执行状态-web
* 修改动作执行状态-web
* @param contingencyPlanInstance
* @param contingencyPlanInstance
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/ContingencyPlanInstanceVO.java
View file @
1e3b8f04
...
@@ -12,7 +12,7 @@ public class ContingencyPlanInstanceVO {
...
@@ -12,7 +12,7 @@ public class ContingencyPlanInstanceVO {
protected
String
id
;
protected
String
id
;
private
String
recordType
;
// 记录类型:消息MESSAGE,操作OPERATE
,回复消息REPLYMESSAG
E
private
String
recordType
;
// 记录类型:消息MESSAGE,操作OPERATE
, 回复消息REPLYMESSAGE, 任务指令TASKOPERAT
E
private
String
content
;
// 记录内容:文本信息或者json数据
private
String
content
;
// 记录内容:文本信息或者json数据
...
@@ -58,6 +58,10 @@ public class ContingencyPlanInstanceVO {
...
@@ -58,6 +58,10 @@ public class ContingencyPlanInstanceVO {
private
String
updateUser
;
private
String
updateUser
;
private
String
createTime
;
private
String
updateTime
;
private
Boolean
isDelete
=
false
;
private
Boolean
isDelete
=
false
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/EmergencyRelationVo.java
0 → 100644
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
EmergencyRelationVo
{
//职责id
private
Long
obligationId
;
//人员id
private
List
<
Long
>
personIds
;
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/EmergencyTaskContentVo.java
0 → 100644
View file @
1e3b8f04
package
com
.
yeejoin
.
amos
.
fas
.
business
.
vo
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* @author keyong
* @title: EmergencyTaskContentVo
* <pre>
* @description: TODO
* </pre>
* @date 2023/6/20 14:24
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
EmergencyTaskContentVo
{
private
Long
id
;
private
String
content
;
private
String
code
;
private
Date
createDate
;
private
Integer
obligationId
;
private
String
obligationName
;
private
String
stepCode
;
private
String
roleCode
;
private
String
buttonJson
;
private
String
taskNum
;
private
boolean
isMust
=
false
;
}
YeeAmosFireAutoSysStart/pom.xml
View file @
1e3b8f04
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<parent>
<parent>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
3.7.0.
8
</version>
<version>
3.7.0.
9
</version>
</parent>
</parent>
<dependencies>
<dependencies>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<dependency>
<dependency>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysService
</artifactId>
<artifactId>
YeeAmosFireAutoSysService
</artifactId>
<version>
3.7.0.
8
</version>
<version>
3.7.0.
9
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
1e3b8f04
...
@@ -95,4 +95,4 @@ outSystem.user.password=a1234560
...
@@ -95,4 +95,4 @@ outSystem.user.password=a1234560
privilege.fegin.name
=
AMOS-API-PRIVILEGE
privilege.fegin.name
=
AMOS-API-PRIVILEGE
#\u9884\u6848\u6307\u6807\u914D\u7F6E
#\u9884\u6848\u6307\u6807\u914D\u7F6E
plan.index
=
ONL_OilDischargeDeviceOilPillowDischargeOpen,CAFS_CAFSFireGunEquipmentValveStatus,DCCP_DCCPStreamTransformerCharged,WSS_DelugeValve_Start,ONL_OilDischargeDeviceOilyPillowDischargeOpen
plan.index
=
ONL_OilDischargeDeviceOilPillowDischargeOpen,CAFS_CAFSFireGunEquipmentValveStatus,DCCP_DCCPStreamTransformerCharged,WSS_DelugeValve_Start,ONL_OilDischargeDeviceOilyPillowDischargeOpen,Running_Alarm,ONL_DrainOilValve_Open,CAFS_CompAirFoamHost_Outfire,CAFS_GunValve_Open,FHS_FirePump_Start,normal_running_state,AIRCS_Fan_Start
\ No newline at end of file
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
1e3b8f04
...
@@ -872,4 +872,86 @@
...
@@ -872,4 +872,86 @@
<changeSet
author=
"keyong"
id=
"1682647357"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"contingency_plan_instance"
columnName=
"task_sort"
/>
</not>
</preConditions>
<comment>
增加任务动作相关字段
</comment>
<sql>
ALTER TABLE `contingency_plan_instance`
ADD COLUMN `task_sort` int DEFAULT NULL AFTER `person_img`,
ADD COLUMN `step_code` varchar(20) NULL AFTER `task_sort`;
</sql>
</changeSet>
<changeSet
author=
"CZ"
id=
"202305101936"
>
<preConditions
onFail=
"MARK_RAN"
>
</preConditions>
<comment>
增加应急角色
</comment>
<sql>
REPLACE INTO `f_dict`(`id`, `dict_name`, `dict_code`, `parent_id`, `is_delete`, `dict_value`, `dict_order`, `remark`) VALUES (47, '管理人员G1', 'YJZC', 0, b'0', 'adminG1', 0, '预案角色');
REPLACE INTO `f_dict`(`id`, `dict_name`, `dict_code`, `parent_id`, `is_delete`, `dict_value`, `dict_order`, `remark`) VALUES (48, '值班长S1', 'YJZC', 0, b'0', 'dutyLeaderS1', 1, '预案角色');
REPLACE INTO `f_dict`(`id`, `dict_name`, `dict_code`, `parent_id`, `is_delete`, `dict_value`, `dict_order`, `remark`) VALUES (49, '副值班长S2', 'YJZC', 0, b'0', 'deputyDutyLeaderS2', 2, '预案角色');
REPLACE INTO `f_dict`(`id`, `dict_name`, `dict_code`, `parent_id`, `is_delete`, `dict_value`, `dict_order`, `remark`) VALUES (50, '值班员A1', 'YJZC', 0, b'0', 'dutyCivilianA1', 3, '预案角色');
REPLACE INTO `f_dict`(`id`, `dict_name`, `dict_code`, `parent_id`, `is_delete`, `dict_value`, `dict_order`, `remark`) VALUES (51, '值班员A2', 'YJZC', 0, b'0', 'dutyCivilianA2', 4, '预案角色');
REPLACE INTO `f_dict`(`id`, `dict_name`, `dict_code`, `parent_id`, `is_delete`, `dict_value`, `dict_order`, `remark`) VALUES (52, '值班员A3', 'YJZC', 0, b'0', 'dutyCivilianA3', 5, '预案角色');
REPLACE INTO `f_dict`(`id`, `dict_name`, `dict_code`, `parent_id`, `is_delete`, `dict_value`, `dict_order`, `remark`) VALUES (53, '白班B1', 'YJZC', 0, b'0', 'dayShiftB1', 6, '预案角色');
REPLACE INTO `f_dict`(`id`, `dict_name`, `dict_code`, `parent_id`, `is_delete`, `dict_value`, `dict_order`, `remark`) VALUES (54, '白班B2', 'YJZC', 0, b'0', 'nightShiftB2', 7, '预案角色');
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"20230510-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"c_emergency_relation"
/>
</not>
</preConditions>
<comment>
create table c_emergency_relation
</comment>
<sql>
CREATE TABLE `c_emergency_relation` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
`obligationId` bigint DEFAULT NULL COMMENT '职责id\r\n',
`person_id` bigint DEFAULT NULL COMMENT '人员id',
`amos_id` bigint DEFAULT NULL COMMENT '平台人员id',
`person_name` varchar(255) DEFAULT NULL COMMENT '人员名称',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=85 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"20230510-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<tableExists
tableName=
"c_emergency_task_content"
/>
</not>
</preConditions>
<comment>
create table c_emergency_task_content
</comment>
<sql>
CREATE TABLE `c_emergency_task_content` (
`id` bigint NOT NULL AUTO_INCREMENT,
`content` varchar(1000) DEFAULT NULL COMMENT '分工内容\r\n',
`code` varchar(255) DEFAULT NULL COMMENT '编码',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`obligation_id` bigint DEFAULT NULL COMMENT '职责id',
`obligation_name` varchar(255) DEFAULT NULL COMMENT '职责名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1682647357-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"contingency_plan_instance"
columnName=
"category"
/>
</not>
</preConditions>
<comment>
修改contingency_plan_instance表结构
</comment>
<sql>
ALTER TABLE `contingency_plan_instance` MODIFY COLUMN `category` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一级分类' AFTER `record_type`;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-sql-task.xml
View file @
1e3b8f04
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
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=
"suhg"
id=
"1561454393001-
1
"
runAlways=
"true"
>
<changeSet
author=
"suhg"
id=
"1561454393001-
2
"
runAlways=
"true"
>
<comment>
update f_fmea_equipment_point 更新触发器创建
</comment>
<comment>
update f_fmea_equipment_point 更新触发器创建
</comment>
<sql
endDelimiter=
"#"
>
<sql
endDelimiter=
"#"
>
DROP TRIGGER IF EXISTS `trigger_fmea_equipment_point_update`
;
DROP TRIGGER IF EXISTS `trigger_fmea_equipment_point_update`
#
CREATE TRIGGER trigger_fmea_equipment_point_update AFTER UPDATE on f_fmea_equipment_point FOR EACH ROW
CREATE TRIGGER trigger_fmea_equipment_point_update AFTER UPDATE on f_fmea_equipment_point FOR EACH ROW
BEGIN
BEGIN
DECLARE riskSourceId BIGINT (20);
DECLARE riskSourceId BIGINT (20);
...
@@ -56,10 +56,10 @@
...
@@ -56,10 +56,10 @@
<!-- END#-->
<!-- END#-->
<!-- </sql>-->
<!-- </sql>-->
<!-- </changeSet>-->
<!-- </changeSet>-->
<changeSet
author=
"shanqiyun"
id=
"1588901126339-
1
"
runAlways=
"true"
>
<changeSet
author=
"shanqiyun"
id=
"1588901126339-
2
"
runAlways=
"true"
>
<comment>
f_risk_source 查询所有子节点id
</comment>
<comment>
f_risk_source 查询所有子节点id
</comment>
<sql
endDelimiter=
"#"
>
<sql
endDelimiter=
"#"
>
DROP FUNCTION IF EXISTS queryRiskSourceChildrenIds
;
DROP FUNCTION IF EXISTS queryRiskSourceChildrenIds
#
CREATE FUNCTION queryRiskSourceChildrenIds(id INT)
CREATE FUNCTION queryRiskSourceChildrenIds(id INT)
RETURNS VARCHAR(4000)
RETURNS VARCHAR(4000)
BEGIN
BEGIN
...
@@ -78,10 +78,10 @@
...
@@ -78,10 +78,10 @@
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"maoying"
id=
"1589954524001-
1
"
runAlways=
"true"
>
<changeSet
author=
"maoying"
id=
"1589954524001-
2
"
runAlways=
"true"
>
<comment>
updatePointConfig 触发器创建
</comment>
<comment>
updatePointConfig 触发器创建
</comment>
<sql
endDelimiter=
"#"
>
<sql
endDelimiter=
"#"
>
DROP TRIGGER IF EXISTS `updatePointConfig`
;
DROP TRIGGER IF EXISTS `updatePointConfig`
#
CREATE TRIGGER `updatePointConfig` AFTER UPDATE ON `p_point` FOR EACH ROW
CREATE TRIGGER `updatePointConfig` AFTER UPDATE ON `p_point` FOR EACH ROW
BEGIN
BEGIN
IF (new.name != old.name)
IF (new.name != old.name)
...
@@ -92,10 +92,10 @@
...
@@ -92,10 +92,10 @@
END#
END#
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"shanqiyun"
id=
"1597831211781-
1
"
runAlways=
"true"
>
<changeSet
author=
"shanqiyun"
id=
"1597831211781-
2
"
runAlways=
"true"
>
<comment>
create view toip_biz_message
</comment>
<comment>
create view toip_biz_message
</comment>
<sql>
<sql
endDelimiter=
"#"
>
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`.`id` AS `originId`,
`m`.`id` AS `originId`,
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
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>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyInstanceInfoMapper.xml
View file @
1e3b8f04
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyPlanInstanceMapper.xml
View file @
1e3b8f04
...
@@ -12,6 +12,32 @@
...
@@ -12,6 +12,32 @@
</if>
</if>
where id = #{id}
where id = #{id}
</update>
</update>
<update
id=
"updateTaskStatusById"
>
UPDATE
contingency_plan_instance
SET
runstate = ${runStatus}
<if
test=
"content != null and content != ''"
>
, content = #{content}
</if>
<if
test=
"userName != null and userName != ''"
>
, start_user_name = #{userName}
</if>
<if
test=
"userId != null and userId != ''"
>
, start_user_id = #{userId}
</if>
<if
test=
"personImg != null and personImg != ''"
>
, person_img = #{personImg}
</if>
<if
test=
"fileType != null and fileType != ''"
>
, file_type = #{fileType}
</if>
<if
test=
"roleNames != null and roleNames != ''"
>
, role_name = #{roleNames}
</if>
where id = #{id}
</update>
<update
id=
"updateMessageById"
>
<update
id=
"updateMessageById"
>
UPDATE `contingency_plan_instance`
UPDATE `contingency_plan_instance`
SET
SET
...
@@ -408,4 +434,39 @@
...
@@ -408,4 +434,39 @@
AND content = #{content}
AND content = #{content}
</if>
</if>
</select>
</select>
<select
id=
"getInstanceIdByBatchNOAndCategory"
resultType=
"String"
>
select
id
from
contingency_plan_instance
where
is_delete = 0
<if
test=
"category!=null and category!=''"
>
AND category = #{category}
</if>
<if
test=
"recordType!=null and recordType!=''"
>
AND record_type = #{recordType}
</if>
<if
test=
"batchNo!=null and batchNo!=''"
>
AND batch_no = #{batchNo}
</if>
limit 1
</select>
<select
id=
"getPlanInstanceByRunState"
resultType=
"Integer"
>
SELECT
COUNT(1)
FROM
contingency_plan_instance
<where>
runstate IS NULL AND record_type = 'TASKOPERATE'
<if
test=
"stepCode != null and stepCode != ''"
>
AND step_code = #{stepCode}
</if>
<if
test=
"batchNo != null and batchNo != ''"
>
AND batch_no = #{batchNo}
</if>
</where>
</select>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanMessage.xml
View file @
1e3b8f04
...
@@ -24,4 +24,21 @@
...
@@ -24,4 +24,21 @@
ORDER BY
ORDER BY
m.index_create_time DESC
m.index_create_time DESC
</select>
</select>
<select
id=
"getPlanMessageCount"
resultType=
"int"
>
SELECT
count(m.id)
FROM
c_plan_message m
where
<if
test=
"batchNo != null and batchNo != ''"
>
m.batch_no = #{batchNo}
</if>
<if
test=
"stepIndex != null"
>
AND m.step_index = ${stepIndex}
</if>
<if
test=
"indexUpdateTime != null"
>
AND m.index_create_time = #{indexUpdateTime}
</if>
</select>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanOperationRecordMapper.xml
View file @
1e3b8f04
...
@@ -140,4 +140,14 @@
...
@@ -140,4 +140,14 @@
<select
id=
"getLastPlanPattern"
resultType=
"java.lang.Integer"
>
<select
id=
"getLastPlanPattern"
resultType=
"java.lang.Integer"
>
select plan_pattern as planPattern from c_plan_operation_record where is_delete = 0 order by create_date desc limit 1
select plan_pattern as planPattern from c_plan_operation_record where is_delete = 0 order by create_date desc limit 1
</select>
</select>
<select
id=
"getArraysUserIds"
resultType=
"java.lang.String"
>
SELECT amos_id from c_emergency_relation cer where obligationId in (
select id from f_dict fd where dict_value = #{roleCode}
)
</select>
<select
id=
"getArraysUserName"
resultType=
"java.lang.String"
>
SELECT person_name from c_emergency_relation cer where obligationId in (
select id from f_dict fd where dict_value = #{roleCode}
)
</select>
</mapper>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_emergency_task.xml
0 → 100644
View file @
1e3b8f04
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.EmergencyTaskMapper"
>
<select
id=
"getEmergencyTaskList"
resultType=
"com.yeejoin.amos.fas.dao.entity.EmergencyTaskContent"
>
SELECT
id,
content,
code,
obligation_name as obligationName
FROM
c_emergency_task_content
<where>
<if
test=
"obligationId != null "
>
obligation_id = #{obligationId}
</if>
</where>
LIMIT #{offset}, #{pageSize}
</select>
<select
id=
"getEmergencyTaskCount"
resultType=
"int"
>
SELECT
count(1)
FROM
c_emergency_task_content
<where>
<if
test=
"_parameter != null "
>
obligation_id = #{obligationId}
</if>
</where>
</select>
<select
id=
"treeList"
resultType=
"com.yeejoin.amos.fas.dao.entity.EmergencyRelationTree"
>
SELECT
cer.person_id as id,
cer.person_id as sequenceNbr,
cer.person_name as name,
cer.obligationId as obligationId,
'1' as type
FROM
c_emergency_relation cer
</select>
<select
id=
"roleCodes"
resultType=
"string"
>
SELECT
f.dict_value
FROM
c_emergency_relation cer LEFT JOIN f_dict f ON cer.obligationId = f.id
<where>
<if
test=
"_parameter != null "
>
cer.amos_id = #{amosOrgId}
</if>
</where>
</select>
<select
id=
"roleNames"
resultType=
"string"
>
SELECT
f.dict_name AS dictName
FROM
c_emergency_relation cer LEFT JOIN f_dict f ON cer.obligationId = f.id
<where>
<if
test=
"_parameter != null "
>
cer.amos_id = #{amosOrgId}
</if>
</where>
</select>
<select
id=
"getPersonIds"
resultType=
"long"
>
SELECT
cer.person_id AS persons
FROM
c_emergency_relation cer
<where>
<if
test=
"_parameter != null "
>
cer.obligationId = #{obligationId}
</if>
</where>
</select>
<delete
id=
"deleteTreeNode"
>
delete from c_emergency_relation cer
<where>
<if
test=
"obligationId != null "
>
cer.obligationId = #{obligationId}
</if>
<if
test=
"personId != null "
>
and cer.person_id = #{personId}
</if>
</where>
</delete>
<insert
id=
"save"
parameterType=
"com.yeejoin.amos.fas.dao.entity.EmergencyRelation"
>
INSERT INTO `c_emergency_relation`(id, `obligationId`, `person_id`, `amos_id`, `person_name`, `create_date`)
VALUES (#{id}, #{obligationId}, #{personId}, #{amosOrgId}, #{personName},#{createDate});
</insert>
<select
id=
"getContentList"
resultType=
"com.yeejoin.amos.fas.business.vo.EmergencyTaskContentVo"
>
SELECT
*
FROM
c_emergency_task_content
<where>
<if
test=
"stepCode != null and stepCode != '' and stepCode != '-2'"
>
step_code = #{stepCode}
</if>
<if
test=
"stepCode != null and stepCode != '' and stepCode == '-2'"
>
step_code = -1
</if>
</where>
</select>
<select
id=
"getMustTaskList"
resultType=
"com.yeejoin.amos.fas.business.vo.EmergencyTaskContentVo"
>
SELECT
*
FROM
c_emergency_task_content
<where>
is_must = true
<if
test=
"stepCode != null and stepCode != ''"
>
and step_code = #{stepCode}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_equipment_specific_index.xml
View file @
1e3b8f04
...
@@ -143,14 +143,14 @@
...
@@ -143,14 +143,14 @@
<when
test =
"outAndOr != null and outAndOr != '' and outAndOr == 'and'"
>
<when
test =
"outAndOr != null and outAndOr != '' and outAndOr == 'and'"
>
<if
test=
"list != null and list.size() > 0"
>
<if
test=
"list != null and list.size() > 0"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
"and"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
"and"
>
esi.equipment_index_key = #{item.equipSpeIndexKey} and es.equipment_code = #{item.equipCode}
and esi.`value` = #{item.standardValue}
esi.equipment_index_key = #{item.equipSpeIndexKey} and es.equipment_code = #{item.equipCode}
</foreach>
</foreach>
</if>
</if>
</when>
</when>
<otherwise>
<otherwise>
<if
test=
"list != null and list.size() > 0"
>
<if
test=
"list != null and list.size() > 0"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
"or"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
"or"
>
esi.equipment_index_key = #{item.equipSpeIndexKey} and es.equipment_code = #{item.equipCode}
and esi.`value` = #{item.standardValue}
esi.equipment_index_key = #{item.equipSpeIndexKey} and es.equipment_code = #{item.equipCode}
</foreach>
</foreach>
</if>
</if>
</otherwise>
</otherwise>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_fire_equip.xml
View file @
1e3b8f04
...
@@ -175,11 +175,14 @@
...
@@ -175,11 +175,14 @@
efe.fire_equipment_id = ind.equipment_specific_id
efe.fire_equipment_id = ind.equipment_specific_id
) equipmentName,
) equipmentName,
ind.update_date as create_date,
ind.update_date as create_date,
ifnull(fs.`name`,'') AS systemName
( SELECT
IFNULL(GROUP_CONCAT( temp.name SEPARATOR ','),'') AS systemName
FROM
( SELECT NAME FROM f_fire_fighting_system fs WHERE FIND_IN_SET( fs.id, spe.system_id ) ) temp
) AS systemName
FROM
FROM
wl_equipment_specific_index as ind
wl_equipment_specific_index as ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET( fs.id, spe.system_id )
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment_index as ein on ind.equipment_index_id = ein.id
left join wl_equipment_index as ein on ind.equipment_index_id = ein.id
left join wl_stock_detail as sto on sto.equipment_specific_id = spe.id
left join wl_stock_detail as sto on sto.equipment_specific_id = spe.id
...
...
YeeAmosFireAutoSysStart/src/main/resources/json/plan-setp-qiantangjiang.json
0 → 100644
View file @
1e3b8f04
[
{
"stepCode"
:
"0"
,
"stepName"
:
"检查确认火情"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_CONFIRM"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
0
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"1"
,
"stepName"
:
"检查相应阀组是否停用、交流进线开关是否已跳开"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_COMMUTATION"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
1
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"2"
,
"stepName"
:
"向各级领导、调度汇报火情"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"LEADER_REPORT_FIRE"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
2
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"3"
,
"stepName"
:
"申请主控站转移、停用本级对端换流器"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_LOCAL_END_TRANSVERTER"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
3
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"4"
,
"stepName"
:
"通知专职消防队、值班领导或驻站检修负责人及保安人员"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"NOTICE_STATION_ALL_PERSON"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
4
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"5"
,
"stepName"
:
"拨打119火警电话、全站广播通报火情"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"CALL_PHONE"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
5
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"6"
,
"stepName"
:
"起火换流变转检修"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_TRANSVERTER_TO_OVERHAUL"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
6
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"7"
,
"stepName"
:
"驻站消防队开始灭火"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRETEAM_START_OUTFIRE"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
7
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"8"
,
"stepName"
:
"调整工业视频监视工业水池、现场火势情况"
,
"stepStatus"
:
"1"
,
"buttonCode"
:
"ADJUST_VIDEO_TO_POOL"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
8
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"9"
,
"stepName"
:
"CAFS喷淋系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OPEN_WATERSYSTEM"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
9
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"雨淋阀"
,
"equipCode"
:
"92130300BH644"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"WSS_DelugeValve_Start"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"10"
,
"stepName"
:
"开启换流变挑檐炮"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"MONITOR_START"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
10
,
"condition"
:
[
{
"equipName"
:
"CAFS消防炮"
,
"equipCode"
:
"92032200BUX44"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"CAFS_GunValve_Open"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"11"
,
"stepName"
:
"停运阀冷系统、阀厅空调系统"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_VALVE_COOL_SYS"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
11
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"AIRCS-风机"
,
"equipCode"
:
"92230600UH244"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"AIRCS_Fan_Start"
,
"standardValue"
:
"false"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"12"
,
"stepName"
:
"断开交直流电源"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OFF_POWER"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
12
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"13"
,
"stepName"
:
"启动着火换流变排油装置"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"DRAIN_OIL_CONFIRM"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
13
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"排油阀"
,
"equipCode"
:
"92102700EBA44"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"ONL_OilDischargeDeviceOilPillowDischargeOpen"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"14"
,
"stepName"
:
"对阀侧套管、阀厅进行降温"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"COOL_SYS_COOL_DOWN"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
14
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"15"
,
"stepName"
:
"驻站消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_COMMAND"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
15
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"16"
,
"stepName"
:
"确认明火扑灭"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_EXTINCT"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
16
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"17"
,
"stepName"
:
"确认无复燃情况"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"CONFIRM_REKINDLE"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
17
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"18"
,
"stepName"
:
"向各级领导、调度、指挥中心汇报已灭火"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"LEADER_REPORT_FIRE_EXTINCT"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
18
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"19"
,
"stepName"
:
"应急处置结束"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"END_EMERGENCY"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
19
,
"checkYesOrNo"
:
""
}
]
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/json/plan-step-poyanghu.json
View file @
1e3b8f04
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
},
},
{
{
"stepCode"
:
"15"
,
"stepCode"
:
"15"
,
"stepName"
:
"全站广播通报火情"
,
"stepName"
:
"全站广播通报火情
、通知驻站消防队
"
,
"stepStatus"
:
"0"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"ALL_STATION_PA"
,
"buttonCode"
:
"ALL_STATION_PA"
,
"isParallel"
:
"1"
,
"isParallel"
:
"1"
,
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
},
},
{
{
"stepCode"
:
"16"
,
"stepCode"
:
"16"
,
"stepName"
:
"停运起火换流器"
,
"stepName"
:
"停运起火换流器
、驻站消防队开始灭火
"
,
"stepStatus"
:
"0"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_FIRE_TRANSVERTER"
,
"buttonCode"
:
"STOP_FIRE_TRANSVERTER"
,
"isParallel"
:
"0"
,
"isParallel"
:
"0"
,
...
...
YeeAmosFireAutoSysStart/src/main/resources/json/plan-step-shaoxing.json
0 → 100644
View file @
1e3b8f04
[
{
"stepCode"
:
"0"
,
"stepName"
:
"检查确认火情"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_CONFIRM"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
0
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"1"
,
"stepName"
:
"检查相应阀组是否停用、交流进线开关是否已跳开"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_COMMUTATION"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
1
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"2"
,
"stepName"
:
"向各级领导、调度汇报火情"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"LEADER_REPORT_FIRE"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
2
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"3"
,
"stepName"
:
"申请主控站转移、停用本级对端换流器"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_LOCAL_END_TRANSVERTER"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
3
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"4"
,
"stepName"
:
"通知专职消防队、值班领导或驻站检修负责人及保安人员"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"NOTICE_STATION_ALL_PERSON"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
4
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"5"
,
"stepName"
:
"拨打119火警电话、全站广播通报火情"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"CALL_PHONE"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
5
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"6"
,
"stepName"
:
"起火换流变转检修"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_TRANSVERTER_TO_OVERHAUL"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
6
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"7"
,
"stepName"
:
"驻站消防队开始灭火"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRETEAM_START_OUTFIRE"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
7
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"8"
,
"stepName"
:
"调整工业视频监视工业水池、现场火势情况"
,
"stepStatus"
:
"1"
,
"buttonCode"
:
"ADJUST_VIDEO_TO_POOL"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
8
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"9"
,
"stepName"
:
"水喷雾系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OPEN_WATERSYSTEM"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
9
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"雨淋阀"
,
"equipCode"
:
"92130300BH644"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"WSS_DelugeValve_Start"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"10"
,
"stepName"
:
"开启换流变挑檐炮、广场涡扇炮"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"MONITOR_START"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
10
,
"condition"
:
[
{
"equipName"
:
"CAFS消防炮"
,
"equipCode"
:
"92032200BUX44"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"CAFS_GunValve_Open"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"11"
,
"stepName"
:
"停运阀冷系统、阀厅空调系统"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_VALVE_COOL_SYS"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
11
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"AIRCS-风机"
,
"equipCode"
:
"92230600UH244"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"AIRCS_Fan_Start"
,
"standardValue"
:
"false"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"12"
,
"stepName"
:
"断开交直流电源"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OFF_POWER"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
12
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"13"
,
"stepName"
:
"启动着火换流变排油装置"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"DRAIN_OIL_CONFIRM"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
13
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"排油阀"
,
"equipCode"
:
"92102700EBA44"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"ONL_OilDischargeDeviceOilPillowDischargeOpen"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"14"
,
"stepName"
:
"对阀侧套管、阀厅进行降温"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"COOL_SYS_COOL_DOWN"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
14
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"15"
,
"stepName"
:
"驻站消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_COMMAND"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
15
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"16"
,
"stepName"
:
"确认明火扑灭"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_EXTINCT"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
16
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"17"
,
"stepName"
:
"确认无复燃情况"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"CONFIRM_REKINDLE"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
17
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"18"
,
"stepName"
:
"向各级领导、调度、指挥中心汇报已灭火"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"LEADER_REPORT_FIRE_EXTINCT"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
18
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"19"
,
"stepName"
:
"应急处置结束"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"END_EMERGENCY"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
19
,
"checkYesOrNo"
:
""
}
]
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/json/plan-step-yinan-yingji1.0.json
0 → 100644
View file @
1e3b8f04
[
{
"stepCode"
:
"0"
,
"stepName"
:
"确认灾情"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_CONFIRM"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
0
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"1"
,
"stepName"
:
"停运换流阀"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_COMMUTATION"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
1
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"换流器"
,
"equipCode"
:
"92261200S7944"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"DCCP_DCCPStreamTransformerCharged"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"2"
,
"stepName"
:
"拨打报警电话"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"CALL_PHONE"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
2
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"3"
,
"stepName"
:
"确认油枕排油系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"DRAIN_OIL_CONFIRM"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
3
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"排油阀"
,
"equipCode"
:
"92102700EBA44"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"ONL_OilDischargeDeviceOilPillowDischargeOpen"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"4"
,
"stepName"
:
"确认水喷雾系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OPEN_WATERSYSTEM"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
4
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"雨淋阀"
,
"equipCode"
:
"92130300BH644"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"WSS_DelugeValve_Start"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"5"
,
"stepName"
:
"断开上级电源"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OFF_POWER"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
5
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"6"
,
"stepName"
:
"停运阀厅空调系统"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_AIRCON"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
6
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"7"
,
"stepName"
:
"一键开启消防炮"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"MONITOR_START"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
7
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"消防炮阀"
,
"equipCode"
:
"92032200BUX44"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"CAFS_CAFSFireGunEquipmentValveStatus"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"8"
,
"stepName"
:
"驻站消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_COMMAND"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
8
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"9"
,
"stepName"
:
"确认本体排油已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OWNER_DRAIN_OIL"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
9
,
"checkYesOrNo"
:
""
,
"condition"
:
[
{
"equipName"
:
"排油阀"
,
"equipCode"
:
"92102700EBA44"
,
"equipSpeName"
:
""
,
"equipSpeCode"
:
""
,
"equipSpeIndexKey"
:
"ONL_OilDischargeDeviceOilyPillowDischargeOpen"
,
"standardValue"
:
"true"
,
"inAndOr"
:
"and"
}
],
"outAndOr"
:
"and"
,
"isAuto"
:
0
},
{
"stepCode"
:
"10"
,
"stepName"
:
"启动阀厅应急预案"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"START_VALVE_HALL_CONTINGENCY"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
10
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"11"
,
"stepName"
:
"电缆沟封堵"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"PLUG_CABLETRENCH"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
11
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"12"
,
"stepName"
:
"政府消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_FIGTHHING"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
12
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"13"
,
"stepName"
:
"确认明火扑灭"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_EXTINCT"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
13
,
"checkYesOrNo"
:
""
},
{
"stepCode"
:
"14"
,
"stepName"
:
"应急处置结束"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"END_EMERGENCY"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
14
,
"checkYesOrNo"
:
""
}
]
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/json/plan-step.json
View file @
1e3b8f04
This diff is collapsed.
Click to expand it.
pom.xml
View file @
1e3b8f04
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
3.7.0.
8
</version>
<version>
3.7.0.
9
</version>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<name>
YeeAmosFireAutoSysRoot
</name>
<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