Commit af6d1a82 authored by Quxl's avatar Quxl

x

parent f2d2382b
......@@ -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);
}
......@@ -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 {
......
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);
}
}
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);
}
}
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