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
d1dae55d
Commit
d1dae55d
authored
Oct 10, 2023
by
xinglei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
996d6238
0208da4c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+15
-2
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 @
d1dae55d
...
@@ -26,6 +26,7 @@ import org.typroject.tyboot.component.emq.EmqKeeper;
...
@@ -26,6 +26,7 @@ import org.typroject.tyboot.component.emq.EmqKeeper;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.net.URLDecoder
;
import
java.net.URLDecoder
;
import
java.time.LocalDate
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -74,7 +75,8 @@ public class MonitoringServiceImpl {
...
@@ -74,7 +75,8 @@ public class MonitoringServiceImpl {
// InfluxdbUtil influxdbUtil;
// InfluxdbUtil influxdbUtil;
@Autowired
@Autowired
IndicatorDataMapper
indicatorDataMapper
;
IndicatorDataMapper
indicatorDataMapper
;
@Autowired
StationPlanMapper
StationPlanMapper
;
/**
/**
* 根据场站编号获取该场站的装机容量
* 根据场站编号获取该场站的装机容量
*
*
...
@@ -824,7 +826,18 @@ public class MonitoringServiceImpl {
...
@@ -824,7 +826,18 @@ public class MonitoringServiceImpl {
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
total
.
set
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
));
total
.
set
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
));
}
}
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
total
.
get
()
%
100
));
QueryWrapper
<
StationPlan
>
wrapper2
=
new
QueryWrapper
<>();
LocalDate
currentDate
=
LocalDate
.
now
();
int
month
=
currentDate
.
getMonthValue
();
wrapper2
.
select
(
"ifnull(sum(value), 0) as sum_value"
);
wrapper2
.
eq
(
"monthly"
,
month
);
wrapper2
.
eq
(
"station_basic_id"
,
stationBasic
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
list
=
StationPlanMapper
.
selectMaps
(
wrapper2
);
System
.
out
.
println
(
total
.
get
()+
"9999999999999999999999"
);
Double
sumValue
=
list
!=
null
&&
!
list
.
isEmpty
()
?
(
Double
)
list
.
get
(
0
).
get
(
"sum_value"
)
:
0
;
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
total
.
get
()/
sumValue
*
100
));
});
});
List
<
StationBasic
>
sorted
=
stationBasicListAll
.
stream
().
sorted
(
Comparator
.
comparing
(
StationBasic:
:
getAddress
,
Comparator
.
comparingDouble
(
Double:
:
parseDouble
)).
reversed
()).
collect
(
Collectors
.
toList
());
List
<
StationBasic
>
sorted
=
stationBasicListAll
.
stream
().
sorted
(
Comparator
.
comparing
(
StationBasic:
:
getAddress
,
Comparator
.
comparingDouble
(
Double:
:
parseDouble
)).
reversed
()).
collect
(
Collectors
.
toList
());
sorted
.
forEach
(
stationBasic
->
{
sorted
.
forEach
(
stationBasic
->
{
...
...
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