Commit 1c6f416b authored by Quxl's avatar Quxl

x

parent 99d41b0b
...@@ -21,6 +21,7 @@ public interface ExportService { ...@@ -21,6 +21,7 @@ public interface ExportService {
Integer review_state, Integer review_state,
Integer allot_atate, Integer allot_atate,
Integer opt_state, Integer opt_state,
Integer[] film_group_id,
String[] columns); String[] columns);
void export(OutputStream os); void export(OutputStream os);
......
...@@ -112,6 +112,7 @@ public interface FilmService { ...@@ -112,6 +112,7 @@ public interface FilmService {
Integer review_state, Integer review_state,
Integer allot_atate, Integer allot_atate,
Integer opt_state, Integer opt_state,
Integer[] film_group_id,
Page page); Page page);
Integer pass(Long member_film_id); Integer pass(Long member_film_id);
......
...@@ -155,7 +155,8 @@ public class ExportServiceImpl implements ExportService { ...@@ -155,7 +155,8 @@ public class ExportServiceImpl implements ExportService {
Integer review_round, Integer review_round,
Integer review_state, Integer review_state,
Integer allot_atate, Integer allot_atate,
Integer opt_state) { Integer opt_state,
Integer[] film_group_id) {
String sql0 = "select group_concat(fp.playactor_name) text, fp.film_id, fp.playactor_type from fc_member_film_playactor fp group by fp.film_id, fp.playactor_type"; String sql0 = "select group_concat(fp.playactor_name) text, fp.film_id, fp.playactor_type from fc_member_film_playactor fp group by fp.film_id, fp.playactor_type";
String sql1 = "select group_concat(fi.issuer_company) text, fi.film_id from fc_member_film_issuer fi group by fi.film_id"; String sql1 = "select group_concat(fi.issuer_company) text, fi.film_id from fc_member_film_issuer fi group by fi.film_id";
String sql2 = "select group_concat(fs.show_filmfest) text, fs.film_id from fc_member_film_show fs group by fs.film_id"; String sql2 = "select group_concat(fs.show_filmfest) text, fs.film_id from fc_member_film_show fs group by fs.film_id";
...@@ -172,7 +173,8 @@ public class ExportServiceImpl implements ExportService { ...@@ -172,7 +173,8 @@ public class ExportServiceImpl implements ExportService {
review_round, review_round,
review_state, review_state,
allot_atate, allot_atate,
opt_state, opt_state,
film_group_id,
new Page(1L, 9999999999L)); new Page(1L, 9999999999L));
List<Map<String, Object>> playactors = jdbcTemplate.queryForList(sql0); List<Map<String, Object>> playactors = jdbcTemplate.queryForList(sql0);
List<Map<String, Object>> issuers = jdbcTemplate.queryForList(sql1); List<Map<String, Object>> issuers = jdbcTemplate.queryForList(sql1);
...@@ -208,7 +210,7 @@ public class ExportServiceImpl implements ExportService { ...@@ -208,7 +210,7 @@ public class ExportServiceImpl implements ExportService {
} }
public void export(OutputStream os) { public void export(OutputStream os) {
List<Map<String, Object>> list = this.queryFilmDataList(null, null, null, null, null, null, null, null, null, null,null, null, null); List<Map<String, Object>> list = this.queryFilmDataList(null, null, null, null, null, null, null, null, null, null,null, null, null, null);
List<String> argsList = new ArrayList<String>(); List<String> argsList = new ArrayList<String>();
List<String> titleList = new ArrayList<String>(); List<String> titleList = new ArrayList<String>();
Map<String, String> map = this.getAllTitles(null); Map<String, String> map = this.getAllTitles(null);
...@@ -234,6 +236,7 @@ public class ExportServiceImpl implements ExportService { ...@@ -234,6 +236,7 @@ public class ExportServiceImpl implements ExportService {
Integer review_state, Integer review_state,
Integer allot_atate, Integer allot_atate,
Integer opt_state, Integer opt_state,
Integer[] film_group_id,
String[] columns) { String[] columns) {
List<Map<String, Object>> list = this.queryFilmDataList( List<Map<String, Object>> list = this.queryFilmDataList(
keyword, keyword,
...@@ -248,7 +251,8 @@ public class ExportServiceImpl implements ExportService { ...@@ -248,7 +251,8 @@ public class ExportServiceImpl implements ExportService {
review_round, review_round,
review_state, review_state,
allot_atate, allot_atate,
opt_state); opt_state,
film_group_id);
List<String> argsList = new ArrayList<String>(); List<String> argsList = new ArrayList<String>();
List<String> titleList = new ArrayList<String>(); List<String> titleList = new ArrayList<String>();
Map<String, String> map = this.getAllTitles(columns); Map<String, String> map = this.getAllTitles(columns);
......
...@@ -408,6 +408,7 @@ public class FilmServiceImpl implements FilmService { ...@@ -408,6 +408,7 @@ public class FilmServiceImpl implements FilmService {
Integer review_state, Integer review_state,
Integer allot_atate, Integer allot_atate,
Integer opt_state, Integer opt_state,
Integer[] film_type_id,
Page page) { Page page) {
SqlWhere where1 = new SqlWhere() SqlWhere where1 = new SqlWhere()
.eq("mf.state", state) .eq("mf.state", state)
...@@ -417,6 +418,7 @@ public class FilmServiceImpl implements FilmService { ...@@ -417,6 +418,7 @@ public class FilmServiceImpl implements FilmService {
.eq("mf.film_type_name_short", film_type_short) .eq("mf.film_type_name_short", film_type_short)
.eq("mf.film_country", film_country) .eq("mf.film_country", film_country)
.eq("mf.play_shanghai", play_shanghai) .eq("mf.play_shanghai", play_shanghai)
.in("mf.film_type_id", film_type_id)
; ;
String sql_film = "fc_member_film"; String sql_film = "fc_member_film";
if(StringUtil.isNotBlank(enroll_type_id)) { if(StringUtil.isNotBlank(enroll_type_id)) {
......
...@@ -81,6 +81,7 @@ public class AdminFirstController { ...@@ -81,6 +81,7 @@ public class AdminFirstController {
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_state", value="审片结论 1通过 2否决 3参赛 4参赛备选 5参展"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_state", value="审片结论 1通过 2否决 3参赛 4参赛备选 5参展"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="allot_atate", value="评委分配状态 0未分配评委 1已分配评委评选中"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="allot_atate", value="评委分配状态 0未分配评委 1已分配评委评选中"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="opt_state", value="评选状态 0未评选 1有争议 2管理员分配 3已完成"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="opt_state", value="评选状态 0未评选 1有争议 2管理员分配 3已完成"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_group_id", value="影片分组ID"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="limit", value="分页大小"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="limitKey", value="排序"), @ApiImplicitParam(paramType="query", dataType="string", required=true, name="limitKey", value="排序"),
...@@ -88,7 +89,7 @@ public class AdminFirstController { ...@@ -88,7 +89,7 @@ public class AdminFirstController {
public Object list( public Object list(
String keyword, String film_country, String play_shanghai, String keyword, String film_country, String play_shanghai,
Integer state, Integer apply_state, Integer film_type, Integer enroll_type, Integer upload_state, Integer film_type_short, Integer state, Integer apply_state, Integer film_type, Integer enroll_type, Integer upload_state, Integer film_type_short,
Integer review_round, Integer review_state, Integer allot_atate, Integer opt_state, Integer review_round, Integer review_state, Integer allot_atate, Integer opt_state, Integer[] film_group_id,
Long index, Long index,
Long limit, Long limit,
String[] limitKey, String[] limitKey,
...@@ -97,7 +98,7 @@ public class AdminFirstController { ...@@ -97,7 +98,7 @@ public class AdminFirstController {
index = index == null ? 1 : index; index = index == null ? 1 : index;
limit = limit == null ? 20 : limit; limit = limit == null ? 20 : limit;
Page page = new Page(index, limit, limitKey); Page page = new Page(index, limit, limitKey);
List<Map<String, Object>> list = memberFilmService.queryChuShenList(keyword, state, apply_state, upload_state, film_type, enroll_type, film_country, film_type_short, play_shanghai, review_round, review_state, allot_atate, opt_state, page); List<Map<String, Object>> list = memberFilmService.queryChuShenList(keyword, state, apply_state, upload_state, film_type, enroll_type, film_country, film_type_short, play_shanghai, review_round, review_state, allot_atate, opt_state, film_group_id, page);
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
...@@ -116,19 +117,20 @@ public class AdminFirstController { ...@@ -116,19 +117,20 @@ public class AdminFirstController {
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_round", value="审片轮数,第几轮审片"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_round", value="审片轮数,第几轮审片"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_state", value="审片结论 1通过 2否决 3参赛 4参赛备选 5参展"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_state", value="审片结论 1通过 2否决 3参赛 4参赛备选 5参展"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="allot_atate", value="评委分配状态 0未分配评委 1已分配评委评选中"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="allot_atate", value="评委分配状态 0未分配评委 1已分配评委评选中"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="opt_state", value="评选状态 0未评选 1有争议 2管理员分配 3已完成"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="opt_state", value="评选状态 0未评选 1有争议 2管理员分配 3已完成"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_group_id", value="影片分组ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="columns", value="数据导出时导出列" , allowMultiple=true), @ApiImplicitParam(paramType="query", dataType="string", required=false, name="columns", value="数据导出时导出列" , allowMultiple=true),
}) })
public void exportExcel( public void exportExcel(
String keyword, String film_country, String play_shanghai, String keyword, String film_country, String play_shanghai,
Integer state, Integer apply_state, Integer film_type, Integer enroll_type, Integer upload_state, Integer film_type_short, Integer state, Integer apply_state, Integer film_type, Integer enroll_type, Integer upload_state, Integer film_type_short,
Integer review_round, Integer review_state, Integer allot_atate, Integer opt_state, Integer review_round, Integer review_state, Integer allot_atate, Integer opt_state, Integer[] film_group_id,
String[] columns, String[] columns,
HttpServletRequest request, HttpServletRequest request,
HttpServletResponse response) throws IOException { HttpServletResponse response) throws IOException {
response.setContentType("application/octet-stream"); response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("影片列表[" + DateUtil.format(new Date(), "yyMMdd-HHmmss") + "].xls", "UTF-8")); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("影片列表[" + DateUtil.format(new Date(), "yyMMdd-HHmmss") + "].xls", "UTF-8"));
exportService.export(response.getOutputStream(), keyword, state, apply_state, film_type, enroll_type, upload_state, film_country, film_type_short, play_shanghai, review_round, review_state, allot_atate, opt_state, columns); exportService.export(response.getOutputStream(), keyword, state, apply_state, film_type, enroll_type, upload_state, film_country, film_type_short, play_shanghai, review_round, review_state, allot_atate, opt_state, film_group_id, columns);
} }
@Transactional @Transactional
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment