Commit 50016f92 authored by 张永's avatar 张永

1

parent 8e685394
...@@ -35,6 +35,7 @@ import com.egolm.film.bean.model.Fc_member_film_base_model; ...@@ -35,6 +35,7 @@ import com.egolm.film.bean.model.Fc_member_film_base_model;
import com.egolm.film.config.WebMvcConfig; import com.egolm.film.config.WebMvcConfig;
import com.egolm.film.config.XException; import com.egolm.film.config.XException;
import com.egolm.film.config.XRException; import com.egolm.film.config.XRException;
import com.egolm.film.util.FilmContrants;
import com.egolm.film.util.SqlWhere; import com.egolm.film.util.SqlWhere;
...@@ -635,15 +636,25 @@ public class FilmServiceImpl implements FilmService { ...@@ -635,15 +636,25 @@ public class FilmServiceImpl implements FilmService {
@Override @Override
public void updateFilmUploadState(String[] film_id,String[] number) { public void updateFilmUploadState(String[] film_id,String[] number) {
if(film_id.length == number.length) { if(film_id.length == number.length) {
List<Object[]> objs = new ArrayList<Object[]>(); List<Object[]> uploadObjs = new ArrayList<Object[]>();
List<Object[]> filmObjs = new ArrayList<Object[]>();
for(int i = 0; i < film_id.length; i++) { for(int i = 0; i < film_id.length; i++) {
objs.add(new Object[]{ uploadObjs.add(new Object[]{
FilmContrants.UPLOAD_STATUS_INIT,
film_id[i], film_id[i],
number[i]}); number[i]});
filmObjs.add(new Object[]{
FilmContrants.UPLOAD_STATUS_INIT,
film_id[i]});
} }
String sql = "update fc_film_upload set upload_state = 0 ,upload__error_message= '',upload_progress='0%' where film_id = ? and number = ? "; String updateSql = "update fc_film_upload set upload_state = ? ,upload__error_message= '',upload_progress='0%' where film_id = ? and number = ? ";
jdbcTemplate.batchUpdate(sql, objs); jdbcTemplate.batchUpdate(updateSql, uploadObjs);
String filmSql = "update fc_member_film set upload_state = ? where film_no = ? ";
jdbcTemplate.batchUpdate(filmSql, filmObjs);
} }
} }
} }
package com.egolm.film.api.web.admin; package com.egolm.film.api.web.admin;
import java.io.IOException; import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
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.ResponseBody;
import com.egolm.common.DateUtil; import com.egolm.common.DateUtil;
import com.egolm.common.Util; import com.egolm.common.Util;
import com.egolm.common.bean.Rjx; import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.AdminTokenService; import com.egolm.film.api.service.AdminTokenService;
import com.egolm.film.api.service.EmailService; import com.egolm.film.api.service.EmailService;
import com.egolm.film.api.service.ExportService; import com.egolm.film.api.service.ExportService;
import com.egolm.film.api.service.FilmService; import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.ReviewService; import com.egolm.film.api.service.ReviewService;
import com.egolm.film.bean.Fc_admin; import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_member_film; import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.model.LoginToken; import com.egolm.film.model.LoginToken;
import com.egolm.film.util.Common; import com.egolm.film.util.Common;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
/** /**
* 初审 * 初审
* @author Quxl * @author Quxl
* *
*/ */
@Api @Api
@Controller @Controller
@RequestMapping("admin/first") @RequestMapping("admin/first")
public class AdminFirstController { public class AdminFirstController {
Logger logger = LoggerFactory.getLogger(AdminFirstController.class); Logger logger = LoggerFactory.getLogger(AdminFirstController.class);
@Autowired @Autowired
FilmService filmService; FilmService filmService;
@Autowired @Autowired
AdminTokenService tokenService; AdminTokenService tokenService;
@Autowired @Autowired
EmailService emailService; EmailService emailService;
@Autowired @Autowired
ReviewService reviewService; ReviewService reviewService;
@Autowired @Autowired
ExportService exportService; ExportService exportService;
@ResponseBody @ResponseBody
@PostMapping("list") @PostMapping("list")
@ApiOperation("影片列表") @ApiOperation("影片列表")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="keyword", value="关键字"), @ApiImplicitParam(paramType="query", dataType="string", required=false, name="keyword", value="关键字"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="state", value="影片状态 1未提交 2 已提交"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="state", value="影片状态 1未提交 2 已提交"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="apply_state", value="初审状态 1未初审 2初审通过 3初审否决"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="apply_state", value="初审状态 1未初审 2初审通过 3初审否决"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type", value="影片类型"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type", value="影片类型"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="enroll_type", value="影片性质"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="enroll_type", value="影片性质"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="film_country", value="影片国家地区"), @ApiImplicitParam(paramType="query", dataType="string", required=false, name="film_country", value="影片国家地区"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_short", value="影片扩展分类"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_short", value="影片扩展分类"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="upload_state", value="影片文件上传状态(0,1)"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="upload_state", value="影片文件上传状态(0,1)"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="play_shanghai", value="首映情况"), @ApiImplicitParam(paramType="query", dataType="string", required=false, name="play_shanghai", value="首映情况"),
@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="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="排序"),
}) })
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[] film_group_id, 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,
HttpServletRequest request, HttpServletRequest request,
HttpServletResponse response) throws IOException { HttpServletResponse response) throws IOException {
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);
Fc_admin admin = Util.mapTo(tokenService.getTokenObj(), Fc_admin.class); Fc_admin admin = Util.mapTo(tokenService.getTokenObj(), Fc_admin.class);
List<Map<String, Object>> list = filmService.queryFilmList(admin.getGroup_id(), 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); List<Map<String, Object>> list = filmService.queryFilmList(admin.getGroup_id(), 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);
} }
@ResponseBody @ResponseBody
@Transactional @Transactional
@PostMapping("pass") @PostMapping("pass")
@ApiOperation("初审通过") @ApiOperation("初审通过")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="film_type_name_short", value="影片分类扩展分类"), @ApiImplicitParam(paramType="query", dataType="string", required=true, name="film_type_name_short", value="影片分类扩展分类"),
}) })
public Object pass(Long member_film_id, String film_type_name_short) { public Object pass(Long member_film_id, String film_type_name_short) {
filmService.verifyFilmDuplicate(member_film_id); filmService.verifyFilmDuplicate(member_film_id);
Fc_member_film film = new Fc_member_film(); Fc_member_film film = new Fc_member_film();
LoginToken token = tokenService.getToken(); LoginToken token = tokenService.getToken();
Integer adminid = (Integer)token.getId(); Integer adminid = (Integer)token.getId();
film.setId(member_film_id); film.setId(member_film_id);
film.setFilm_type_name_short(film_type_name_short); film.setFilm_type_name_short(film_type_name_short);
film.setFirst_admin_id(adminid); film.setFirst_admin_id(adminid);
film.setApply_state(2); film.setApply_state(2);
film.setUpload_state(0); film.setUpload_state(0);
film.setPass_time(System.currentTimeMillis()/1000); film.setPass_time(System.currentTimeMillis()/1000);
filmService.mergeMemberFilm(film); filmService.mergeMemberFilm(film);
filmService.pass(member_film_id); filmService.pass(member_film_id);
reviewService.toFirstRound(member_film_id); reviewService.toFirstRound(member_film_id);
Map<String, Object> map = emailService.sendByTemplate_01(member_film_id, "doc/first_pass"); Map<String, Object> map = emailService.sendByTemplate_01(member_film_id, "doc/first_pass");
Rjx rjx = Rjx.jsonOk(); Rjx rjx = Rjx.jsonOk();
rjx.putAll(map); rjx.putAll(map);
filmService.initKeywords(member_film_id); filmService.initKeywords(member_film_id);
return rjx; return rjx;
} }
@ResponseBody @ResponseBody
@PostMapping("reject") @PostMapping("reject")
@ApiOperation("初审驳回") @ApiOperation("初审驳回")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="apply_state_intro", value="拒绝理由,初审结论"), @ApiImplicitParam(paramType="query", dataType="string", required=true, name="apply_state_intro", value="拒绝理由,初审结论"),
@ApiImplicitParam(paramType="query", dataType="boolean", required=false, name="is_stop_apply", value="true否决 false驳回"), @ApiImplicitParam(paramType="query", dataType="boolean", required=false, name="is_stop_apply", value="true否决 false驳回"),
}) })
public Object reject(Boolean is_stop_apply, Long member_film_id, String apply_state_intro) { public Object reject(Boolean is_stop_apply, Long member_film_id, String apply_state_intro) {
if(is_stop_apply == null) { if(is_stop_apply == null) {
is_stop_apply = false; is_stop_apply = false;
} }
filmService.reject(is_stop_apply, member_film_id, apply_state_intro); filmService.reject(is_stop_apply, member_film_id, apply_state_intro);
return Rjx.jsonOk(); return Rjx.jsonOk();
} }
@ResponseBody @ResponseBody
@PostMapping("testMail") @PostMapping("testMail")
@ApiOperation("初审通过邮件通知测试") @ApiOperation("初审通过邮件通知测试")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="header", dataType="string", required=true, name="i18n_language"), @ApiImplicitParam(paramType="header", dataType="string", required=true, name="i18n_language"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="email") @ApiImplicitParam(paramType="query", dataType="string", required=true, name="email")
}) })
public Object testMail(String email, HttpServletRequest request) { public Object testMail(String email, HttpServletRequest request) {
String i18n_language = request.getHeader("i18n_language"); String i18n_language = request.getHeader("i18n_language");
String[] strs = i18n_language.split("_", 2); String[] strs = i18n_language.split("_", 2);
String content = Common.getStringAsStream("doc/first_pass_" + strs[0].toLowerCase() + "_" + strs[1].toUpperCase() + ".txt"); String content = Common.getStringAsStream("doc/first_pass_" + strs[0].toLowerCase() + "_" + strs[1].toUpperCase() + ".txt");
content = MessageFormat.format(content, "曲欣亮", "00001", "蜘蛛侠"); content = MessageFormat.format(content, "曲欣亮", "00001", "蜘蛛侠");
LoginToken token = tokenService.getToken(); LoginToken token = tokenService.getToken();
Integer adminid = (Integer)token.getId(); Integer adminid = (Integer)token.getId();
emailService.send(2, adminid, "测试邮件", content, email); emailService.send(2, adminid, "测试邮件", content, email);
return Rjx.jsonOk(); return Rjx.jsonOk();
} }
@ResponseBody @ResponseBody
@PostMapping("save_upload_id") @PostMapping("save_upload_id")
@ApiOperation("保存上传状态和上传ID") @ApiOperation("保存上传状态和上传ID")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="upload_id", value="影片上传ID"), @ApiImplicitParam(paramType="query", dataType="string", required=true, name="upload_id", value="影片上传ID"),
}) })
public Object save_upload_id(Long member_film_id, String upload_id) { public Object save_upload_id(Long member_film_id, String upload_id) {
filmService.saveUploadId(member_film_id, upload_id); filmService.saveUploadId(member_film_id, upload_id);
return Rjx.jsonOk(); return Rjx.jsonOk();
} }
@ResponseBody @ResponseBody
@PostMapping("save_upload_state") @PostMapping("save_upload_state")
@ApiOperation("保存上传状态和上传ID") @ApiOperation("保存上传状态和上传ID")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"), @ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="upload_state", value="影片上传状态(0未上传, 1已上传)"), @ApiImplicitParam(paramType="query", dataType="int", required=true, name="upload_state", value="影片上传状态(0未上传, 1已上传)"),
}) })
public Object save_upload_state(Long member_film_id, Integer upload_state) { public Object save_upload_state(Long member_film_id, Integer upload_state) {
filmService.saveUploadState(member_film_id, upload_state); filmService.saveUploadState(member_film_id, upload_state);
return Rjx.jsonOk(); return Rjx.jsonOk();
} }
@ResponseBody @ResponseBody
...@@ -207,62 +207,78 @@ public class AdminFirstController { ...@@ -207,62 +207,78 @@ public class AdminFirstController {
Page page = new Page(index, limit); Page page = new Page(index, limit);
List<Map<String, Object>> list = filmService.queryMonitorUploadList(keyword,upload_state,page); List<Map<String, Object>> list = filmService.queryMonitorUploadList(keyword,upload_state,page);
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
@ResponseBody @ResponseBody
@PostMapping("update_state") @PostMapping("batch_update_state")
@ApiOperation("修改影片状态") @ApiOperation("批量修改上传列表状态")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="影片ID"), @ApiImplicitParam(paramType="query", dataType="int", allowMultiple=true, required=true, name="film_id", value="影片ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="state", value="影片状态:1未提交 2已提交"), @ApiImplicitParam(paramType="query", dataType="int", allowMultiple=true, required=true, name="number", value="第几集"),
}) })
public Object update_state(Long member_film_id, Integer state) { public Object batch_update_state(HttpServletRequest req) {
filmService.updateFilmState(member_film_id, state); String[] film_id = req.getParameterValues("film_id");
return Rjx.jsonOk(); String[] number = req.getParameterValues("number");
}
filmService.updateFilmUploadState(film_id, number);
@ResponseBody
@PostMapping("exchangeFilmNo") return Rjx.jsonOk();
@ApiOperation("交换影片编号, id1影片会被更新初审待审核状态,id2影片会被更新为初审否决状态") }
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="id1", value="做为主影片,会被保留,状态重置为初审待审核"), @ResponseBody
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="id2", value="编号会被替换,并且状态会重置为初审否决"), @PostMapping("update_state")
}) @ApiOperation("修改影片状态")
public Object exchangeFilmNo(Integer id1, Integer id2) { @ApiImplicitParams({
filmService.exchangeFilmNo(id1, id2); @ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="影片ID"),
filmService.initKeywords(id1.longValue()); @ApiImplicitParam(paramType="query", dataType="int", required=true, name="state", value="影片状态:1未提交 2已提交"),
filmService.initKeywords(id2.longValue()); })
return Rjx.jsonOk(); public Object update_state(Long member_film_id, Integer state) {
} filmService.updateFilmState(member_film_id, state);
return Rjx.jsonOk();
@ResponseBody }
@PostMapping("getApplyListColumns")
@ApiOperation("获取报名列表导出列") @ResponseBody
public Object getApplyListColumns() { @PostMapping("exchangeFilmNo")
return Rjx.jsonOk().setData(exportService.getApplyListColumns()); @ApiOperation("交换影片编号, id1影片会被更新初审待审核状态,id2影片会被更新为初审否决状态")
} @ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="id1", value="做为主影片,会被保留,状态重置为初审待审核"),
@GetMapping("exportApplyList") @ApiImplicitParam(paramType="query", dataType="int", required=true, name="id2", value="编号会被替换,并且状态会重置为初审否决"),
@ApiOperation("导出报名列表") })
public void exportApplyList(HttpServletResponse response, String[] columns) throws IOException { public Object exchangeFilmNo(Integer id1, Integer id2) {
response.setContentType("application/octet-stream"); filmService.exchangeFilmNo(id1, id2);
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("报名列表[" + DateUtil.format(new Date(), "yyMMdd-HHmmss") + "].xls", "UTF-8")); filmService.initKeywords(id1.longValue());
exportService.exportApplyList(response.getOutputStream(), columns); filmService.initKeywords(id2.longValue());
} return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("getApplyPassListColumns") @ResponseBody
@ApiOperation("获取影片列表导出列") @PostMapping("getApplyListColumns")
public Object getApplyPassListColumns() { @ApiOperation("获取报名列表导出列")
return Rjx.jsonOk().setData(exportService.getApplyPassListColumns()); public Object getApplyListColumns() {
} return Rjx.jsonOk().setData(exportService.getApplyListColumns());
}
@GetMapping("exportApplyPassList")
@ApiOperation("导出影片列表") @GetMapping("exportApplyList")
public void exportApplyPassList(HttpServletResponse response, String[] columns) throws IOException { @ApiOperation("导出报名列表")
response.setContentType("application/octet-stream"); public void exportApplyList(HttpServletResponse response, String[] columns) throws IOException {
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("影片列表[" + DateUtil.format(new Date(), "yyMMdd-HHmmss") + "].xls", "UTF-8")); response.setContentType("application/octet-stream");
exportService.exportApplyPassList(response.getOutputStream(), columns); 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());
}
@GetMapping("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);
}
} }
\ No newline at end of file
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