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
82178a0c
Commit
82178a0c
authored
Aug 09, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
fd0b67d5
eef6a715
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+9
-8
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/MonitoringServiceImpl.java
View file @
82178a0c
...
...
@@ -988,9 +988,10 @@ public class MonitoringServiceImpl {
List
<
String
>
superPowerShortYdata
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
25
;
i
++)
{
xdata
.
add
(
String
.
format
(
"%02d"
,
i
)
+
":00"
);
currentPowerYdata
.
add
(
String
.
format
(
"%.2f"
,
Math
.
random
()
*
30.0
));
shortPowerYdata
.
add
(
String
.
format
(
"%.2f"
,
Math
.
random
()
*
40.0
));
superPowerShortYdata
.
add
(
String
.
format
(
"%.2f"
,
Math
.
random
()
*
35.0
));
Random
random
=
new
Random
();
currentPowerYdata
.
add
(
String
.
format
(
"%.2f"
,
random
.
nextDouble
()*
30
));
shortPowerYdata
.
add
(
String
.
format
(
"%.2f"
,
random
.
nextDouble
()*
40
));
superPowerShortYdata
.
add
(
String
.
format
(
"%.2f"
,
random
.
nextDouble
()*
50
));
}
result
.
put
(
"xData"
,
xdata
);
HashMap
<
String
,
Object
>
currentPowerHashMap
=
new
HashMap
<>();
...
...
@@ -999,11 +1000,11 @@ public class MonitoringServiceImpl {
result
.
put
(
"currentPower"
,
currentPowerHashMap
);
HashMap
<
String
,
Object
>
shortPowerHashMap
=
new
HashMap
<>();
shortPowerHashMap
.
put
(
"title"
,
"短期功率预测 "
+
date
);
shortPowerHashMap
.
put
(
"yData"
,
curren
tPowerYdata
);
shortPowerHashMap
.
put
(
"yData"
,
shor
tPowerYdata
);
result
.
put
(
"shortPower"
,
shortPowerHashMap
);
HashMap
<
String
,
Object
>
superShortPowerHashMap
=
new
HashMap
<>();
superShortPowerHashMap
.
put
(
"title"
,
"超短期功率预测 "
+
date
);
superShortPowerHashMap
.
put
(
"yData"
,
currentPower
Ydata
);
superShortPowerHashMap
.
put
(
"yData"
,
superPowerShort
Ydata
);
result
.
put
(
"superShortPower"
,
superShortPowerHashMap
);
HashMap
<
String
,
Object
>
footerList
=
new
HashMap
<>();
String
currentMin
=
String
.
format
(
"%.2f"
,
currentPowerYdata
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
min
().
getAsDouble
());
...
...
@@ -1029,9 +1030,9 @@ public class MonitoringServiceImpl {
sj2
.
add
(
xdata
.
get
(
currentPowerYdata
.
indexOf
(
currentMax
)));
sj2
.
add
(
xdata
.
get
(
shortPowerYdata
.
indexOf
(
shortMax
)));
sj2
.
add
(
xdata
.
get
(
superPowerShortYdata
.
indexOf
(
supreMax
)));
String
currentAvg
=
currentPowerYdata
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
average
().
toString
(
);
String
shortAvg
=
shortPowerYdata
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
average
().
toString
(
);
String
supreAvg
=
superPowerShortYdata
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
average
().
toString
(
);
String
currentAvg
=
String
.
format
(
"%.2f"
,
currentPowerYdata
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
average
().
getAsDouble
()
);
String
shortAvg
=
String
.
format
(
"%.2f"
,
shortPowerYdata
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
average
().
getAsDouble
()
);
String
supreAvg
=
String
.
format
(
"%.2f"
,
superPowerShortYdata
.
stream
().
mapToDouble
(
Double:
:
parseDouble
).
average
().
getAsDouble
()
);
List
<
String
>
pjz
=
new
ArrayList
<>();
List
<
String
>
fjl
=
new
ArrayList
<>();
pjz
.
add
(
currentAvg
);
...
...
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