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
1e13a0e8
Commit
1e13a0e8
authored
Oct 10, 2023
by
suhuiguang
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
15ca20bf
f0d78474
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+13
-6
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 @
1e13a0e8
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import
cn.hutool.core.date.DateUnit
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.druid.sql.visitor.functions.If
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -69,7 +70,7 @@ public class MonitoringServiceImpl {
@Autowired
EmqKeeper
emqKeeper
;
// @Autowired
// @Autowired
// InfluxdbUtil influxdbUtil;
@Autowired
IndicatorDataMapper
indicatorDataMapper
;
...
...
@@ -257,7 +258,7 @@ public class MonitoringServiceImpl {
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
null
);
List
<
ESEquipments
>
result1
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion1
,
null
,
ESEquipments
.
class
);
completionOfPowerIndicatorsDto
.
setWindSpeedOrIrradiance
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
)));
completionOfPowerIndicatorsDto
.
setActivePower
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)
*
CommonConstans
.
kwToMv
));
completionOfPowerIndicatorsDto
.
setActivePower
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)
*
CommonConstans
.
kwToMv
));
completionOfPowerIndicatorsDto
.
setDailyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
)));
completionOfPowerIndicatorsDto
.
setMonthlyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
)));
completionOfPowerIndicatorsDto
.
setAnnualPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)));
...
...
@@ -691,6 +692,12 @@ public class MonitoringServiceImpl {
public
Page
<
HashMap
<
String
,
String
>>
getDetailsOnPowergeneration
(
String
areaName
)
{
Page
<
HashMap
<
String
,
String
>>
hashMapPage
=
new
Page
<>(
1
,
99
);
List
<
HashMap
<
String
,
String
>>
hashMapList
=
new
ArrayList
<>();
List
<
StationCacheInfoDto
>
stationCacheInfoDtoList
=
new
ArrayList
<>();
stationCacheInfoDtoList
=
commonServiceImpl
.
getListStationCacheInfoDto
();
if
(!
ObjectUtils
.
isEmpty
(
areaName
))
{
stationCacheInfoDtoList
=
stationCacheInfoDtoList
.
stream
().
filter
(
stationCacheInfoDto
->
stationCacheInfoDto
.
getBelongArea
().
equals
(
areaName
)).
collect
(
Collectors
.
toList
());
}
List
<
StationBasic
>
stationBasicList
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
isNotNull
(
"fan_gateway_id"
));
//日发电量
AtomicReference
<
Double
>
dailyPower
=
new
AtomicReference
<>(
0.0
);
...
...
@@ -698,11 +705,11 @@ public class MonitoringServiceImpl {
AtomicReference
<
Double
>
monthlyPower
=
new
AtomicReference
<>(
0.0
);
//年发电量
AtomicReference
<
Double
>
annualPower
=
new
AtomicReference
<>(
0.0
);
station
BasicList
.
forEach
(
stationBasic
->
{
if
(
"FDZ"
.
equals
(
station
Basic
.
getStationType
()))
{
station
CacheInfoDtoList
.
forEach
(
stationCacheInfoDto
->
{
if
(
"FDZ"
.
equals
(
station
CacheInfoDto
.
getStationType
()))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
station
Basic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
station
CacheInfoDto
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)));
...
...
@@ -710,7 +717,7 @@ public class MonitoringServiceImpl {
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
station
Basic
.
getBoosterGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
station
CacheInfoDto
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
)));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
)));
...
...
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