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
dbaa4742
Commit
dbaa4742
authored
Aug 01, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加光伏 运行列表
parent
f0f4c31e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
0 deletions
+57
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+21
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+36
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
dbaa4742
...
...
@@ -729,4 +729,25 @@ public class MonitorFanIdxController extends BaseController {
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
return
ResponseHelper
.
buildResponse
(
monitorFanIndicatorImpl
.
collectingBox
(
gatewayId
,
current
,
size
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"光伏 运行列表"
)
@GetMapping
(
"/solarPowerOperation"
)
public
ResponseModel
<
IPage
<
Map
<
String
,
Object
>>>
solarPowerOperation
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
,
@RequestParam
(
value
=
"current"
)
int
current
,
int
size
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
List
<
Map
<
String
,
Object
>>
statusMonitoring
=
monitorFanIndicator
.
solarPowerOperation
(
gatewayId
);
List
<
Map
<
String
,
Object
>>
collect
=
statusMonitoring
.
stream
()
.
skip
((
long
)
(
current
-
1
)
*
size
)
.
limit
(
size
)
.
collect
(
Collectors
.
toList
());
IPage
<
Map
<
String
,
Object
>>
result
=
new
Page
<>();
result
.
setRecords
(
collect
);
result
.
setCurrent
(
current
);
result
.
setTotal
(
statusMonitoring
.
size
());
return
ResponseHelper
.
buildResponse
(
result
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
dbaa4742
...
...
@@ -1571,5 +1571,41 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
List
<
Map
<
String
,
Object
>>
solarPowerOperation
(
String
gatewayId
)
{
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" WHERE equipmentIndexName = '有功功率' or equipmentIndexName = '逆变器效率' or equipmentIndexName ='总直流功率' or equipmentIndexName ='日发电量' or equipmentIndexName ='总发电量' "
;
List
<
IndicatorsDto
>
list
=
influxDButils
.
getListData
(
sql
,
IndicatorsDto
.
class
);
List
<
IndicatorsDto
>
collect
=
list
.
stream
().
filter
(
e
->
StringUtils
.
isNotEmpty
(
e
.
getEquipmentNumber
())).
collect
(
Collectors
.
toList
());
Map
<
String
,
List
<
IndicatorsDto
>>
collects
=
collect
.
stream
().
collect
(
Collectors
.
groupingBy
(
IndicatorsDto:
:
getEquipmentNumber
));
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
();
for
(
String
s
:
collects
.
keySet
()){
List
<
IndicatorsDto
>
indicatorsDtos
=
collects
.
get
(
s
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
s
);
map
.
put
(
"type"
,
"兆能"
);
//此处暂时未提供数据 待定 暂写死值
map
.
put
(
"status"
,
"1"
);
//此处暂时未提供数据 待定 暂写死值
indicatorsDtos
.
forEach
(
e
->{
switch
(
e
.
getEquipmentIndexName
()){
case
"总直流功率"
:
map
.
put
(
"sr"
,
keepTwoDecimalPlaces
(
e
.
getValue
()));
break
;
case
"有功功率"
:
map
.
put
(
"sc"
,
keepTwoDecimalPlaces
(
e
.
getValue
()));
break
;
case
"逆变器效率"
:
map
.
put
(
"efficiency"
,
keepTwoDecimalPlaces
(
e
.
getValue
()));
break
;
case
"日发电量"
:
map
.
put
(
"dayNum"
,
keepTwoDecimalPlaces
(
e
.
getValue
()));
break
;
case
"总发电量"
:
map
.
put
(
"yearNum"
,
keepTwoDecimalPlaces
(
e
.
getValue
()));
break
;
}
});
result
.
add
(
map
);
}
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