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
40edb89b
Commit
40edb89b
authored
Oct 09, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运行监盘-泰和日月年发电量由计算改为测点直取,运行列表、实时数据日月年光伏系数转换。
parent
f1162d4d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
122 additions
and
134 deletions
+122
-134
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+11
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+6
-6
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+2
-10
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+14
-4
MonitoringServiceIMQTTmpl.java
...ule/jxiop/biz/service/impl/MonitoringServiceIMQTTmpl.java
+11
-14
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+78
-100
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/constants/CommonConstans.java
View file @
40edb89b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
constants
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
constants
;
import
com.sun.javafx.logging.PulseLogger
;
import
org.checkerframework.checker.units.qual.C
;
import
org.checkerframework.checker.units.qual.C
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
public
class
CommonConstans
{
public
class
CommonConstans
{
//光伏发电量系数
//光伏发电量系数
public
static
final
Double
pvGenPoweActor
=
0.000001
;
public
static
final
Double
pvGenPoweActor
=
0.000001
;
public
static
final
Double
pvGenPoweActorDay
=
1.0
;
public
static
final
Double
pvGenPoweActorDay
=
1.0
;
public
static
final
Double
pvGenPoweActorYear
=
0.0001
;
public
static
final
Double
pvGenPoweActorYear
=
0.0001
;
public
static
final
Double
pvGenPoweActorCurrentData
=
0.0001
;
// 风电站:
// 风电站:
// (日/月/年)发电量=场站所有风机(日/月/年)发电量总和
// (日/月/年)发电量=场站所有风机(日/月/年)发电量总和
// 装机容量=场站所有风机装机容量总和
// 装机容量=场站所有风机装机容量总和
...
@@ -107,4 +112,10 @@ public class CommonConstans {
...
@@ -107,4 +112,10 @@ public class CommonConstans {
public
static
final
String
Twodecimalplaces
=
"%.2f"
;
public
static
final
String
Twodecimalplaces
=
"%.2f"
;
public
static
final
String
Fourdecimalplaces
=
"%.4f"
;
public
static
final
String
Fourdecimalplaces
=
"%.4f"
;
public
static
final
String
QueryStringFrontMoudleNotKeyWord
=
"frontModule"
;
public
static
final
String
QueryStringFrontMoudleNotKeyWord
=
"frontModule"
;
//泰和的发电量数据
public
static
final
List
<
String
>
taiHeGenIndicator
=
new
ArrayList
<>(
Arrays
.
asList
(
"泰和日发电量总和"
,
"泰和月发电量总和"
,
"泰和年发电量总和"
));
public
static
final
String
taiHeGenIndicatorDay
=
"泰和日发电量总和"
;
public
static
final
String
taiHeGenIndicatorMonth
=
"泰和月发电量总和"
;
public
static
final
String
taiHeGenIndicatorYear
=
"泰和年发电量总和"
;
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
40edb89b
...
@@ -614,14 +614,14 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -614,14 +614,14 @@ public class MonitorFanIdxController extends BaseController {
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
String
boosterGatewayId
=
stationBasic
.
getBoosterGatewayId
();
String
boosterGatewayId
=
stationBasic
.
getBoosterGatewayId
();
String
[]
columnList
=
new
String
[]{
"日发电量"
,
"月发电量"
,
"年发电量"
};
String
[]
columnList
=
new
String
[]{
CommonConstans
.
taiHeGenIndicatorDay
,
CommonConstans
.
taiHeGenIndicatorMonth
,
CommonConstans
.
taiHeGenIndicatorYear
};
String
[]
columnLists
=
new
String
[]{
"有功功率"
};
String
[]
columnLists
=
new
String
[]{
"有功功率"
};
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
//日 月 年发电量同仅统计逆变器数据
//日 月 年发电量同仅统计逆变器数据
List
<
Map
<
String
,
Object
>>
mapList
;
List
<
Map
<
String
,
Object
>>
mapList
;
for
(
String
column
:
columnList
)
{
for
(
String
column
:
columnList
)
{
Double
result
=
commonService
.
getTotalByIndicatiorByGF
(
g
atewayId
,
column
);
Double
result
=
commonService
.
getTotalByIndicatiorByGF
(
boosterG
atewayId
,
column
);
columnMap
.
put
(
column
,
result
);
columnMap
.
put
(
column
,
result
);
}
}
...
@@ -641,25 +641,25 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -641,25 +641,25 @@ public class MonitorFanIdxController extends BaseController {
data
.
put
(
"title"
,
columnMap
.
get
(
"装机容量"
).
toString
());
data
.
put
(
"title"
,
columnMap
.
get
(
"装机容量"
).
toString
());
objects
.
add
(
data
);
objects
.
add
(
data
);
Map
<
String
,
Object
>
data1
=
new
HashMap
<>();
Map
<
String
,
Object
>
data1
=
new
HashMap
<>();
data1
.
put
(
"title"
,
columnMap
.
get
(
"日发电量"
).
toString
());
data1
.
put
(
"title"
,
columnMap
.
get
(
CommonConstans
.
taiHeGenIndicatorDay
).
toString
());
objects
.
add
(
data1
);
objects
.
add
(
data1
);
Map
<
String
,
Object
>
data2
=
new
HashMap
<>();
Map
<
String
,
Object
>
data2
=
new
HashMap
<>();
data2
.
put
(
"title"
,
columnMap
.
get
(
"风机台数"
).
toString
().
replace
(
".0"
,
""
));
data2
.
put
(
"title"
,
columnMap
.
get
(
"风机台数"
).
toString
().
replace
(
".0"
,
""
));
objects
.
add
(
data2
);
objects
.
add
(
data2
);
Map
<
String
,
Object
>
data3
=
new
HashMap
<>();
Map
<
String
,
Object
>
data3
=
new
HashMap
<>();
data3
.
put
(
"title"
,
columnMap
.
get
(
"月发电量"
).
toString
());
data3
.
put
(
"title"
,
columnMap
.
get
(
CommonConstans
.
taiHeGenIndicatorMonth
).
toString
());
objects
.
add
(
data3
);
objects
.
add
(
data3
);
Map
<
String
,
Object
>
data4
=
new
HashMap
<>();
Map
<
String
,
Object
>
data4
=
new
HashMap
<>();
data4
.
put
(
"title"
,
String
.
format
(
"%.2f"
,
commonService
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
)));
data4
.
put
(
"title"
,
String
.
format
(
"%.2f"
,
commonService
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
)));
objects
.
add
(
data4
);
objects
.
add
(
data4
);
Map
<
String
,
Object
>
data5
=
new
HashMap
<>();
Map
<
String
,
Object
>
data5
=
new
HashMap
<>();
data5
.
put
(
"title"
,
columnMap
.
get
(
"年发电量"
).
toString
());
data5
.
put
(
"title"
,
columnMap
.
get
(
CommonConstans
.
taiHeGenIndicatorYear
).
toString
());
objects
.
add
(
data5
);
objects
.
add
(
data5
);
Map
<
String
,
Object
>
data6
=
new
HashMap
<>();
Map
<
String
,
Object
>
data6
=
new
HashMap
<>();
data6
.
put
(
"title"
,
columnMap
.
get
(
"有功功率"
).
toString
());
data6
.
put
(
"title"
,
columnMap
.
get
(
"有功功率"
).
toString
());
objects
.
add
(
data6
);
objects
.
add
(
data6
);
Map
<
String
,
Object
>
data7
=
new
HashMap
<>();
Map
<
String
,
Object
>
data7
=
new
HashMap
<>();
data7
.
put
(
"title"
,
String
.
format
(
"%.2f"
,
((
Double
.
parseDouble
(
columnMap
.
get
(
"日发电量"
).
toString
())
*
CommonConstans
.
wkwhToMv
)
/
(
Double
.
parseDouble
(
columnMap
.
get
(
"装机容量"
).
toString
())))));
data7
.
put
(
"title"
,
String
.
format
(
"%.2f"
,
((
Double
.
parseDouble
(
columnMap
.
get
(
CommonConstans
.
taiHeGenIndicatorDay
).
toString
())
*
CommonConstans
.
wkwhToMv
)
/
(
Double
.
parseDouble
(
columnMap
.
get
(
"装机容量"
).
toString
())))));
objects
.
add
(
data7
);
objects
.
add
(
data7
);
Map
<
String
,
Object
>
data8
=
new
HashMap
<>();
Map
<
String
,
Object
>
data8
=
new
HashMap
<>();
data8
.
put
(
"title"
,
String
.
format
(
"%.2f"
,
commonService
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射累计"
)));
data8
.
put
(
"title"
,
String
.
format
(
"%.2f"
,
commonService
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射累计"
)));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
40edb89b
...
@@ -235,24 +235,16 @@ public class CommonServiceImpl {
...
@@ -235,24 +235,16 @@ public class CommonServiceImpl {
//用于组装-es查询条件
//用于组装-es查询条件
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
String
>
likeQuerCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
indicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
indicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
likeQuerCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
List
<
ESEquipments
>
result
=
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
List
<
ESEquipments
>
result
=
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
Double
totalvalue
=
0.00
;
Double
totalvalue
=
0.00
;
try
{
try
{
totalvalue
=
result
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
getValueF
())).
mapToDouble
(
l
->
Double
.
parseDouble
(
l
.
getValueF
().
toString
())).
sum
();
totalvalue
=
result
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
getValueF
())).
mapToDouble
(
l
->
Double
.
parseDouble
(
l
.
getValueF
().
toString
())).
sum
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
totalvalue
;
return
totalvalue
;
}
}
if
(
indicator
.
equals
(
"日发电量"
))
{
return
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
totalvalue
));
return
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
totalvalue
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
}
if
(
indicator
.
equals
(
"年发电量"
))
{
return
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
totalvalue
*
CommonConstans
.
pvGenPoweActorYear
));
}
return
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
totalvalue
*
CommonConstans
.
pvGenPoweActor
));
}
}
public
Double
getTotalByIndicatiorAndParams
(
String
gatewayId
,
String
indicator
,
String
querySql
)
{
public
Double
getTotalByIndicatiorAndParams
(
String
gatewayId
,
String
indicator
,
String
querySql
)
{
...
...
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 @
40edb89b
...
@@ -219,7 +219,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -219,7 +219,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
esEquipments
.
setValue
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
Double
.
valueOf
(
esEquipments
.
getValue
())
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
esEquipments
.
setValue
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
Double
.
valueOf
(
esEquipments
.
getValue
())
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
}
}
if
(
powerOther
.
contains
(
esEquipments
.
getEquipmentIndexName
()))
{
if
(
powerOther
.
contains
(
esEquipments
.
getEquipmentIndexName
()))
{
esEquipments
.
setValue
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
Double
.
valueOf
(
esEquipments
.
getValue
())
*
CommonConstans
.
pvGenPoweActor
));
esEquipments
.
setValue
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
Double
.
valueOf
(
esEquipments
.
getValue
())
*
CommonConstans
.
pvGenPoweActor
CurrentData
));
}
}
});
});
}
}
...
@@ -1600,7 +1600,17 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1600,7 +1600,17 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
return
s
;
return
s
;
}
}
public
String
keepFourDecimalPlaces
(
String
value
)
{
String
s
=
"0.0000"
;
if
(!
ObjectUtils
.
isEmpty
(
value
))
{
try
{
s
=
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
Double
.
parseDouble
(
value
));
}
catch
(
Exception
ex
)
{
}
}
return
s
;
}
public
HashMap
<
String
,
Object
>
SpeedIndicator
(
String
gatewayId
,
String
equipmentNumber
,
String
equipmentIndexName
)
{
public
HashMap
<
String
,
Object
>
SpeedIndicator
(
String
gatewayId
,
String
equipmentNumber
,
String
equipmentIndexName
)
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
...
@@ -1743,11 +1753,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1743,11 +1753,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
break
;
break
;
case
"日发电量"
:
case
"日发电量"
:
double
v
=
Double
.
parseDouble
(
e
.
getValueF
().
toString
())
*
CommonConstans
.
pvGenPoweActor
;
double
v
=
Double
.
parseDouble
(
e
.
getValueF
().
toString
())
*
CommonConstans
.
pvGenPoweActor
;
map
.
put
(
"dayNum"
,
keep
Two
DecimalPlaces
(
String
.
valueOf
(
v
)));
map
.
put
(
"dayNum"
,
keep
Four
DecimalPlaces
(
String
.
valueOf
(
v
)));
break
;
break
;
case
"总发电量"
:
case
"总发电量"
:
double
a
=
Double
.
parseDouble
(
e
.
getValueF
().
toString
())
*
CommonConstans
.
pvGenPoweActor
;
double
a
=
Double
.
parseDouble
(
e
.
getValueF
().
toString
())
*
CommonConstans
.
pvGenPoweActor
CurrentData
;
map
.
put
(
"yearNum"
,
keep
Two
DecimalPlaces
(
String
.
valueOf
(
a
)));
map
.
put
(
"yearNum"
,
keep
Four
DecimalPlaces
(
String
.
valueOf
(
a
)));
break
;
break
;
}
}
});
});
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitoringServiceIMQTTmpl.java
View file @
40edb89b
...
@@ -101,12 +101,11 @@ public class MonitoringServiceIMQTTmpl {
...
@@ -101,12 +101,11 @@ public class MonitoringServiceIMQTTmpl {
totalSocialContribution
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getTotalByIndicatior
(
stationBasic
.
getFanGatewayId
(),
"年发电量"
));
totalSocialContribution
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getTotalByIndicatior
(
stationBasic
.
getFanGatewayId
(),
"年发电量"
));
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
CommonConstans
.
taiHeGenIndicatorYear
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
totalSocialContribution
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
));
totalSocialContribution
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
);
}
}
});
});
Page
<
SocialContributionDto
>
socialContributionDtoPage
=
commonService
.
getSocialContributionDtoList
(
totalSocialContribution
.
get
());
Page
<
SocialContributionDto
>
socialContributionDtoPage
=
commonService
.
getSocialContributionDtoList
(
totalSocialContribution
.
get
());
...
@@ -154,14 +153,12 @@ public class MonitoringServiceIMQTTmpl {
...
@@ -154,14 +153,12 @@ public class MonitoringServiceIMQTTmpl {
annualPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
annualPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
likeQuerCondtion
=
new
HashMap
<>();
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
likeQuerCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
dailyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
)
));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
monthlyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
)));
dailyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
annualPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)
));
monthlyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
annualPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
}
}
});
});
...
...
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 @
40edb89b
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.sun.imageio.plugins.common.I18NImpl
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
...
@@ -14,13 +15,10 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.*;
...
@@ -14,13 +15,10 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.*;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
import
com.yeejoin.amos.component.influxdb.InfluxdbUtil
;
import
com.yeejoin.amos.component.influxdb.InfluxdbUtil
;
import
org.apache.velocity.runtime.directive.contrib.For
;
import
org.elasticsearch.search.aggregations.bucket.terms.Terms
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
...
@@ -191,11 +189,11 @@ public class MonitoringServiceImpl {
...
@@ -191,11 +189,11 @@ public class MonitoringServiceImpl {
colModels
.
add
(
colModelAnnualPower
);
colModels
.
add
(
colModelAnnualPower
);
List
<
StationCacheInfoDto
>
stationCacheInfoDtoList
=
commonServiceImpl
.
getListStationCacheInfoDto
();
List
<
StationCacheInfoDto
>
stationCacheInfoDtoList
=
commonServiceImpl
.
getListStationCacheInfoDto
();
List
<
StationCacheInfoDto
>
stationCacheInfoDtos
=
stationCacheInfoDtoList
.
stream
().
filter
(
stationCacheInfoDto
->
stationCacheInfoDto
.
getBelongProvince
().
equals
(
provinceName
)).
collect
(
Collectors
.
toList
());
List
<
StationCacheInfoDto
>
stationCacheInfoDtos
=
stationCacheInfoDtoList
.
stream
().
filter
(
stationCacheInfoDto
->
stationCacheInfoDto
.
getBelongProvince
().
equals
(
provinceName
)).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
stationCacheInfoDtos
))
{
if
(
ObjectUtils
.
isEmpty
(
stationCacheInfoDtos
))
{
DataGridMock
dataGridMock
=
new
DataGridMock
(
current
,
0
,
false
,
1
,
null
);
DataGridMock
dataGridMock
=
new
DataGridMock
(
current
,
0
,
false
,
1
,
null
);
ResultsData
resultsData
=
new
ResultsData
(
dataGridMock
,
colModels
);
ResultsData
resultsData
=
new
ResultsData
(
dataGridMock
,
colModels
);
return
resultsData
;
return
resultsData
;
}
}
//日发电量
//日发电量
AtomicReference
<
Double
>
dailyPower
=
new
AtomicReference
<>(
0.0
);
AtomicReference
<
Double
>
dailyPower
=
new
AtomicReference
<>(
0.0
);
//月发电量
//月发电量
...
@@ -251,24 +249,22 @@ public class MonitoringServiceImpl {
...
@@ -251,24 +249,22 @@ public class MonitoringServiceImpl {
fdzInstallCapacity
.
updateAndGet
(
v
->
v
+
Double
.
parseDouble
(
stationCacheInfoDto
.
getInstalledCapacity
()));
fdzInstallCapacity
.
updateAndGet
(
v
->
v
+
Double
.
parseDouble
(
stationCacheInfoDto
.
getInstalledCapacity
()));
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
likeQuerCondtion
=
new
HashMap
<>();
likeQuerCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
queryCondtion1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"WTX-801_25_WTX-801_总辐射"
,
"南瑞光差保护_313P"
));
queryCondtion1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"WTX-801_25_WTX-801_总辐射"
,
"南瑞光差保护_313P"
));
queryCondtion1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getBoosterGatewayId
()));
queryCondtion1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationCacheInfoDto
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
null
);
List
<
ESEquipments
>
result1
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion1
,
null
,
ESEquipments
.
class
);
List
<
ESEquipments
>
result1
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion1
,
null
,
ESEquipments
.
class
);
completionOfPowerIndicatorsDto
.
setWindSpeedOrIrradiance
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
)));
completionOfPowerIndicatorsDto
.
setWindSpeedOrIrradiance
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
)));
completionOfPowerIndicatorsDto
.
setActivePower
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)));
completionOfPowerIndicatorsDto
.
setActivePower
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)));
completionOfPowerIndicatorsDto
.
setDailyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
completionOfPowerIndicatorsDto
.
setDailyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
)
));
completionOfPowerIndicatorsDto
.
setMonthlyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
completionOfPowerIndicatorsDto
.
setMonthlyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
)
));
completionOfPowerIndicatorsDto
.
setAnnualPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActorYear
));
completionOfPowerIndicatorsDto
.
setAnnualPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)
));
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
)
));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
)
));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActorYear
));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)
));
gfzannualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActorYear
));
gfzannualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)
));
gfzinstallCapacity
.
updateAndGet
(
v
->
v
+
Double
.
parseDouble
(
stationCacheInfoDto
.
getInstalledCapacity
()));
gfzinstallCapacity
.
updateAndGet
(
v
->
v
+
Double
.
parseDouble
(
stationCacheInfoDto
.
getInstalledCapacity
()));
}
}
}
catch
(
Exception
exception
)
{
}
catch
(
Exception
exception
)
{
...
@@ -602,12 +598,10 @@ public class MonitoringServiceImpl {
...
@@ -602,12 +598,10 @@ public class MonitoringServiceImpl {
total
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)));
total
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)));
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
CommonConstans
.
taiHeGenIndicatorDay
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
total
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
)));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
total
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -640,12 +634,10 @@ public class MonitoringServiceImpl {
...
@@ -640,12 +634,10 @@ public class MonitoringServiceImpl {
Double
total1
=
0.00
;
Double
total1
=
0.00
;
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
CommonConstans
.
taiHeGenIndicatorYear
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
total1
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
total1
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
)
*
CommonConstans
.
pvGenPoweActor
;
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
...
@@ -675,11 +667,9 @@ public class MonitoringServiceImpl {
...
@@ -675,11 +667,9 @@ public class MonitoringServiceImpl {
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
)
*
CommonConstans
.
pvGenPoweActor
;
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
...
@@ -692,7 +682,7 @@ public class MonitoringServiceImpl {
...
@@ -692,7 +682,7 @@ public class MonitoringServiceImpl {
});
});
HashMap
<
String
,
List
<
String
>>
hashMap
=
new
HashMap
<>();
HashMap
<
String
,
List
<
String
>>
hashMap
=
new
HashMap
<>();
List
<
String
>
xList
=
getXListofRecentOneYear
();
List
<
String
>
xList
=
getXListofRecentOneYear
();
List
<
String
>
yList
=
Arrays
.
asList
(
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"
1200
0"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
monthlyPower
.
get
()));
List
<
String
>
yList
=
Arrays
.
asList
(
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
monthlyPower
.
get
()));
hashMap
.
put
(
"axisData"
,
xList
);
hashMap
.
put
(
"axisData"
,
xList
);
hashMap
.
put
(
"seriesData"
,
yList
);
hashMap
.
put
(
"seriesData"
,
yList
);
return
hashMap
;
return
hashMap
;
...
@@ -719,14 +709,12 @@ public class MonitoringServiceImpl {
...
@@ -719,14 +709,12 @@ public class MonitoringServiceImpl {
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
)));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
)));
dailyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)));
monthlyPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
annualPower
.
updateAndGet
(
v
->
v
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActorYear
));
}
}
});
});
HashMap
<
String
,
String
>
dayHashMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
dayHashMap
=
new
HashMap
<>();
...
@@ -776,11 +764,9 @@ public class MonitoringServiceImpl {
...
@@ -776,11 +764,9 @@ public class MonitoringServiceImpl {
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
)
*
CommonConstans
.
pvGenPoweActor
;
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
...
@@ -793,7 +779,7 @@ public class MonitoringServiceImpl {
...
@@ -793,7 +779,7 @@ public class MonitoringServiceImpl {
});
});
HashMap
<
String
,
List
<
String
>>
hashMap
=
new
HashMap
<>();
HashMap
<
String
,
List
<
String
>>
hashMap
=
new
HashMap
<>();
List
<
String
>
xList
=
getXListofRecentOneYear
();
List
<
String
>
xList
=
getXListofRecentOneYear
();
List
<
String
>
yList
=
Arrays
.
asList
(
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"
12
0"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
monthlyPower
.
get
()
%
200
));
List
<
String
>
yList
=
Arrays
.
asList
(
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
"0"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
monthlyPower
.
get
()
%
200
));
hashMap
.
put
(
"axisData"
,
xList
);
hashMap
.
put
(
"axisData"
,
xList
);
hashMap
.
put
(
"seriesData"
,
yList
);
hashMap
.
put
(
"seriesData"
,
yList
);
return
hashMap
;
return
hashMap
;
...
@@ -819,12 +805,10 @@ public class MonitoringServiceImpl {
...
@@ -819,12 +805,10 @@ public class MonitoringServiceImpl {
List
<
Map
<
String
,
Object
>>
mapListData
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
mapListData
=
new
ArrayList
<>();
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
CommonConstans
.
taiHeGenIndicatorMonth
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
total
.
set
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
total
.
set
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
)
*
CommonConstans
.
pvGenPoweActor
);
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
...
@@ -872,40 +856,37 @@ public class MonitoringServiceImpl {
...
@@ -872,40 +856,37 @@ public class MonitoringServiceImpl {
}
else
{
}
else
{
stationBasicListAll
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
isNotNull
(
"fan_gateway_id"
));
stationBasicListAll
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
isNotNull
(
"fan_gateway_id"
));
}
}
String
indicator
=
"日发电量"
;
AtomicReference
<
String
>
indicator
=
new
AtomicReference
<>(
"日发电量"
)
;
if
(
tabValue
.
equals
(
"1"
))
{
if
(
tabValue
.
equals
(
"1"
))
{
indicator
=
"月发电量"
;
indicator
.
set
(
"月发电量"
)
;
}
else
if
(
tabValue
.
equals
(
"2"
))
{
}
else
if
(
tabValue
.
equals
(
"2"
))
{
indicator
=
"年发电量"
;
indicator
.
set
(
"年发电量"
)
;
}
}
//填写发电小时数
//填写发电小时数
String
finalIndicator
=
indicator
;
stationBasicListAll
.
forEach
(
stationBasic
->
{
stationBasicListAll
.
forEach
(
stationBasic
->
{
Double
install1
=
getStationCaPACITYL
(
stationBasic
.
getStationNumber
());
Double
install1
=
getStationCaPACITYL
(
stationBasic
.
getStationNumber
());
BigDecimal
gfInstall
=
new
BigDecimal
(
String
.
format
(
"%.2f"
,
install1
));
BigDecimal
gfInstall
=
new
BigDecimal
(
String
.
format
(
"%.2f"
,
install1
));
Double
total
=
0.00
;
Double
total
=
0.00
;
List
<
Map
<
String
,
Object
>>
mapListData
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
mapListData
=
new
ArrayList
<>();
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
indicator
.
set
(
CommonConstans
.
taiHeGenIndicatorDay
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
if
(
tabValue
.
equals
(
"1"
))
{
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
indicator
.
set
(
CommonConstans
.
taiHeGenIndicatorMonth
);
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
}
else
if
(
tabValue
.
equals
(
"2"
))
{
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
indicator
.
set
(
CommonConstans
.
taiHeGenIndicatorYear
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
// total = commonServiceImpl.getSumByEquipmentIndxName(result, finalIndicator) * CommonConstans.pvGenPoweActor * CommonConstans.pvGenPoweActorDay;
if
(
finalIndicator
.
equals
(
"日发电量"
))
{
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
;
}
else
{
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
)
*
CommonConstans
.
pvGenPoweActor
;
}
}
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
indicator
.
get
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
indicator
.
get
());
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
finalIndicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
indicator
.
get
()
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
finalIndicator
);
total
=
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
indicator
.
get
()
);
}
}
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
total
*
10
)
/
gfInstall
.
doubleValue
()));
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
total
*
10
)
/
gfInstall
.
doubleValue
()));
if
(
stationBasic
.
getAddress
().
equals
(
"NaN"
))
{
if
(
stationBasic
.
getAddress
().
equals
(
"NaN"
))
{
...
@@ -1024,43 +1005,41 @@ public class MonitoringServiceImpl {
...
@@ -1024,43 +1005,41 @@ public class MonitoringServiceImpl {
for
(
int
i
=
0
;
i
<
gfList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
gfList
.
size
();
i
++)
{
StationBasic
stationBasic
=
gfList
.
get
(
i
);
StationBasic
stationBasic
=
gfList
.
get
(
i
);
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
likeQuerCondtion
=
new
HashMap
<>();
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
likeQuerCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
powerOfDayGF
=
powerOfDayGF
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
powerOfMonthGF
=
powerOfMonthGF
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
));
powerOfDayGF
=
powerOfDayGF
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
powerOfAnnualGF
=
powerOfAnnualGF
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
));
powerOfMonthGF
=
powerOfMonthGF
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
powerOfAnnualGF
=
powerOfAnnualGF
+
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
}
}
HashMap
<
String
,
String
>
stringHashMap4
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap4
=
new
HashMap
<>();
stringHashMap4
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfDayFD
)
+
"/"
+
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfDayGF
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
stringHashMap4
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfDayFD
)
+
"/"
+
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfDayGF
));
list1
.
add
(
stringHashMap4
);
list1
.
add
(
stringHashMap4
);
HashMap
<
String
,
String
>
stringHashMap5
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap5
=
new
HashMap
<>();
stringHashMap5
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfMonthFD
)
+
"/"
+
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfMonthGF
*
CommonConstans
.
pvGenPoweActor
));
stringHashMap5
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfMonthFD
)
+
"/"
+
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfMonthGF
));
list1
.
add
(
stringHashMap5
);
list1
.
add
(
stringHashMap5
);
HashMap
<
String
,
String
>
stringHashMap6
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap6
=
new
HashMap
<>();
stringHashMap6
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfAnnualFD
)
+
"/"
+
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfAnnualGF
*
CommonConstans
.
pvGenPoweActorYear
));
stringHashMap6
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfAnnualFD
)
+
"/"
+
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfAnnualGF
));
list1
.
add
(
stringHashMap6
);
list1
.
add
(
stringHashMap6
);
HashMap
<
String
,
String
>
stringHashMap7
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap7
=
new
HashMap
<>();
stringHashMap7
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualFD
*
100
)
/
fdzValue
)
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualGF
*
CommonConstans
.
pvGenPoweActorYear
*
100
)
/
gfvalue
));
stringHashMap7
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualFD
*
100
)
/
fdzValue
)
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualGF
*
100
)
/
gfvalue
));
list1
.
add
(
stringHashMap7
);
list1
.
add
(
stringHashMap7
);
HashMap
<
String
,
String
>
stringHashMap8
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap8
=
new
HashMap
<>();
stringHashMap8
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualFD
*
CommonConstans
.
wkwhToMv
)
/
fdzInstall
.
doubleValue
())
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualGF
*
CommonConstans
.
pvGenPoweActorYear
*
CommonConstans
.
wkwhToMv
)
/
gfInstall
.
doubleValue
()));
stringHashMap8
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualFD
*
CommonConstans
.
wkwhToMv
)
/
fdzInstall
.
doubleValue
())
+
"/"
+
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
powerOfAnnualGF
*
CommonConstans
.
wkwhToMv
)
/
gfInstall
.
doubleValue
()));
list1
.
add
(
stringHashMap8
);
list1
.
add
(
stringHashMap8
);
page1
.
setRecords
(
list1
);
page1
.
setRecords
(
list1
);
HashMap
<
String
,
String
>
stringHashMap9
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap9
=
new
HashMap
<>();
stringHashMap9
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfDayFD
+
(
powerOfDayGF
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
)
));
stringHashMap9
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfDayFD
+
powerOfDayGF
));
list2
.
add
(
stringHashMap9
);
list2
.
add
(
stringHashMap9
);
HashMap
<
String
,
String
>
stringHashMap10
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap10
=
new
HashMap
<>();
stringHashMap10
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfMonthFD
+
powerOfMonthGF
*
CommonConstans
.
pvGenPoweActor
));
stringHashMap10
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfMonthFD
+
powerOfMonthGF
));
list2
.
add
(
stringHashMap10
);
list2
.
add
(
stringHashMap10
);
HashMap
<
String
,
String
>
stringHashMap11
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap11
=
new
HashMap
<>();
stringHashMap11
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfAnnualFD
+
powerOfAnnualGF
*
CommonConstans
.
pvGenPoweActorYear
));
stringHashMap11
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
powerOfAnnualFD
+
powerOfAnnualGF
));
list2
.
add
(
stringHashMap11
);
list2
.
add
(
stringHashMap11
);
HashMap
<
String
,
String
>
stringHashMap12
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap12
=
new
HashMap
<>();
stringHashMap12
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
((
powerOfAnnualFD
+
powerOfAnnualGF
*
CommonConstans
.
pvGenPoweActorYear
)
*
100
)
/
yearValue
));
stringHashMap12
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
((
powerOfAnnualFD
+
powerOfAnnualGF
)
*
100
)
/
yearValue
));
list2
.
add
(
stringHashMap12
);
list2
.
add
(
stringHashMap12
);
page2
.
setRecords
(
list2
);
page2
.
setRecords
(
list2
);
Double
totalAnnual
=
(
powerOfAnnualFD
+
powerOfAnnualGF
*
CommonConstans
.
pvGenPoweActorYear
);
Double
totalAnnual
=
(
powerOfAnnualFD
+
powerOfAnnualGF
*
CommonConstans
.
pvGenPoweActorYear
);
...
@@ -1104,12 +1083,11 @@ public class MonitoringServiceImpl {
...
@@ -1104,12 +1083,11 @@ public class MonitoringServiceImpl {
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
}
else
{
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
CommonConstans
.
taiHeGenIndicatorYear
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)));
stationBasic
.
setAddress
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActorYear
));
}
}
});
});
List
<
StationBasic
>
fdzList
=
stationBasicListAll
.
stream
().
filter
(
stationBasic
->
stationBasic
.
getStationType
().
equals
(
"FDZ"
)).
collect
(
Collectors
.
toList
());
List
<
StationBasic
>
fdzList
=
stationBasicListAll
.
stream
().
filter
(
stationBasic
->
stationBasic
.
getStationType
().
equals
(
"FDZ"
)).
collect
(
Collectors
.
toList
());
...
...
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