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
8dbc7363
Commit
8dbc7363
authored
Jul 21, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
夏造运行列表优化
parent
0077db66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+18
-10
No files found.
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 @
8dbc7363
...
...
@@ -832,18 +832,26 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
ResultsData
runningPageByStationId
(
int
current
,
int
size
,
String
stationId
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
baseSql
=
"SELECT equipmentNumber, value FROM \"indicators_%s\" where equipmentIndexName = '%s'"
;
String
windSql
=
String
.
format
(
baseSql
,
stationBasic
.
getFanGatewayId
(),
"风向角"
);
List
<
IndicatorsDto
>
windSqlList
=
influxDButils
.
getListDataAll
(
windSql
,
IndicatorsDto
.
class
);
String
powerSql
=
String
.
format
(
baseSql
,
stationBasic
.
getFanGatewayId
(),
"有功功率"
);
List
<
IndicatorsDto
>
powerSqlList
=
influxDButils
.
getListDataAll
(
powerSql
,
IndicatorsDto
.
class
);
String
baseSql
=
"SELECT equipmentNumber, value, equipmentIndexName FROM \"indicators_%s\" where equipmentIndexName = '%s' or equipmentIndexName = '%s' or equipmentIndexName = '%s' or equipmentIndexName = '%s'"
;
String
windSql
=
String
.
format
(
baseSql
,
stationBasic
.
getFanGatewayId
(),
"风向角"
,
"有功功率"
,
"瞬时风速"
,
"日发电量"
);
List
<
IndicatorsDto
>
allList
=
influxDButils
.
getListDataAll
(
windSql
,
IndicatorsDto
.
class
);
List
<
IndicatorsDto
>
windSqlList
=
new
ArrayList
<>();
List
<
IndicatorsDto
>
powerSqlList
=
new
ArrayList
<>();
List
<
IndicatorsDto
>
windSpeedSqlList
=
new
ArrayList
<>();
List
<
IndicatorsDto
>
electricitySqlList
=
new
ArrayList
<>();
allList
.
forEach
(
item
->
{
if
(
"风向角"
.
equals
(
item
.
getEquipmentIndexName
()))
{
windSqlList
.
add
(
item
);
}
if
(
"有功功率"
.
equals
(
item
.
getEquipmentIndexName
()))
{
powerSqlList
.
add
(
item
);
}
if
(
"瞬时风速"
.
equals
(
item
.
getEquipmentIndexName
()))
{
windSpeedSqlList
.
add
(
item
);
}
if
(
"日发电量"
.
equals
(
item
.
getEquipmentIndexName
()))
{
electricitySqlList
.
add
(
item
);
}
});
Map
<
String
,
String
>
powerSqlMap
=
powerSqlList
.
stream
().
collect
(
Collectors
.
toMap
(
IndicatorsDto:
:
getEquipmentNumber
,
IndicatorsDto:
:
getValue
));
String
windSpeedSql
=
String
.
format
(
baseSql
,
stationBasic
.
getFanGatewayId
(),
"瞬时风速"
);
List
<
IndicatorsDto
>
windSpeedSqlList
=
influxDButils
.
getListDataAll
(
windSpeedSql
,
IndicatorsDto
.
class
);
Map
<
String
,
String
>
windSpeedSqlMap
=
windSpeedSqlList
.
stream
().
collect
(
Collectors
.
toMap
(
IndicatorsDto:
:
getEquipmentNumber
,
IndicatorsDto:
:
getValue
));
String
electricitySql
=
String
.
format
(
baseSql
,
stationBasic
.
getFanGatewayId
(),
"日发电量"
);
List
<
IndicatorsDto
>
electricitySqlList
=
influxDButils
.
getListDataAll
(
electricitySql
,
IndicatorsDto
.
class
);
Map
<
String
,
String
>
electricitySqlMap
=
electricitySqlList
.
stream
().
collect
(
Collectors
.
toMap
(
IndicatorsDto:
:
getEquipmentNumber
,
IndicatorsDto:
:
getValue
));
ArrayList
<
Map
<
String
,
String
>>
resultList
=
new
ArrayList
<>();
windSqlList
.
forEach
(
item
->
{
...
...
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