Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-qyxzpt-report
Overview
Overview
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
刘良浪
xzxt-qyxzpt-report
Commits
0340a4a2
Commit
0340a4a2
authored
Feb 23, 2023
by
liulianglang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出
parent
9da0e410
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
src/main/java/org/springblade/founder/tjfx/controller/NewDwAjlbController.java
+29
-0
No files found.
src/main/java/org/springblade/founder/tjfx/controller/NewDwAjlbController.java
View file @
0340a4a2
package
org
.
springblade
.
founder
.
tjfx
.
controller
;
package
org
.
springblade
.
founder
.
tjfx
.
controller
;
import
com.alibaba.excel.EasyExcel
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.codec.Charsets
;
import
org.springblade.founder.tjfx.entity.DwTjParam
;
import
org.springblade.founder.tjfx.entity.DwTjParam
;
import
org.springblade.founder.tjfx.entity.TbStAsj
;
import
org.springblade.founder.tjfx.service.AjlbSysDictService
;
import
org.springblade.founder.tjfx.service.AjlbSysDictService
;
import
org.springblade.founder.tjfx.service.NewDwAjlbService
;
import
org.springblade.founder.tjfx.service.NewDwAjlbService
;
import
org.springblade.founder.utils.EasyUIPage
;
import
org.springblade.founder.utils.EasyUIPage
;
...
@@ -9,8 +12,14 @@ import org.springblade.founder.utils.R;
...
@@ -9,8 +12,14 @@ import org.springblade.founder.utils.R;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@RestController
@RestController
...
@@ -63,6 +72,26 @@ public class NewDwAjlbController {
...
@@ -63,6 +72,26 @@ public class NewDwAjlbController {
}
}
}
}
@RequestMapping
(
"/exportnewAjlbTjByPidTs"
)
@ResponseBody
public
void
exportnewAjlbTjByPidTs
(
DwTjParam
dwTjParam
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
IOException
{
EasyUIPage
easyUIPage
=
new
EasyUIPage
();
easyUIPage
.
setPage
(
1
);
easyUIPage
.
setPageParaOracle
(
10000
);
int
begin
=
easyUIPage
.
getBegin
();
int
end
=
easyUIPage
.
getEnd
();
dwTjParam
.
setBegin
(
begin
);
dwTjParam
.
setEnd
(
end
);
Map
<
String
,
Object
>
rtMap
=
ajlbSysDictService
.
getnewAjlbTjByPidTs
(
dwTjParam
);
List
<
TbStAsj
>
list
=(
List
<
TbStAsj
>)
rtMap
.
get
(
"rows"
);
response
.
setContentType
(
"application/vnd.ms-excel"
);
response
.
setCharacterEncoding
(
Charsets
.
UTF_8
.
name
());
String
fileName
=
URLEncoder
.
encode
(
"案件列表"
,
Charsets
.
UTF_8
.
name
());
response
.
setHeader
(
"Content-disposition"
,
"attachment;filename="
+
fileName
+
".xlsx"
);
EasyExcel
.
write
(
response
.
getOutputStream
(),
TbStAsj
.
class
).
sheet
(
"案件列表"
).
doWrite
(
list
);
}
}
}
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