Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
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
曲欣亮
member-api
Commits
af6d1a82
Commit
af6d1a82
authored
Feb 18, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
f2d2382b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
213 additions
and
60 deletions
+213
-60
ExportService.java
src/main/java/com/egolm/film/api/service/ExportService.java
+5
-1
ExportServiceImpl.java
...va/com/egolm/film/api/service/impl/ExportServiceImpl.java
+165
-29
ExportConstant.java
src/main/java/com/egolm/film/api/web/ExportConstant.java
+4
-5
FilmController.java
src/main/java/com/egolm/film/api/web/FilmController.java
+0
-25
AdminFirstController.java
...va/com/egolm/film/api/web/admin/AdminFirstController.java
+39
-0
No files found.
src/main/java/com/egolm/film/api/service/ExportService.java
View file @
af6d1a82
...
...
@@ -7,6 +7,10 @@ import javax.servlet.ServletOutputStream;
public
interface
ExportService
{
Map
<
String
,
String
>
getApplyListColumns
();
void
exportApplyList
(
ServletOutputStream
outputStream
,
String
[]
columns
);
void
exportApplyList
(
ServletOutputStream
os
,
String
[]
columns
);
Map
<
String
,
String
>
getApplyPassListColumns
();
void
exportApplyPassList
(
ServletOutputStream
os
,
String
[]
columns
);
}
src/main/java/com/egolm/film/api/service/impl/ExportServiceImpl.java
View file @
af6d1a82
This diff is collapsed.
Click to expand it.
src/main/java/com/egolm/film/api/web/ExportConstant.java
View file @
af6d1a82
...
...
@@ -14,7 +14,6 @@ public class ExportConstant {
playactorTypes
.
put
(
"actor"
,
"男演员"
);
playactorTypes
.
put
(
"actress"
,
"女演员"
);
playactorTypes
.
put
(
"issuser"
,
"发行方"
);
playactorTypes
.
put
(
"show"
,
"参加过的电视节"
);
}
public
static
final
Map
<
String
,
String
>
filmTypes
=
new
HashMap
<
String
,
String
>();
...
...
@@ -38,10 +37,10 @@ public class ExportConstant {
}
public
static
final
Map
<
String
,
String
>
enrollTypes
=
new
HashMap
<
String
,
String
>();
static
{
enrollTypes
.
put
(
"1"
,
"金爵
奖国际影片评选
"
);
enrollTypes
.
put
(
"2"
,
"亚
洲新人奖国际影片评选
"
);
enrollTypes
.
put
(
"3"
,
"
电影频道传媒关注
"
);
enrollTypes
.
put
(
"4"
,
"
国际电影
展映"
);
enrollTypes
.
put
(
"1"
,
"金爵"
);
enrollTypes
.
put
(
"2"
,
"亚
新
"
);
enrollTypes
.
put
(
"3"
,
"
传媒
"
);
enrollTypes
.
put
(
"4"
,
"展映"
);
}
public
static
final
Map
<
String
,
String
>
enrollOtherTypes
=
new
HashMap
<
String
,
String
>();
static
{
...
...
src/main/java/com/egolm/film/api/web/FilmController.java
View file @
af6d1a82
package
com
.
egolm
.
film
.
api
.
web
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -15,10 +11,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.egolm.common.DateUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.film.api.service.AdminTokenService
;
import
com.egolm.film.api.service.ExportService
;
import
com.egolm.film.api.service.FilmService
;
import
com.egolm.film.api.service.MemberTokenService
;
import
com.egolm.film.api.service.ReviewService
;
...
...
@@ -47,9 +41,6 @@ public class FilmController {
@Autowired
ReviewService
reviewService
;
@Autowired
ExportService
exportService
;
@Autowired
MemberTokenService
memberTokenService
;
...
...
@@ -191,20 +182,4 @@ public class FilmController {
return
Rjx
.
jsonOk
().
set
(
"id"
,
filmBase
.
getId
());
}
@ResponseBody
@PostMapping
(
"getApplyListColumns"
)
@ApiOperation
(
"获取报名列表导出列"
)
public
Object
getApplyListColumns
()
{
return
Rjx
.
jsonOk
().
setData
(
exportService
.
getApplyListColumns
());
}
@ResponseBody
@PostMapping
(
"exportApplyList"
)
@ApiOperation
(
"导出报名列表"
)
public
void
exportApplyList
(
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
);
}
}
src/main/java/com/egolm/film/api/web/admin/AdminFirstController.java
View file @
af6d1a82
package
com
.
egolm
.
film
.
api
.
web
.
admin
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.text.MessageFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -17,11 +19,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.egolm.common.DateUtil
;
import
com.egolm.common.Util
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.api.service.AdminTokenService
;
import
com.egolm.film.api.service.EmailService
;
import
com.egolm.film.api.service.ExportService
;
import
com.egolm.film.api.service.FilmService
;
import
com.egolm.film.api.service.ReviewService
;
import
com.egolm.film.bean.Fc_admin
;
...
...
@@ -58,6 +62,9 @@ public class AdminFirstController {
@Autowired
ReviewService
reviewService
;
@Autowired
ExportService
exportService
;
@ResponseBody
@PostMapping
(
"list"
)
@ApiOperation
(
"影片列表"
)
...
...
@@ -207,4 +214,36 @@ public class AdminFirstController {
return
Rjx
.
jsonOk
();
}
@ResponseBody
@PostMapping
(
"getApplyListColumns"
)
@ApiOperation
(
"获取报名列表导出列"
)
public
Object
getApplyListColumns
()
{
return
Rjx
.
jsonOk
().
setData
(
exportService
.
getApplyListColumns
());
}
@ResponseBody
@PostMapping
(
"exportApplyList"
)
@ApiOperation
(
"导出报名列表"
)
public
void
exportApplyList
(
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
);
}
@ResponseBody
@PostMapping
(
"getApplyPassListColumns"
)
@ApiOperation
(
"获取影片列表导出列"
)
public
Object
getApplyPassListColumns
()
{
return
Rjx
.
jsonOk
().
setData
(
exportService
.
getApplyPassListColumns
());
}
@ResponseBody
@PostMapping
(
"exportApplyPassList"
)
@ApiOperation
(
"导出影片列表"
)
public
void
exportApplyPassList
(
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
.
exportApplyPassList
(
response
.
getOutputStream
(),
columns
);
}
}
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