Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AmosBankRoot
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
1
Merge Requests
1
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
bank
AmosBankRoot
Commits
9dcc751c
Commit
9dcc751c
authored
Jun 16, 2020
by
zhengjiangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
3e5d6f74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
DeviceListener.java
...ain/java/com/yeejoin/amos/bank/config/DeviceListener.java
+11
-1
No files found.
AmosBankService/src/main/java/com/yeejoin/amos/bank/config/DeviceListener.java
View file @
9dcc751c
...
@@ -31,6 +31,11 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
...
@@ -31,6 +31,11 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
private
final
Logger
logger
=
LogManager
.
getLogger
(
DeviceListener
.
class
);
private
final
Logger
logger
=
LogManager
.
getLogger
(
DeviceListener
.
class
);
private
static
ObjectMapper
mapper
=
new
ObjectMapper
();
private
static
ObjectMapper
mapper
=
new
ObjectMapper
();
//临界温度
private
static
final
double
CRITICAL_TEMPERATURE
=
35
;
@Autowired
@Autowired
private
EmqKeeper
emqKeeper
;
private
EmqKeeper
emqKeeper
;
...
@@ -104,7 +109,8 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
...
@@ -104,7 +109,8 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
System
.
out
.
println
(
"----shudu equipmentsPointId : "
+
equipmentsPointId
);
System
.
out
.
println
(
"----shudu equipmentsPointId : "
+
equipmentsPointId
);
List
<
Long
>
riskFactorId
=
equipmentMapper
.
judgeEquipmentExists
(
equipmentsPointId
);
List
<
Long
>
riskFactorId
=
equipmentMapper
.
judgeEquipmentExists
(
equipmentsPointId
);
Integer
value
=
0
;
Integer
value
=
0
;
if
(
"35"
.
equals
(
statusName
))
{
if
(
Double
.
valueOf
(
statusName
)
>=
CRITICAL_TEMPERATURE
)
{
value
=
DevicePointEnum
.
getValue
(
"异常"
);
value
=
DevicePointEnum
.
getValue
(
"异常"
);
equipmentMapper
.
updateEquipmentPointStatus
(
value
,
queryEquipmentPoint
.
getId
());
equipmentMapper
.
updateEquipmentPointStatus
(
value
,
queryEquipmentPoint
.
getId
());
}
else
{
}
else
{
...
@@ -112,6 +118,10 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
...
@@ -112,6 +118,10 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
equipmentMapper
.
updateEquipmentPointStatus
(
value
,
queryEquipmentPoint
.
getId
());
equipmentMapper
.
updateEquipmentPointStatus
(
value
,
queryEquipmentPoint
.
getId
());
}
}
System
.
out
.
println
(
"----shudu riskFactorId : "
+
riskFactorId
);
System
.
out
.
println
(
"----shudu riskFactorId : "
+
riskFactorId
);
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
try
{
try
{
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
),
eqpName
,
value
);
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
),
eqpName
,
value
);
...
...
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