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
630cafa4
Commit
630cafa4
authored
Aug 04, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功率曲线-获取下拉框数据接口提交
parent
9efd6b70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
18 deletions
+47
-18
MonitoringMapController.java
.../module/jxiop/biz/controller/MonitoringMapController.java
+8
-0
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+39
-18
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitoringMapController.java
View file @
630cafa4
...
...
@@ -57,6 +57,14 @@ public class MonitoringMapController extends BaseController {
public
ResponseModel
<
List
<
HashMap
<
String
,
Object
>>>
getNationalPowerGenerationData
()
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getNationalPowerGenerationData
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"获取监盘全国地图-获取功率曲线下拉框数据"
)
@GetMapping
(
"/getSelectDataForNational"
)
public
ResponseModel
<
List
<
HashMap
<
String
,
Object
>>>
getSelectDataForNational
()
{
return
ResponseHelper
.
buildResponse
(
monitoringServiceImpl
.
getSelectDataForNational
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"获取区域电量指标完成情况"
)
@GetMapping
(
"/getCompletionOfPowerIndicatorsByProvinceName"
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceImpl.java
View file @
630cafa4
...
...
@@ -912,29 +912,50 @@ public class MonitoringServiceImpl {
stationBasic
.
setAddress
(
String
.
format
(
"%.2f"
,
commonServiceImpl
.
getTotalByIndicatior
(
mapList
,
"年发电量"
)));
}
else
{
mapList
=
influxdbUtil
.
query
(
"SELECT * FROM indicators_"
+
stationBasic
.
getFanGatewayId
()
+
" where frontModule=~/逆变器/ and (equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' )"
);
stationBasic
.
setAddress
(
String
.
format
(
"%.2f"
,
commonServiceImpl
.
getTotalByIndicatior
(
mapList
,
"年发电量"
)
/
10000
));
stationBasic
.
setAddress
(
String
.
format
(
"%.2f"
,
commonServiceImpl
.
getTotalByIndicatior
(
mapList
,
"年发电量"
)
/
10000
));
}
});
List
<
StationBasic
>
fdzList
=
stationBasicListAll
.
stream
().
filter
(
stationBasic
->
stationBasic
.
getStationType
().
equals
(
"FDZ"
)).
collect
(
Collectors
.
toList
());
List
<
StationBasic
>
jzsgfdzList
=
stationBasicListAll
.
stream
().
filter
(
stationBasic
->
stationBasic
.
getStationType
().
equals
(
"JZSGFDZ"
)).
collect
(
Collectors
.
toList
());
List
<
StationBasic
>
fbsgfdzList
=
stationBasicListAll
.
stream
().
filter
(
stationBasic
->
stationBasic
.
getStationType
().
equals
(
"FBSGFDZ"
)).
collect
(
Collectors
.
toList
());
resultHashMap
.
add
(
getTableByStationListAndTitle
(
"风电年发电量 (万kWh)"
,
fdzList
,
"#0060ff"
));
resultHashMap
.
add
(
getTableByStationListAndTitle
(
"分布式光伏年发电量 (万kWh)"
,
fbsgfdzList
,
"#fdaa04"
));
resultHashMap
.
add
(
getTableByStationListAndTitle
(
"集中式光伏年发电量 (万kWh)"
,
jzsgfdzList
,
"#ec18f7"
));
resultHashMap
.
add
(
getTableByStationListAndTitle
(
"风电年发电量 (万kWh)"
,
fdzList
,
"#0060ff"
));
resultHashMap
.
add
(
getTableByStationListAndTitle
(
"分布式光伏年发电量 (万kWh)"
,
fbsgfdzList
,
"#fdaa04"
));
resultHashMap
.
add
(
getTableByStationListAndTitle
(
"集中式光伏年发电量 (万kWh)"
,
jzsgfdzList
,
"#ec18f7"
));
return
resultHashMap
;
}
public
HashMap
<
String
,
Object
>
getTableByStationListAndTitle
(
String
title
,
List
<
StationBasic
>
stationBasicList
,
String
color
){
HashMap
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
List
<
String
>
xData
=
new
ArrayList
<>();
List
<
String
>
yData
=
new
ArrayList
<>();
stationBasicList
.
forEach
(
stationBasic
->
{
xData
.
add
(
stationBasic
.
getStationName
());
yData
.
add
(
stationBasic
.
getAddress
());
});
hashMap
.
put
(
"title"
,
title
);
hashMap
.
put
(
"color"
,
color
);
hashMap
.
put
(
"xData"
,
xData
);
hashMap
.
put
(
"yData"
,
yData
);
return
hashMap
;
}
public
HashMap
<
String
,
Object
>
getTableByStationListAndTitle
(
String
title
,
List
<
StationBasic
>
stationBasicList
,
String
color
)
{
HashMap
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
List
<
String
>
xData
=
new
ArrayList
<>();
List
<
String
>
yData
=
new
ArrayList
<>();
stationBasicList
.
forEach
(
stationBasic
->
{
xData
.
add
(
stationBasic
.
getStationName
());
yData
.
add
(
stationBasic
.
getAddress
());
});
hashMap
.
put
(
"title"
,
title
);
hashMap
.
put
(
"color"
,
color
);
hashMap
.
put
(
"xData"
,
xData
);
hashMap
.
put
(
"yData"
,
yData
);
return
hashMap
;
}
public
List
<
HashMap
<
String
,
Object
>>
getSelectDataForNational
()
{
List
<
HashMap
<
String
,
Object
>>
hashMapList
=
new
ArrayList
<>();
List
<
StationBasic
>
stationBasicList
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
isNotNull
(
"belong_area"
).
isNotNull
(
"fan_gateway_id"
));
List
<
Region
>
regionList
=
this
.
regionMapper
.
selectList
(
new
QueryWrapper
<
Region
>().
eq
(
"level"
,
1
));
regionList
.
forEach
(
region
->
{
HashMap
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"label"
,
region
.
getRegionName
());
hashMap
.
put
(
"value"
,
region
.
getRegionCode
());
List
<
HashMap
<
String
,
Object
>>
children
=
stationBasicList
.
stream
().
filter
(
stationBasic
->
stationBasic
.
getBelongArea
().
contains
(
String
.
valueOf
(
region
.
getRegionCode
()))).
map
(
stationBasic
->
{
HashMap
<
String
,
Object
>
hashMap1
=
new
HashMap
<>();
hashMap1
.
put
(
"label"
,
stationBasic
.
getStationName
());
hashMap1
.
put
(
"value"
,
stationBasic
.
getSequenceNbr
());
return
hashMap1
;
}).
collect
(
Collectors
.
toList
());
hashMap
.
put
(
"children"
,
children
);
hashMapList
.
add
(
hashMap
);
});
return
hashMapList
;
}
}
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