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
0bfa0135
Commit
0bfa0135
authored
Nov 20, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预警详情保留一位小数
parent
e255578f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
AlarmInfoDetailServiceImpl.java
...le/jxiop/biz/service/impl/AlarmInfoDetailServiceImpl.java
+27
-14
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/AlarmInfoDetailServiceImpl.java
View file @
0bfa0135
...
@@ -212,11 +212,11 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
...
@@ -212,11 +212,11 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
HashMap
<
String
,
String
>
alarmAbnormalityItem
=
new
HashMap
<>();
HashMap
<
String
,
String
>
alarmAbnormalityItem
=
new
HashMap
<>();
FanHealthIndex
idxBizFanHealthIndex
=
idxBizFanHealthIndexList
.
get
(
i
);
FanHealthIndex
idxBizFanHealthIndex
=
idxBizFanHealthIndexList
.
get
(
i
);
xDatas
.
add
(
idxBizFanHealthIndex
.
getAnalysisTime
());
xDatas
.
add
(
idxBizFanHealthIndex
.
getAnalysisTime
());
yDatas
.
add
(
idxBizFanHealthIndex
.
getHealthIndex
(
));
yDatas
.
add
(
Double
.
valueOf
(
keepOneKeepDecimalPlace
(
idxBizFanHealthIndex
.
getHealthIndex
())
));
alarmAbnormalityItem
.
put
(
"sort"
,
String
.
valueOf
(
i
));
alarmAbnormalityItem
.
put
(
"sort"
,
String
.
valueOf
(
i
));
alarmAbnormalityItem
.
put
(
"time"
,
idxBizFanHealthIndex
.
getAnalysisTime
());
alarmAbnormalityItem
.
put
(
"time"
,
idxBizFanHealthIndex
.
getAnalysisTime
());
alarmAbnormalityItem
.
put
(
"abnormal"
,
String
.
valueOf
(
idxBizFanHealthIndex
.
getAnomaly
()).
replace
(
"null"
,
"0.0"
));
alarmAbnormalityItem
.
put
(
"abnormal"
,
keepOneKeepDecimalPlace
(
idxBizFanHealthIndex
.
getAnomaly
()
));
alarmAbnormalityItem
.
put
(
"healthValue"
,
String
.
valueOf
(
idxBizFanHealthIndex
.
getHealthIndex
()));
alarmAbnormalityItem
.
put
(
"healthValue"
,
keepOneKeepDecimalPlace
(
idxBizFanHealthIndex
.
getHealthIndex
()));
alarmAbnormalityList
.
add
(
alarmAbnormalityItem
);
alarmAbnormalityList
.
add
(
alarmAbnormalityItem
);
}
}
alarmTrendMap
.
put
(
"xDatas"
,
xDatas
);
alarmTrendMap
.
put
(
"xDatas"
,
xDatas
);
...
@@ -265,11 +265,11 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
...
@@ -265,11 +265,11 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
HashMap
<
String
,
String
>
alarmAbnormalityItem
=
new
HashMap
<>();
HashMap
<
String
,
String
>
alarmAbnormalityItem
=
new
HashMap
<>();
PvHealthIndex
idxBizPvHealthIndex
=
idxBizPvHealthIndexList
.
get
(
i
);
PvHealthIndex
idxBizPvHealthIndex
=
idxBizPvHealthIndexList
.
get
(
i
);
xDatas
.
add
(
idxBizPvHealthIndex
.
getAnalysisTime
());
xDatas
.
add
(
idxBizPvHealthIndex
.
getAnalysisTime
());
yDatas
.
add
(
idxBizPvHealthIndex
.
getHealthIndex
(
));
yDatas
.
add
(
Double
.
valueOf
(
keepOneKeepDecimalPlace
(
idxBizPvHealthIndex
.
getHealthIndex
())
));
alarmAbnormalityItem
.
put
(
"sort"
,
String
.
valueOf
(
i
));
alarmAbnormalityItem
.
put
(
"sort"
,
String
.
valueOf
(
i
));
alarmAbnormalityItem
.
put
(
"time"
,
idxBizPvHealthIndex
.
getAnalysisTime
());
alarmAbnormalityItem
.
put
(
"time"
,
idxBizPvHealthIndex
.
getAnalysisTime
());
alarmAbnormalityItem
.
put
(
"abnormal"
,
String
.
valueOf
(
idxBizPvHealthIndex
.
getAnomaly
()).
replace
(
"null"
,
"0.0"
));
alarmAbnormalityItem
.
put
(
"abnormal"
,
keepOneKeepDecimalPlace
(
idxBizPvHealthIndex
.
getAnomaly
()
));
alarmAbnormalityItem
.
put
(
"healthValue"
,
String
.
valueOf
(
idxBizPvHealthIndex
.
getHealthIndex
()));
alarmAbnormalityItem
.
put
(
"healthValue"
,
keepOneKeepDecimalPlace
(
idxBizPvHealthIndex
.
getHealthIndex
()));
if
(
idxBizPvHealthIndexListSize
>=
3
)
{
if
(
idxBizPvHealthIndexListSize
>=
3
)
{
if
(
i
==
0
)
{
if
(
i
==
0
)
{
endTime
=
handlerDateStr
(
idxBizPvHealthIndex
.
getAnalysisTime
(),
-
8
,
5
);
endTime
=
handlerDateStr
(
idxBizPvHealthIndex
.
getAnalysisTime
(),
-
8
,
5
);
...
@@ -540,10 +540,10 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
...
@@ -540,10 +540,10 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
Double
processValue1
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process1Address
);
Double
processValue1
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process1Address
);
Double
processValue2
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process2Address
);
Double
processValue2
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process2Address
);
Double
processValue3
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process3Address
);
Double
processValue3
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process3Address
);
currentValueMap
.
put
(
"analyseValue"
,
String
.
valueOf
(
analyseValue
));
currentValueMap
.
put
(
"analyseValue"
,
keepOneKeepDecimalPlace
(
analyseValue
));
currentValueMap
.
put
(
"processValue1"
,
String
.
valueOf
(
processValue1
));
currentValueMap
.
put
(
"processValue1"
,
keepOneKeepDecimalPlace
(
processValue1
));
currentValueMap
.
put
(
"processValue2"
,
String
.
valueOf
(
processValue2
));
currentValueMap
.
put
(
"processValue2"
,
keepOneKeepDecimalPlace
(
processValue2
));
currentValueMap
.
put
(
"processValue3"
,
String
.
valueOf
(
processValue3
));
currentValueMap
.
put
(
"processValue3"
,
keepOneKeepDecimalPlace
(
processValue3
));
HashMap
<
String
,
String
>
trainValueMap
=
getWorkingConditionCombinationIntervalFan
(
processValue1
,
processValue2
,
processValue3
,
idxBizFanPointVarCentralValueList
);
HashMap
<
String
,
String
>
trainValueMap
=
getWorkingConditionCombinationIntervalFan
(
processValue1
,
processValue2
,
processValue3
,
idxBizFanPointVarCentralValueList
);
trainValueMap
.
put
(
"time"
,
s
);
trainValueMap
.
put
(
"time"
,
s
);
currentValue
.
add
(
currentValueMap
);
currentValue
.
add
(
currentValueMap
);
...
@@ -599,10 +599,10 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
...
@@ -599,10 +599,10 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
Double
processValue1
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process1Address
);
Double
processValue1
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process1Address
);
Double
processValue2
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process2Address
);
Double
processValue2
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process2Address
);
Double
processValue3
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process3Address
);
Double
processValue3
=
indicatorDataListMap
.
get
(
s
+
"_"
+
process3Address
);
currentValueMap
.
put
(
"analyseValue"
,
String
.
valueOf
(
analyseValue
));
currentValueMap
.
put
(
"analyseValue"
,
keepOneKeepDecimalPlace
(
analyseValue
));
currentValueMap
.
put
(
"processValue1"
,
String
.
valueOf
(
processValue1
));
currentValueMap
.
put
(
"processValue1"
,
keepOneKeepDecimalPlace
(
processValue1
));
currentValueMap
.
put
(
"processValue2"
,
String
.
valueOf
(
processValue2
));
currentValueMap
.
put
(
"processValue2"
,
keepOneKeepDecimalPlace
(
processValue2
));
currentValueMap
.
put
(
"processValue3"
,
String
.
valueOf
(
processValue3
));
currentValueMap
.
put
(
"processValue3"
,
keepOneKeepDecimalPlace
(
processValue3
));
HashMap
<
String
,
String
>
trainValueMap
=
getWorkingConditionCombinationIntervalPv
(
processValue1
,
processValue2
,
processValue3
,
idxBizPvPointVarCentralValueList
);
HashMap
<
String
,
String
>
trainValueMap
=
getWorkingConditionCombinationIntervalPv
(
processValue1
,
processValue2
,
processValue3
,
idxBizPvPointVarCentralValueList
);
trainValueMap
.
put
(
"time"
,
s
);
trainValueMap
.
put
(
"time"
,
s
);
currentValue
.
add
(
currentValueMap
);
currentValue
.
add
(
currentValueMap
);
...
@@ -653,4 +653,17 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
...
@@ -653,4 +653,17 @@ public class AlarmInfoDetailServiceImpl implements IAlarmInfoDetailService {
result
.
put
(
"warningCycle"
,
warningCycle
);
result
.
put
(
"warningCycle"
,
warningCycle
);
return
result
;
return
result
;
}
}
/**
* 保留一位小数
* @param input
* @return
*/
public
String
keepOneKeepDecimalPlace
(
Double
input
){
String
result
=
"0.0"
;
if
(!
ObjectUtils
.
isEmpty
(
input
)){
return
String
.
format
(
"%.1f"
,
input
)
;
}
return
result
;
}
}
}
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