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
3dcf3e19
Commit
3dcf3e19
authored
Jun 12, 2020
by
zhengjiangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加调用风险接口的eqName
parent
b3b0d42a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
12 deletions
+14
-12
BlueprintListener.java
.../java/com/yeejoin/amos/bank/config/BlueprintListener.java
+2
-1
DeviceListener.java
...ain/java/com/yeejoin/amos/bank/config/DeviceListener.java
+3
-2
EquipmentListener.java
.../java/com/yeejoin/amos/bank/config/EquipmentListener.java
+3
-3
SelfSupportListener.java
...ava/com/yeejoin/amos/bank/config/SelfSupportListener.java
+1
-1
RiskModelRemoteClient.java
...eejoin/amos/bank/remote/client/RiskModelRemoteClient.java
+5
-5
No files found.
AmosBankService/src/main/java/com/yeejoin/amos/bank/config/BlueprintListener.java
View file @
3dcf3e19
...
@@ -74,6 +74,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
...
@@ -74,6 +74,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
logger
.
error
(
">>>>>>>>>>>>>>>>>jsonStr"
,
jsonStr
);
logger
.
error
(
">>>>>>>>>>>>>>>>>jsonStr"
,
jsonStr
);
JSONObject
parseObject
=
JSON
.
parseObject
(
jsonStr
);
JSONObject
parseObject
=
JSON
.
parseObject
(
jsonStr
);
Long
eqpId
=
parseObject
.
getLong
(
"eqpId"
);
Long
eqpId
=
parseObject
.
getLong
(
"eqpId"
);
String
eqpName
=
parseObject
.
getString
(
"eqpName"
);
JSONArray
jsonArray
=
parseObject
.
getJSONArray
(
"metricDatas"
);
JSONArray
jsonArray
=
parseObject
.
getJSONArray
(
"metricDatas"
);
if
(
ObjectUtils
.
isEmpty
(
jsonArray
))
{
if
(
ObjectUtils
.
isEmpty
(
jsonArray
))
{
return
;
return
;
...
@@ -103,7 +104,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
...
@@ -103,7 +104,7 @@ public class BlueprintListener extends EmqxListener implements InitializingBean
equipmentMapper
.
updateEquipmentPointStatus
(
value
,
queryEquipmentPoint
.
getId
());
equipmentMapper
.
updateEquipmentPointStatus
(
value
,
queryEquipmentPoint
.
getId
());
try
{
try
{
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
));
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
)
,
eqpName
);
}
}
}
catch
(
InnerInvokException
e1
)
{
}
catch
(
InnerInvokException
e1
)
{
logger
.
error
(
"update rpn fail "
+
e1
.
getMessage
());
logger
.
error
(
"update rpn fail "
+
e1
.
getMessage
());
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/config/DeviceListener.java
View file @
3dcf3e19
...
@@ -77,6 +77,7 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
...
@@ -77,6 +77,7 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
//logger.info("----shidumqtt received sucess",parseObject);
//logger.info("----shidumqtt received sucess",parseObject);
System
.
out
.
println
(
"----shidumqtt received sucess :"
+
parseObject
);
System
.
out
.
println
(
"----shidumqtt received sucess :"
+
parseObject
);
Long
eqpId
=
parseObject
.
getLong
(
"eqpId"
);
Long
eqpId
=
parseObject
.
getLong
(
"eqpId"
);
String
eqpName
=
parseObject
.
getString
(
"eqpName"
);
JSONArray
jsonArray
=
parseObject
.
getJSONArray
(
"metricDatas"
);
JSONArray
jsonArray
=
parseObject
.
getJSONArray
(
"metricDatas"
);
if
(
ObjectUtils
.
isEmpty
(
jsonArray
))
{
if
(
ObjectUtils
.
isEmpty
(
jsonArray
))
{
return
;
return
;
...
@@ -112,7 +113,7 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
...
@@ -112,7 +113,7 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
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
));
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
)
,
eqpName
);
System
.
out
.
println
(
"----udpate riskFactor sucess"
);
System
.
out
.
println
(
"----udpate riskFactor sucess"
);
}
catch
(
InnerInvokException
e1
)
{
}
catch
(
InnerInvokException
e1
)
{
logger
.
error
(
"update rpn fail "
+
e1
.
getMessage
());
logger
.
error
(
"update rpn fail "
+
e1
.
getMessage
());
...
@@ -135,7 +136,7 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
...
@@ -135,7 +136,7 @@ public class DeviceListener extends EmqxListener implements InitializingBean {
try
{
try
{
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
System
.
out
.
println
(
"----shudu riskFactorId : "
+
riskFactorId
);
System
.
out
.
println
(
"----shudu riskFactorId : "
+
riskFactorId
);
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
));
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
)
,
eqpName
);
System
.
out
.
println
(
"----udpate riskFactor sucess"
);
System
.
out
.
println
(
"----udpate riskFactor sucess"
);
}
}
}
catch
(
InnerInvokException
e1
)
{
}
catch
(
InnerInvokException
e1
)
{
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/config/EquipmentListener.java
View file @
3dcf3e19
...
@@ -191,7 +191,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
...
@@ -191,7 +191,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
//拓扑闪烁
//拓扑闪烁
topographyAlarm
(
sourceId
,
statusByName
);
topographyAlarm
(
sourceId
,
statusByName
);
// 触发风险合格不合格
// 触发风险合格不合格
riskAlarm
(
eqpId
,
remark
,
statusName
);
riskAlarm
(
eqpId
,
remark
,
statusName
,
eqpName
);
}
}
}
}
}
}
...
@@ -213,7 +213,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
...
@@ -213,7 +213,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
}
}
}
}
private
Integer
riskAlarm
(
Long
eqpId
,
String
remark
,
String
statusName
)
{
private
Integer
riskAlarm
(
Long
eqpId
,
String
remark
,
String
statusName
,
String
eqpName
)
{
int
statusByName
=
0
;
int
statusByName
=
0
;
EquipmentQualityVo
queryEquipmentPoint
=
equipmentMapper
.
queryEquipmentPoint
(
eqpId
,
remark
);
EquipmentQualityVo
queryEquipmentPoint
=
equipmentMapper
.
queryEquipmentPoint
(
eqpId
,
remark
);
if
(!
ObjectUtils
.
isEmpty
(
queryEquipmentPoint
))
{
if
(!
ObjectUtils
.
isEmpty
(
queryEquipmentPoint
))
{
...
@@ -231,7 +231,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
...
@@ -231,7 +231,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
// 修改rpn值
// 修改rpn值
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
try
{
try
{
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
));
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
)
,
eqpName
);
System
.
out
.
println
(
"----udpate riskFactor sucess"
);
System
.
out
.
println
(
"----udpate riskFactor sucess"
);
}
catch
(
InnerInvokException
e1
)
{
}
catch
(
InnerInvokException
e1
)
{
logger
.
error
(
"update rpn fail "
+
e1
.
getMessage
());
logger
.
error
(
"update rpn fail "
+
e1
.
getMessage
());
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/config/SelfSupportListener.java
View file @
3dcf3e19
...
@@ -188,7 +188,7 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
...
@@ -188,7 +188,7 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
//修改rpn值
//修改rpn值
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
riskFactorId
.
size
();
j
++)
{
try
{
try
{
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
));
riskModelRemoteClient
.
updateEquipmentAlarmData
(
riskFactorId
.
get
(
j
)
,
eqpName
);
System
.
out
.
println
(
"----udpate riskFactor sucess"
);
System
.
out
.
println
(
"----udpate riskFactor sucess"
);
}
catch
(
InnerInvokException
e1
)
{
}
catch
(
InnerInvokException
e1
)
{
logger
.
error
(
"update rpn fail "
+
e1
.
getMessage
());
logger
.
error
(
"update rpn fail "
+
e1
.
getMessage
());
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/remote/client/RiskModelRemoteClient.java
View file @
3dcf3e19
...
@@ -16,11 +16,11 @@ import org.springframework.web.bind.annotation.RequestParam;
...
@@ -16,11 +16,11 @@ import org.springframework.web.bind.annotation.RequestParam;
public
interface
RiskModelRemoteClient
{
public
interface
RiskModelRemoteClient
{
/**
/**
* 修改rpn值
* 修改rpn值
*/
*/
@RequestMapping
(
value
=
"api/risksource/update/fireqeuiment/sod"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
@RequestMapping
(
value
=
"api/risksource/update/fireqeuiment/sod"
,
method
=
RequestMethod
.
GET
,
consumes
=
"application/json"
)
CommonResponse
updateEquipmentAlarmData
(
@RequestParam
(
value
=
"riskFactorID"
)
Long
riskFactorID
)
throws
InnerInvokException
;
CommonResponse
updateEquipmentAlarmData
(
@RequestParam
(
value
=
"riskFactorID"
)
Long
riskFactorID
,
@RequestParam
(
"equipmentName"
)
String
equipmentName
)
throws
InnerInvokException
;
/**
/**
* 根据风险因素id查询巡检点和指标项目列表
* 根据风险因素id查询巡检点和指标项目列表
...
...
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