Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
0e8a9868
Commit
0e8a9868
authored
Apr 20, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、报表导出部分bug
parent
9ad4b6dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
CitReportController.java
...java/pwc/taxtech/atms/controller/CitReportController.java
+29
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CitReportController.java
View file @
0e8a9868
...
...
@@ -25,6 +25,7 @@ import pwc.taxtech.atms.vat.service.impl.ReportServiceImpl;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayOutputStream
;
import
java.io.OutputStream
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -251,6 +252,34 @@ public class CitReportController {
return
ResponseEntity
.
ok
(
reportService
.
addCellManualDataSource
(
data
,
from
));
}
@RequestMapping
(
value
=
"exportReportData/{projectId}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
public
void
exportReportData
(
HttpServletResponse
response
,
@RequestBody
PeriodReportDataParam
param
,
@PathVariable
(
name
=
"period"
,
required
=
false
)
Integer
period
,
@PathVariable
(
name
=
"projectId"
,
required
=
false
)
String
projectId
)
{
OutputStream
ouputStream
=
null
;
try
{
Workbook
tWorkbook
=
citReportService
.
generateReportData
(
param
.
getReportIds
(),
projectId
,
period
);
response
.
setContentType
(
"multipart/form-data"
);
// response.setHeader("Content-Disposition", "attachment;fileName=" + new String(param.getFileName().getBytes("GB2312"), "ISO-8859-1"));
ouputStream
=
response
.
getOutputStream
();
tWorkbook
.
write
(
ouputStream
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
try
{
if
(
ouputStream
!=
null
)
{
ouputStream
.
close
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
@RequestMapping
(
value
=
"uploadReportData/{projectId}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
...
...
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