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
6119753e
Commit
6119753e
authored
Oct 10, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全景监控大屏 泰和日月年发电量数据来源修改
parent
d25d7dbf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
111 additions
and
80 deletions
+111
-80
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+1
-1
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+0
-0
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+0
-0
LargeScreenImpl.java
...s/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
+63
-35
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+18
-12
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+25
-27
PowerGenerationImpl.java
...ot/module/jxiop/biz/service/impl/PowerGenerationImpl.java
+4
-5
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/constants/CommonConstans.java
View file @
6119753e
...
...
@@ -46,7 +46,7 @@ public class CommonConstans {
//万Kwh转MV
public
static
final
Integer
wkwhToMv
=
10
;
//kw转MV
public
static
final
Double
kwToMv
=
0.00
0
1
;
public
static
final
Double
kwToMv
=
0.001
;
// 正常运行 发电状态=1
// 告警运行 报警状态=1
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
6119753e
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
6119753e
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
View file @
6119753e
...
...
@@ -75,7 +75,7 @@ public class LargeScreenImpl {
value
.
add
(
ZFSLJ
);
Map
<
String
,
List
<
String
>>
map
=
new
HashMap
<>();
map
.
put
(
"equipmentIndexName.keyword"
,
value
);
List
<
StationCacheInfoDto
>
stationCacheInfoDtos
=
commonServiceImpl
.
getListStationCacheInfoDto
();
List
<?
extends
Terms
.
Bucket
>
lidate
=
commonServiceImpl
.
getgroupavg
(
map
,
"valueF"
,
"equipmentIndexName.keyword"
,
ESEquipments
.
class
);
DecimalFormat
format2
=
new
DecimalFormat
(
"#.0000"
);
for
(
Terms
.
Bucket
bucket
:
lidate
)
{
...
...
@@ -99,34 +99,65 @@ public class LargeScreenImpl {
}
}
}
//日发电量
AtomicReference
<
Double
>
dailyPower
=
new
AtomicReference
<>(
0.0
);
//月发电量
AtomicReference
<
Double
>
monthlyPower
=
new
AtomicReference
<>(
0.0
);
//年发电量
AtomicReference
<
Double
>
annualPower
=
new
AtomicReference
<>(
0.0
);
for
(
StationCacheInfoDto
stationCacheInfoDto
:
stationCacheInfoDtos
)
{
//总和
value
.
clear
();
value
.
add
(
RSD
);
value
.
add
(
YFD
);
value
.
add
(
NFD
);
List
<?
extends
Terms
.
Bucket
>
lidatesum
=
commonServiceImpl
.
getgroupsum
(
map
,
"valueF"
,
"equipmentIndexName.keyword"
,
ESEquipments
.
class
);
for
(
Terms
.
Bucket
bucket
:
lidatesum
)
{
Aggregations
aggregation
=
bucket
.
getAggregations
();
List
<
Aggregation
>
listdata
=
Objects
.
nonNull
(
aggregation
)
?
aggregation
.
asList
()
:
null
;
for
(
Aggregation
agg
:
listdata
)
{
ParsedSum
parsedSum
=
(
ParsedSum
)
agg
;
switch
(
bucket
.
getKeyAsString
())
{
case
RSD:
mapdta
.
put
(
"RSD"
,
Double
.
valueOf
(
format2
.
format
(
parsedSum
.
getValue
()*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
)));
break
;
case
YFD:
mapdta
.
put
(
"YFD"
,
Double
.
valueOf
(
format2
.
format
(
parsedSum
.
getValue
()*
CommonConstans
.
pvGenPoweActornew
)));
break
;
case
NFD:
mapdta
.
put
(
"NFD"
,
Double
.
valueOf
(
format2
.
format
(
parsedSum
.
getValue
()*
CommonConstans
.
pvGenPoweActorYear
)));
break
;
default
:
break
;
}
if
(
"FDZ"
.
equals
(
stationCacheInfoDto
.
getStationType
()))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
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
,
"月发电量"
)));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
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
)));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)));
}
}
mapdta
.
put
(
"RSD"
,
keepFourdecimalPlaces
(
dailyPower
.
get
()));
mapdta
.
put
(
"YFD"
,
keepFourdecimalPlaces
(
monthlyPower
.
get
()));
mapdta
.
put
(
"NFD"
,
keepFourdecimalPlaces
(
annualPower
.
get
()));
//总和
// value.clear();
// value.add(RSD);
// value.add(YFD);
// value.add(NFD);
// List<? extends Terms.Bucket> lidatesum = commonServiceImpl.getgroupsum(map, "valueF", "equipmentIndexName.keyword", ESEquipments.class);
//
// for (Terms.Bucket bucket : lidatesum) {
// Aggregations aggregation = bucket.getAggregations();
// List<Aggregation> listdata = Objects.nonNull(aggregation) ? aggregation.asList() : null;
// for (Aggregation agg : listdata) {
// ParsedSum parsedSum = (ParsedSum) agg;
// switch (bucket.getKeyAsString()) {
// case RSD:
// mapdta.put("RSD", Double.valueOf(format2.format(parsedSum.getValue()*CommonConstans.pvGenPoweActor* CommonConstans.pvGenPoweActorDay)));
// break;
// case YFD:
// mapdta.put("YFD", Double.valueOf(format2.format(parsedSum.getValue()*CommonConstans.pvGenPoweActornew)));
// break;
// case NFD:
// mapdta.put("NFD", Double.valueOf(format2.format(parsedSum.getValue()*CommonConstans.pvGenPoweActorYear)));
// break;
// default:
// break;
// }
// }
// }
//计算月完成百分比
//当前月份 获取
LocalDate
currentDate
=
LocalDate
.
now
();
...
...
@@ -238,17 +269,14 @@ public class LargeScreenImpl {
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActornew
));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActorYear
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
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
)));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)));
}
}
mapdta
.
put
(
"RSD"
,
keepFourdecimalPlaces
(
dailyPower
.
get
()));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
6119753e
...
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.QRCodeUtil
;
import
com.yeejoin.amos.boot.module.jxiop.api.Enum.ElectricQuantity
;
import
com.yeejoin.amos.boot.module.jxiop.api.Enum.KGName
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.IndexDto
;
...
...
@@ -1936,22 +1937,27 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
likeQuerCondtion
=
new
HashMap
<>();
if
(
query
!=
null
){
likeQuerCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
}
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
Double
powerOfDay
=
0.0000
;
Double
powerOfMonth
=
0.0000
;
Double
powerOfAnnual
=
0.0000
;
if
(
ObjectUtils
.
isEmpty
(
query
)){
powerOfDay
=
powerOfDay
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
powerOfMonth
=
powerOfMonth
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
powerOfAnnual
=
powerOfAnnual
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
}
else
{
powerOfDay
=
powerOfDay
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
));
powerOfMonth
=
powerOfMonth
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
));
powerOfAnnual
=
powerOfAnnual
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
));
}
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
Double
powerOfDayFD
=
0.0000
;
Double
powerOfMonthFD
=
0.0000
;
Double
powerOfAnnualFD
=
0.0000
;
powerOfDayFD
=
powerOfDayFD
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
powerOfMonthFD
=
powerOfMonthFD
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
powerOfAnnualFD
=
powerOfAnnualFD
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
Map
<
String
,
Object
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"日发电量"
,
powerOfDay
FD
);
hashMap
.
put
(
"月发电量"
,
powerOfMonth
FD
);
hashMap
.
put
(
"年发电量"
,
powerOfAnnual
FD
);
hashMap
.
put
(
"日发电量"
,
powerOfDay
);
hashMap
.
put
(
"月发电量"
,
powerOfMonth
);
hashMap
.
put
(
"年发电量"
,
powerOfAnnual
);
return
hashMap
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceImpl.java
View file @
6119753e
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PowerGenerationImpl.java
View file @
6119753e
...
...
@@ -88,16 +88,15 @@ public class PowerGenerationImpl {
//"日发电量"
if
(
"日发电量"
.
equals
(
value
)){
//"日发电量"
flags
=
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweAc
torDay
;
value
=
CommonConstans
.
taiHeGenIndica
torDay
;
}
else
if
(
"月发电量"
.
equals
(
value
)){
//"月发电量"
flags
=
CommonConstans
.
pvGenPoweActornew
;
value
=
CommonConstans
.
taiHeGenIndicatorMonth
;
}
else
{
//"年发电量"
flags
=
CommonConstans
.
pvGenPoweAc
torYear
;
value
=
CommonConstans
.
taiHeGenIndica
torYear
;
}
indexDto
=
indicatorDataMapper
.
selectlastgf
(
value
,
gatewayId
,
startTime
,
endTime
);
indexDto
=
indicatorDataMapper
.
selectlastgf
(
value
,
stationCacheInfoDto
.
getBoosterGatewayId
(),
startTime
,
endTime
);
//indexDto= this.getlastgf(gatewayId,value,datyvalue);
}
...
...
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