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
4f94d207
Commit
4f94d207
authored
Nov 21, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电站报表导出字段修复
parent
3b935d5f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
12 deletions
+92
-12
DayGenerateEX.java
.../yeejoin/amos/boot/module/hygf/api/dto/DayGenerateEX.java
+3
-1
JpStationDto.java
...m/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
+4
-3
MonthGenerateEX.java
...eejoin/amos/boot/module/hygf/api/dto/MonthGenerateEX.java
+3
-1
YearGenerateEX.java
...yeejoin/amos/boot/module/hygf/api/dto/YearGenerateEX.java
+3
-1
JpStationServiceImpl.java
...ot/module/hygf/biz/service/impl/JpStationServiceImpl.java
+79
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/DayGenerateEX.java
View file @
4f94d207
...
...
@@ -3,14 +3,16 @@ package com.yeejoin.amos.boot.module.hygf.api.dto;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/11/20
*/
@Data
public
class
DayGenerateEX
{
@ExcelProperty
(
value
=
"电站编
码
"
,
index
=
0
)
@ExcelProperty
(
value
=
"电站编
号
"
,
index
=
0
)
@ApiModelProperty
(
value
=
"电站编码"
)
private
String
code
;
@ExcelProperty
(
value
=
"电站名称"
,
index
=
1
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpStationDto.java
View file @
4f94d207
...
...
@@ -26,7 +26,7 @@ import java.util.Map;
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JpStationDto"
,
description
=
"第三方场站"
)
public
class
JpStationDto
extends
BaseDto
{
@ExcelIgnore
private
static
final
long
serialVersionUID
=
1L
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"sn编码"
)
...
...
@@ -37,7 +37,7 @@ public class JpStationDto extends BaseDto {
@ExcelProperty
(
value
=
"电站名称"
,
index
=
1
)
@ApiModelProperty
(
value
=
"电站名称"
)
private
String
name
;
@ExcelProperty
(
value
=
"电站编
码
"
,
index
=
0
)
@ExcelProperty
(
value
=
"电站编
号
"
,
index
=
0
)
@ApiModelProperty
(
value
=
"电站编码"
)
private
String
code
;
@ExcelIgnore
...
...
@@ -82,7 +82,7 @@ public class JpStationDto extends BaseDto {
@ExcelIgnore
@ApiModelProperty
(
value
=
"第三方电站id"
)
private
String
thirdStationId
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"电站id"
)
private
Long
stationId
;
@ExcelIgnore
...
...
@@ -123,6 +123,7 @@ public class JpStationDto extends BaseDto {
// 年发电量
private
Double
yearGenerate
;
// 日收益
@ExcelIgnore
private
Double
dayIncome
;
@ExcelIgnore
// 月收益
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/MonthGenerateEX.java
View file @
4f94d207
...
...
@@ -2,17 +2,19 @@ package com.yeejoin.amos.boot.module.hygf.api.dto;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/11/20
*/
@Data
public
class
MonthGenerateEX
{
@ExcelProperty
(
value
=
"电站编
码
"
,
index
=
0
)
@ExcelProperty
(
value
=
"电站编
号
"
,
index
=
0
)
@ApiModelProperty
(
value
=
"电站编码"
)
private
String
code
;
@ExcelProperty
(
value
=
"电站名称"
,
index
=
1
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/YearGenerateEX.java
View file @
4f94d207
...
...
@@ -2,14 +2,16 @@ package com.yeejoin.amos.boot.module.hygf.api.dto;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @description:
* @author: tw
* @createDate: 2023/11/20
*/
@Data
public
class
YearGenerateEX
{
@ExcelProperty
(
value
=
"电站编
码
"
,
index
=
0
)
@ExcelProperty
(
value
=
"电站编
号
"
,
index
=
0
)
@ApiModelProperty
(
value
=
"电站编码"
)
private
String
code
;
@ExcelProperty
(
value
=
"电站名称"
,
index
=
1
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpStationServiceImpl.java
View file @
4f94d207
...
...
@@ -572,11 +572,11 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
wapper
.
eq
(
reviewDto
.
getTimeDate
()!=
null
,
DayGenerate:
:
getDayTime
,
reviewDto
.
getTimeDate
());
List
<
DayGenerate
>
listday
=
dayGenerateMapper
.
selectList
(
wapper
);
list
=
getJpStationDtoday
(
dataJpStation
,
listday
);
List
<
DayGenerateEX
>
listne
=
getJpStationDtodaynew
(
dataJpStation
,
listday
);
setResponseHeadForDowload
(
response
,
"电站日报表.xls"
);
EasyExcel
.
write
(
response
.
getOutputStream
()).
head
(
DayGenerateEX
.
class
).
excelType
(
ExcelTypeEnum
.
XLS
).
sheet
(
"电站报表"
)
.
doWrite
(
list
);
.
doWrite
(
list
ne
);
break
;
case
"month"
:
LambdaQueryWrapper
<
MonthGenerate
>
wapper1
=
new
LambdaQueryWrapper
<
MonthGenerate
>();
...
...
@@ -584,22 +584,22 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
wapper1
.
eq
(
reviewDto
.
getTimeDate
()!=
null
,
MonthGenerate:
:
getMonthTime
,
reviewDto
.
getTimeDate
());
List
<
MonthGenerate
>
listmonth
=
monthGenerateMapper
.
selectList
(
wapper1
);
list
=
getJpStationDtomonth
(
dataJpStation
,
listmonth
);
List
<
MonthGenerateEX
>
lo
=
getJpStationDtomonthnew
(
dataJpStation
,
listmonth
);
setResponseHeadForDowload
(
response
,
"电站月报表.xls"
);
EasyExcel
.
write
(
response
.
getOutputStream
()).
head
(
MonthGenerateEX
.
class
).
excelType
(
ExcelTypeEnum
.
XLS
).
sheet
(
"电站报表"
)
.
doWrite
(
l
ist
);
.
doWrite
(
l
o
);
break
;
case
"year"
:
LambdaQueryWrapper
<
YearGenerate
>
wapper2
=
new
LambdaQueryWrapper
<
YearGenerate
>();
wapper2
.
in
(
YearGenerate:
:
getThirdStationId
,
reviewDto
.
getThirdStationIds
());
wapper2
.
eq
(
reviewDto
.
getTimeDate
()!=
null
,
YearGenerate:
:
getYear
,
reviewDto
.
getTimeDate
());
List
<
YearGenerate
>
listyear
=
yearGenerateMapper
.
selectList
(
wapper2
);
list
=
getJpStationDtoyear
(
dataJpStation
,
listyear
);
List
<
YearGenerateEX
>
listy
=
getJpStationDtoyearnew
(
dataJpStation
,
listyear
);
setResponseHeadForDowload
(
response
,
"电站年报表.xls"
);
EasyExcel
.
write
(
response
.
getOutputStream
()).
head
(
YearGenerateEX
.
class
).
excelType
(
ExcelTypeEnum
.
XLS
).
sheet
(
"电站报表"
)
.
doWrite
(
list
);
.
doWrite
(
list
y
);
break
;
default
:
list
=
getJpStationDtoAll
(
dataJpStation
);
...
...
@@ -614,6 +614,79 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
return
list
;
}
public
List
<
DayGenerateEX
>
getJpStationDtodaynew
(
List
<
JpStation
>
da
,
List
<
DayGenerate
>
listday
){
List
<
DayGenerateEX
>
ld
=
new
ArrayList
<>();
for
(
DayGenerate
dayGenerate
:
listday
)
{
DayGenerateEX
hd
=
new
DayGenerateEX
();
for
(
JpStation
jpStation
:
da
)
{
if
(
jpStation
.
getThirdStationId
().
equals
(
dayGenerate
.
getThirdStationId
())){
hd
.
setCode
(
jpStation
.
getCode
());
hd
.
setName
(
jpStation
.
getName
());
hd
.
setUserName
(
jpStation
.
getUserName
());
hd
.
setStationContact
(
jpStation
.
getStationContact
());
hd
.
setState
(
jpStation
.
getState
());
hd
.
setAccumulatedPower
(
jpStation
.
getAccumulatedPower
());
hd
.
setFullhour
(
dayGenerate
.
getFullhour
());
hd
.
setDayGenerate
(
dayGenerate
.
getGenerate
());
hd
.
setTimeDate
(
dayGenerate
.
getDayTime
());
hd
.
setDayIncome
(
dayGenerate
.
getDayIncome
());
break
;
}
}
ld
.
add
(
hd
);
}
return
ld
;
}
public
List
<
MonthGenerateEX
>
getJpStationDtomonthnew
(
List
<
JpStation
>
da
,
List
<
MonthGenerate
>
listmonth
){
List
<
MonthGenerateEX
>
ld
=
new
ArrayList
<>();
for
(
MonthGenerate
dayGenerate
:
listmonth
)
{
MonthGenerateEX
hd
=
new
MonthGenerateEX
();
for
(
JpStation
jpStation
:
da
)
{
if
(
jpStation
.
getThirdStationId
().
equals
(
dayGenerate
.
getThirdStationId
())){
hd
.
setCode
(
jpStation
.
getCode
());
hd
.
setName
(
jpStation
.
getName
());
hd
.
setUserName
(
jpStation
.
getUserName
());
hd
.
setStationContact
(
jpStation
.
getStationContact
());
hd
.
setAccumulatedPower
(
jpStation
.
getAccumulatedPower
());
hd
.
setMonthGenerate
(
dayGenerate
.
getGenerate
());
hd
.
setMonthIncome
(
dayGenerate
.
getMonthIncome
());
hd
.
setTimeDate
(
dayGenerate
.
getMonthTime
());
hd
.
setFullhour
(
dayGenerate
.
getFullhour
());
break
;
}
}
ld
.
add
(
hd
);
}
return
ld
;
}
public
List
<
YearGenerateEX
>
getJpStationDtoyearnew
(
List
<
JpStation
>
da
,
List
<
YearGenerate
>
listyear
){
List
<
YearGenerateEX
>
ld
=
new
ArrayList
<>();
for
(
YearGenerate
dayGenerate
:
listyear
)
{
YearGenerateEX
hd
=
new
YearGenerateEX
();
for
(
JpStation
jpStation
:
da
)
{
if
(
jpStation
.
getThirdStationId
().
equals
(
dayGenerate
.
getThirdStationId
())){
hd
.
setCode
(
jpStation
.
getCode
());
hd
.
setName
(
jpStation
.
getName
());
hd
.
setUserName
(
jpStation
.
getUserName
());
hd
.
setStationContact
(
jpStation
.
getStationContact
());
hd
.
setAccumulatedPower
(
jpStation
.
getAccumulatedPower
());
hd
.
setFullhour
(
dayGenerate
.
getFullhour
());
hd
.
setYearGenerate
(
dayGenerate
.
getGenerate
());
hd
.
setYearIncome
(
dayGenerate
.
getYearIncome
());
hd
.
setTimeDate
(
dayGenerate
.
getYearTime
());
break
;
}
}
ld
.
add
(
hd
);
}
return
ld
;
}
public
void
setResponseHeadForDowload
(
HttpServletResponse
response
,
String
dowloadFileName
)
{
try
{
...
...
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