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
340d5219
Commit
340d5219
authored
Nov 05, 2021
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改预案推送接口
parent
f304650f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
PlanDetailMapper.java
...eejoin/amos/fas/business/dao/mapper/PlanDetailMapper.java
+1
-1
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+3
-0
HandlerMqttMessageImpl.java
...mos/fas/business/service/impl/HandlerMqttMessageImpl.java
+7
-2
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanDetailMapper.java
View file @
340d5219
...
...
@@ -47,6 +47,6 @@ public interface PlanDetailMapper {
List
<
String
>
getRuleIdByEquipment
(
@Param
(
"id"
)
Long
id
);
PlanDetailVo
getPlanDetailByEquipmentId
(
@Param
(
"fire
_equipment_i
d"
)
Long
fireEquipmentId
);
PlanDetailVo
getPlanDetailByEquipmentId
(
@Param
(
"fire
EquipmentI
d"
)
Long
fireEquipmentId
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
340d5219
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.component.rule.config.ClazzUtils
;
import
com.yeejoin.amos.fas.business.action.CustomerAction
;
...
...
@@ -107,6 +108,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
public
ContingencyPlanResponseVo
planStart
(
ContingencyPlanParamVo
vo
,
Toke
toke
)
throws
Exception
{
ContingencyPlanResponseVo
result
=
new
ContingencyPlanResponseVo
();
//状态校验
logger
.
info
(
"========状态校验==========="
);
ReserveEnum
reserveEnum
=
this
.
runCheck
(
vo
);
result
.
setMessage
(
reserveEnum
.
getText
());
if
(
ReserveEnum
.
THISRUNNING
.
getStatus
().
equals
(
reserveEnum
.
getStatus
()))
{
...
...
@@ -241,6 +243,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
//启动状态校验
public
ReserveEnum
runCheck
(
ContingencyPlanParamVo
vo
)
throws
Exception
{
logger
.
info
(
"========vo==========="
+
JSONObject
.
toJSONString
(
vo
));
if
(
EquipmentRiskTypeEnum
.
HZGJ
.
getCode
().
equals
(
vo
.
getRiskType
())
||
StringUtils
.
isBlank
(
vo
.
getRiskType
()))
{
List
<
PlanDoc
>
planDocs
=
planDocDao
.
findAllByPlanId
(
Long
.
valueOf
(
vo
.
getPlanId
()));
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/HandlerMqttMessageImpl.java
View file @
340d5219
...
...
@@ -139,7 +139,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
log
.
info
(
"========topic==========: "
+
topic
);
log
.
info
(
"========data==========: "
+
JSON
.
toJSONString
(
data
));
EquipmentSpecificIndexVo
equipmentSpecificIndex
=
JSONObject
.
parseObject
(
topicEntity
.
getMessage
(),
EquipmentSpecificIndexVo
.
class
);
l
ong
eqSpecId
=
equipmentSpecificIndex
.
getEquipmentSpecificId
();
L
ong
eqSpecId
=
equipmentSpecificIndex
.
getEquipmentSpecificId
();
EquipmentSpecificForRiskVo
equipmentSpecific
=
equipmentSpecificMapper
.
getOneById
(
eqSpecId
);
log
.
info
(
"========equipmentSpecific==========: "
+
JSON
.
toJSONString
(
equipmentSpecific
));
if
(
ObjectUtils
.
isEmpty
(
equipmentSpecific
)){
...
...
@@ -233,16 +233,21 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
}
}
private
void
startPlan
(
Equipment
equipment
,
Toke
toke
,
l
ong
fireEquipmentId
)
{
private
void
startPlan
(
Equipment
equipment
,
Toke
toke
,
L
ong
fireEquipmentId
)
{
PlanDetailVo
planDetailVo
=
planDetailMapper
.
getPlanDetailByEquipmentId
(
equipment
.
getId
());
//3d页面打开且存在预案,套用之前数字源码启动逻辑 进行预案的启动
boolean
isOnLine
=
this
.
getOpen3dUser
();
log
.
info
(
"isOnLine==="
+
isOnLine
);
log
.
info
(
"planDetailVo==="
+
JSONObject
.
toJSONString
(
planDetailVo
));
if
(
planDetailVo
!=
null
&&
isOnLine
)
{
ContingencyPlanParamVo
vo
=
new
ContingencyPlanParamVo
();
vo
.
setUserId
(
loginId
);
//TODO 待优化为调用平台进行查询
vo
.
setUserName
(
"系统用户"
);
vo
.
setFireEquipmentId
(
fireEquipmentId
);
vo
.
setPlanId
(
String
.
valueOf
(
planDetailVo
.
getId
()));
vo
.
setStatus
(
5
);
try
{
iContingencyPlanService
.
planStart
(
vo
,
toke
);
}
catch
(
Exception
e
)
{
...
...
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