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
2efd9a45
Commit
2efd9a45
authored
Nov 15, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复年发电量完成率
parent
58fbe0c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+10
-4
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 @
2efd9a45
...
@@ -75,10 +75,10 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -75,10 +75,10 @@ public class MonitorFanIdxController extends BaseController {
@Autowired
@Autowired
MonitorFanIndicatorMapper
monitorFanIndicatorMapper
;
MonitorFanIndicatorMapper
monitorFanIndicatorMapper
;
@Autowired
@Autowired
EmqKeeper
emqKeeper
;
@Autowired
MonitoringServiceImpl
monitoringService
;
MonitoringServiceImpl
monitoringService
;
@Autowired
@Autowired
EmqKeeper
emqKeeper
;
@Autowired
MonitorService
monitorService
;
MonitorService
monitorService
;
@Autowired
@Autowired
StationPlanMapper
StationPlanMapper
;
StationPlanMapper
StationPlanMapper
;
...
@@ -495,8 +495,14 @@ public class MonitorFanIdxController extends BaseController {
...
@@ -495,8 +495,14 @@ public class MonitorFanIdxController extends BaseController {
wrapper
.
eq
(
"station_basic_id"
,
stationBasic
.
getSequenceNbr
());
wrapper
.
eq
(
"station_basic_id"
,
stationBasic
.
getSequenceNbr
());
wrapper
.
groupBy
(
"monthly"
);
wrapper
.
groupBy
(
"monthly"
);
List
<
Map
<
String
,
Object
>>
list1
=
StationPlanMapper
.
selectMaps
(
wrapper
);
List
<
Map
<
String
,
Object
>>
list1
=
StationPlanMapper
.
selectMaps
(
wrapper
);
Double
sumValue
=
list1
!=
null
&&
!
list1
.
isEmpty
()
?
(
Double
)
list1
.
get
(
0
).
get
(
"value"
)
:
0
;
// Double sumValue = list1 != null && !list1.isEmpty() ? (Double) list1.get(0).get("value") : 0;
//此处应该求全部值
Double
sumValue
=
0.0
;
if
(
CollectionUtils
.
isNotEmpty
(
list1
)){
for
(
Map
<
String
,
Object
>
map
:
list1
)
{
sumValue
+=
Objects
.
isNull
(
map
.
get
(
"value"
))?
0
:(
Double
)
map
.
get
(
"value"
);
}
}
columnMap
.
put
(
"年发电量完成率(%)"
,
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
columnMap
.
get
(
"年发电量"
).
toString
())
/
sumValue
*
100
));
columnMap
.
put
(
"年发电量完成率(%)"
,
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
columnMap
.
get
(
"年发电量"
).
toString
())
/
sumValue
*
100
));
// StationBasic stationBasic = stationBasicMapper.selectById(stationId);
// StationBasic stationBasic = stationBasicMapper.selectById(stationId);
...
...
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