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
a942806d
Commit
a942806d
authored
Sep 28, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发电量数据精度丢失问题处理
parent
6e254cba
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+1
-1
MonitoringServiceIMQTTmpl.java
...ule/jxiop/biz/service/impl/MonitoringServiceIMQTTmpl.java
+12
-12
MonitoringServiceImpl.java
.../module/jxiop/biz/service/impl/MonitoringServiceImpl.java
+1
-1
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 @
a942806d
...
...
@@ -23,7 +23,7 @@ public class CommonConstans {
// 二氧化碳减排量(万t)=发电量(万kW·h)*0.997 * 10 / 10000
public
static
final
Double
carbonDioxide
=
0.997
*
10
/
10000
;
// 节约标准煤(万t)=发电量(万kW·h)*0.29
public
static
final
Double
standardCoal
=
0.29
;
public
static
final
Double
standardCoal
=
0.29
/
10000
;
// 炭粉尘减排量(t)=发电量(万kW·h)*0.30
public
static
final
Double
toner
=
0.30
;
// 二氧化硫减排量(t)=发电量(万kW·h)*1.51
...
...
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 @
a942806d
...
...
@@ -153,32 +153,32 @@ public class MonitoringServiceIMQTTmpl {
queryCondtion
.
put
(
CommonConstans
.
QueryStringEquipmentIndexName
,
Arrays
.
asList
(
"有功功率"
,
"日发电量"
,
"月发电量"
,
"年发电量"
));
queryCondtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
null
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
));
monthlyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
));
annualPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
));
dailyPower
.
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
.
QueryStringGateWayId
,
Arrays
.
asList
(
stationBasic
.
getFanGatewayId
()));
Map
<
String
,
String
>
shouldQuery
Condtion
=
new
HashMap
<>();
shouldQueryCondtion
.
put
(
"frontModule"
,
"逆变器"
);
List
<
ESEquipments
>
result
=
commonServiceImpl
.
getListDataByCondtions
(
queryCondtion
,
shouldQueryCondtion
,
ESEquipments
.
class
);
dailyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
);
monthlyPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)*
CommonConstans
.
pvGenPoweActor
);
annualPower
.
updateAndGet
(
v
->
v
+
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)*
CommonConstans
.
pvGenPoweActor
);
Map
<
String
,
String
>
likeQuer
Condtion
=
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
)
);
}
});
String
completionRatio
=
String
.
format
(
"%.2f"
,
annualPower
.
get
()
/
value
);
SocialContributionDto
dailyPowerdto
=
new
SocialContributionDto
();
dailyPowerdto
.
setTitle
(
String
.
format
(
"%.2f"
,
dailyPower
.
get
()));
dailyPowerdto
.
setTitle
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
dailyPower
.
get
()));
dailyPowerdto
.
setUnit
(
"万kWh"
);
SocialContributionDto
monthlyPowerdto
=
new
SocialContributionDto
();
monthlyPowerdto
.
setTitle
(
String
.
format
(
"%.2f"
,
monthlyPower
.
get
()));
monthlyPowerdto
.
setTitle
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
monthlyPower
.
get
()));
monthlyPowerdto
.
setUnit
(
"万kWh"
);
SocialContributionDto
annualPowerdto
=
new
SocialContributionDto
();
annualPowerdto
.
setTitle
(
String
.
format
(
"%.2f"
,
annualPower
.
get
()));
annualPowerdto
.
setTitle
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
annualPower
.
get
()));
annualPowerdto
.
setUnit
(
"万kWh"
);
SocialContributionDto
completionRatioDto
=
new
SocialContributionDto
();
completionRatioDto
.
setTitle
(
completionRatio
);
...
...
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 @
a942806d
...
...
@@ -224,7 +224,7 @@ public class MonitoringServiceImpl {
completionOfPowerIndicatorsDto
.
setActivePower
(
String
.
format
(
CommonConstans
.
Twodecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result1
,
"南瑞光差保护_313P"
)
*
CommonConstans
.
kwToMv
));
completionOfPowerIndicatorsDto
.
setDailyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"日发电量"
)
*
CommonConstans
.
pvGenPoweActor
*
CommonConstans
.
pvGenPoweActorDay
));
completionOfPowerIndicatorsDto
.
setMonthlyPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"月发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
completionOfPowerIndicatorsDto
.
setAnnualPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
new
BigDecimal
(
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
)
));
completionOfPowerIndicatorsDto
.
setAnnualPower
(
String
.
format
(
CommonConstans
.
Fourdecimalplaces
,
commonServiceImpl
.
getSumByEquipmentIndxName
(
result
,
"年发电量"
)
*
CommonConstans
.
pvGenPoweActor
));
}
}
catch
(
Exception
exception
)
{
completionOfPowerIndicatorsDto
.
setWindSpeedOrIrradiance
(
"0"
);
...
...
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