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
3a59225c
Commit
3a59225c
authored
Oct 27, 2022
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:应急处置流程执行修改
parent
1b0dbc75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
29 deletions
+31
-29
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+31
-23
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+0
-6
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
3a59225c
...
@@ -52,6 +52,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -52,6 +52,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
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
;
...
@@ -370,30 +372,36 @@ public class ContingencyAction implements CustomerAction {
...
@@ -370,30 +372,36 @@ public class ContingencyAction implements CustomerAction {
content
=
instedParams
(
content
,
contingencyRo
);
content
=
instedParams
(
content
,
contingencyRo
);
iContingencyInstance
.
createInstanceRecord
(
contingencyRo
.
getBatchNo
(),
""
,
"DEFAULT"
,
content
,
"MESSAGE"
,
""
);
iContingencyInstance
.
createInstanceRecord
(
contingencyRo
.
getBatchNo
(),
""
,
"DEFAULT"
,
content
,
"MESSAGE"
,
""
);
SafteyPlanResult
result
=
new
SafteyPlanResult
();
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
@Override
try
{
public
void
afterCommit
()
{
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
// 事物提交后业务逻辑
List
<
ContingencyPlanInstance
>
list
=
iContingencyInstance
.
queryForTimeLine
(
contingencyRo
.
getBatchNo
(),
"MESSAGE"
);
SafteyPlanResult
result
=
new
SafteyPlanResult
();
ArrayList
records
=
new
ArrayList
<>();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
try
{
list
.
forEach
(
action
->
{
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
HashMap
map
=
new
HashMap
();
List
<
ContingencyPlanInstance
>
list
=
iContingencyInstance
.
queryForTimeLine
(
contingencyRo
.
getBatchNo
(),
"MESSAGE"
);
map
.
put
(
"time"
,
sdf1
.
format
(
action
.
getCreateDate
().
getTime
()));
ArrayList
records
=
new
ArrayList
<>();
map
.
put
(
"stepName"
,
action
.
getContent
());
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
records
.
add
(
map
);
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
);
tempmap1
.
put
(
"status"
,
PlanRecordStatusEnum
.
OPERATION
.
getCode
());
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
result
.
add
(
tempmap1
);
System
.
out
.
println
(
"--------------------messageRecord----------------------"
+
result
);
sendcmd
(
"recordarea"
,
paramObj
,
result
);
sendweb
(
"recordarea"
,
paramObj
,
result
);
}
}
tempmap1
.
put
(
"content"
,
records
);
});
tempmap1
.
put
(
"status"
,
PlanRecordStatusEnum
.
OPERATION
.
getCode
());
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
result
.
add
(
tempmap1
);
System
.
out
.
println
(
"--------------------messageRecord----------------------"
+
result
);
this
.
sendcmd
(
"recordarea"
,
paramObj
,
result
);
this
.
sendweb
(
"recordarea"
,
paramObj
,
result
);
}
}
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
3a59225c
...
@@ -391,12 +391,6 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -391,12 +391,6 @@ 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
);
...
...
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