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
a8f43ef4
Commit
a8f43ef4
authored
Mar 31, 2020
by
xukaiqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sod值注释
parent
8a2f800e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+13
-0
RsDataQueue.java
.../java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
+4
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
a8f43ef4
...
...
@@ -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 @
a8f43ef4
...
...
@@ -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
);
}
}
...
...
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