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
ff2de0da
Commit
ff2de0da
authored
Nov 24, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改等级判断
parent
aed280e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+7
-7
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TDBigScreenAnalyseController.java
View file @
ff2de0da
...
...
@@ -1201,26 +1201,26 @@ public class TDBigScreenAnalyseController extends BaseController {
throw
new
RuntimeException
(
"安全的分数上限只能是100"
);
}
List
<
IdxBizFanHealthLevel
>
list
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"注意"
));
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
kv
.
get
(
"ANALYSIS_OBJ_TYPE"
)
));
Map
<
String
,
Double
>
map
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizFanHealthLevel:
:
getHealthLevel
,
IdxBizFanHealthLevel:
:
getGroupLowerLimit
));
if
(
Double
.
valueOf
(
kv
.
get
(
"GROUP_LOWER_LIMIT"
).
toString
())
<=
map
.
get
(
"
groupUpperLimit
"
))
{
if
(
Double
.
valueOf
(
kv
.
get
(
"GROUP_LOWER_LIMIT"
).
toString
())
<=
map
.
get
(
"
注意
"
))
{
throw
new
RuntimeException
(
"安全的下限和注意的上限不能低于注意的下限"
);
}
}
else
if
(
"注意"
.
equals
(
kv
.
get
(
"HEALTH_LEVEL"
).
toString
()))
{
List
<
IdxBizFanHealthLevel
>
list
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"警告"
));
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
kv
.
get
(
"ANALYSIS_OBJ_TYPE"
)
));
Map
<
String
,
Double
>
map
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizFanHealthLevel:
:
getHealthLevel
,
IdxBizFanHealthLevel:
:
getGroupLowerLimit
));
if
(
Double
.
valueOf
(
kv
.
get
(
"GROUP_LOWER_LIMIT"
).
toString
())
<=
map
.
get
(
"
groupUpperLimit
"
))
{
if
(
Double
.
valueOf
(
kv
.
get
(
"GROUP_LOWER_LIMIT"
).
toString
())
<=
map
.
get
(
"
警告
"
))
{
throw
new
RuntimeException
(
"注意的下限和安全的上限不能低于安全的下限"
);
}
}
else
if
(
"警告"
.
equals
(
kv
.
get
(
"HEALTH_LEVEL"
).
toString
()))
{
List
<
IdxBizFanHealthLevel
>
list
=
idxBizFanHealthLevelMapper
.
selectList
(
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"危险"
));
new
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>().
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
kv
.
get
(
"ANALYSIS_OBJ_TYPE"
)
));
Map
<
String
,
Double
>
map
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
IdxBizFanHealthLevel:
:
getHealthLevel
,
IdxBizFanHealthLevel:
:
getGroupLowerLimit
));
if
(
Double
.
valueOf
(
kv
.
get
(
"GROUP_LOWER_LIMIT"
).
toString
())
<=
map
.
get
(
"
groupUpperLimit
"
))
{
if
(
Double
.
valueOf
(
kv
.
get
(
"GROUP_LOWER_LIMIT"
).
toString
())
<=
map
.
get
(
"
危险
"
))
{
throw
new
RuntimeException
(
"警告的下限和注意的上限不能低于注意的下限"
);
}
}
else
if
(
"危险"
.
equals
(
kv
.
get
(
"HEALTH_LEVEL"
).
toString
()))
{
...
...
@@ -1229,7 +1229,7 @@ public class TDBigScreenAnalyseController extends BaseController {
throw
new
RuntimeException
(
"危险的分数下限只能是0"
);
}
}
if
(
Integer
.
valueOf
(
kv
.
get
(
"GROUP_UPPER_LIMIT"
).
toString
())
<=
Integer
if
(
Double
.
valueOf
(
kv
.
get
(
"GROUP_UPPER_LIMIT"
).
toString
())
<=
Double
.
valueOf
(
kv
.
get
(
"GROUP_LOWER_LIMIT"
).
toString
()))
{
throw
new
RuntimeException
(
kv
.
get
(
"HEALTH_LEVEL"
).
toString
()
+
"的分数上限不能小于或等于本身下限"
);
}
...
...
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