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
b23985f1
Commit
b23985f1
authored
Feb 18, 2020
by
xukaiqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
efe531a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+25
-17
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
b23985f1
...
@@ -1150,6 +1150,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1150,6 +1150,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
redisTemplate
.
opsForHash
().
put
(
"currentContingency"
,
"alarmType"
,
null
);
redisTemplate
.
opsForHash
().
put
(
"currentContingency"
,
"alarmType"
,
null
);
// redisTemplate.opsForValue().set("equipmentId", null);
// redisTemplate.opsForValue().set("equipmentId", null);
}
else
{
}
else
{
if
(
"alarm_type_trouble"
.
equals
(
fireEquipmentPointType
)
{
notifyAlarm
(
fireEquipmentPoint
,
deviceData
);
}
String
alarmType
=
(
String
)
redisTemplate
.
opsForHash
().
get
(
"currentContingency"
,
"alarmType"
);
String
alarmType
=
(
String
)
redisTemplate
.
opsForHash
().
get
(
"currentContingency"
,
"alarmType"
);
if
(!
ObjectUtils
.
isEmpty
(
alarmType
)
&&
dict
.
getDictValue
().
equals
(
alarmType
))
{
if
(!
ObjectUtils
.
isEmpty
(
alarmType
)
&&
dict
.
getDictValue
().
equals
(
alarmType
))
{
ContingencyDeviceStatus
contingencyDeviceStatus
=
(
ContingencyDeviceStatus
)
redisTemplate
.
opsForHash
().
get
(
"currentContingency"
,
"contingencyPlan"
);
ContingencyDeviceStatus
contingencyDeviceStatus
=
(
ContingencyDeviceStatus
)
redisTemplate
.
opsForHash
().
get
(
"currentContingency"
,
"contingencyPlan"
);
...
@@ -1222,23 +1225,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1222,23 +1225,8 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
updateFirePointValue
(
fireEquipmentPoint
.
getId
(),
param
.
getState
());
updateFirePointValue
(
fireEquipmentPoint
.
getId
(),
param
.
getState
());
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
valueOf
(
data
.
getFireEquipmentId
()));
Equipment
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
valueOf
(
data
.
getFireEquipmentId
()));
if
(!
ObjectUtils
.
isEmpty
(
equipment
))
{
if
(!
ObjectUtils
.
isEmpty
(
equipment
))
{
if
(
dict
!=
null
&&
dict
.
getDictCode
().
equals
(
"alarm_type_trouble"
))
{
if
(
dict
!=
null
&&
dict
.
getDictValue
().
equals
(
"alarm_type_trouble"
))
{
List
<
FmeaEquipmentPoint
>
fmeaEquipmentPoints
=
fmeaEquipmentPointMapper
.
listByEquipmentPointId
(
fireEquipmentPoint
.
getId
());
notifyAlarm
(
fireEquipmentPoint
,
param
);
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
List
<
Long
>
ids
=
Lists
.
newArrayList
();
fmeaEquipmentPoints
.
forEach
(
fmeaEquipmentPoint
->
{
ids
.
add
(
fmeaEquipmentPoint
.
getId
());
fmeaIds
.
add
(
fmeaEquipmentPoint
.
getFmeaId
());
});
if
(
param
.
getState
().
equals
(
"true"
))
{
fmeaEquipmentPointMapper
.
updateStateByIds
(
1
,
ids
);
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addAbnormalMessage
(
fmeaId
));
}
else
if
(
param
.
getState
().
equals
(
"false"
))
{
fmeaEquipmentPointMapper
.
updateStateByIds
(
0
,
ids
);
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addAbnormalMessage
(
fmeaId
));
}
}
}
String
batchNo
=
UUID
.
randomUUID
().
toString
();
String
batchNo
=
UUID
.
randomUUID
().
toString
();
FireEquimentDataRo
ruleData
=
new
FireEquimentDataRo
();
FireEquimentDataRo
ruleData
=
new
FireEquimentDataRo
();
...
@@ -1269,6 +1257,26 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -1269,6 +1257,26 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
equipCommunicationDao
.
save
(
list
);
equipCommunicationDao
.
save
(
list
);
}
}
private
void
notifyAlarm
(
FireEquipmentPoint
fireEquipmentPoint
,
AlarmParam
param
)
{
List
<
FmeaEquipmentPoint
>
fmeaEquipmentPoints
=
fmeaEquipmentPointMapper
.
listByEquipmentPointId
(
fireEquipmentPoint
.
getId
());
Set
<
Long
>
fmeaIds
=
Sets
.
newHashSet
();
List
<
Long
>
ids
=
Lists
.
newArrayList
();
fmeaEquipmentPoints
.
forEach
(
fmeaEquipmentPoint
->
{
ids
.
add
(
fmeaEquipmentPoint
.
getId
());
fmeaIds
.
add
(
fmeaEquipmentPoint
.
getFmeaId
());
});
if
(
param
.
getState
().
equals
(
"true"
))
{
fmeaEquipmentPointMapper
.
updateStateByIds
(
1
,
ids
);
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addAbnormalMessage
(
fmeaId
));
}
else
if
(
param
.
getState
().
equals
(
"false"
))
{
fmeaEquipmentPointMapper
.
updateStateByIds
(
0
,
ids
);
RsDataQueue
rsDataQueue
=
RsDataQueue
.
getInstance
();
fmeaIds
.
forEach
(
fmeaId
->
rsDataQueue
.
addAbnormalMessage
(
fmeaId
));
}
}
@Async
@Async
public
void
sendAnalogue
(
EquipCommunicationData
data
)
{
public
void
sendAnalogue
(
EquipCommunicationData
data
)
{
try
{
try
{
...
...
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