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
f29da542
Commit
f29da542
authored
Oct 11, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
泰和光伏-场站总览功率曲线 丢失代码补全
parent
a226e31d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
10 deletions
+55
-10
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+55
-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 @
f29da542
...
...
@@ -460,21 +460,58 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public
Map
<
String
,
Object
>
getDetailsWindSpeedAll
(
String
gatewayId
)
{
List
<
Map
<
String
,
Object
>>
list
=
temporaryDataMapper
.
timingTemporarysSorageData
(
gatewayId
);
public
void
getDetailsWindSpeedAll
(
StationBasic
stationBasic
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
List
<
String
>
values
=
new
ArrayList
<>();
List
<
String
>
valueList
=
new
ArrayList
<>();
Set
<
String
>
time
=
new
TreeSet
<>();
for
(
Map
<
String
,
Object
>
stringStringMap
:
list
)
{
if
(
stringStringMap
.
get
(
"equipmentIndexName"
).
toString
().
equals
(
"有功功率"
))
{
values
.
add
(
stringStringMap
.
get
(
"value"
).
toString
());
Map
<
Date
,
Double
>
groupMap
=
new
HashMap
<>();
List
<
String
>
time
=
new
ArrayList
<>();
Map
<
String
,
Object
>
activePowerInfo
=
new
HashMap
<>();
Map
<
String
,
Object
>
otherInfo
=
new
HashMap
<>();
List
<
IndicatorData
>
activePowerList
=
new
ArrayList
<>();
List
<
IndicatorData
>
otherList
=
new
ArrayList
<>();
String
startTime
=
DateUtil
.
today
()
+
" 00:00:00"
;
String
endTime
=
DateUtil
.
today
()
+
" 23:59:59"
;
Double
installedCapacity
=
commonServiceImpl
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
());
if
(
"FDZ"
.
equals
(
stationBasic
.
getStationType
()))
{
activePowerList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
xiazaoActivePowerPoint
,
startTime
,
endTime
,
stationBasic
.
getBoosterGatewayId
());
otherList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
xiazaoWindSpeedrPoint
,
startTime
,
endTime
,
stationBasic
.
getFanGatewayId
());
groupMap
=
otherList
.
stream
().
collect
(
Collectors
.
groupingBy
(
IndicatorData:
:
getCreatedTime
,
Collectors
.
averagingDouble
(
IndicatorData:
:
getValueF
)));
}
else
{
activePowerList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
taiheActivePowerPoint
,
startTime
,
endTime
,
stationBasic
.
getBoosterGatewayId
());
otherList
=
indicatorDataMapper
.
selectDataByequipmentIndexNameAndtime
(
CommonConstans
.
taiheIrradiationPonit
,
startTime
,
endTime
,
stationBasic
.
getBoosterGatewayId
());
}
for
(
int
i
=
0
;
i
<
activePowerList
.
size
();
i
++)
{
IndicatorData
indicatorData
=
activePowerList
.
get
(
i
);
time
.
add
(
DateUtil
.
format
(
indicatorData
.
getCreatedTime
(),
"HH:mm"
));
if
(
"FDZ"
.
equals
(
stationBasic
.
getStationType
()))
{
values
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
indicatorData
.
getValueF
()));
valueList
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
groupMap
.
get
(
indicatorData
.
getCreatedTime
())));
}
else
{
value
List
.
add
(
stringStringMap
.
get
(
"value"
).
toString
(
));
time
.
add
(
stringStringMap
.
get
(
"createdTime"
).
toString
(
));
value
s
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
indicatorData
.
getValueF
()
*
CommonConstans
.
kwToMv
));
valueList
.
add
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
otherList
.
get
(
i
).
getValueF
()
));
}
}
String
max
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
values
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
max
().
getAsDouble
());
String
min
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
values
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
min
().
getAsDouble
());
String
mean
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
values
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
average
().
getAsDouble
());
activePowerInfo
.
put
(
"mean"
,
mean
);
activePowerInfo
.
put
(
"max"
,
max
);
activePowerInfo
.
put
(
"min"
,
min
);
activePowerInfo
.
put
(
"maxTime"
,
time
.
get
(
values
.
lastIndexOf
(
max
)));
activePowerInfo
.
put
(
"minTime"
,
time
.
get
(
values
.
lastIndexOf
(
min
)));
activePowerInfo
.
put
(
"load"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
Double
.
valueOf
(
values
.
get
(
values
.
size
()
-
1
))
/
installedCapacity
));
max
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
valueList
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
max
().
getAsDouble
());
min
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
valueList
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
min
().
getAsDouble
());
mean
=
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
valueList
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
average
().
getAsDouble
());
otherInfo
.
put
(
"mean"
,
mean
);
otherInfo
.
put
(
"max"
,
max
);
otherInfo
.
put
(
"min"
,
min
);
otherInfo
.
put
(
"maxTime"
,
time
.
get
(
valueList
.
lastIndexOf
(
max
)));
otherInfo
.
put
(
"minTime"
,
time
.
get
(
valueList
.
lastIndexOf
(
min
)));
otherInfo
.
put
(
"load"
,
""
);
List
<
Map
<
String
,
Object
>>
seriesData
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map3
=
new
HashMap
<>();
...
...
@@ -486,8 +523,16 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
seriesData
.
add
(
map1
);
map
.
put
(
"seriesData"
,
seriesData
);
map
.
put
(
"axisData"
,
time
);
try
{
log
.
info
(
"---------------------推送全站图表信息开始------------------------------"
);
emqKeeper
.
getMqttClient
().
publish
(
stationBasic
.
getSequenceNbr
()+
"_activePower_table"
,
JSON
.
toJSON
(
map
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
stationBasic
.
getSequenceNbr
()+
"_activePower_info"
,
JSON
.
toJSON
(
activePowerInfo
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
emqKeeper
.
getMqttClient
().
publish
(
stationBasic
.
getSequenceNbr
()+
"_other_info"
,
JSON
.
toJSON
(
otherInfo
).
toString
().
getBytes
(
"UTF-8"
),
1
,
true
);
log
.
info
(
"---------------------推送全站图表信息结束------------------------------"
);
}
catch
(
Exception
exception
){
log
.
info
(
"---------------------推送全站图表信息失败------------------------------"
);
}
return
map
;
}
public
Map
<
String
,
Object
>
getDetailsWindSpeed
(
String
gatewayId
,
String
name
)
{
...
...
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