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
6667521b
Commit
6667521b
authored
Nov 28, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
72cef0f6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
9 deletions
+47
-9
JpInverterMapper.xml
...-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
+31
-1
JpCollectorController.java
...oot/module/hygf/biz/controller/JpCollectorController.java
+4
-4
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+12
-4
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
View file @
6667521b
...
...
@@ -39,7 +39,37 @@
<select
id=
"selectPageData"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDtoNew"
>
select
hjc. *
hjc.sequence_nbr,
hjc.rec_date,
hjc.rec_user_id,
hjc.rec_user_name,
hjc.sn_code,
hjc.state,
hjc.rated_power,
hjc.collector_id,
hjc.collector_sn_code,
hjc.update_time,
hjc.current_power,
ROUND(hjc.day_power_generation/1000,4) as dayPowerGeneration,
ROUND(hjc.month_power_generation/1000,4) as monthPowerGeneration,
ROUND(hjc.year_power_generation/1000,4) as yearPowerGeneration,
hjc.brand,
hjc.model,
hjc.national_standard,
hjc.version,
hjc.generation_hours,
hjc.warranty_period,
hjc.IGBT_temperature,
hjc.AFCI_programme,
hjc.AFCI_version,
hjc.ID,
hjc.capacity,
ROUND(hjc.total_power_generation/1000,4) as totalPowerGeneration,
hjc.third_station_id,
hjc.is_delete,
hjc.third_code,
hjc.station_name,
hjc.addr
from
hygf_jp_inverter hjc
left join hygf_jp_station sta on sta.third_station_id = hjc.third_station_id
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpCollectorController.java
View file @
6667521b
...
...
@@ -112,10 +112,10 @@ public class JpCollectorController extends BaseController {
List
<
JpInverter
>
list
=
jpInverterServiceImpl
.
list
(
queryWrapper
);
List
<
JpInverter
>
listData
=
new
ArrayList
<>();
for
(
JpInverter
jpInverter
:
list
)
{
jpInverter
.
setDayPowerGeneration
(
jpInverter
.
getDayPowerGeneration
()!=
null
?
jpInverter
.
getDayPowerGeneration
()/
1000
:
0
);
jpInverter
.
setMonthPowerGeneration
(
jpInverter
.
getMonthPowerGeneration
()!=
null
?
jpInverter
.
getMonthPowerGeneration
()/
1000
:
0
);
jpInverter
.
setYearPowerGeneration
(
jpInverter
.
getYearPowerGeneration
()!=
null
?
jpInverter
.
getYearPowerGeneration
()/
1000
:
0
);
jpInverter
.
setTotalPowerGeneration
(
jpInverter
.
getTotalPowerGeneration
()!=
null
?
jpInverter
.
getTotalPowerGeneration
()/
1000
:
0
);
jpInverter
.
setDayPowerGeneration
(
jpInverter
.
getDayPowerGeneration
()!=
null
?
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
jpInverter
.
getDayPowerGeneration
()/
1000
))
:
0
);
jpInverter
.
setMonthPowerGeneration
(
jpInverter
.
getMonthPowerGeneration
()!=
null
?
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
jpInverter
.
getMonthPowerGeneration
()/
1000
))
:
0
);
jpInverter
.
setYearPowerGeneration
(
jpInverter
.
getYearPowerGeneration
()!=
null
?
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
jpInverter
.
getYearPowerGeneration
()/
1000
))
:
0
);
jpInverter
.
setTotalPowerGeneration
(
jpInverter
.
getTotalPowerGeneration
()!=
null
?
Double
.
valueOf
(
String
.
format
(
"%.4f"
,
jpInverter
.
getTotalPowerGeneration
()/
1000
))
:
0
);
listData
.
add
(
jpInverter
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpInverterServiceImpl.java
View file @
6667521b
...
...
@@ -343,14 +343,22 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
public
Map
<
String
,
Object
>
jpInverterTotal
(
String
snCode
,
String
thirdStationId
,
String
time
,
String
date
)
{
if
(
date
.
equals
(
"day"
)){
return
tdHYGFInverterMonthGenerateMapper
.
selectMonthTotal
(
time
,
snCode
,
thirdStationId
);
Map
<
String
,
Object
>
map
=
tdHYGFInverterMonthGenerateMapper
.
selectMonthTotal
(
time
,
snCode
,
thirdStationId
);
map
.
put
(
"fullhour"
,
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())));
return
map
;
}
else
if
(
date
.
equals
(
"month"
)){
return
tdHYGFInverterYearGenerateMapper
.
selectYearTotal
(
time
,
snCode
,
thirdStationId
);
Map
<
String
,
Object
>
map
=
tdHYGFInverterYearGenerateMapper
.
selectYearTotal
(
time
,
snCode
,
thirdStationId
);
map
.
put
(
"fullhour"
,
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())));
return
map
;
}
else
if
(
date
.
equals
(
"year"
)){
List
<
TdHYGFInverterTotalGenerate
>
tdHYGFInverterTotalGenerates
=
tdHYGFInverterYearGenerateMapper
.
selectTotalSum
(
time
,
snCode
,
thirdStationId
);
if
(
CollectionUtil
.
isNotEmpty
(
tdHYGFInverterTotalGenerates
)){
TdHYGFInverterTotalGenerate
tdHYGFInverterTotalGenerate
=
tdHYGFInverterTotalGenerates
.
get
(
0
);
return
Bean
.
BeantoMap
(
tdHYGFInverterTotalGenerate
)
;
Map
<
String
,
Object
>
map
=
Bean
.
BeantoMap
(
tdHYGFInverterTotalGenerate
);
map
.
put
(
"fullhour"
,
String
.
format
(
"%.2f"
,
Double
.
valueOf
(
map
.
get
(
"fullhour"
).
toString
())));
return
map
;
}
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"fullhour"
,
0
);
...
...
@@ -363,7 +371,7 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
double
income
=
maps
.
stream
().
filter
(
e
->
null
!=
e
.
getIncome
()
).
mapToDouble
(
TdHYGFInverterTotalGenerate:
:
getIncome
).
sum
();
double
generate
=
maps
.
stream
().
mapToDouble
(
TdHYGFInverterTotalGenerate:
:
getGenerate
).
sum
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"fullhour"
,
fullhour
);
map
.
put
(
"fullhour"
,
String
.
format
(
"%.2f"
,
fullhour
)
);
map
.
put
(
"income"
,
income
);
map
.
put
(
"generate"
,
generate
);
return
map
;
...
...
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