Commit 562e888c authored by Quxl's avatar Quxl

x

parent 9dcd5f24
package com.egolm.film.api.web.admin;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
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.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.ExportService;
import com.egolm.film.api.service.FilmGroupService;
import com.egolm.film.bean.Fc_film_group;
......@@ -29,6 +37,9 @@ public class FilmGroupController {
@Autowired
FilmGroupService filmGroupService;
@Autowired
ExportService exportService;
@Autowired
JdbcTemplate jdbcTemplate;
......@@ -68,6 +79,22 @@ public class FilmGroupController {
return Rjx.jsonOk().setData(list).setPage(page);
}
@ResponseBody
@PostMapping("getReviewPassListColumns")
@ApiOperation("获取影片列表导出列")
public Object getApplyPassListColumns() {
return Rjx.jsonOk().setData(exportService.getReviewPassListColumns());
}
@GetMapping("exportReviewPassList")
@ApiOperation("导出影片列表")
public void exportApplyPassList(Integer[] group_id, String keyword, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short, Integer play_shanghai, Integer is_important, Integer review_state, Integer review_round, String film_country, String[] orderBy, Long index, Long limit, 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"));
List<Map<String, Object>> list = filmGroupService.queryGroupFilmList(group_id, keyword, enroll_type_id, film_type_name, film_type_name_short, play_shanghai, is_important, review_state, review_round, film_country, new Page(1L, 999999999L, new String[] {"film_no asc"}));
exportService.exportReviewPassList(response.getOutputStream(), columns, list);
}
@ResponseBody
@PostMapping("getNotInviteList")
@ApiOperation("查询移除列表(不邀请)")
......
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