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
19887d4f
Commit
19887d4f
authored
Oct 07, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
00e19eff
11c2005c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
44 deletions
+41
-44
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+2
-2
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+2
-2
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+2
-2
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+2
-2
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+14
-12
MonitoringServiceIMQTTmpl.java
...ule/jxiop/biz/service/impl/MonitoringServiceIMQTTmpl.java
+18
-23
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+0
-0
TemporaryDataMapper.xml
...src/main/resources/mapper/cluster/TemporaryDataMapper.xml
+1
-1
No files found.
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 @
19887d4f
...
...
@@ -239,7 +239,7 @@ public class MonitorFanIdxController extends BaseController {
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
));
columnMap
.
put
(
"有功功率"
,
String
.
format
(
"%.2f"
,
result1
.
get
(
0
).
getValueF
()));
String
num
=
monitorFanIndicator
.
getFJCount
(
gatewayId
);
columnMap
.
put
(
"风机台数"
,
Double
.
valueOf
(
num
).
intValue
());
...
...
@@ -938,7 +938,7 @@ public class MonitorFanIdxController extends BaseController {
Map
<
String
,
Object
>
yearMap
=
new
HashMap
<>();
dayMap
.
put
(
"name"
,
name
);
dayMap
.
put
(
"gateWayId"
,
stationBasic
.
getFanGatewayId
());
dayMap
.
put
(
"value"
,
map
.
get
(
"日发电量"
)
==
null
?
0
:
String
.
format
(
"%.4f"
,
Double
.
parseDouble
(
map
.
get
(
"日发电量"
).
toString
())*
CommonConstans
.
pvGenPoweActor
));
dayMap
.
put
(
"value"
,
map
.
get
(
"日发电量"
)
==
null
?
0
:
String
.
format
(
"%.4f"
,
Double
.
parseDouble
(
map
.
get
(
"日发电量"
).
toString
())*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
monthMap
.
put
(
"name"
,
name
);
monthMap
.
put
(
"gateWayId"
,
stationBasic
.
getFanGatewayId
());
monthMap
.
put
(
"value"
,
map
.
get
(
"月发电量"
)
==
null
?
0
:
String
.
format
(
"%.4f"
,
Double
.
parseDouble
(
map
.
get
(
"月发电量"
).
toString
())*
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 @
19887d4f
...
...
@@ -659,8 +659,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
map
.
put
(
"seriesData"
,
seriesData
);
map
.
put
(
"axisData"
,
time
);
map
.
put
(
"mean"
,
mean
);
map
.
put
(
"max"
,
max
);
map
.
put
(
"min"
,
min
);
map
.
put
(
"max"
,
String
.
format
(
"%.2f"
,
max
)
);
map
.
put
(
"min"
,
String
.
format
(
"%.2f"
,
min
)
);
map
.
put
(
"maxTime"
,
maxTime
);
map
.
put
(
"minTime"
,
minTime
);
map
.
put
(
"load"
,
format
);
...
...
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 @
19887d4f
...
...
@@ -6,8 +6,8 @@ import java.util.HashMap;
public
class
CommonConstans
{
//光伏发电量系数
public
static
final
Double
pvGenPoweActor
=
0.000
0
1
;
public
static
final
Double
pvGenPoweActorDay
=
0.1
;
public
static
final
Double
pvGenPoweActor
=
0.0001
;
public
static
final
Double
pvGenPoweActorDay
=
0.
0
1
;
// 风电站:
// (日/月/年)发电量=场站所有风机(日/月/年)发电量总和
// 装机容量=场站所有风机装机容量总和
...
...
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 @
19887d4f
...
...
@@ -227,7 +227,7 @@ public class MonitorFanIdxController extends BaseController {
queryCondtion1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值"
));
queryCondtion1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result1
=
commonService
.
getListDataByCondtions
(
queryCondtion1
,
null
,
ESEquipments
.
class
);
columnMap
.
put
(
"有功功率"
,
String
.
format
(
"%.2f"
,
result1
.
get
(
0
).
getValueF
()
/
1000
));
columnMap
.
put
(
"有功功率"
,
String
.
format
(
"%.2f"
,
result1
.
get
(
0
).
getValueF
()));
String
num
=
monitorFanIndicator
.
getEquipCount
(
gatewayId
,
"FDZ"
);
columnMap
.
put
(
"风机台数"
,
num
);
...
...
@@ -617,7 +617,7 @@ public class MonitorFanIdxController extends BaseController {
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
=
commonService
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
columnMap
.
put
(
"有功功率"
,
String
.
format
(
"%.2f"
,
commonService
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)
*
CommonConstans
.
kwToMv
));
columnMap
.
put
(
"有功功率"
,
String
.
format
(
"%.2f"
,
commonService
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)
*
CommonConstans
.
kwToMv
*
10
));
// mapList = influxdbUtil.query("SELECT * FROM indicators_" + stationBasic.getFanGatewayId() + " where frontModule=~/逆变器/ and(equipmentIndexName='日发电量' or equipmentIndexName='月发电量' or equipmentIndexName='年发电量' or equipmentIndexName='有功功率')");
...
...
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 @
19887d4f
...
...
@@ -403,7 +403,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentNumberKeyword
,
Arrays
.
asList
(
equipNum
));
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
frontModule
);
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
frontModule
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
List
<
String
>
xList
=
new
ArrayList
<>();
List
<
String
>
yList
=
new
ArrayList
<>();
...
...
@@ -431,7 +431,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public
String
getFanDataByType
(
String
stationId
,
String
equipNum
,
String
frontModule
,
String
typeName
)
{
StationBasic
stationBasic
=
getOneByStationNumber
(
stationId
);
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
frontModule
);
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
frontModule
);
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
typeName
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
...
...
@@ -779,7 +779,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
frontModule
);
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
frontModule
);
List
<
ESEquipments
>
indicatorsDtoList
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
List
<
Map
<
String
,
Object
>>
statusMaps
=
new
ArrayList
<>();
...
...
@@ -815,7 +815,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
frontModule
);
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
frontModule
);
likeMap
.
put
(
CommonConstans
.
QueryStringSystemType
,
systemType
);
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
List
<
ESEquipments
>
listData
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
!
esEquipments
.
getDisplayName
().
equals
(
""
)).
collect
(
Collectors
.
toList
());
...
...
@@ -1054,7 +1054,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
// queryCondtion.put(CommonConstans.QueryStringFrontMoudle, Arrays.asList("电量表计"));
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"电量表计"
);
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
"电量表计"
);
List
<
ESEquipments
>
esEquipmentsList
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
List
<
ESEquipments
>
windSqlList
=
esEquipmentsList
.
stream
().
filter
(
esEquipments
->
!
esEquipments
.
getDisplayName
().
equals
(
""
)
&&
!
esEquipments
.
getDisplayName
().
equals
(
"检修状态"
)).
collect
(
Collectors
.
toList
());
Map
<
String
,
List
<
ESEquipments
>>
maps
=
windSqlList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ESEquipments:
:
getSystemType
));
...
...
@@ -1105,9 +1105,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
queryCodtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCodtion
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
Arrays
.
asList
(
"模拟量"
));
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
map
.
get
(
"boosterName"
));
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
map
.
get
(
"boosterName"
));
if
(
"1主变高压侧"
.
equals
(
map
.
get
(
"boosterName"
))
||
"1主变低压侧"
.
equals
(
map
.
get
(
"boosterName"
)))
{
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
map
.
get
(
"压侧"
));
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
map
.
get
(
"压侧"
));
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCodtion
,
null
,
ESEquipments
.
class
,
likeMap
);
// 主变高压侧
...
...
@@ -1554,7 +1554,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
for
(
String
value
:
values
)
{
mean
+=
Double
.
parseDouble
(
value
);
}
mean
=
Double
.
parseDouble
(
String
.
format
(
"%.2f"
,
mean
/
values
.
size
()));
mean
=
Double
.
parseDouble
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
mean
/
values
.
size
()));
max
=
Double
.
parseDouble
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
max
));
min
=
Double
.
parseDouble
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
min
));
List
<
Map
<
String
,
Object
>>
seriesData
=
new
ArrayList
<>();
...
...
@@ -1785,14 +1787,14 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryConditon
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"总直流功率"
));
queryConditon
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
"逆变器"
);
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon
,
null
,
ESEquipments
.
class
,
likeMap
);
Map
<
String
,
List
<
String
>>
queryConditon1
=
new
HashMap
<>();
queryConditon1
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"有功功率"
));
queryConditon1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
likeMap1
=
new
HashMap
<>();
likeMap1
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
likeMap1
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
"逆变器"
);
List
<
ESEquipments
>
listData1
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryConditon1
,
null
,
ESEquipments
.
class
,
likeMap1
);
// 将两组数据合并成一个集合中 将总直流功率数据 放入 另一个集合的valueLable中
...
...
@@ -1895,7 +1897,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"运行"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeMap
);
// 逆变器总数量
Integer
totalNumber
=
result
.
size
();
...
...
@@ -1905,7 +1907,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion1
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCondtion1
.
put
(
CommonConstans
.
QueryStringValueKeyword
,
Arrays
.
asList
(
"true"
));
Map
<
String
,
String
>
likeMap1
=
new
HashMap
<>();
likeMap1
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
likeMap1
.
put
(
CommonConstans
.
QueryStringFrontMoudle
NotKeyWord
,
"逆变器"
);
List
<
ESEquipments
>
result1
=
commonServiceImpl
.
getListDataByCondtionsAndLike
(
queryCondtion1
,
null
,
ESEquipments
.
class
,
likeMap1
);
List
<
String
>
equipmentNumberList
=
result1
.
stream
().
map
(
ESEquipments:
:
getEquipmentNumber
).
distinct
().
collect
(
Collectors
.
toList
());
int
djNum
=
0
;
...
...
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 @
19887d4f
...
...
@@ -40,7 +40,6 @@ import java.util.stream.Collectors;
@Async
@Service
public
class
MonitoringServiceIMQTTmpl
{
Logger
logger
=
LoggerFactory
.
getLogger
(
MonitoringServiceIMQTTmpl
.
class
);
//社会贡献Cron表达式
private
final
String
totalSocialContributionCron
=
"0 0/1 * * * *"
;
//区域完成情况 Cron表达式
...
...
@@ -55,9 +54,7 @@ public class MonitoringServiceIMQTTmpl {
private
final
String
fanStatusListCron
=
"0/30 * * * * *"
;
//风机实时数据Cron表达式
private
final
String
fanCurrentDataCron
=
"0 0/1 * * * *"
;
@Value
(
"${fan.statuts.stattuspath}"
)
private
String
fanStatusImagePathPrefix
;
Logger
logger
=
LoggerFactory
.
getLogger
(
MonitoringServiceIMQTTmpl
.
class
);
@Autowired
StationPlanMapper
stationPlanMapper
;
/**
...
...
@@ -65,7 +62,6 @@ public class MonitoringServiceIMQTTmpl {
*/
@Autowired
StationBasicMapper
stationBasicMapper
;
@Autowired
CommonServiceImpl
commonServiceImpl
;
@Autowired
...
...
@@ -74,13 +70,14 @@ public class MonitoringServiceIMQTTmpl {
EmqKeeper
emqKeeper
;
@Autowired
MonitorFanIndicatorImpl
monitorFanIndicator
;
@Autowired
CommonServiceImpl
commonService
;
@Autowired
InfluxDButils
influxDButils
;
@Autowired
MonitoringServiceImpl
monitoringServiceImpl
;
@Value
(
"${fan.statuts.stattuspath}"
)
private
String
fanStatusImagePathPrefix
;
@Autowired
private
MonitorFanIndicatorMapper
monitorFanIndicatorregionMapper
;
...
...
@@ -99,16 +96,16 @@ public class MonitoringServiceIMQTTmpl {
stationBasicList
.
forEach
(
stationBasic
->
{
if
(
"FDZ"
.
equals
(
stationBasic
.
getStationType
()))
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
totalSocialContribution
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getTotalByIndicatior
(
stationBasic
.
getFanGatewayId
(),
"年发电量"
));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
shouldQueryCondtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
shouldQueryCondtion
);
totalSocialContribution
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
);
}
});
...
...
@@ -124,7 +121,7 @@ public class MonitoringServiceIMQTTmpl {
/**
* 区域实时数据消息推送-30s一次
*/
//
@Scheduled(cron = completionOfPowerIndicatorsByProvinceNameCron)
@Scheduled
(
cron
=
completionOfPowerIndicatorsByProvinceNameCron
)
public
void
getCompletionOfPowerIndicatorsByProvinceName
()
{
Page
<
SocialContributionDto
>
socialContributionDtoPage
=
new
Page
<
SocialContributionDto
>();
logger
.
error
(
"--------------------------区域实时数据消息开始发送----------------------------------------------"
);
...
...
@@ -133,11 +130,11 @@ public class MonitoringServiceIMQTTmpl {
List
<
StationBasic
>
stationBasicList
=
stationBasicMapper
.
selectList
(
new
QueryWrapper
<
StationBasic
>().
like
(
"belong_area"
,
region
.
getRegionCode
()).
isNotNull
(
"fan_gateway_id"
));
int
year
=
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
);
List
<
Long
>
fdz
=
stationBasicList
.
stream
().
map
(
StationBasic:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
StationPlan
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
StationPlan:
:
getYear
,
String
.
valueOf
(
year
));
queryWrapper
.
in
(
StationPlan:
:
getStationBasicId
,
fdz
);
LambdaQueryWrapper
<
StationPlan
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
StationPlan:
:
getYear
,
String
.
valueOf
(
year
));
queryWrapper
.
in
(
StationPlan:
:
getStationBasicId
,
fdz
);
List
<
StationPlan
>
fdzPlans
=
stationPlanMapper
.
selectList
(
queryWrapper
);
double
value
=
fdzPlans
.
stream
().
mapToDouble
(
StationPlan:
:
getValue
).
sum
();
double
value
=
fdzPlans
.
stream
().
mapToDouble
(
StationPlan:
:
getValue
).
sum
();
//日发电量
AtomicReference
<
Double
>
dailyPower
=
new
AtomicReference
<>(
0.0
);
...
...
@@ -153,23 +150,22 @@ public class MonitoringServiceIMQTTmpl {
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)));
monthlyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)));
monthlyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)));
annualPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)));
}
else
{
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
likeQuerCondtion
=
new
HashMap
<>();
likeQuerCondtion
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
dailyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
monthlyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
annualPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)*
CommonConstans
.
pvGenPoweActor
));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
,
likeQuerCondtion
);
dailyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
monthlyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
annualPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
}
});
String
completionRatio
=
String
.
format
(
"%.2f"
,
annualPower
.
get
()
/
value
);
String
completionRatio
=
String
.
format
(
"%.2f"
,
(
annualPower
.
get
()
*
100
)
/
value
);
SocialContributionDto
dailyPowerdto
=
new
SocialContributionDto
();
dailyPowerdto
.
setTitle
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
dailyPower
.
get
()));
dailyPowerdto
.
setUnit
(
"万kWh"
);
...
...
@@ -329,7 +325,6 @@ public class MonitoringServiceIMQTTmpl {
// }
// });
// }
@Scheduled
(
cron
=
fanCurrentDataCron
)
public
void
getFanCurrentData
()
{
Integer
current
=
1
;
...
...
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 @
19887d4f
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/resources/mapper/cluster/TemporaryDataMapper.xml
View file @
19887d4f
...
...
@@ -5,7 +5,7 @@
<select
id=
"timingTemporarysSorageData"
resultType=
"map"
>
SELECT
avg(value)
as value ,
SELECT
FORMAT( avg(value),2)
as value ,
created_time as createdTime ,
equipmentIndexName
FROM
...
...
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