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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
34 deletions
+44
-34
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
+0
-0
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
;
import
com.sun.javafx.logging.PulseLogger
;
import
org.checkerframework.checker.units.qual.C
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
public
class
CommonConstans
{
//光伏发电量系数
public
static
final
Double
pvGenPoweActor
=
0.000001
;
public
static
final
Double
pvGenPoweActorDay
=
1.0
;
public
static
final
Double
pvGenPoweActorYear
=
0.0001
;
public
static
final
Double
pvGenPoweActorCurrentData
=
0.0001
;
// 风电站:
// (日/月/年)发电量=场站所有风机(日/月/年)发电量总和
// 装机容量=场站所有风机装机容量总和
...
...
@@ -107,4 +112,10 @@ public class CommonConstans {
public
static
final
String
Twodecimalplaces
=
"%.2f"
;
public
static
final
String
Fourdecimalplaces
=
"%.4f"
;
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 {
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
String
gatewayId
=
stationBasic
.
getFanGatewayId
();
String
boosterGatewayId
=
stationBasic
.
getBoosterGatewayId
();
String
[]
columnList
=
new
String
[]{
"日发电量"
,
"月发电量"
,
"年发电量"
};
String
[]
columnList
=
new
String
[]{
CommonConstans
.
taiHeGenIndicatorDay
,
CommonConstans
.
taiHeGenIndicatorMonth
,
CommonConstans
.
taiHeGenIndicatorYear
};
String
[]
columnLists
=
new
String
[]{
"有功功率"
};
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
//日 月 年发电量同仅统计逆变器数据
List
<
Map
<
String
,
Object
>>
mapList
;
for
(
String
column
:
columnList
)
{
Double
result
=
commonService
.
getTotalByIndicatiorByGF
(
g
atewayId
,
column
);
Double
result
=
commonService
.
getTotalByIndicatiorByGF
(
boosterG
atewayId
,
column
);
columnMap
.
put
(
column
,
result
);
}
...
...
@@ -641,25 +641,25 @@ public class MonitorFanIdxController extends BaseController {
data
.
put
(
"title"
,
columnMap
.
get
(
"装机容量"
).
toString
());
objects
.
add
(
data
);
Map
<
String
,
Object
>
data1
=
new
HashMap
<>();
data1
.
put
(
"title"
,
columnMap
.
get
(
"日发电量"
).
toString
());
data1
.
put
(
"title"
,
columnMap
.
get
(
CommonConstans
.
taiHeGenIndicatorDay
).
toString
());
objects
.
add
(
data1
);
Map
<
String
,
Object
>
data2
=
new
HashMap
<>();
data2
.
put
(
"title"
,
columnMap
.
get
(
"风机台数"
).
toString
().
replace
(
".0"
,
""
));
objects
.
add
(
data2
);
Map
<
String
,
Object
>
data3
=
new
HashMap
<>();
data3
.
put
(
"title"
,
columnMap
.
get
(
"月发电量"
).
toString
());
data3
.
put
(
"title"
,
columnMap
.
get
(
CommonConstans
.
taiHeGenIndicatorMonth
).
toString
());
objects
.
add
(
data3
);
Map
<
String
,
Object
>
data4
=
new
HashMap
<>();
data4
.
put
(
"title"
,
String
.
format
(
"%.2f"
,
commonService
.
getSumByEquipmentIndxName
(
result1
,
"WTX-801_25_WTX-801_总辐射"
)));
objects
.
add
(
data4
);
Map
<
String
,
Object
>
data5
=
new
HashMap
<>();
data5
.
put
(
"title"
,
columnMap
.
get
(
"年发电量"
).
toString
());
data5
.
put
(
"title"
,
columnMap
.
get
(
CommonConstans
.
taiHeGenIndicatorYear
).
toString
());
objects
.
add
(
data5
);
Map
<
String
,
Object
>
data6
=
new
HashMap
<>();
data6
.
put
(
"title"
,
columnMap
.
get
(
"有功功率"
).
toString
());
objects
.
add
(
data6
);
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
);
Map
<
String
,
Object
>
data8
=
new
HashMap
<>();
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 {
//用于组装-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
);
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
;
}
if
(
indicator
.
equals
(
"日发电量"
))
{
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
));
return
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
totalvalue
));
}
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 {
esEquipments
.
setValue
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
Double
.
valueOf
(
esEquipments
.
getValue
())
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
}
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 {
}
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
)
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
queryCondtion
=
new
HashMap
<>();
...
...
@@ -1743,11 +1753,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
break
;
case
"日发电量"
:
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
;
case
"总发电量"
:
double
a
=
Double
.
parseDouble
(
e
.
getValueF
().
toString
())
*
CommonConstans
.
pvGenPoweActor
;
map
.
put
(
"yearNum"
,
keep
Two
DecimalPlaces
(
String
.
valueOf
(
a
)));
double
a
=
Double
.
parseDouble
(
e
.
getValueF
().
toString
())
*
CommonConstans
.
pvGenPoweActor
CurrentData
;
map
.
put
(
"yearNum"
,
keep
Four
DecimalPlaces
(
String
.
valueOf
(
a
)));
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 {
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
.
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
);
totalSocialContribution
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
CommonConstans
.
taiHeGenIndicatorYear
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
totalSocialContribution
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
));
}
});
Page
<
SocialContributionDto
>
socialContributionDtoPage
=
commonService
.
getSocialContributionDtoList
(
totalSocialContribution
.
get
());
...
...
@@ -154,14 +153,12 @@ public class MonitoringServiceIMQTTmpl {
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
.
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
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
CommonConstans
.
taiHeGenIndicator
);
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getBoosterGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorDay
)
));
monthlyPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorMonth
)));
annualPower
.
updateAndGet
(
v
->
v
+
monitoringServiceImpl
.
keepFourdecimalPlaces
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
CommonConstans
.
taiHeGenIndicatorYear
)
));
}
});
...
...
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
This diff is collapsed.
Click to expand it.
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