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
d9709b94
Commit
d9709b94
authored
Jan 08, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:扩展应急预案流程索引index
parent
6180e459
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
334 additions
and
137 deletions
+334
-137
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+5
-9
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+4
-34
PlanStepServiceImpl.java
...n/amos/fas/business/service/impl/PlanStepServiceImpl.java
+105
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+16
-26
IContingencyInstance.java
...amos/fas/business/service/intfc/IContingencyInstance.java
+0
-9
IPlanStepService.java
...oin/amos/fas/business/service/intfc/IPlanStepService.java
+28
-0
PlanStepJsonVO.java
...java/com/yeejoin/amos/fas/business/vo/PlanStepJsonVO.java
+5
-0
plan-step-yinan.json
...AutoSysStart/src/main/resources/json/plan-step-yinan.json
+123
-0
plan-step.json
...osFireAutoSysStart/src/main/resources/json/plan-step.json
+48
-59
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
d9709b94
...
...
@@ -15,7 +15,6 @@ import com.yeejoin.amos.fas.business.action.result.ActionResult;
import
com.yeejoin.amos.fas.business.action.result.SafteyPlanResult
;
import
com.yeejoin.amos.fas.business.action.result.message.AbstractActionResultMessage
;
import
com.yeejoin.amos.fas.business.action.util.ContingencyLogPublisher
;
import
com.yeejoin.amos.fas.business.dao.mapper.ContingencyPlanInstanceMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanDetailMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.IContingencyPlanInstanceRepository
;
...
...
@@ -124,19 +123,16 @@ public class ContingencyAction implements CustomerAction {
private
PlanDetailMapper
planDetailMapper
;
@Autowired
private
IPlanRuleService
planRuleService
;
@Autowired
private
IPlanVisual3dService
planVisual3dService
;
@Autowired
private
ContingencyInstanceInfoService
contingencyInstanceInfoService
;
@Autowired
private
ContingencyPlanInstanceMapper
contingencyPlanInstanceMapper
;
private
IContingencyPlanInstanceRepository
contingencyPlanInstanceRepository
;
@Autowired
private
I
ContingencyPlanInstanceRepository
contingencyPlanInstanceRepository
;
private
I
PlanStepService
planStepService
;
@Value
(
"${rocket-plan-topic}"
)
private
String
rocketTopic
;
...
...
@@ -441,7 +437,7 @@ public class ContingencyAction implements CustomerAction {
if
(
StringUtils
.
isBlank
(
buttonCode
))
{
// 根据步骤,取按钮编码
List
<
PlanStepJsonVO
>
planStepJsonVOList
=
iContingencyInstan
ce
.
getPlanStepJsonVOS
();
List
<
PlanStepJsonVO
>
planStepJsonVOList
=
planStepServi
ce
.
getPlanStepJsonVOS
();
List
<
PlanStepJsonVO
>
collect
=
planStepJsonVOList
.
stream
().
filter
(
x
->
x
.
getStepCode
().
equals
(
stepCode
)).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
buttonCode
=
collect
.
get
(
0
).
getButtonCode
();
...
...
@@ -863,9 +859,9 @@ public class ContingencyAction implements CustomerAction {
try
{
// ContingencyPlanInstance instance = contingencyInstance.getMessageById(contingencyPlanId);
// if (contingencyPlanInstance != null) {
contingencyPlanInstance
.
setRoleCode
(
contingencyInstan
ce
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
));
contingencyPlanInstance
.
setRoleCode
(
planStepServi
ce
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
));
// contingencyPlanInstanceMapper.updateMessageById(contingencyPlanInstance);
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
// }
contingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
"true"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
}
catch
(
Exception
e
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
d9709b94
...
...
@@ -28,7 +28,6 @@ import com.yeejoin.amos.fas.datasync.bo.ContingencyOriginalDataSyncBo;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.codehaus.jackson.map.ObjectMapper
;
...
...
@@ -37,7 +36,6 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
...
...
@@ -45,10 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContextEntityType
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -99,9 +94,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
private
ContingencyOriginalMapper
contingencyOriginalMapper
;
@Autowired
private
IPlanRuleService
planRuleService
;
@Autowired
private
ContingencyInstanceInfoService
contingencyInstanceInfoService
;
@Autowired
...
...
@@ -116,8 +108,8 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
@Autowired
private
IPlanVisual3dService
planVisual3dService
;
@
Value
(
"classpath:/json/plan-step.json"
)
private
Resource
planStepResour
ce
;
@
Autowired
private
IPlanStepService
planStepServi
ce
;
private
static
Map
<
String
,
String
>
stepMap
=
new
HashMap
<>();
...
...
@@ -489,7 +481,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
if
(
"OPERATE"
.
equals
(
recordType
))
{
ButtonJsonVO
buttonJsonVO
=
JSONObject
.
parseObject
(
contingencyPlanInstance
.
getContent
(),
ButtonJsonVO
.
class
);
Map
<
String
,
Object
>
map
=
buttonJsonVO
.
getOperate
().
get
(
buttonJsonVO
.
getOperate
().
size
()
-
1
);
contingencyPlanInstance
.
setRoleCode
(
getPlanStepRoleCodeByButtonCode
(
map
.
get
(
"code"
).
toString
()));
contingencyPlanInstance
.
setRoleCode
(
planStepService
.
getPlanStepRoleCodeByButtonCode
(
map
.
get
(
"code"
).
toString
()));
}
else
{
String
appKey
=
redisTemplate
.
opsForValue
().
get
(
"action:appKey"
).
toString
();
String
product
=
redisTemplate
.
opsForValue
().
get
(
"action:product"
).
toString
();
...
...
@@ -509,7 +501,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
FeignClientResult
<
AgencyUserModel
>
feignClientResult
=
Privilege
.
agencyUserClient
.
getme
();
AgencyUserModel
user
=
(
AgencyUserModel
)
feignClientResult
.
getResult
();
List
<
PlanStepJsonVO
>
result
=
getPlanStepJsonVOS
();
List
<
PlanStepJsonVO
>
result
=
planStepService
.
getPlanStepJsonVOS
();
List
<
String
>
roleCode
=
result
.
stream
().
map
(
PlanStepJsonVO:
:
getRoleCode
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
RoleModel
>
roleModelList
=
new
ArrayList
<>();
...
...
@@ -544,17 +536,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
return
contingencyPlanInstance
;
}
public
List
<
PlanStepJsonVO
>
getPlanStepJsonVOS
()
{
String
json
=
""
;
try
{
json
=
IOUtils
.
toString
(
planStepResource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"获取预案相关角色信息失败!"
);
}
List
<
PlanStepJsonVO
>
result
=
JSONObject
.
parseArray
(
json
,
PlanStepJsonVO
.
class
);
return
result
;
}
private
void
sendPlanAlarm
(
String
batchNo
,
String
buttonCode
)
{
//确警后推送报警数据
List
<
FirePlanAlarmBo
>
list
=
new
ArrayList
<
FirePlanAlarmBo
>();
...
...
@@ -618,15 +599,4 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
return
contingencyPlanInstanceMapper
.
getMessageById
(
id
);
}
@Override
public
String
getPlanStepRoleCodeByButtonCode
(
String
buttonCode
)
{
if
(
StringUtils
.
isNotBlank
(
buttonCode
))
{
List
<
PlanStepJsonVO
>
result
=
getPlanStepJsonVOS
();
List
<
PlanStepJsonVO
>
collect
=
result
.
stream
().
filter
(
x
->
buttonCode
.
equalsIgnoreCase
(
x
.
getButtonCode
())).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
return
collect
.
get
(
0
).
getRoleCode
();
}
}
return
null
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanStepServiceImpl.java
0 → 100644
View file @
d9709b94
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.rule.RuleTrigger
;
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.ContingencyRo
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.action.util.ContingencyLogPublisher
;
import
com.yeejoin.amos.fas.business.bo.FirePlanAlarmBo
;
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.IContingencyPlanInstanceRepository
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
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.OperateGroup
;
import
com.yeejoin.amos.fas.business.util.DateUtils
;
import
com.yeejoin.amos.fas.business.vo.ButtonJsonVO
;
import
com.yeejoin.amos.fas.business.vo.PlanStepJsonVO
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.common.enums.PlanReplyMessageEnum
;
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.datasync.bo.ContingencyOriginalDataSyncBo
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
PlanStepServiceImpl
implements
IPlanStepService
{
@Value
(
"classpath:/json/plan-step.json"
)
private
Resource
planStepResource
;
@Override
public
String
getPlanStepRoleCodeByButtonCode
(
String
buttonCode
)
{
if
(
StringUtils
.
isNotBlank
(
buttonCode
))
{
List
<
PlanStepJsonVO
>
result
=
getPlanStepJsonVOS
();
List
<
PlanStepJsonVO
>
collect
=
result
.
stream
().
filter
(
x
->
buttonCode
.
equalsIgnoreCase
(
x
.
getButtonCode
())).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
return
collect
.
get
(
0
).
getRoleCode
();
}
}
return
null
;
}
@Override
public
int
getPlanStepIndexByStepCode
(
String
stepCode
)
{
if
(
StringUtils
.
isNotBlank
(
stepCode
))
{
List
<
PlanStepJsonVO
>
result
=
getPlanStepJsonVOS
();
List
<
PlanStepJsonVO
>
collect
=
result
.
stream
().
filter
(
x
->
stepCode
.
equalsIgnoreCase
(
x
.
getStepCode
())).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
return
collect
.
get
(
0
).
getIndex
();
}
}
return
-
1
;
}
@Override
public
List
<
PlanStepJsonVO
>
getPlanStepJsonVOS
()
{
String
json
=
""
;
try
{
json
=
IOUtils
.
toString
(
planStepResource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"获取预案相关角色信息失败!"
);
}
List
<
PlanStepJsonVO
>
result
=
JSONObject
.
parseArray
(
json
,
PlanStepJsonVO
.
class
);
return
result
;
}
@Override
public
String
getPlanStep
()
{
try
{
return
IOUtils
.
toString
(
planStepResource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"获取预案初始化planStep信息失败!"
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
d9709b94
...
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.fas.business.feign.IMaasVisualServer;
import
com.yeejoin.amos.fas.business.feign.PrivilegeFeign
;
import
com.yeejoin.amos.fas.business.feign.RemoteSecurityService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanStepService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.util.JSONUtil
;
...
...
@@ -91,8 +92,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Autowired
private
WebMqttComponent
webMqttComponent
;
@
Value
(
"classpath:/json/plan-step.json"
)
private
Resource
planStepResour
ce
;
@
Autowired
private
IPlanStepService
planStepServi
ce
;
@Autowired
private
IContingencyPlanInstanceRepository
repository
;
...
...
@@ -112,7 +113,6 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Value
(
"${plan.instance.personImg}"
)
private
String
personImg
;
...
...
@@ -321,7 +321,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
ToipResponse
toipResponse
=
new
ToipResponse
();
// 根据批次号查询预案步骤
// String planStep = planOperationRecordMapper.getPlanStepByBatchNo(batchNo);
String
planStep
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planStep"
)).
toString
();
String
planStep
=
""
;
if
(
redisTemplate
.
hasKey
(
"planStep"
))
{
planStep
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planStep"
)).
toString
();
}
else
{
planStep
=
planStepService
.
getPlanStep
();
}
JSONArray
objects
=
JSON
.
parseArray
(
planStep
);
Map
<
String
,
Object
>
msgContext
=
new
HashMap
<>(
2
);
if
(
StringUtil
.
isNotEmpty
(
planStep
)
&&
StringUtils
.
isNotBlank
(
batchNo
))
{
...
...
@@ -392,12 +397,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Override
public
void
initPlanStep
()
{
try
{
redisTemplate
.
opsForValue
().
set
(
"planStep"
,
IOUtils
.
toString
(
planStepResource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
)));
redisTemplate
.
delete
(
"isMock"
);
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"预案redis初始化planStep信息失败!"
);
}
redisTemplate
.
opsForValue
().
set
(
"planStep"
,
planStepService
.
getPlanStep
());
redisTemplate
.
delete
(
"isMock"
);
}
@Override
...
...
@@ -454,7 +455,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
List
<
PlanStepJsonVO
>
collect
=
list
.
stream
().
peek
(
x
->
{
if
(
"true"
.
equals
(
isExecute
))
{
// 更新进度条标志位
if
(
StringUtils
.
isBlank
(
x
.
getTime
())
&&
Integer
.
parseInt
(
x
.
getStepCode
())
<=
Integer
.
parseInt
(
stepCode
))
{
// 根据stepCode查找对应的索引index
int
index
=
planStepService
.
getPlanStepIndexByStepCode
(
stepCode
);
if
(
StringUtils
.
isBlank
(
x
.
getTime
())
&&
index
>
-
1
&&
x
.
getIndex
()
<=
index
)
{
x
.
setShowLine
(
true
);
}
}
...
...
@@ -473,11 +476,8 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
x
.
setTime
(
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
}
// 通过contingencyPlanId获取buttonJson数据
x
.
setBatchNo
(
batchNo
);
x
.
setCaseId
(
contingencyPlanId
);
// ContingencyPlanInstance planInstance = iContingencyPlanInstanceRepository.getOne(contingencyPlanId);
// x.setButtonJson(planInstance.getContent());
x
.
setButtonJson
(
buttonJson
);
}
}).
collect
(
Collectors
.
toList
());
...
...
@@ -512,12 +512,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Override
public
ContingencyPlanInstance
replyMessage
(
AgencyUserModel
user
,
ContingencyPlanInstance
dto
)
{
String
json
=
""
;
try
{
json
=
IOUtils
.
toString
(
planStepResource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"获取预案相关角色信息失败!"
);
}
String
json
=
planStepService
.
getPlanStep
();
List
<
PlanStepJsonVO
>
result
=
JSONObject
.
parseArray
(
json
,
PlanStepJsonVO
.
class
);
List
<
String
>
roleCode
=
result
.
stream
().
map
(
PlanStepJsonVO:
:
getRoleCode
).
distinct
().
collect
(
Collectors
.
toList
());
...
...
@@ -700,12 +695,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
return
contingencyPlanInstance
;
}
private
List
<
String
>
getUserIds
(
String
buttonCode
)
{
String
planStepJson
=
""
;
try
{
planStepJson
=
IOUtils
.
toString
(
planStepResource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"获取预案相关角色信息失败!"
);
}
String
planStepJson
=
planStepService
.
getPlanStep
();
List
<
PlanStepJsonVO
>
planStepJsonList
=
JSONObject
.
parseArray
(
planStepJson
,
PlanStepJsonVO
.
class
);
List
<
String
>
collect
=
planStepJsonList
.
stream
().
filter
(
code
->
code
.
getButtonCode
().
equals
(
buttonCode
)).
map
(
PlanStepJsonVO:
:
getRoleCode
).
collect
(
Collectors
.
toList
());
Toke
toke
=
remoteSecurityService
.
getServerToken
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyInstance.java
View file @
d9709b94
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.fas.business.vo.PlanStepJsonVO
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
...
...
@@ -40,12 +39,4 @@ public interface IContingencyInstance {
*/
ContingencyPlanInstance
getMessageById
(
String
id
);
/**
* 通过buttonCode获取执行角色编码
* @param buttonCode
* @return
*/
String
getPlanStepRoleCodeByButtonCode
(
String
buttonCode
);
List
<
PlanStepJsonVO
>
getPlanStepJsonVOS
();
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanStepService.java
0 → 100644
View file @
d9709b94
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.fas.business.vo.PlanStepJsonVO
;
import
java.util.List
;
public
interface
IPlanStepService
{
/**
* 通过buttonCode获取执行角色编码
*
* @param buttonCode
* @return
*/
String
getPlanStepRoleCodeByButtonCode
(
String
buttonCode
);
/**
* 通过stepCode获取当前索引index
*
* @param stepCode
* @return
*/
int
getPlanStepIndexByStepCode
(
String
stepCode
);
List
<
PlanStepJsonVO
>
getPlanStepJsonVOS
();
String
getPlanStep
();
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/PlanStepJsonVO.java
View file @
d9709b94
...
...
@@ -20,4 +20,9 @@ public class PlanStepJsonVO {
* 1:是,0:否
*/
private
String
checkYesOrNo
=
""
;
/**
* 进度索引
*/
private
int
index
;
}
YeeAmosFireAutoSysStart/src/main/resources/json/plan-step-yinan.json
0 → 100644
View file @
d9709b94
[
{
"stepCode"
:
"0"
,
"stepName"
:
"确认灾情"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_CONFIRM"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
},
{
"stepCode"
:
"1"
,
"stepName"
:
"停运换流阀"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_COMMUTATION"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
},
{
"stepCode"
:
"2"
,
"stepName"
:
"拨打报警电话"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"CALL_PHONE"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
},
{
"stepCode"
:
"3"
,
"stepName"
:
"确认油枕排油系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"DRAIN_OIL_CONFIRM"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
},
{
"stepCode"
:
"4"
,
"stepName"
:
"确认水喷雾系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OPEN_WATERSYSTEM"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
},
{
"stepCode"
:
"5"
,
"stepName"
:
"断开上级电源"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OFF_POWER"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
},
{
"stepCode"
:
"6"
,
"stepName"
:
"停运阀厅空调系统"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"STOP_AIRCON"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
},
{
"stepCode"
:
"7"
,
"stepName"
:
"一键开启消防炮"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"MONITOR_START"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
},
{
"stepCode"
:
"8"
,
"stepName"
:
"驻站消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_COMMAND"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"9"
,
"stepName"
:
"确认本体排油已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OWNER_DRAIN_OIL"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"10"
,
"stepName"
:
"启动阀厅应急预案"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"START_VALVE_HALL_CONTINGENCY"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"11"
,
"stepName"
:
"电缆沟封堵"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"PLUG_CABLETRENCH"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"12"
,
"stepName"
:
"政府消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_FIGTHHING"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"13"
,
"stepName"
:
"确认明火扑灭"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_EXTINCT"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"14"
,
"stepName"
:
"应急处置结束"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"END_EMERGENCY"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
}
]
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/json/plan-step.json
View file @
d9709b94
...
...
@@ -5,39 +5,53 @@
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_CONFIRM"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
0
},
{
"stepCode"
:
"
1
"
,
"stepName"
:
"
停运换流阀
"
,
"stepStatus"
:
"
0
"
,
"buttonCode"
:
"
STOP_COMMUTATION
"
,
"stepCode"
:
"
2
"
,
"stepName"
:
"
拨打报警电话
"
,
"stepStatus"
:
"
1
"
,
"buttonCode"
:
"
CALL_PHONE
"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
1
},
{
"stepCode"
:
"
2
"
,
"stepName"
:
"
拨打报警电话
"
,
"stepCode"
:
"
1
"
,
"stepName"
:
"
停运换流阀
"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"
CALL_PHONE
"
,
"buttonCode"
:
"
STOP_COMMUTATION
"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
2
},
{
"stepCode"
:
"3"
,
"stepName"
:
"确认
油枕
排油系统已开启"
,
"stepName"
:
"确认排油系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"DRAIN_OIL_CONFIRM"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
3
},
{
"stepCode"
:
"4"
,
"stepName"
:
"确认
水喷雾
系统已开启"
,
"stepName"
:
"确认
泡沫喷淋
系统已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OPEN_WATERSYSTEM"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
4
},
{
"stepCode"
:
"7"
,
"stepName"
:
"一键开启消防炮"
,
"stepStatus"
:
"1"
,
"buttonCode"
:
"MONITOR_START"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
5
},
{
"stepCode"
:
"5"
,
...
...
@@ -45,63 +59,35 @@
"stepStatus"
:
"0"
,
"buttonCode"
:
"OFF_POWER"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
6
},
{
"stepCode"
:
"
6
"
,
"stepName"
:
"
停运阀厅空调系统
"
,
"stepCode"
:
"
11
"
,
"stepName"
:
"
电缆沟封堵
"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"
STOP_AIRCON
"
,
"buttonCode"
:
"
PLUG_CABLETRENCH
"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
7
},
{
"stepCode"
:
"
7
"
,
"stepName"
:
"
一键开启消防炮
"
,
"stepCode"
:
"
6
"
,
"stepName"
:
"
停运阀厅空调系统
"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"MONITOR_START"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
"buttonCode"
:
"STOP_AIRCON"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_A"
,
"index"
:
8
},
{
"stepCode"
:
"8"
,
"stepName"
:
"驻站消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_COMMAND"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"9"
,
"stepName"
:
"确认本体排油已开启"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"OWNER_DRAIN_OIL"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"10"
,
"stepName"
:
"启动阀厅应急预案"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"START_VALVE_HALL_CONTINGENCY"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"11"
,
"stepName"
:
"电缆沟封堵"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"PLUG_CABLETRENCH"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
},
{
"stepCode"
:
"12"
,
"stepName"
:
"政府消防队指挥权交接"
,
"stepStatus"
:
"0"
,
"buttonCode"
:
"HANDOVER_FIGTHHING"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
9
},
{
"stepCode"
:
"13"
,
...
...
@@ -109,7 +95,8 @@
"stepStatus"
:
"0"
,
"buttonCode"
:
"FIRE_EXTINCT"
,
"isParallel"
:
"0"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
10
},
{
"stepCode"
:
"14"
,
...
...
@@ -117,6 +104,7 @@
"stepStatus"
:
"0"
,
"buttonCode"
:
"END_EMERGENCY"
,
"isParallel"
:
"1"
,
"roleCode"
:
"Digital_Responsing_Plan_B"
"roleCode"
:
"Digital_Responsing_Plan_B"
,
"index"
:
11
}
]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment