Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
00caab43
Commit
00caab43
authored
Oct 26, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改预警生成规则
parent
b1f9ed9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
63 deletions
+78
-63
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+78
-63
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/HealthStatusIndicatorServiceImpl.java
View file @
00caab43
...
@@ -162,8 +162,9 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -162,8 +162,9 @@ public class HealthStatusIndicatorServiceImpl {
Double
healthValueRisk
=
0.0
;
Double
healthValueRisk
=
0.0
;
Double
healthValueNotice
=
0.0
;
Double
healthValueNotice
=
0.0
;
long
healthValueDayCount
=
0
;
long
healthValueWarnCount
=
0
;
long
healthValueHourCount
=
0
;
long
healthValueRiskCount
=
0
;
long
healthValueNoticeCount
=
0
;
long
healthValueMinCount
=
0
;
long
healthValueMinCount
=
0
;
...
@@ -171,15 +172,15 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -171,15 +172,15 @@ public class HealthStatusIndicatorServiceImpl {
switch
(
e
.
getWarningName
()){
switch
(
e
.
getWarningName
()){
case
"警告"
:
case
"警告"
:
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Mi
nCount
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
War
nCount
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"危险"
:
case
"危险"
:
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Min
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Risk
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"注意"
:
case
"注意"
:
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Min
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Notice
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
}
}
...
@@ -195,19 +196,22 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -195,19 +196,22 @@ public class HealthStatusIndicatorServiceImpl {
String
level
=
""
;
String
level
=
""
;
String
content
=
""
;
String
content
=
""
;
String
num
=
""
;
String
num
=
""
;
content
=
healthValueMinCount
*
10
+
"分钟"
;
if
(
noticeNum
>=
healthValueNoticeCount
){
if
(
noticeNum
>=
healthValueMinCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_notice_minute","notice");
// redisUtils.set(gateWayId+"_"+address+"_health_notice_minute","notice");
level
=
"注意"
;
level
=
"注意"
;
num
=
""
+
healthValueNotice
;
num
=
""
+
healthValueNotice
;
}
else
if
(
warnNum
>=
healthValueMinCount
){
content
=
healthValueNotice
*
10
+
"分钟"
;
}
else
if
(
warnNum
>=
healthValueWarnCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_warn_minute","warn");
// redisUtils.set(gateWayId+"_"+address+"_health_warn_minute","warn");
level
=
"警告"
;
level
=
"警告"
;
num
=
""
+
healthValueWarn
;
num
=
""
+
healthValueWarn
;
}
else
if
(
riskNum
>=
healthValueMinCount
){
content
=
healthValueWarnCount
*
10
+
"分钟"
;
}
else
if
(
riskNum
>=
healthValueRiskCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_risk_minute","risk");
// redisUtils.set(gateWayId+"_"+address+"_health_risk_minute","risk");
level
=
"危险"
;
level
=
"危险"
;
num
=
""
+
healthValueRisk
;
num
=
""
+
healthValueRisk
;
content
=
healthValueRiskCount
*
10
+
"分钟"
;
}
}
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
LambdaQueryWrapper
<
IdxBizPvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizPvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
...
@@ -307,24 +311,26 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -307,24 +311,26 @@ public class HealthStatusIndicatorServiceImpl {
Double
healthValueRisk
=
0.0
;
Double
healthValueRisk
=
0.0
;
Double
healthValueNotice
=
0.0
;
Double
healthValueNotice
=
0.0
;
long
healthValueDayCount
=
0
;
long
healthValueNoticeCount
=
0
;
long
healthValueRiskCount
=
0
;
long
healthValueWarnCount
=
0
;
long
healthValueHourCount
=
0
;
long
healthValueHourCount
=
0
;
long
healthValueMinCount
=
0
;
for
(
IdxBizPvWarningRuleSet
e
:
idxBizPvWarningRuleSets
)
{
for
(
IdxBizPvWarningRuleSet
e
:
idxBizPvWarningRuleSets
)
{
switch
(
e
.
getWarningName
()){
switch
(
e
.
getWarningName
()){
case
"警告"
:
case
"警告"
:
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Hour
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Warn
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"危险"
:
case
"危险"
:
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Hour
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Risk
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"注意"
:
case
"注意"
:
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Hour
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Notice
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
}
}
...
@@ -341,21 +347,19 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -341,21 +347,19 @@ public class HealthStatusIndicatorServiceImpl {
String
level
=
""
;
String
level
=
""
;
String
content
=
""
;
String
content
=
""
;
String
num
=
""
;
String
num
=
""
;
content
=
healthValueHourCount
+
"小时"
;
if
(
noticeNum
>=
healthValueNoticeCount
){
if
(
noticeNum
>=
healthValueHourCount
){
level
=
"注意"
;
level
=
"注意"
;
num
=
""
+
healthValueNotice
;
num
=
""
+
healthValueNotice
;
content
=
healthValueNoticeCount
+
"小时"
;
}
else
if
(
warnNum
>=
healthValue
Hour
Count
){
}
else
if
(
warnNum
>=
healthValue
Warn
Count
){
level
=
"警告"
;
level
=
"警告"
;
num
=
""
+
healthValueWarn
;
num
=
""
+
healthValueWarn
;
content
=
healthValueWarnCount
+
"小时"
;
}
else
if
(
riskNum
>=
healthValueHourCount
){
}
else
if
(
riskNum
>=
healthValueRiskCount
){
level
=
"危险"
;
level
=
"危险"
;
num
=
""
+
healthValueRisk
;
num
=
""
+
healthValueRisk
;
content
=
healthValueRiskCount
+
"小时"
;
}
}
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
LambdaQueryWrapper
<
IdxBizPvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizPvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
...
@@ -453,23 +457,23 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -453,23 +457,23 @@ public class HealthStatusIndicatorServiceImpl {
Double
healthValueNotice
=
0.0
;
Double
healthValueNotice
=
0.0
;
long
healthValueDayCount
=
0
;
long
healthValueDayCount
=
0
;
long
healthValue
Hour
Count
=
0
;
long
healthValue
Notice
Count
=
0
;
long
healthValue
Min
Count
=
0
;
long
healthValue
Risk
Count
=
0
;
long
healthValueWarnCount
=
0
;
for
(
IdxBizPvWarningRuleSet
e
:
idxBizPvWarningRuleSets
)
{
for
(
IdxBizPvWarningRuleSet
e
:
idxBizPvWarningRuleSets
)
{
switch
(
e
.
getWarningName
()){
switch
(
e
.
getWarningName
()){
case
"警告"
:
case
"警告"
:
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Day
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Warn
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"危险"
:
case
"危险"
:
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Day
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Risk
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"注意"
:
case
"注意"
:
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Day
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Notice
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
}
}
...
@@ -485,19 +489,22 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -485,19 +489,22 @@ public class HealthStatusIndicatorServiceImpl {
String
level
=
""
;
String
level
=
""
;
String
content
=
""
;
String
content
=
""
;
String
num
=
""
;
String
num
=
""
;
content
=
healthValueDayCount
+
"天"
;
if
(
noticeNum
>=
healthValue
Day
Count
){
if
(
noticeNum
>=
healthValue
Notice
Count
){
// redisUtils.set(gateWayId+"_"+address+"_health_notice_day","notice");
// redisUtils.set(gateWayId+"_"+address+"_health_notice_day","notice");
level
=
"注意"
;
level
=
"注意"
;
num
=
""
+
healthValueNotice
;
num
=
""
+
healthValueNotice
;
}
else
if
(
warnNum
>=
healthValueDayCount
){
content
=
healthValueNoticeCount
+
"天"
;
}
else
if
(
warnNum
>=
healthValueWarnCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_warn_day","warn");
// redisUtils.set(gateWayId+"_"+address+"_health_warn_day","warn");
level
=
"警告"
;
level
=
"警告"
;
num
=
""
+
healthValueWarn
;
num
=
""
+
healthValueWarn
;
}
else
if
(
riskNum
>=
healthValueDayCount
){
content
=
healthValueWarnCount
+
"天"
;
}
else
if
(
riskNum
>=
healthValueRiskCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_risk_day","risk");
// redisUtils.set(gateWayId+"_"+address+"_health_risk_day","risk");
level
=
"危险"
;
level
=
"危险"
;
num
=
""
+
healthValueRisk
;
num
=
""
+
healthValueRisk
;
content
=
healthValueRiskCount
+
"天"
;
}
}
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
LambdaQueryWrapper
<
IdxBizPvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizPvWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
...
@@ -592,8 +599,9 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -592,8 +599,9 @@ public class HealthStatusIndicatorServiceImpl {
Double
healthValueRisk
=
0.0
;
Double
healthValueRisk
=
0.0
;
Double
healthValueNotice
=
0.0
;
Double
healthValueNotice
=
0.0
;
long
healthValueDayCount
=
0
;
long
healthValueWarnCount
=
0
;
long
healthValueHourCount
=
0
;
long
healthValueRiskCount
=
0
;
long
healthValueNoticeCount
=
0
;
long
healthValueMinCount
=
0
;
long
healthValueMinCount
=
0
;
...
@@ -601,15 +609,15 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -601,15 +609,15 @@ public class HealthStatusIndicatorServiceImpl {
switch
(
e
.
getWarningName
()){
switch
(
e
.
getWarningName
()){
case
"警告"
:
case
"警告"
:
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Mi
nCount
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
War
nCount
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"危险"
:
case
"危险"
:
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Min
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Risk
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"注意"
:
case
"注意"
:
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Min
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Notice
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
}
}
...
@@ -628,20 +636,22 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -628,20 +636,22 @@ public class HealthStatusIndicatorServiceImpl {
String
level
=
""
;
String
level
=
""
;
String
content
=
""
;
String
content
=
""
;
String
num
=
""
;
String
num
=
""
;
content
=
healthValueMinCount
*
10
+
"分钟"
;
if
(
noticeNum
>=
healthValueNoticeCount
){
if
(
noticeNum
>=
healthValueMinCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_notice_day","notice");
// redisUtils.set(gateWayId+"_"+address+"_health_notice_day","notice");
level
=
"注意"
;
level
=
"注意"
;
num
=
""
+
healthValueNotice
;
num
=
""
+
healthValueNotice
;
content
=
healthValueNoticeCount
*
10
+
"分钟"
;
}
}
else
if
(
warnNum
>=
healthValue
Mi
nCount
){
else
if
(
warnNum
>=
healthValue
War
nCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_warn_day","warn");
// redisUtils.set(gateWayId+"_"+address+"_health_warn_day","warn");
level
=
"警告"
;
level
=
"警告"
;
num
=
""
+
healthValueWarn
;
num
=
""
+
healthValueWarn
;
}
else
if
(
riskNum
>=
healthValueMinCount
){
content
=
healthValueWarnCount
*
10
+
"分钟"
;
}
else
if
(
riskNum
>=
healthValueRiskCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_risk_day","risk");
// redisUtils.set(gateWayId+"_"+address+"_health_risk_day","risk");
level
=
"危险"
;
level
=
"危险"
;
num
=
""
+
healthValueRisk
;
num
=
""
+
healthValueRisk
;
content
=
healthValueRiskCount
*
10
+
"分钟"
;
}
}
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
//库里若已存在该测点预警 不生成重复的 若新生预警等级高于历史 则生成
LambdaQueryWrapper
<
IdxBizFanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizFanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
...
@@ -740,24 +750,24 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -740,24 +750,24 @@ public class HealthStatusIndicatorServiceImpl {
Double
healthValueRisk
=
0.0
;
Double
healthValueRisk
=
0.0
;
Double
healthValueNotice
=
0.0
;
Double
healthValueNotice
=
0.0
;
long
healthValue
Day
Count
=
0
;
long
healthValue
Notice
Count
=
0
;
long
healthValue
Hour
Count
=
0
;
long
healthValue
Risk
Count
=
0
;
long
healthValue
Mi
nCount
=
0
;
long
healthValue
War
nCount
=
0
;
for
(
IdxBizFanWarningRuleSet
e
:
idxBizPvWarningRuleSets
)
{
for
(
IdxBizFanWarningRuleSet
e
:
idxBizPvWarningRuleSets
)
{
switch
(
e
.
getWarningName
()){
switch
(
e
.
getWarningName
()){
case
"警告"
:
case
"警告"
:
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Hour
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Warn
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"危险"
:
case
"危险"
:
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Hour
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Risk
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"注意"
:
case
"注意"
:
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Hour
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Notice
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
}
}
...
@@ -775,17 +785,19 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -775,17 +785,19 @@ public class HealthStatusIndicatorServiceImpl {
String
level
=
""
;
String
level
=
""
;
String
content
=
""
;
String
content
=
""
;
String
num
=
""
;
String
num
=
""
;
content
=
healthValueHourCount
+
"小时"
;
if
(
noticeNum
>=
healthValueNoticeCount
){
if
(
noticeNum
>=
healthValueHourCount
){
level
=
"注意"
;
level
=
"注意"
;
num
=
""
+
healthValueNotice
;
num
=
""
+
healthValueNotice
;
}
else
if
(
warnNum
>=
healthValueHourCount
){
content
=
healthValueNoticeCount
+
"小时"
;
}
else
if
(
warnNum
>=
healthValueWarnCount
){
level
=
"警告"
;
level
=
"警告"
;
num
=
""
+
healthValueWarn
;
num
=
""
+
healthValueWarn
;
}
else
if
(
riskNum
>=
healthValueHourCount
){
content
=
healthValueWarnCount
+
"小时"
;
}
else
if
(
riskNum
>=
healthValueRiskCount
){
level
=
"危险"
;
level
=
"危险"
;
num
=
""
+
healthValueRisk
;
num
=
""
+
healthValueRisk
;
content
=
healthValueRiskCount
+
"小时"
;
}
}
LambdaQueryWrapper
<
IdxBizFanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizFanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanWarningRecord:
:
getAnalysisPointId
,
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
query
.
eq
(
IdxBizFanWarningRecord:
:
getAnalysisPointId
,
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
...
@@ -882,23 +894,25 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -882,23 +894,25 @@ public class HealthStatusIndicatorServiceImpl {
Double
healthValueRisk
=
0.0
;
Double
healthValueRisk
=
0.0
;
Double
healthValueNotice
=
0.0
;
Double
healthValueNotice
=
0.0
;
long
healthValueDayCount
=
0
;
long
healthValueNoticeCount
=
0
;
long
healthValueWarnCount
=
0
;
long
healthValueRiskCount
=
0
;
for
(
IdxBizFanWarningRuleSet
e
:
idxBizPvWarningRuleSets
)
{
for
(
IdxBizFanWarningRuleSet
e
:
idxBizPvWarningRuleSets
)
{
switch
(
e
.
getWarningName
()){
switch
(
e
.
getWarningName
()){
case
"警告"
:
case
"警告"
:
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueWarn
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Day
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Warn
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"危险"
:
case
"危险"
:
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueRisk
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Day
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Risk
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
case
"注意"
:
case
"注意"
:
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValueNotice
=
Double
.
parseDouble
(
e
.
getWarningIf
().
substring
(
2
));
healthValue
Day
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
healthValue
Notice
Count
=
Long
.
parseLong
(
e
.
getWarningCycle
());
break
;
break
;
}
}
...
@@ -917,20 +931,21 @@ public class HealthStatusIndicatorServiceImpl {
...
@@ -917,20 +931,21 @@ public class HealthStatusIndicatorServiceImpl {
String
level
=
""
;
String
level
=
""
;
String
content
=
""
;
String
content
=
""
;
String
num
=
""
;
String
num
=
""
;
content
=
healthValueDayCount
+
"天"
;
if
(
noticeNum
>=
healthValueNoticeCount
){
if
(
noticeNum
>=
healthValueDayCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_notice_day","notice");
// redisUtils.set(gateWayId+"_"+address+"_health_notice_day","notice");
level
=
"注意"
;
level
=
"注意"
;
num
=
""
+
healthValueNotice
;
num
=
""
+
healthValueNotice
;
}
content
=
healthValueNoticeCount
+
"天"
;
else
if
(
warnNum
>=
healthValueDay
Count
){
}
else
if
(
warnNum
>=
healthValueWarn
Count
){
// redisUtils.set(gateWayId+"_"+address+"_health_warn_day","warn");
// redisUtils.set(gateWayId+"_"+address+"_health_warn_day","warn");
level
=
"警告"
;
level
=
"警告"
;
num
=
""
+
healthValueWarn
;
num
=
""
+
healthValueWarn
;
}
else
if
(
riskNum
>=
healthValueDayCount
){
content
=
healthValueWarnCount
+
"天"
;
}
else
if
(
riskNum
>=
healthValueRiskCount
){
// redisUtils.set(gateWayId+"_"+address+"_health_risk_day","risk");
// redisUtils.set(gateWayId+"_"+address+"_health_risk_day","risk");
level
=
"危险"
;
level
=
"危险"
;
num
=
""
+
healthValueRisk
;
num
=
""
+
healthValueRisk
;
content
=
healthValueRiskCount
+
"天"
;
}
}
LambdaQueryWrapper
<
IdxBizFanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizFanWarningRecord
>
query
=
new
LambdaQueryWrapper
<>();
...
...
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