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
cc7a5d84
Commit
cc7a5d84
authored
Nov 15, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.逆变器日、月、年增加缺省值处理
parent
fa46f6f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
JpInverterController.java
...boot/module/hygf/biz/controller/JpInverterController.java
+25
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpInverterController.java
View file @
cc7a5d84
...
...
@@ -5,6 +5,7 @@ import com.alibaba.excel.EasyExcel;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.ReviewDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.*
;
...
...
@@ -240,18 +241,24 @@ public class JpInverterController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/jpInverterDayReport"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器日报表"
,
notes
=
"逆变器日报表"
)
public
ResponseModel
<
Page
<
TdHYGFInverterDayGenerate
>>
jpInverterDayReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
)
{
public
ResponseModel
<
Page
<
TdHYGFInverterDayGenerate
>>
jpInverterDayReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
)
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isEmpty
(
time
)){
time
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
);
}
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
jpInverterDayReport
(
current
,
size
,
time
,
snCodes
,
stationIds
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/jpInverterDayReportExport"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器日报表导出"
,
notes
=
"逆变器日报表导出"
)
public
void
jpInverterDayReportExport
(
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
,
HttpServletResponse
response
)
{
public
void
jpInverterDayReportExport
(
@RequestParam
(
required
=
false
)
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
,
HttpServletResponse
response
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isEmpty
(
time
)){
time
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
);
}
List
<
TdHYGFInverterDayGenerate
>
tdHYGFInverterDayGenerates
=
jpInverterServiceImpl
.
jpInverterDayReportExport
(
time
,
snCodes
,
stationIds
);
try
{
setResponseHeadForDowload
(
response
,
"逆变器日报表.xls"
);
...
...
@@ -263,18 +270,24 @@ public class JpInverterController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/jpInverterMonthReport"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器月报表"
,
notes
=
"逆变器月报表"
)
public
ResponseModel
<
Page
<
TdHYGFInverterMonthGenerate
>>
jpInverterMonthReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
)
{
public
ResponseModel
<
Page
<
TdHYGFInverterMonthGenerate
>>
jpInverterMonthReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
)
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isEmpty
(
time
)){
time
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM"
);
}
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
jpInverterMonthReport
(
current
,
size
,
time
,
snCodes
,
stationIds
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/jpInverterMonthReportExport"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器月报表导出"
,
notes
=
"逆变器月报表导出"
)
public
void
jpInverterMonthReportExport
(
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
,
HttpServletResponse
response
)
{
public
void
jpInverterMonthReportExport
(
@RequestParam
(
required
=
false
)
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
,
HttpServletResponse
response
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isEmpty
(
time
)){
time
=
DateUtil
.
format
(
new
Date
(),
"yyyy-MM"
);
}
List
<
TdHYGFInverterMonthGenerate
>
tdHYGFInverterMonthGenerates
=
jpInverterServiceImpl
.
jpInverterMonthReportExport
(
time
,
snCodes
,
stationIds
);
try
{
setResponseHeadForDowload
(
response
,
"逆变器月报表.xls"
);
...
...
@@ -287,18 +300,24 @@ public class JpInverterController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/jpInverterYearReport"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器年报表"
,
notes
=
"逆变器年报表"
)
public
ResponseModel
<
Page
<
TdHYGFInverterYearGenerate
>>
jpInverterYearReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
)
{
public
ResponseModel
<
Page
<
TdHYGFInverterYearGenerate
>>
jpInverterYearReport
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
)
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isEmpty
(
time
)){
time
=
DateUtil
.
format
(
new
Date
(),
"yyyy"
);
}
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
jpInverterYearReport
(
current
,
size
,
time
,
snCodes
,
stationIds
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/jpInverterYearReportExport"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"逆变器年报表导出"
,
notes
=
"逆变器年报表导出"
)
public
void
jpInverterYearReportExport
(
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
,
HttpServletResponse
response
)
{
public
void
jpInverterYearReportExport
(
@RequestParam
(
required
=
false
)
String
time
,
@RequestParam
(
required
=
false
)
List
<
String
>
snCodes
,
HttpServletResponse
response
)
{
List
<
JpStation
>
jpStation
=
jpStationServiceImpl
.
getJpStation
(
new
JpStationDto
());
List
<
String
>
stationIds
=
jpStation
.
stream
().
map
(
jpStation1
->
jpStation1
.
getThirdStationId
()).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isEmpty
(
time
)){
time
=
DateUtil
.
format
(
new
Date
(),
"yyyy"
);
}
List
<
TdHYGFInverterYearGenerate
>
tdHYGFInverterYearGenerates
=
jpInverterServiceImpl
.
jpInverterYearReportExport
(
time
,
snCodes
,
stationIds
);
try
{
setResponseHeadForDowload
(
response
,
"逆变器年报表.xls"
);
...
...
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