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
db3cdd14
Commit
db3cdd14
authored
Apr 10, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feture-xkq
parents
1d4b419d
1a1a91d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
5 deletions
+27
-5
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+13
-0
RsDataQueue.java
.../java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
+4
-0
dbTemplate_node3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_node3d.xml
+10
-5
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
db3cdd14
...
...
@@ -1258,6 +1258,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
equipCommunicationDao
.
save
(
list
);
}
/**
* 设备告警触发fema的sod值
*/
private
void
notifyAlarm
(
FireEquipmentPoint
fireEquipmentPoint
,
AlarmParam
param
)
{
List
<
FmeaEquipmentPoint
>
fmeaEquipmentPoints
=
fmeaEquipmentPointMapper
.
listByEquipmentPointId
(
fireEquipmentPoint
.
getId
());
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
...
...
@@ -1490,6 +1493,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if
(
fmea
.
getEvaluationOid
()
!=
null
&&
fmea
.
getEvaluationSid
()
!=
null
&&
fmea
.
getEvaluationDid
()
!=
null
)
{
List
<
FmeaEquipmentPoint
>
equipmentPoints
=
fmeaEquipmentPointMapper
.
listFmeaByFmeaId
(
fmeaId
);
List
<
FmeaPointInputitem
>
pointInputitems
=
fmeaPointInputitemMapper
.
listFmeaByFmeaId
(
fmeaId
);
//根据设备和巡检数据获取高的故障率
Double
maxRate
=
getMaxRate
(
equipmentPoints
,
pointInputitems
);
if
(
maxRate
!=
null
)
{
List
<
EvaluationModel
>
oModels
=
iEvaluationModelDao
.
findAllByType
(
"O"
);
...
...
@@ -1510,6 +1514,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
fmeaMapper
.
updateRpn
(
fmea
);
saveRpnLog
(
fmea
.
getRiskSourceId
(),
fmeaId
,
rpn
,
fmea
.
getRpni
());
//影响风险点的sod值
this
.
notifyRiskSource
(
fmea
.
getRiskSourceId
(),
notifyType
,
jpushTarget
);
}
}
...
...
@@ -1631,11 +1636,16 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSource
.
setRpni
(
rpni
);
riskSource
.
setRiskLevelId
(
newRiskLevel
.
getId
());
riskSourceMapper
.
updateRpn
(
riskSource
);
//极光推送给手机客户端
jpushRiskSourceMessage
(
"风险点告警"
,
jpushTarget
);
//规则告警
notifyRule
(
riskSourceId
,
rpn
,
rpni
,
oldRiskLevel
.
getLevel
(),
newRiskLevel
.
getLevel
(),
notifyType
);
}
}
/**
* 极光推送
*/
private
void
jpushRiskSourceMessage
(
String
content
,
String
jpushTarget
)
{
if
(
StringUtils
.
isEmpty
(
jpushTarget
))
{
return
;
...
...
@@ -1648,6 +1658,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
appMessagePushService
.
sendMessage
(
pushMsgParam
);
}
/**
* 规则告警
*/
private
void
notifyRule
(
Long
id
,
BigDecimal
rpnr
,
BigDecimal
rpni
,
Integer
oldLevel
,
Integer
newLevel
,
String
notifyType
)
{
int
level
=
oldLevel
-
newLevel
;
String
changeType
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
View file @
db3cdd14
...
...
@@ -73,12 +73,16 @@ public class RsDataQueue {
String
from
=
fmeaMessage
.
getNorifyFrom
();
Long
handId
=
fmeaMessage
.
getHandId
();
if
(
from
.
equals
(
"patrol"
))
{
//巡检不合格通知
riskSourceService
.
notifyFmeaFromAbnormal
(
handId
,
from
);
}
else
if
(
from
.
equals
(
"equipment"
))
{
//设备告警
riskSourceService
.
notifyFmeaFromAbnormal
(
handId
,
from
);
}
else
if
(
from
.
equals
(
"update"
))
{
//修改通知
riskSourceService
.
notifyFmeaFromUpdate
(
handId
,
from
);
}
else
if
(
from
.
equals
(
"delete"
))
{
//删除通知
riskSourceService
.
notifyRiskSource
(
handId
,
from
,
null
);
}
}
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_node3d.xml
View file @
db3cdd14
...
...
@@ -119,7 +119,8 @@
null data_level,
fe.`code` data_code,
(select GROUP_CONCAT(cast(eq.`name` as char(50)) SEPARATOR ',') from f_equipment_fire_equipment fre join f_equipment eq on fre.equipment_id = eq.id where fre.fire_equipment_id = fe.id) protect_obj_name,
null route_name
null route_name,
0 frequency
from f_fire_equipment fe
where
<choose>
...
...
@@ -249,7 +250,8 @@
null data_level,
e.`code` data_code,
null protect_obj_name,
null route_name
null route_name,
0 frequency
from f_equipment e
where
<choose>
...
...
@@ -346,7 +348,8 @@
null data_level,
fc.car_num data_code,
null protect_obj_name,
null route_name
null route_name,
0 frequency
from f_fire_car fc
where
...
...
@@ -445,7 +448,8 @@
null data_level,
fs.`code` data_code,
null protect_obj_name,
null route_name
null route_name ,
0 frequency
from f_fire_station fs
where
<choose>
...
...
@@ -544,7 +548,8 @@
null data_level,
wr.`code` data_code,
null protect_obj_name,
null route_name
null route_name ,
0 frequency
from f_water_resource wr
where
<choose>
...
...
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