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
8fb9d1e3
Commit
8fb9d1e3
authored
Mar 09, 2023
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:预案自动执行提交
parent
9c567eaa
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
23 deletions
+13
-23
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+2
-2
TimeLineController.java
...join/amos/fas/business/controller/TimeLineController.java
+1
-1
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+4
-16
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+4
-2
IContingencyInstance.java
...amos/fas/business/service/intfc/IContingencyInstance.java
+1
-1
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+1
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
8fb9d1e3
...
@@ -470,7 +470,7 @@ public class ContingencyAction implements CustomerAction {
...
@@ -470,7 +470,7 @@ public class ContingencyAction implements CustomerAction {
try
{
try
{
ButtonJsonVO
buttonJsonVO
=
JSONObject
.
parseObject
(
buttonJson
,
ButtonJsonVO
.
class
);
ButtonJsonVO
buttonJsonVO
=
JSONObject
.
parseObject
(
buttonJson
,
ButtonJsonVO
.
class
);
Map
<
String
,
Object
>
map
=
buttonJsonVO
.
getOperate
().
get
(
buttonJsonVO
.
getOperate
().
size
()
-
1
);
Map
<
String
,
Object
>
map
=
buttonJsonVO
.
getOperate
().
get
(
buttonJsonVO
.
getOperate
().
size
()
-
1
);
iContingencyInstance
.
fire
(
batchNo
,
buttonJsonVO
.
getStepCode
(),
buttonJson
,
contingencyPlanId
,
map
.
get
(
"code"
).
toString
(),
"CANCEL_0"
,
"A"
,
"false"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
iContingencyInstance
.
fire
(
batchNo
,
buttonJsonVO
.
getStepCode
(),
buttonJson
,
contingencyPlanId
,
map
.
get
(
"code"
).
toString
(),
"CANCEL_0"
,
"A"
,
"false"
,
"false"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"optionarea 加入队列失败-->"
+
e
.
getMessage
());
log
.
error
(
"optionarea 加入队列失败-->"
+
e
.
getMessage
());
}
}
...
@@ -861,7 +861,7 @@ public class ContingencyAction implements CustomerAction {
...
@@ -861,7 +861,7 @@ public class ContingencyAction implements CustomerAction {
try
{
try
{
contingencyPlanInstance
.
setRoleCode
(
planStepService
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
));
contingencyPlanInstance
.
setRoleCode
(
planStepService
.
getPlanStepRoleCodeByButtonCode
(
buttonCode
));
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
contingencyPlanInstanceRepository
.
save
(
contingencyPlanInstance
);
contingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
"true"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
contingencyInstance
.
fire
(
contingencyRo
.
getBatchNo
(),
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
,
"true"
,
"true"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/TimeLineController.java
View file @
8fb9d1e3
...
@@ -81,7 +81,7 @@ public class TimeLineController extends BaseController {
...
@@ -81,7 +81,7 @@ public class TimeLineController extends BaseController {
public
CommonResponse
fire
(
@RequestBody
PlanExecuteVo
vo
)
throws
Exception
{
public
CommonResponse
fire
(
@RequestBody
PlanExecuteVo
vo
)
throws
Exception
{
AgencyUserModel
userInfo
=
getUserInfo
();
AgencyUserModel
userInfo
=
getUserInfo
();
String
user
=
userInfo
.
getRealName
();
String
user
=
userInfo
.
getRealName
();
iContingencyInstance
.
fire
(
vo
.
getBatchNo
(),
vo
.
getStepCode
(),
vo
.
getButtonJson
(),
vo
.
getContingencyPlanId
(),
vo
.
getButtonCode
(),
vo
.
getConfirm
(),
vo
.
getStepState
(),
"true"
,
getToken
(),
getProduct
(),
getAppKey
(),
user
);
iContingencyInstance
.
fire
(
vo
.
getBatchNo
(),
vo
.
getStepCode
(),
vo
.
getButtonJson
(),
vo
.
getContingencyPlanId
(),
vo
.
getButtonCode
(),
vo
.
getConfirm
(),
vo
.
getStepState
(),
"true"
,
"false"
,
getToken
(),
getProduct
(),
getAppKey
(),
user
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
return
CommonResponseUtil
.
success
(
"SUCCESS"
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
8fb9d1e3
...
@@ -353,19 +353,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -353,19 +353,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
}
}
throw
new
Exception
(
"请勿重复操作."
);
throw
new
Exception
(
"请勿重复操作."
);
}
}
// if ("CONFIRM".equals(buttonState)) {
// if (code.equals(operate.getCode())) {
// operate.setState("executed");
// if ("FIRE_CANCEL".equals(code) || "END_EMERGENCY".equals(code)) {
// redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning());
// // 应急处置中断,初始化planStep,json数据
// planRuleService.updatePlanRuleByBatchNo(batchNo);
// // 应急处置中断,更新预案信息表结束时间
// contingencyInstanceInfoService.updateEndTimeById(batchNo);
// }
// }
// }
}
}
}
}
...
@@ -397,7 +384,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -397,7 +384,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
if
(
"CONFIRM"
.
equals
(
buttonState
)
&&
(
"FIRE_CANCEL"
.
equals
(
code
)
||
"END_EMERGENCY"
.
equals
(
code
)))
{
if
(
"CONFIRM"
.
equals
(
buttonState
)
&&
(
"FIRE_CANCEL"
.
equals
(
code
)
||
"END_EMERGENCY"
.
equals
(
code
)))
{
redisTemplate
.
delete
(
RiskSourceServiceImpl
.
cacheKeyForCanBeRunning
());
redisTemplate
.
delete
(
RiskSourceServiceImpl
.
cacheKeyForCanBeRunning
());
// 应急处置中断,初始化planStep,json数据
// 应急处置中断,初始化planStep,json数据
// planRuleService.updatePlanRuleByBatchNo(batchNo);
planStepService
.
initPlanStep
();
planStepService
.
initPlanStep
();
// 应急处置中断,更新预案信息表结束时间
// 应急处置中断,更新预案信息表结束时间
contingencyInstanceInfoService
.
updateEndTimeById
(
batchNo
);
contingencyInstanceInfoService
.
updateEndTimeById
(
batchNo
);
...
@@ -452,7 +438,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -452,7 +438,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
}
}
@Override
@Override
public
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
String
token
,
String
product
,
String
appKey
,
String
startUserName
)
throws
Exception
{
public
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
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"batchNo"
,
batchNo
);
map
.
put
(
"batchNo"
,
batchNo
);
map
.
put
(
"stepCode"
,
stepCode
);
map
.
put
(
"stepCode"
,
stepCode
);
...
@@ -461,6 +447,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -461,6 +447,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
map
.
put
(
"contingencyPlanId"
,
contingencyPlanId
);
map
.
put
(
"contingencyPlanId"
,
contingencyPlanId
);
map
.
put
(
"stepState"
,
stepStateOnbutton
);
map
.
put
(
"stepState"
,
stepStateOnbutton
);
map
.
put
(
"isExecute"
,
isExecute
);
map
.
put
(
"isExecute"
,
isExecute
);
map
.
put
(
"isAuto"
,
isAuto
);
if
(
startUserName
!=
null
)
{
if
(
startUserName
!=
null
)
{
map
.
put
(
"startUserName"
,
startUserName
);
map
.
put
(
"startUserName"
,
startUserName
);
}
}
...
@@ -576,6 +563,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -576,6 +563,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
String
contingencyPlanId
=
map
.
get
(
"contingencyPlanId"
);
String
contingencyPlanId
=
map
.
get
(
"contingencyPlanId"
);
String
stepState
=
map
.
get
(
"stepState"
);
String
stepState
=
map
.
get
(
"stepState"
);
String
isExecute
=
map
.
get
(
"isExecute"
);
String
isExecute
=
map
.
get
(
"isExecute"
);
String
isAuto
=
map
.
get
(
"isAuto"
);
String
buttonJson
=
map
.
get
(
"buttonJson"
);
String
buttonJson
=
map
.
get
(
"buttonJson"
);
String
appKey
=
map
.
get
(
"appKey"
);
String
appKey
=
map
.
get
(
"appKey"
);
String
product
=
map
.
get
(
"product"
);
String
product
=
map
.
get
(
"product"
);
...
@@ -585,7 +573,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -585,7 +573,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setToken
(
token
);
RequestContext
.
setToken
(
token
);
planVisual3dService
.
updatePlanStepToRedis
(
batchNo
,
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
isExecute
);
planVisual3dService
.
updatePlanStepToRedis
(
batchNo
,
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
isExecute
,
isAuto
);
setButtonExecuted
(
batchNo
,
contingencyPlanId
,
buttonCode
,
confirm
,
user
);
setButtonExecuted
(
batchNo
,
contingencyPlanId
,
buttonCode
,
confirm
,
user
);
fire
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
);
fire
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
8fb9d1e3
...
@@ -381,7 +381,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -381,7 +381,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
}
@Override
@Override
public
void
updatePlanStepToRedis
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
isExecute
)
{
public
void
updatePlanStepToRedis
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
isExecute
,
String
isAuto
)
{
if
(
StringUtils
.
isNotBlank
(
batchNo
)
&&
StringUtils
.
isNotBlank
(
contingencyPlanId
)
&&
StringUtils
.
isNotBlank
(
buttonCode
))
{
if
(
StringUtils
.
isNotBlank
(
batchNo
)
&&
StringUtils
.
isNotBlank
(
contingencyPlanId
)
&&
StringUtils
.
isNotBlank
(
buttonCode
))
{
// 根据批次号查询预案步骤
// 根据批次号查询预案步骤
String
planStep
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planStep"
)).
toString
();
String
planStep
=
Objects
.
requireNonNull
(
redisTemplate
.
opsForValue
().
get
(
"planStep"
)).
toString
();
...
@@ -405,10 +405,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -405,10 +405,12 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
x
.
setCheckYesOrNo
(
"0"
);
x
.
setCheckYesOrNo
(
"0"
);
}
else
{
}
else
{
x
.
setCheckYesOrNo
(
"1"
);
x
.
setCheckYesOrNo
(
"1"
);
x
.
setIsAuto
(
1
);
if
(
StringUtils
.
isNotBlank
(
x
.
getTime
()))
{
if
(
StringUtils
.
isNotBlank
(
x
.
getTime
()))
{
x
.
setShowLine
(
true
);
x
.
setShowLine
(
true
);
}
}
if
(
StringUtils
.
isNotBlank
(
isAuto
)
&&
"true"
.
equalsIgnoreCase
(
isAuto
))
{
x
.
setIsAuto
(
1
);
}
}
}
x
.
setTime
(
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
x
.
setTime
(
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IContingencyInstance.java
View file @
8fb9d1e3
...
@@ -23,7 +23,7 @@ public interface IContingencyInstance {
...
@@ -23,7 +23,7 @@ public interface IContingencyInstance {
void
updateStep
(
String
step
,
String
batchNo
);
void
updateStep
(
String
step
,
String
batchNo
);
Optional
<
Equipment
>
fire
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
buttonState
,
String
stepStateOnbutton
,
String
isExecute
,
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
;
/**
/**
* 扩展属性赋值
* 扩展属性赋值
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
8fb9d1e3
...
@@ -95,7 +95,7 @@ public interface IPlanVisual3dService {
...
@@ -95,7 +95,7 @@ public interface IPlanVisual3dService {
void
updatePlanStep
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
isExecute
);
void
updatePlanStep
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
isExecute
);
void
updatePlanStepToRedis
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
isExecute
);
void
updatePlanStepToRedis
(
String
batchNo
,
String
stepCode
,
String
buttonJson
,
String
contingencyPlanId
,
String
buttonCode
,
String
isExecute
,
String
isAuto
);
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
);
...
...
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