Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
6e1e4ce7
Commit
6e1e4ce7
authored
Sep 03, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复健康指数分析天和小时不出现问题
parent
de8bfc3d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
FanHealthIndexServiceImpl.java
...ule/jxiop/biz/service/impl/FanHealthIndexServiceImpl.java
+10
-10
PvHealthIndexServiceImpl.java
...dule/jxiop/biz/service/impl/PvHealthIndexServiceImpl.java
+6
-6
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/FanHealthIndexServiceImpl.java
View file @
6e1e4ce7
...
...
@@ -62,7 +62,7 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
idxBizFanWeightQueryWrapper
.
eq
(
"type"
,
"5"
);
idxBizFanWeightQueryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizFanWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizFanWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getIndexAddress
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getAnalysisObjSeq
()
+
o
.
getWeight
()
+
o
.
getArea
()
+
o
.
getSubSystem
()
+
o
.
getEquipmentName
()
+
o
.
getNumber
()
+
o
.
getPointName
()
+
o
.
getKks
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
...
...
@@ -120,7 +120,7 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
idxBizFanWeightQueryWrapper
.
eq
(
"type"
,
"5"
);
idxBizFanWeightQueryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizFanWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizFanWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getSubSystem
()
+
o
.
getEquipmentName
()
+
o
.
getNumber
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
...
...
@@ -173,7 +173,7 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
idxBizFanWeightQueryWrapper
.
eq
(
"type"
,
"4"
);
idxBizFanWeightQueryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
(),
IdxBizFanWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
(),
IdxBizFanWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getNumber
()
+
o
.
getEquipmentName
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
...
...
@@ -225,7 +225,7 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
idxBizFanWeightQueryWrapper
.
eq
(
"type"
,
"3"
);
idxBizFanWeightQueryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
(),
IdxBizFanWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
(),
IdxBizFanWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
...
...
@@ -276,7 +276,7 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
idxBizFanWeightQueryWrapper
.
eq
(
"type"
,
"2"
);
idxBizFanWeightQueryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
(),
IdxBizFanWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
(),
IdxBizFanWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
...
...
@@ -325,7 +325,7 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
idxBizFanWeightQueryWrapper
.
eq
(
"type"
,
"1"
);
idxBizFanWeightQueryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
idxBizFanWeightQueryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
(),
IdxBizFanWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
(),
IdxBizFanWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
FanHealthIndex
>>
fanHealthIndicesZxtMap
=
fanHealthIndicesZxt
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getAnalysisObjType
()
+
o
.
getOrgCode
()));
List
<
FanHealthIndex
>
fanHealthIndicesZxtNews
=
new
ArrayList
<>();
...
...
@@ -354,11 +354,11 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
public
List
<
HealthIndexDTO
>
getInfoListByGroupByQy
(
String
startTime
,
String
fanTableName
,
String
pvTableName
,
String
analysisObjectType
)
{
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndexMapper
.
getInfoList
(
startTime
,
fanTableName
,
analysisObjectType
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
new
QueryWrapper
<
IdxBizFanWeight
>().
eq
(
"type"
,
"2"
).
isNotNull
(
"value"
));
Map
<
String
,
Float
>
fanWeightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
"fan"
+
o
.
getArae
()
+
o
.
getStation
(),
IdxBizFanWeight:
:
getValue
));
Map
<
String
,
Float
>
fanWeightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
"fan"
+
o
.
getArae
()
+
o
.
getStation
(),
IdxBizFanWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoList
(
startTime
,
pvTableName
,
analysisObjectType
);
List
<
IdxBizPvWeight
>
pvIdxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
new
QueryWrapper
<
IdxBizPvWeight
>().
eq
(
"type"
,
"2"
).
isNotNull
(
"value"
));
Map
<
String
,
Float
>
pvWeightMap
=
pvIdxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
"pv"
+
o
.
getArae
()
+
o
.
getStation
(),
IdxBizPvWeight:
:
getValue
));
Map
<
String
,
Float
>
pvWeightMap
=
pvIdxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
"pv"
+
o
.
getArae
()
+
o
.
getStation
(),
IdxBizPvWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
List
<
HealthIndexDTO
>
healthIndexDTOS
=
new
ArrayList
<>();
healthIndexDTOS
.
addAll
(
fanHealthIndices
.
stream
().
map
(
this
::
toHealthIndexDTO
).
collect
(
Collectors
.
toList
()));
...
...
@@ -396,11 +396,11 @@ public class FanHealthIndexServiceImpl implements IFanHealthIndexService {
public
List
<
HealthIndexDTO
>
getInfoListByGroupByQg
(
String
startTime
,
String
fanTableName
,
String
pvTableName
,
String
analysisObjectType
)
{
List
<
FanHealthIndex
>
fanHealthIndices
=
fanHealthIndexMapper
.
getInfoList
(
startTime
,
fanTableName
,
analysisObjectType
);
List
<
IdxBizFanWeight
>
idxBizFanWeights
=
idxBizFanWeightMapper
.
selectList
(
new
QueryWrapper
<
IdxBizFanWeight
>().
eq
(
"type"
,
"1"
).
isNotNull
(
"value"
));
Map
<
String
,
Float
>
fanWeightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
"fan"
+
o
.
getArae
(),
IdxBizFanWeight:
:
getValue
));
Map
<
String
,
Float
>
fanWeightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
"fan"
+
o
.
getArae
(),
IdxBizFanWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
List
<
PvHealthIndex
>
pvHealthIndices
=
pvHealthIndexMapper
.
getInfoList
(
startTime
,
pvTableName
,
analysisObjectType
);
List
<
IdxBizPvWeight
>
pvIdxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
new
QueryWrapper
<
IdxBizPvWeight
>().
eq
(
"type"
,
"1"
).
isNotNull
(
"value"
));
Map
<
String
,
Float
>
pvWeightMap
=
pvIdxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
"pv"
+
o
.
getArae
(),
IdxBizPvWeight:
:
getValue
));
Map
<
String
,
Float
>
pvWeightMap
=
pvIdxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
"pv"
+
o
.
getArae
(),
IdxBizPvWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
List
<
HealthIndexDTO
>
healthIndexDTOS
=
new
ArrayList
<>();
healthIndexDTOS
.
addAll
(
fanHealthIndices
.
stream
().
map
(
this
::
toHealthIndexDTO
).
collect
(
Collectors
.
toList
()));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PvHealthIndexServiceImpl.java
View file @
6e1e4ce7
...
...
@@ -50,7 +50,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
queryWrapper
.
eq
(
"type"
,
"5"
);
queryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizPvWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizPvWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getIndexAddress
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getAnalysisObjSeq
()
+
o
.
getWeight
()
+
o
.
getArea
()
+
o
.
getSubarray
()
+
o
.
getManufacturer
()
+
o
.
getEquipmentName
()
+
o
.
getPointName
()
+
o
.
getDeviceType
()
+
o
.
getKks
()
+
o
.
getOrgCode
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
...
...
@@ -111,7 +111,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
queryWrapper
.
eq
(
"type"
,
"5"
);
queryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizPvWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
()
+
o
.
getPointName
(),
IdxBizPvWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getSubarray
()
+
o
.
getOrgCode
()
+
o
.
getEquipmentName
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
...
...
@@ -165,7 +165,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
queryWrapper
.
eq
(
"type"
,
"4"
);
queryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
(),
IdxBizPvWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
()
+
o
.
getSubarray
(),
IdxBizPvWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getGatewayId
()
+
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getSubarray
()
+
o
.
getOrgCode
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
...
...
@@ -218,7 +218,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
queryWrapper
.
eq
(
"type"
,
"3"
);
queryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
(),
IdxBizPvWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
()
+
o
.
getEquipmentName
(),
IdxBizPvWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getStation
()
+
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getOrgCode
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
...
...
@@ -270,7 +270,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
queryWrapper
.
eq
(
"type"
,
"2"
);
queryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
(),
IdxBizPvWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
()
+
o
.
getStation
(),
IdxBizPvWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getAnalysisObjType
()
+
o
.
getArea
()
+
o
.
getOrgCode
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
...
...
@@ -320,7 +320,7 @@ public class PvHealthIndexServiceImpl implements IPvHealthIndexService {
queryWrapper
.
eq
(
"type"
,
"1"
);
queryWrapper
.
isNotNull
(
"value"
);
List
<
IdxBizPvWeight
>
idxBizFanWeights
=
idxBizPvWeightMapper
.
selectList
(
queryWrapper
);
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
(),
IdxBizPvWeight:
:
getValue
));
Map
<
String
,
Float
>
weightMap
=
idxBizFanWeights
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getArae
(),
IdxBizPvWeight:
:
getValue
,(
item1
,
item2
)
->
item1
));
// 开始计算加权平均
Map
<
String
,
List
<
PvHealthIndex
>>
healthIndicesMap
=
pvHealthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
o
->
o
.
getAnalysisObjType
()
+
o
.
getOrgCode
()));
List
<
PvHealthIndex
>
pvHealthIndexList
=
new
ArrayList
<>();
...
...
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