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
1b0dbc75
Commit
1b0dbc75
authored
Oct 27, 2022
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:应急处置流程执行修改
parent
512ed150
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
4 deletions
+31
-4
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+15
-4
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+7
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+6
-0
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+3
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
1b0dbc75
...
@@ -44,6 +44,7 @@ import com.yeejoin.amos.fas.dao.entity.PlanDetail;
...
@@ -44,6 +44,7 @@ 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.datasync.bo.PlanDetailSyncBo
;
import
com.yeejoin.amos.fas.datasync.bo.PlanDetailSyncBo
;
import
com.yeejoin.amos.fas.datasync.bo.PlanOperationRecordSyncBo
;
import
com.yeejoin.amos.fas.datasync.bo.PlanOperationRecordSyncBo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -140,6 +141,9 @@ public class ContingencyAction implements CustomerAction {
...
@@ -140,6 +141,9 @@ public class ContingencyAction implements CustomerAction {
@Value
(
"${maparea.action.is-area}"
)
@Value
(
"${maparea.action.is-area}"
)
private
String
isArea
;
private
String
isArea
;
@Value
(
"${plan.default.roleCode}"
)
private
String
defaultRoleCode
;
private
static
Map
<
String
,
String
>
OPERATE_RECORD_ID
=
new
HashMap
<>();
private
static
Map
<
String
,
String
>
OPERATE_RECORD_ID
=
new
HashMap
<>();
private
static
Map
<
String
,
Map
<
String
,
String
>>
stringStringMap
=
new
HashMap
<>();
private
static
Map
<
String
,
Map
<
String
,
String
>>
stringStringMap
=
new
HashMap
<>();
...
@@ -147,9 +151,6 @@ public class ContingencyAction implements CustomerAction {
...
@@ -147,9 +151,6 @@ public class ContingencyAction implements CustomerAction {
public
static
ConcurrentHashMap
<
String
,
Map
<
String
,
Object
>>
pointCache
=
new
ConcurrentHashMap
<>();
public
static
ConcurrentHashMap
<
String
,
Map
<
String
,
Object
>>
pointCache
=
new
ConcurrentHashMap
<>();
private
static
CacheMap
cacheMap
=
CacheFactory
.
newChacheMap
();
private
static
final
String
TOKE
=
"TOKE"
;
@Autowired
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
private
RemoteSecurityService
remoteSecurityService
;
...
@@ -508,7 +509,12 @@ public class ContingencyAction implements CustomerAction {
...
@@ -508,7 +509,12 @@ public class ContingencyAction implements CustomerAction {
this
.
sendcmd
(
"optionarea"
,
paramObj
,
result
);
this
.
sendcmd
(
"optionarea"
,
paramObj
,
result
);
ContingencyPlanInstance
instance
=
contingencyInstance
.
getMessageById
(
contingencyPlanId
);
ContingencyPlanInstance
instance
=
contingencyInstance
.
getMessageById
(
contingencyPlanId
);
if
(
instance
!=
null
)
{
if
(
instance
!=
null
)
{
instance
.
setRoleCode
(
contingencyInstance
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
));
String
roleCode
=
contingencyInstance
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
);
if
(
StringUtils
.
isNotBlank
(
roleCode
))
{
instance
.
setRoleCode
(
roleCode
);
}
else
{
instance
.
setRoleCode
(
defaultRoleCode
);
}
contingencyPlanInstanceMapper
.
updateMessageById
(
instance
);
contingencyPlanInstanceMapper
.
updateMessageById
(
instance
);
}
}
...
@@ -882,6 +888,11 @@ public class ContingencyAction implements CustomerAction {
...
@@ -882,6 +888,11 @@ public class ContingencyAction implements CustomerAction {
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
String
contingencyPlanId
=
getContingencyPlanId
(
contingencyRo
.
getBatchNo
(),
actionName
,
icon
,
tips
,
buttonJson
);
String
contingencyPlanId
=
getContingencyPlanId
(
contingencyRo
.
getBatchNo
(),
actionName
,
icon
,
tips
,
buttonJson
);
try
{
try
{
ContingencyPlanInstance
instance
=
contingencyInstance
.
getMessageById
(
contingencyPlanId
);
if
(
instance
!=
null
)
{
instance
.
setRoleCode
(
contingencyInstance
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
));
contingencyPlanInstanceMapper
.
updateMessageById
(
instance
);
}
contingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
());
contingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
1b0dbc75
...
@@ -117,6 +117,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -117,6 +117,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
@Autowired
@Autowired
private
WebMqttComponent
webMqttComponent
;
private
WebMqttComponent
webMqttComponent
;
@Autowired
private
IPlanVisual3dService
planVisual3dService
;
@Value
(
"classpath:/json/plan-step.json"
)
@Value
(
"classpath:/json/plan-step.json"
)
private
Resource
planStepResource
;
private
Resource
planStepResource
;
...
@@ -369,6 +372,10 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -369,6 +372,10 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
webMqttComponent
.
publish
(
topic
,
"{\"msgType\":\"replayMessage\"}"
);
webMqttComponent
.
publish
(
topic
,
"{\"msgType\":\"replayMessage\"}"
);
}
}
ContingencyPlanInstance
instance
=
repository
.
save
(
contingencyPlanInstance
);
ContingencyPlanInstance
instance
=
repository
.
save
(
contingencyPlanInstance
);
if
(
buttonState
.
equals
(
"CONFIRM"
))
{
// 满足移动端确认按钮展示,确认后,多按钮json只保留最后一个按钮
planVisual3dService
.
updateStatusById
(
contingencyPlanId
);
}
// 异步数据同步之消息发送
// 异步数据同步之消息发送
contingencyPlanInstanceDataSync
(
instance
);
contingencyPlanInstanceDataSync
(
instance
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
1b0dbc75
...
@@ -391,6 +391,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -391,6 +391,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Override
@Override
public
Page
<
ContingencyPlanInstanceVO
>
getPlaneRecordByNew
(
Integer
pageNum
,
Integer
size
,
String
batchNo
,
AgencyUserModel
user
)
{
public
Page
<
ContingencyPlanInstanceVO
>
getPlaneRecordByNew
(
Integer
pageNum
,
Integer
size
,
String
batchNo
,
AgencyUserModel
user
)
{
try
{
// TODO 为了配合流程,前端获取执行记录消息的数据,后续处理
Thread
.
sleep
(
1000
);
}
catch
(
InterruptedException
e
)
{
throw
new
RuntimeException
(
e
);
}
Integer
planInstanceCount
=
contingencyPlanInstanceMapper
.
getPlanInstanceCount
(
batchNo
);
Integer
planInstanceCount
=
contingencyPlanInstanceMapper
.
getPlanInstanceCount
(
batchNo
);
// 根据批次号获取预案记录
// 根据批次号获取预案记录
List
<
ContingencyPlanInstance
>
planInstanceListByPage
=
contingencyPlanInstanceMapper
.
getPlanInstanceListByPage
(
batchNo
,
(
pageNum
-
1
)
*
size
,
size
);
List
<
ContingencyPlanInstance
>
planInstanceListByPage
=
contingencyPlanInstanceMapper
.
getPlanInstanceListByPage
(
batchNo
,
(
pageNum
-
1
)
*
size
,
size
);
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
1b0dbc75
...
@@ -61,6 +61,9 @@ file.downLoad.url=http://172.16.11.201:9000/
...
@@ -61,6 +61,9 @@ file.downLoad.url=http://172.16.11.201:9000/
plan.instance.personImg
=
upload/3dview_icon/plan_via.png
plan.instance.personImg
=
upload/3dview_icon/plan_via.png
plan.instance.playImg
=
upload/3dview_icon/plan_play.png
plan.instance.playImg
=
upload/3dview_icon/plan_play.png
#应急预案动作执行默认角色编码
plan.default.roleCode
=
Digital_Responsing_Plan_A
# 是否使用rocketmq on/off
# 是否使用rocketmq on/off
rocketmq.producer.sysIsUsed
=
off
rocketmq.producer.sysIsUsed
=
off
#rocketmq生产者配置
#rocketmq生产者配置
...
...
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