Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
991d4dad
Commit
991d4dad
authored
Sep 28, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监盘 大屏问题修复
parent
a942806d
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
226 additions
and
85 deletions
+226
-85
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+3
-0
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+117
-45
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+73
-29
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+21
-4
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+1
-1
overview.json
...jxiop-bigscreen-biz/src/main/resources/json/overview.json
+0
-1
overviewGF.json
...iop-bigscreen-biz/src/main/resources/json/overviewGF.json
+3
-4
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+1
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+7
-1
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 @
991d4dad
...
@@ -32,6 +32,9 @@ public class CommonConstans {
...
@@ -32,6 +32,9 @@ public class CommonConstans {
public
static
final
Double
tToWT
=
0.0001
;
public
static
final
Double
tToWT
=
0.0001
;
//万Kwh转MV
//万Kwh转MV
public
static
final
Integer
wkwhToMv
=
10
;
public
static
final
Integer
wkwhToMv
=
10
;
//kw转MV
public
static
final
Double
kwToMv
=
0.0001
;
// 正常运行 发电状态=1
// 正常运行 发电状态=1
// 告警运行 报警状态=1
// 告警运行 报警状态=1
// 正常停机 停机状态=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 @
991d4dad
...
@@ -53,6 +53,7 @@ import java.io.IOException;
...
@@ -53,6 +53,7 @@ import java.io.IOException;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
parseArray
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
parseArray
;
...
@@ -218,26 +219,56 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -218,26 +219,56 @@ public class MonitorFanIdxController extends BaseController {
public
ResponseModel
<
IPage
<
Map
>>
getData
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
)
{
public
ResponseModel
<
IPage
<
Map
>>
getData
(
@RequestParam
(
value
=
"stationId"
)
String
stationId
)
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
String
[]
columnList
=
new
String
[]{
"日发电量"
,
"月发电量"
,
"年发电量"
};
String
[]
columnList
=
new
String
[]{
"日发电量"
,
"月发电量"
,
"年发电量"
};
String
[]
columnLists
=
new
String
[]{
"有功功率"
,
"瞬时风速"
};
String
[]
columnLists
=
new
String
[]{
"瞬时风速"
};
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
for
(
String
column
:
columnList
)
{
for
(
String
column
:
columnList
)
{
Double
result
=
commonServiceImpl
.
getTotalByIndicatior
(
gatewayId
,
column
);
Double
result
=
commonServiceImpl
.
getTotalByIndicatior
(
gatewayId
,
column
);
columnMap
.
put
(
column
,
String
.
format
(
"%.2f"
,
result
));
columnMap
.
put
(
column
,
String
.
format
(
"%.2f"
,
result
));
}
}
for
(
String
column
:
columnLists
)
{
for
(
String
column
:
columnLists
)
{
Double
result
=
commonServiceImpl
.
getAvgvalueByIndicatior
(
gatewayId
,
column
);
Double
result
=
commonServiceImpl
.
getAvgvalueByIndicatior
(
gatewayId
,
column
);
columnMap
.
put
(
column
,
String
.
format
(
"%.2f"
,
result
));
columnMap
.
put
(
column
,
String
.
format
(
"%.2f"
,
result
));
}
}
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
queryCondtion1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值"
));
queryCondtion1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result1
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion1
,
null
,
ESEquipments
.
class
);
columnMap
.
put
(
"有功功率"
,
String
.
format
(
"%.2f"
,
result1
.
get
(
0
).
getValueF
()
/
1000
));
String
num
=
monitorFanIndicator
.
getFJCount
(
gatewayId
);
String
num
=
monitorFanIndicator
.
getFJCount
(
gatewayId
);
columnMap
.
put
(
"风机台数"
,
Double
.
valueOf
(
num
).
intValue
());
columnMap
.
put
(
"风机台数"
,
Double
.
valueOf
(
num
).
intValue
());
Double
capacityl
=
commonServiceImpl
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
());
Double
capacityl
=
commonServiceImpl
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
());
columnMap
.
put
(
"装机容量"
,
String
.
format
(
"%.2f"
,
capacityl
));
columnMap
.
put
(
"装机容量"
,
String
.
format
(
"%.2f"
,
capacityl
));
// StationBasic stationBasic = stationBasicMapper.selectById(stationId);
// String gatewayId = stationBasic.getFanGatewayId();
// String [] columnList = new String[]{"日发电量","月发电量","年发电量"};
// String [] columnLists = new String[]{"有功功率","瞬时风速"};
// Map<String, Object> columnMap = new HashMap<>();
//
// for (String column : columnList) {
// Double result = commonServiceImpl.getTotalByIndicatior(gatewayId, column);
// columnMap.put(column, String.format("%.2f",result));
// }
// for (String column : columnLists) {
// Double result = commonServiceImpl.getAvgvalueByIndicatior(gatewayId, column);
// columnMap.put(column, String.format("%.2f",result));
// }
//
// String num = monitorFanIndicator.getFJCount(gatewayId);
//
//
// Double capacityl = commonServiceImpl.getStationCapactityByStationWerks(stationBasic.getStationNumber());
// columnMap.put("装机容量",String.format("%.2f",capacityl));
String
json
=
null
;
String
json
=
null
;
try
{
try
{
...
@@ -252,7 +283,7 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -252,7 +283,7 @@ public class MonitorFanIdxController extends BaseController {
map
.
put
(
"title2"
,
map
.
get
(
"title"
));
map
.
put
(
"title2"
,
map
.
get
(
"title"
));
if
(
map
.
containsKey
(
"action"
)){
if
(
map
.
containsKey
(
"action"
)){
if
(
key
.
equals
(
"日利用小时"
)){
if
(
key
.
equals
(
"日利用小时"
)){
String
format
=
String
.
format
(
"%.2f"
,
((
Double
.
parseDouble
(
columnMap
.
get
(
"日发电量"
).
toString
())
*
10
)
/
(
Double
.
parseDouble
(
columnMap
.
get
(
"装机容量"
).
toString
()))));
String
format
=
String
.
format
(
"%.2f"
,
((
Double
.
parseDouble
(
columnMap
.
get
(
"日发电量"
).
toString
())
*
10
)
/
(
Double
.
parseDouble
(
columnMap
.
get
(
"装机容量"
).
toString
()))));
map
.
put
(
"title"
,
format
);
map
.
put
(
"title"
,
format
);
map
.
put
(
"title2"
,
map
.
get
(
"title"
));
map
.
put
(
"title2"
,
map
.
get
(
"title"
));
}
else
{
}
else
{
...
@@ -279,10 +310,13 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -279,10 +310,13 @@ public class MonitorFanIdxController extends BaseController {
public
ResponseModel
<
Map
<
String
,
Object
>>
getOverviewWindSpeed
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
public
ResponseModel
<
Map
<
String
,
Object
>>
getOverviewWindSpeed
(
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
)
{
,
@RequestParam
(
value
=
"areaCode"
,
required
=
false
)
String
areaCode
)
{
String
gatewayId
=
""
;
String
gatewayId
=
""
;
String
paramId
=
""
;
List
<
String
>
ids
=
new
ArrayList
<>();
List
<
StationCacheInfoDto
>
listStationCacheInfoDto
=
commonServiceImpl
.
getListStationCacheInfoDto
();
List
<
StationCacheInfoDto
>
listStationCacheInfoDto
=
commonServiceImpl
.
getListStationCacheInfoDto
();
double
installedCapacity
=
listStationCacheInfoDto
.
stream
().
mapToDouble
(
t
->
Double
.
parseDouble
(
t
.
getInstalledCapacity
())).
sum
();
double
installedCapacity
=
listStationCacheInfoDto
.
stream
().
mapToDouble
(
t
->
Double
.
parseDouble
(
t
.
getInstalledCapacity
())).
sum
();
if
(
null
!=
areaCode
){
if
(
null
!=
areaCode
){
List
<
String
>
collect
=
listStationCacheInfoDto
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
equals
(
areaCode
)).
map
(
StationCacheInfoDto:
:
getFanGatewayId
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
listStationCacheInfoDto
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
equals
(
areaCode
)).
map
(
StationCacheInfoDto:
:
getFanGatewayId
).
collect
(
Collectors
.
toList
());
ids
=
listStationCacheInfoDto
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
equals
(
areaCode
)).
map
(
StationCacheInfoDto:
:
getBoosterGatewayId
).
collect
(
Collectors
.
toList
());
installedCapacity
=
listStationCacheInfoDto
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
equals
(
areaCode
)).
mapToDouble
(
t
->
Double
.
parseDouble
(
t
.
getInstalledCapacity
())).
sum
();
installedCapacity
=
listStationCacheInfoDto
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
equals
(
areaCode
)).
mapToDouble
(
t
->
Double
.
parseDouble
(
t
.
getInstalledCapacity
())).
sum
();
gatewayId
=
String
.
join
(
","
,
collect
);
gatewayId
=
String
.
join
(
","
,
collect
);
}
}
...
@@ -294,7 +328,7 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -294,7 +328,7 @@ public class MonitorFanIdxController extends BaseController {
}
}
installedCapacity
=
listStationCacheInfoDto
.
stream
().
filter
(
e
->
e
.
getStationId
().
equals
(
stationId
)).
mapToDouble
(
t
->
Double
.
parseDouble
(
t
.
getInstalledCapacity
())).
sum
();
installedCapacity
=
listStationCacheInfoDto
.
stream
().
filter
(
e
->
e
.
getStationId
().
equals
(
stationId
)).
mapToDouble
(
t
->
Double
.
parseDouble
(
t
.
getInstalledCapacity
())).
sum
();
}
}
Map
<
String
,
Object
>
detailsWindSpeed
=
monitorFanIndicator
.
getDetailsWindSpeedAll
(
gatewayId
,
installedCapacity
);
Map
<
String
,
Object
>
detailsWindSpeed
=
monitorFanIndicator
.
getDetailsWindSpeedAll
(
gatewayId
,
installedCapacity
,
ids
);
return
ResponseHelper
.
buildResponse
(
detailsWindSpeed
);
return
ResponseHelper
.
buildResponse
(
detailsWindSpeed
);
}
}
...
@@ -610,31 +644,32 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -610,31 +644,32 @@ 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
[]{
"日发电量"
,
"月发电量"
,
"年发电量"
};
String
[]
columnLists
=
new
String
[]{
"有功功率"
};
String
[]
columnLists
=
new
String
[]{
"有功功率"
};
String
[]
syLists
=
new
String
[]{
"总辐射累计"
,
"总辐射"
,
"日照时数"
};
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
//日 月 年发电量同仅统计逆变器数据
List
<
Map
<
String
,
Object
>>
mapList
;
for
(
String
column
:
columnList
)
{
for
(
String
column
:
columnList
)
{
Double
result
=
commonServiceImpl
.
getTotalByIndicatior
(
gatewayId
,
column
);
Double
result
=
commonServiceImpl
.
getTotalByIndicatiorByGF
(
gatewayId
,
column
);
columnMap
.
put
(
column
,
String
.
format
(
"%.4f"
,
result
*
CommonConstans
.
pvGenPoweActor
));
if
(
column
.
equals
(
"日发电量"
))
{
columnMap
.
put
(
column
,
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
result
*
CommonConstans
.
pvGenPoweActorDay
));
}
else
{
columnMap
.
put
(
column
,
result
);
}
}
for
(
String
column
:
syLists
)
{
Double
result
=
commonServiceImpl
.
getNumByIndicatior
(
boosterGatewayId
,
column
);
columnMap
.
put
(
column
,
String
.
format
(
"%.2f"
,
result
));
}
}
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"南瑞光差保护_313P"
,
"WTX-801_25_WTX-801_总辐射累计"
,
"WTX-801_25_WTX-801_总辐射"
,
"313光差保护_总反向有功电度"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result1
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
columnMap
.
put
(
"有功功率"
,
String
.
format
(
"%.2f"
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)
*
CommonConstans
.
kwToMv
));
for
(
String
column
:
columnLists
)
{
String
num
=
monitorFanIndicator
.
getEquipCount
(
gatewayId
,
"GF"
);
Double
result
=
commonServiceImpl
.
getAvgvalueByIndicatior
(
gatewayId
,
column
);
columnMap
.
put
(
"逆变器台数"
,
num
);
columnMap
.
put
(
column
,
String
.
format
(
"%.2f"
,
result
));
}
String
num
=
monitorFanIndicator
.
getFJCount
(
gatewayId
);
columnMap
.
put
(
"逆变器台数"
,
num
);
Double
capacityl
=
commonServiceImpl
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
());
Double
capacityl
=
commonServiceImpl
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
());
columnMap
.
put
(
"装机容量"
,
String
.
format
(
"%.2f"
,
capacityl
));
columnMap
.
put
(
"装机容量"
,
String
.
format
(
"%.2f"
,
capacityl
));
columnMap
.
put
(
"辐照强度"
,
String
.
format
(
"%.2f"
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
)));
String
json
=
null
;
String
json
=
null
;
try
{
try
{
...
@@ -646,8 +681,9 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -646,8 +681,9 @@ public class MonitorFanIdxController extends BaseController {
for
(
Map
map
:
list
)
{
for
(
Map
map
:
list
)
{
String
key
=
map
.
get
(
"title"
).
toString
();
String
key
=
map
.
get
(
"title"
).
toString
();
if
(
map
.
containsKey
(
"action"
)){
if
(
map
.
containsKey
(
"action"
)){
if
(
key
.
equals
(
"年利用小时"
)){
if
(
key
.
equals
(
"日利用小时"
)){
map
.
put
(
"title"
,
map
.
get
(
"action"
).
toString
().
replace
(
"*"
,
"年发电量"
).
replace
(
"-"
,
"装机容量"
));
map
.
put
(
"title"
,
String
.
format
(
"%.2f"
,
((
Double
.
parseDouble
(
columnMap
.
get
(
"日发电量"
).
toString
())
*
CommonConstans
.
wkwhToMv
)
/
(
Double
.
parseDouble
(
columnMap
.
get
(
"装机容量"
).
toString
())))));
columnMap
.
put
(
"日利用小时"
,
map
.
get
(
"title"
));
map
.
put
(
"title2"
,
map
.
get
(
"title"
));
map
.
put
(
"title2"
,
map
.
get
(
"title"
));
}
else
{
}
else
{
map
.
put
(
"title"
,
map
.
get
(
"action"
).
toString
().
replace
(
"*"
,
columnMap
.
get
(
key
).
toString
()));
map
.
put
(
"title"
,
map
.
get
(
"action"
).
toString
().
replace
(
"*"
,
columnMap
.
get
(
key
).
toString
()));
...
@@ -957,32 +993,68 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -957,32 +993,68 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"社会贡献 "
)
@ApiOperation
(
value
=
"社会贡献 "
)
@GetMapping
(
"/SocialContribution"
)
@GetMapping
(
"/SocialContribution"
)
public
ResponseModel
<
Page
<
SocialContributionDto
>
>
socialContribution
(
String
areaCode
)
{
public
ResponseModel
<
Page
<
HashMap
<
String
,
String
>>
>
socialContribution
(
String
areaCode
)
{
Page
<
HashMap
<
String
,
String
>>
page3
=
new
Page
<>(
1
,
10
);
List
<
String
>
value
=
new
ArrayList
<>();
List
<
String
>
value
=
new
ArrayList
<>();
value
.
add
(
NFDL
);
value
.
add
(
NFDL
);
Map
<
String
,
List
<
String
>>
map
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
map
=
new
HashMap
<>();
map
.
put
(
"equipmentIndexName.keyword"
,
value
);
map
.
put
(
"equipmentIndexName.keyword"
,
value
);
List
<
StationCacheInfoDto
>
stationBasicListAll
=
new
ArrayList
<>();
if
(
null
!=
areaCode
){
if
(
null
!=
areaCode
){
List
<
StationCacheInfoDto
>
listStationCacheInfoDto
=
commonServiceImpl
.
getListStationCacheInfoDto
();
stationBasicListAll
=
commonServiceImpl
.
getListStationCacheInfoDto
();
List
<
String
>
collect
=
listStationCacheInfoDto
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
equals
(
areaCode
)).
map
(
StationCacheInfoDto:
:
getFanGatewayId
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
stationBasicListAll
.
stream
().
filter
(
e
->
e
.
getAreaCode
().
equals
(
areaCode
)).
map
(
StationCacheInfoDto:
:
getFanGatewayId
).
collect
(
Collectors
.
toList
());
map
.
put
(
"gatewayId.keyword"
,
collect
);
map
.
put
(
"gatewayId.keyword"
,
collect
);
}
}
List
<
StationCacheInfoDto
>
fdzList
=
stationBasicListAll
.
stream
().
filter
(
stationBasic
->
stationBasic
.
getStationType
().
equals
(
"FDZ"
)).
collect
(
Collectors
.
toList
());
List
<?
extends
Terms
.
Bucket
>
lidate
=
commonServiceImpl
.
getgroupsum
(
map
,
"valueDouble"
,
"equipmentIndexName.keyword"
,
ESEquipments
.
class
);
List
<
StationCacheInfoDto
>
gfList
=
stationBasicListAll
.
stream
().
filter
(
stationBasic
->
!
stationBasic
.
getStationType
().
equals
(
"FDZ"
)).
collect
(
Collectors
.
toList
());
List
<
HashMap
<
String
,
String
>>
list1
=
new
ArrayList
<>();
DecimalFormat
format2
=
new
DecimalFormat
(
"#.0000"
);
List
<
HashMap
<
String
,
String
>>
list2
=
new
ArrayList
<>();
Double
num
=
0.00
;
List
<
HashMap
<
String
,
String
>>
list3
=
new
ArrayList
<>();
for
(
Terms
.
Bucket
bucket
:
lidate
)
{
AtomicReference
<
Double
>
powerOfDayFD
=
new
AtomicReference
<>(
new
Double
(
0.00
));
Aggregations
aggregation
=
bucket
.
getAggregations
();
AtomicReference
<
Double
>
powerOfMonthFD
=
new
AtomicReference
<>(
new
Double
(
0.00
));
List
<
Aggregation
>
listdata
=
Objects
.
nonNull
(
aggregation
)?
aggregation
.
asList
():
null
;
AtomicReference
<
Double
>
powerOfAnnualFD
=
new
AtomicReference
<>(
new
Double
(
0.00
));
for
(
Aggregation
agg
:
listdata
)
{
AtomicReference
<
Double
>
powerOfDayGF
=
new
AtomicReference
<>(
new
Double
(
0.00
));
ParsedSum
parsedSum
=(
ParsedSum
)
agg
;
AtomicReference
<
Double
>
powerOfMonthGF
=
new
AtomicReference
<>(
new
Double
(
0.00
));
num
=
Double
.
valueOf
(
format2
.
format
(
parsedSum
.
getValue
()));
AtomicReference
<
Double
>
powerOfAnnualGF
=
new
AtomicReference
<>(
new
Double
(
0.00
));
}
fdzList
.
forEach
(
stationBasic
->
{
}
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getSocialContributionDtoList
(
num
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
powerOfDayFD
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
powerOfMonthFD
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
powerOfAnnualFD
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
});
gfList
.
forEach
(
stationBasic
->
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
powerOfDayGF
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
powerOfMonthGF
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
powerOfAnnualGF
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
});
Double
totalAnnual
=
(
powerOfAnnualFD
.
get
()
+
powerOfAnnualGF
.
get
()
*
CommonConstans
.
pvGenPoweActor
);
HashMap
<
String
,
String
>
stringHashMap13
=
new
HashMap
<>();
stringHashMap13
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
totalAnnual
*
CommonConstans
.
carbonDioxide
)));
stringHashMap13
.
put
(
"unit"
,
"二氧化碳减排量(万t)"
);
list3
.
add
(
stringHashMap13
);
HashMap
<
String
,
String
>
stringHashMap14
=
new
HashMap
<>();
stringHashMap14
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
totalAnnual
*
CommonConstans
.
standardCoal
)));
stringHashMap14
.
put
(
"unit"
,
"节约标准煤(万t)"
);
list3
.
add
(
stringHashMap14
);
HashMap
<
String
,
String
>
stringHashMap15
=
new
HashMap
<>();
stringHashMap15
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
totalAnnual
*
CommonConstans
.
toner
*
CommonConstans
.
tToWT
)));
stringHashMap15
.
put
(
"unit"
,
"碳粉尘减排量(万t)"
);
list3
.
add
(
stringHashMap15
);
HashMap
<
String
,
String
>
stringHashMap16
=
new
HashMap
<>();
stringHashMap16
.
put
(
"title"
,
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
(
totalAnnual
*
CommonConstans
.
sulfurDioxide
*
CommonConstans
.
tToWT
)));
stringHashMap16
.
put
(
"unit"
,
"二氧化硫减排量(万t)"
);
list3
.
add
(
stringHashMap16
);
page3
.
setRecords
(
list3
);
return
ResponseHelper
.
buildResponse
(
page3
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
...
...
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 @
991d4dad
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.mapper.MapRegionMapper;
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.mapper.MapRegionMapper;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.RegionMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.QueryDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.QueryDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.SocialContributionDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.StationCacheInfoDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.StationCacheInfoDto
;
...
@@ -44,10 +45,7 @@ import org.springframework.stereotype.Service;
...
@@ -44,10 +45,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Service
@Service
...
@@ -83,11 +81,19 @@ public class CommonServiceImpl {
...
@@ -83,11 +81,19 @@ public class CommonServiceImpl {
* @return 指标值总和
* @return 指标值总和
*/
*/
public
Double
getTotalByIndicatior
(
String
gatewayId
,
String
indicator
){
public
Double
getTotalByIndicatior
(
String
gatewayId
,
String
indicator
){
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" where equipmentIndexName='"
+
indicator
+
"'"
;
Double
totalvalue
=
0.0
;
//用于组装-es查询条件
List
<
Map
<
String
,
Object
>>
mapList
=
influxdbUtil
.
query
(
sql
);
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
totalvalue
=
mapList
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
get
(
"value"
))).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
get
(
"value"
))).
sum
();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
indicator
));
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
totalvalue
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
List
<
ESEquipments
>
result
=
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
Double
totalvalue
=
0.00
;
try
{
totalvalue
=
result
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
getValueF
())).
mapToDouble
(
l
->
Double
.
parseDouble
(
l
.
getValueF
().
toString
())).
sum
();
}
catch
(
Exception
e
)
{
return
totalvalue
;
}
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
totalvalue
));
}
}
public
Double
getNumByIndicatior
(
String
gatewayId
,
String
indicator
){
public
Double
getNumByIndicatior
(
String
gatewayId
,
String
indicator
){
...
@@ -105,14 +111,15 @@ public class CommonServiceImpl {
...
@@ -105,14 +111,15 @@ public class CommonServiceImpl {
* @return 指标值总和
* @return 指标值总和
*/
*/
public
Double
getAvgvalueByIndicatior
(
String
gatewayId
,
String
indicator
){
public
Double
getAvgvalueByIndicatior
(
String
gatewayId
,
String
indicator
){
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" where equipmentIndexName='"
+
indicator
+
"'"
;
String
sql
=
"SELECT * FROM indicators_"
+
gatewayId
+
" where equipmentIndexName='"
+
indicator
+
"'"
;
Double
avageValue
=
0.0
;
Double
avageValue
=
0.00
;
List
<
Map
<
String
,
Object
>>
mapList
=
influxdbUtil
.
query
(
sql
);
try
{
if
(
mapList
.
size
()
<
1
){
List
<
Map
<
String
,
Object
>>
mapList
=
influxdbUtil
.
query
(
sql
);
avageValue
=
mapList
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
get
(
"value"
))).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
get
(
"value"
))).
average
().
getAsDouble
();
}
catch
(
Exception
e
)
{
return
avageValue
;
return
avageValue
;
}
}
avageValue
=
mapList
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
get
(
"value"
))).
mapToDouble
(
l
->
Double
.
parseDouble
((
String
)
l
.
get
(
"value"
))).
average
().
getAsDouble
();
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
avageValue
));
return
Double
.
valueOf
(
String
.
format
(
"%.2f"
,
avageValue
));
}
}
public
Double
getTotalByIndicatior
(
List
<
Map
<
String
,
Object
>>
mapList
,
String
indicator
){
public
Double
getTotalByIndicatior
(
List
<
Map
<
String
,
Object
>>
mapList
,
String
indicator
){
Double
totalvalue
=
0.0
;
Double
totalvalue
=
0.0
;
...
@@ -172,8 +179,6 @@ public class CommonServiceImpl {
...
@@ -172,8 +179,6 @@ public class CommonServiceImpl {
public
List
<
StationCacheInfoDto
>
getListStationCacheInfoDto
()
{
public
List
<
StationCacheInfoDto
>
getListStationCacheInfoDto
()
{
List
<
StationCacheInfoDto
>
stationCacheInfoDtos
=
new
ArrayList
<>();
List
<
StationCacheInfoDto
>
stationCacheInfoDtos
=
new
ArrayList
<>();
stationCacheInfoDtos
=
redisTemplate
.
opsForList
().
range
(
"station_info_cache_bigscreen"
,
0
,
-
1
);
if
(
ObjectUtils
.
isEmpty
(
stationCacheInfoDtos
))
{
List
<
Region
>
regionList
=
regionMapper
.
selectList
(
new
QueryWrapper
<
Region
>().
eq
(
"LEVEL"
,
1
));
List
<
Region
>
regionList
=
regionMapper
.
selectList
(
new
QueryWrapper
<
Region
>().
eq
(
"LEVEL"
,
1
));
List
<
MapRegion
>
mapRegionList
=
mapRegionMapper
.
selectList
(
new
QueryWrapper
<
MapRegion
>().
isNotNull
(
"name"
));
List
<
MapRegion
>
mapRegionList
=
mapRegionMapper
.
selectList
(
new
QueryWrapper
<
MapRegion
>().
isNotNull
(
"name"
));
List
<
StationBasic
>
stationBasicList
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
isNotNull
(
"belong_area"
).
isNotNull
(
"fan_gateway_id"
));
List
<
StationBasic
>
stationBasicList
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
isNotNull
(
"belong_area"
).
isNotNull
(
"fan_gateway_id"
));
...
@@ -186,22 +191,12 @@ public class CommonServiceImpl {
...
@@ -186,22 +191,12 @@ public class CommonServiceImpl {
stationCacheInfoDto
.
setBelongProvince
(
regionList
.
stream
().
filter
(
region
->
region
.
getRegionCode
().
toString
().
equals
(
stationBasic
.
getBelongArea
().
replace
(
"["
,
""
).
split
(
","
)[
0
])).
map
(
region
->
region
.
getRegionName
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setBelongProvince
(
regionList
.
stream
().
filter
(
region
->
region
.
getRegionCode
().
toString
().
equals
(
stationBasic
.
getBelongArea
().
replace
(
"["
,
""
).
split
(
","
)[
0
])).
map
(
region
->
region
.
getRegionName
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setBelongArea
(
mapRegionList
.
stream
().
filter
(
mapRegion
->
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
2
))
||
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
3
))).
map
(
mapRegion
->
mapRegion
.
getName
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setBelongArea
(
mapRegionList
.
stream
().
filter
(
mapRegion
->
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
2
))
||
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
3
))).
map
(
mapRegion
->
mapRegion
.
getName
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setInstalledCapacity
(
String
.
format
(
"%.2f"
,
sjglZsjZsbtzMapper
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
())));
stationCacheInfoDto
.
setInstalledCapacity
(
String
.
format
(
"%.2f"
,
sjglZsjZsbtzMapper
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
())));
try
{
List
<
QueryDto
>
queryDtoList
=
new
ArrayList
<>();
queryDtoList
.
add
(
new
QueryDto
(
"gatewayId"
,
stationBasic
.
getFanGatewayId
()));
queryDtoList
.
add
(
new
QueryDto
(
"equipmentIndexName.keyword"
,
"有功功率"
));
if
(!
stationBasic
.
getStationType
().
equals
(
"FDZ"
))
{
queryDtoList
.
add
(
new
QueryDto
(
"frontModule"
,
"逆变器"
));
}
stationCacheInfoDto
.
setEquipmentNumbers
(
getCount
(
queryDtoList
,
"equipmentNumber.Keyword"
,
ESEquipments
.
class
).
toString
());
}
catch
(
Exception
exception
)
{
}
stationCacheInfoDto
.
setFanGatewayId
(
stationBasic
.
getFanGatewayId
());
stationCacheInfoDto
.
setFanGatewayId
(
stationBasic
.
getFanGatewayId
());
stationCacheInfoDto
.
setAreaCode
(
mapRegionList
.
stream
().
filter
(
mapRegion
->
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
2
))
||
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
3
))).
map
(
mapRegion
->
mapRegion
.
getAreaCode
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setBoosterGatewayId
(
stationBasic
.
getBoosterGatewayId
());
stationCacheInfoDto
.
setBoosterGatewayId
(
stationBasic
.
getBoosterGatewayId
());
stationCacheInfoDtos
.
add
(
stationCacheInfoDto
);
stationCacheInfoDtos
.
add
(
stationCacheInfoDto
);
}
}
redisTemplate
.
opsForList
().
leftPushAll
(
"station_info_cache_bigscreen"
,
stationCacheInfoDtos
);
}
return
stationCacheInfoDtos
;
return
stationCacheInfoDtos
;
}
}
...
@@ -330,6 +325,55 @@ public class CommonServiceImpl {
...
@@ -330,6 +325,55 @@ public class CommonServiceImpl {
return
null
;
return
null
;
}
}
public
<
T
>
List
<
T
>
getListDataByCondtions
(
Map
<
String
,
List
<
String
>>
mustQuerCondtion
,
Map
<
String
,
String
>
shouldQuerCondtion
,
Class
<
T
>
tClass
,
Map
<
String
,
String
>
likeQuerCondtion
)
{
BoolQueryBuilder
queryBuilder
=
QueryBuilders
.
boolQuery
();
if
(!
ObjectUtils
.
isEmpty
(
mustQuerCondtion
))
{
for
(
String
key
:
mustQuerCondtion
.
keySet
())
{
List
<
String
>
va
=
mustQuerCondtion
.
get
(
key
);
queryBuilder
.
must
(
QueryBuilders
.
termsQuery
(
key
,
va
));
}
}
if
(!
ObjectUtils
.
isEmpty
(
shouldQuerCondtion
))
{
for
(
String
key
:
shouldQuerCondtion
.
keySet
())
{
queryBuilder
.
should
(
QueryBuilders
.
wildcardQuery
(
key
,
shouldQuerCondtion
.
get
(
key
)));
}
}
if
(!
ObjectUtils
.
isEmpty
(
likeQuerCondtion
))
{
for
(
String
key
:
likeQuerCondtion
.
keySet
())
{
queryBuilder
.
must
(
QueryBuilders
.
wildcardQuery
(
key
,
"*"
+
likeQuerCondtion
.
get
(
key
)
+
"*"
));
}
}
Query
query
=
new
NativeSearchQueryBuilder
()
.
withQuery
(
queryBuilder
)
.
build
();
query
.
setTrackTotalHits
(
true
);
SearchHits
search
=
elasticsearchTemplate
.
search
(
query
,
tClass
);
if
(
search
.
hasSearchHits
())
{
List
<
SearchHit
<
T
>>
searchHitList
=
search
.
getSearchHits
();
List
<
T
>
list
=
searchHitList
.
stream
().
map
(
hit
->
hit
.
getContent
()).
collect
(
Collectors
.
toList
());
return
list
;
}
return
null
;
}
public
Double
getTotalByIndicatiorByGF
(
String
gatewayId
,
String
indicator
)
{
//用于组装-es查询条件
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
String
>
likeQuerCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
indicator
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
likeQuerCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
List
<
ESEquipments
>
result
=
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
Double
totalvalue
=
0.00
;
try
{
totalvalue
=
result
.
stream
().
filter
(
stringObjectMap
->
!
ObjectUtils
.
isEmpty
(
stringObjectMap
.
getValueF
())).
mapToDouble
(
l
->
Double
.
parseDouble
(
l
.
getValueF
().
toString
())).
sum
();
}
catch
(
Exception
e
)
{
return
totalvalue
;
}
return
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
totalvalue
*
CommonConstans
.
pvGenPoweActor
));
}
}
}
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 @
991d4dad
...
@@ -602,14 +602,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -602,14 +602,15 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
public
Map
<
String
,
Object
>
getDetailsWindSpeedAll
(
String
gatewayId
,
double
installedCapacity
){
public
Map
<
String
,
Object
>
getDetailsWindSpeedAll
(
String
gatewayId
,
double
installedCapacity
,
List
<
String
>
ids
){
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
if
(
StringUtils
.
isNotEmpty
(
gatewayId
))
{
if
(
CollectionUtils
.
isNotEmpty
(
ids
))
{
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
)
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
ids
);
}
}
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值"
,
"南瑞光差保护_313P"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值"
,
"南瑞光差保护_313P"
));
List
<
ESEquipments
>
indicatorsDtoList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
List
<
ESEquipments
>
indicatorsDtoList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
double
sum
=
indicatorsDtoList
.
stream
().
mapToDouble
(
t
->
Double
.
parseDouble
(
t
.
getValueF
().
toString
())).
sum
();
double
sum
=
null
==
indicatorsDtoList
?
0.0
:
indicatorsDtoList
.
stream
().
mapToDouble
(
t
->
Double
.
parseDouble
(
t
.
getValueF
().
toString
())).
sum
();
Double
format
=
Double
.
parseDouble
(
String
.
format
(
"%.2f"
,
sum
/
installedCapacity
));
Double
format
=
Double
.
parseDouble
(
String
.
format
(
"%.2f"
,
sum
/
installedCapacity
));
List
<
Map
<
String
,
Object
>>
list
=
temporaryDataMapper
.
timingTemporarysSorageData
(
gatewayId
);
List
<
Map
<
String
,
Object
>>
list
=
temporaryDataMapper
.
timingTemporarysSorageData
(
gatewayId
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -1936,5 +1937,21 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -1936,5 +1937,21 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
return
hashMap
;
return
hashMap
;
}
}
public
String
getEquipCount
(
String
gatewayId
,
String
stationType
)
{
Map
<
String
,
List
<
String
>>
queryCondtion1
=
new
HashMap
<>();
if
(
stationType
.
equals
(
"FDZ"
))
{
queryCondtion1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"有功功率"
));
}
else
{
queryCondtion1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"运行"
));
}
queryCondtion1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
List
<
ESEquipments
>
equipNumList
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion1
,
null
,
ESEquipments
.
class
);
if
(!
CollectionUtils
.
isEmpty
(
equipNumList
))
{
return
equipNumList
.
size
()
+
""
;
}
return
"0"
;
}
}
}
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 @
991d4dad
...
@@ -821,7 +821,7 @@ public class MonitoringServiceImpl {
...
@@ -821,7 +821,7 @@ public class MonitoringServiceImpl {
BigDecimal
totalInstall
=
new
BigDecimal
(
getInstallCapity
(
stationBasicListAll
));
BigDecimal
totalInstall
=
new
BigDecimal
(
getInstallCapity
(
stationBasicListAll
));
stringHashMap
.
put
(
"title"
,
totalInstall
.
toString
());
stringHashMap
.
put
(
"title"
,
totalInstall
.
toString
());
stringHashMap
.
put
(
"data"
,
""
);
stringHashMap
.
put
(
"data"
,
""
);
list
.
add
(
stringHashMap
);
//
list.add(stringHashMap);
//风电站
//风电站
HashMap
<
String
,
String
>
stringHashMap1
=
new
HashMap
<>();
HashMap
<
String
,
String
>
stringHashMap1
=
new
HashMap
<>();
BigDecimal
fdzInstall
=
new
BigDecimal
(
getInstallCapity
(
fdzList
));
BigDecimal
fdzInstall
=
new
BigDecimal
(
getInstallCapity
(
fdzList
));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/json/overview.json
View file @
991d4dad
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
{
{
"title"
:
"风机台数"
,
"title"
:
"风机台数"
,
"title1"
:
"风机台数(台)"
,
"title1"
:
"风机台数(台)"
,
"action"
:
"*.replace(
\"
.0
\"
,
\"\"
)"
,
"url"
:
"upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png"
"url"
:
"upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png"
},
},
{
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/json/overviewGF.json
View file @
991d4dad
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
{
{
"title"
:
"逆变器台数"
,
"title"
:
"逆变器台数"
,
"title1"
:
"逆变器台数(台)"
,
"title1"
:
"逆变器台数(台)"
,
"action"
:
"*.replace(
\"
.0
\"
,
\"\"
)"
,
"url"
:
"upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png"
"url"
:
"upload/jxiop/amos_studio/EA3572E1BD31DC1E7D8DA162F09ECB.png"
},
},
{
{
...
@@ -24,7 +23,7 @@
...
@@ -24,7 +23,7 @@
{
{
"url"
:
"upload/jxiop/amos_studio/DD1CE8BAF5A7C3AC5E6E2C0D46C3EEC.png"
,
"url"
:
"upload/jxiop/amos_studio/DD1CE8BAF5A7C3AC5E6E2C0D46C3EEC.png"
,
"title1"
:
"辐照强度(W/㎡)"
,
"title1"
:
"辐照强度(W/㎡)"
,
"title"
:
"
总辐射
"
"title"
:
"
辐照强度
"
},
},
{
{
"url"
:
"upload/jxiop/amos_studio/22639FDFF29B20B681DF55F1252876B3.png"
,
"url"
:
"upload/jxiop/amos_studio/22639FDFF29B20B681DF55F1252876B3.png"
,
...
@@ -52,8 +51,8 @@
...
@@ -52,8 +51,8 @@
"url"
:
"upload/jxiop/amos_studio/1660C5DDA22ACFADC89A60DEDB82FA39.png"
"url"
:
"upload/jxiop/amos_studio/1660C5DDA22ACFADC89A60DEDB82FA39.png"
},
},
{
{
"title"
:
"
年
利用小时"
,
"title"
:
"
日
利用小时"
,
"title1"
:
"
年
利用小时"
,
"title1"
:
"
日
利用小时"
,
"action"
:
"String.format(
\"
%.2f
\"
,Double.parseDouble(columnMap.get(
\"
*
\"
).toString())/ (Double.parseDouble(columnMap.get(
\"
-
\"
).toString())*1000))"
,
"action"
:
"String.format(
\"
%.2f
\"
,Double.parseDouble(columnMap.get(
\"
*
\"
).toString())/ (Double.parseDouble(columnMap.get(
\"
-
\"
).toString())*1000))"
,
"url"
:
"upload/jxiop/amos_studio/C46B483E51ACAC137CBEB5156F6F377.png"
"url"
:
"upload/jxiop/amos_studio/C46B483E51ACAC137CBEB5156F6F377.png"
}
}
...
...
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 @
991d4dad
...
@@ -401,6 +401,7 @@ public class CommonServiceImpl {
...
@@ -401,6 +401,7 @@ public class CommonServiceImpl {
stationCacheInfoDto
.
setBelongArea
(
mapRegionList
.
stream
().
filter
(
mapRegion
->
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
2
))
||
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
3
))).
map
(
mapRegion
->
mapRegion
.
getName
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setBelongArea
(
mapRegionList
.
stream
().
filter
(
mapRegion
->
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
2
))
||
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
3
))).
map
(
mapRegion
->
mapRegion
.
getName
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setInstalledCapacity
(
String
.
format
(
"%.2f"
,
sjglZsjZsbtzMapper
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
())));
stationCacheInfoDto
.
setInstalledCapacity
(
String
.
format
(
"%.2f"
,
sjglZsjZsbtzMapper
.
getStationCapactityByStationWerks
(
stationBasic
.
getStationNumber
())));
stationCacheInfoDto
.
setFanGatewayId
(
stationBasic
.
getFanGatewayId
());
stationCacheInfoDto
.
setFanGatewayId
(
stationBasic
.
getFanGatewayId
());
stationCacheInfoDto
.
setAreaCode
(
mapRegionList
.
stream
().
filter
(
mapRegion
->
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
2
))
||
mapRegion
.
getProvince
().
contains
(
stationCacheInfoDto
.
getBelongProvince
().
substring
(
0
,
3
))).
map
(
mapRegion
->
mapRegion
.
getAreaCode
()).
collect
(
Collectors
.
toList
()).
get
(
0
));
stationCacheInfoDto
.
setBoosterGatewayId
(
stationBasic
.
getBoosterGatewayId
());
stationCacheInfoDto
.
setBoosterGatewayId
(
stationBasic
.
getBoosterGatewayId
());
stationCacheInfoDtos
.
add
(
stationCacheInfoDto
);
stationCacheInfoDtos
.
add
(
stationCacheInfoDto
);
}
}
...
...
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 @
991d4dad
...
@@ -206,7 +206,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -206,7 +206,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
});
});
Collator
instance
=
Collator
.
getInstance
(
Locale
.
CHINA
);
Collator
instance
=
Collator
.
getInstance
(
Locale
.
CHINA
);
Collections
.
sort
(
result
,
(
e1
,
e2
)
->
{
Collections
.
sort
(
result
,
(
e1
,
e2
)
->
{
return
instance
.
compare
(
e1
.
get
SystemType
(),
e2
.
getSystemTyp
e
());
return
instance
.
compare
(
e1
.
get
EquipmentIndexName
(),
e2
.
getEquipmentIndexNam
e
());
});
});
List
<
ESEquipments
>
collect
=
result
.
stream
()
List
<
ESEquipments
>
collect
=
result
.
stream
()
.
skip
((
long
)
(
current
-
1
)
*
size
)
.
skip
((
long
)
(
current
-
1
)
*
size
)
...
@@ -801,6 +801,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
...
@@ -801,6 +801,12 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
statusMap
.
put
(
"title"
,
listDatum
.
getValue
().
equals
(
"false"
)
?
"通"
:
"断"
);
statusMap
.
put
(
"title"
,
listDatum
.
getValue
().
equals
(
"false"
)
?
"通"
:
"断"
);
statusMaps
.
add
(
statusMap
);
statusMaps
.
add
(
statusMap
);
}
}
Collator
instance
=
Collator
.
getInstance
(
Locale
.
CHINA
);
Collections
.
sort
(
statusMaps
,
(
e1
,
e2
)
->
{
return
instance
.
compare
(
e1
.
get
(
"data"
),
e2
.
get
(
"data"
));
});
return
statusMaps
;
return
statusMaps
;
}
}
...
...
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