Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
7694579b
Commit
7694579b
authored
Feb 22, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
748cacf6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
ExportService.java
src/main/java/com/egolm/film/api/service/ExportService.java
+1
-1
ExportServiceImpl.java
...va/com/egolm/film/api/service/impl/ExportServiceImpl.java
+9
-4
AdminFirstController.java
...va/com/egolm/film/api/web/admin/AdminFirstController.java
+2
-2
No files found.
src/main/java/com/egolm/film/api/service/ExportService.java
View file @
7694579b
...
...
@@ -7,7 +7,7 @@ import javax.servlet.ServletOutputStream;
public
interface
ExportService
{
Map
<
String
,
String
>
getApplyListColumns
();
void
exportApplyList
(
ServletOutputStream
os
,
String
[]
columns
);
void
exportApplyList
(
ServletOutputStream
os
,
String
[]
columns
,
String
keyword
,
Integer
apply_state
,
Integer
enroll_type_id
,
Integer
film_type_id
,
String
film_country
);
Map
<
String
,
String
>
getApplyPassListColumns
();
...
...
src/main/java/com/egolm/film/api/service/impl/ExportServiceImpl.java
View file @
7694579b
...
...
@@ -20,6 +20,7 @@ import com.egolm.film.api.service.CountryService;
import
com.egolm.film.api.service.ExportService
;
import
com.egolm.film.api.service.LanguageService
;
import
com.egolm.film.api.web.ExportConstant
;
import
com.egolm.film.util.SqlWhere
;
@Service
public
class
ExportServiceImpl
implements
ExportService
{
...
...
@@ -77,7 +78,13 @@ public class ExportServiceImpl implements ExportService {
}
@Override
public
void
exportApplyList
(
ServletOutputStream
os
,
String
[]
columns
)
{
public
void
exportApplyList
(
ServletOutputStream
os
,
String
[]
columns
,
String
keyword
,
Integer
apply_state
,
Integer
enroll_type_id
,
Integer
film_type_id
,
String
film_country
)
{
SqlWhere
where
=
new
SqlWhere
();
where
.
eq
(
"mf.state"
,
2
).
lk
(
"mf.keywords"
,
keyword
).
eq
(
"mf.apply_state"
,
apply_state
).
lk
(
"mf.film_type_name"
,
film_type_id
).
eq
(
"mf.film_country"
,
film_country
);
String
sqlFilm
=
"fc_member_film"
;
if
(
enroll_type_id
!=
null
)
{
sqlFilm
=
"(select mf0.* from fc_member_film mf0, fc_member_film_enroll mfe where mf0.id = mfe.film_id and mfe.enroll_type_id = "
+
enroll_type_id
+
")"
;
}
String
sql
=
""
+
"select "
+
"mf.id, "
...
...
@@ -109,9 +116,7 @@ public class ExportServiceImpl implements ExportService {
+
"mf.film_type_name_short, "
+
"mf.apply_state "
+
" from "
+
"fc_member_film mf "
+
"where "
+
"state = 2"
;
+
sqlFilm
+
" mf "
+
StringUtil
.
join
(
" and "
,
" where "
,
""
,
""
,
where
.
getStringList
());
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
limitAll
(
sql
,
new
Page
(
1L
,
1000L
,
new
String
[]
{
"film_no asc"
,
"id asc"
}));
for
(
Map
<
String
,
Object
>
map
:
list
)
{
Integer
filmNo
=
Util
.
toInt
(
map
.
get
(
"film_no"
));
...
...
src/main/java/com/egolm/film/api/web/admin/AdminFirstController.java
View file @
7694579b
...
...
@@ -260,10 +260,10 @@ public class AdminFirstController {
@GetMapping
(
"exportApplyList"
)
@ApiOperation
(
"导出报名列表"
)
public
void
exportApplyList
(
HttpServletResponse
response
,
String
[]
columns
)
throws
IOException
{
public
void
exportApplyList
(
String
keyword
,
Integer
apply_state
,
Integer
enroll_type_id
,
Integer
film_type_id
,
String
film_country
,
HttpServletResponse
response
,
String
[]
columns
)
throws
IOException
{
response
.
setContentType
(
"application/octet-stream"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
"报名列表["
+
DateUtil
.
format
(
new
Date
(),
"yyMMdd-HHmmss"
)
+
"].xls"
,
"UTF-8"
));
exportService
.
exportApplyList
(
response
.
getOutputStream
(),
columns
);
exportService
.
exportApplyList
(
response
.
getOutputStream
(),
columns
,
keyword
,
apply_state
,
enroll_type_id
,
film_type_id
,
film_country
);
}
@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