Commit 13077459 authored by Quxl's avatar Quxl

x

parent a85ea04a
......@@ -8,6 +8,7 @@ public interface ExportService {
Map<String, String> getAllTitles(String[] columns);
void export(
OutputStream os,
Integer admin_group_id,
String keyword,
Integer state,
Integer apply_state,
......
......@@ -99,6 +99,7 @@ public interface FilmService {
List<Map<String, Object>> queryListAll(String keyword);
List<Map<String, Object>> queryChuShenList(
Integer admin_group_id,
String keyword,
Integer state,
Integer apply_state,
......
......@@ -143,6 +143,7 @@ public class ExportServiceImpl implements ExportService {
}
private List<Map<String, Object>> queryFilmDataList(
Integer admin_group_id,
String keyword,
Integer state,
Integer apply_state,
......@@ -161,6 +162,7 @@ public class ExportServiceImpl implements ExportService {
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";
List<Map<String, Object>> list = filmService.queryChuShenList(
admin_group_id,
keyword,
state,
apply_state,
......@@ -210,7 +212,7 @@ public class ExportServiceImpl implements ExportService {
}
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, null);
List<Map<String, Object>> list = this.queryFilmDataList(null, null, null, null, null, null, null, null, null, null, null,null, null, null, null);
List<String> argsList = new ArrayList<String>();
List<String> titleList = new ArrayList<String>();
Map<String, String> map = this.getAllTitles(null);
......@@ -223,6 +225,7 @@ public class ExportServiceImpl implements ExportService {
public void export(
OutputStream os,
Integer admin_group_id,
String keyword,
Integer state,
Integer apply_state,
......@@ -239,6 +242,7 @@ public class ExportServiceImpl implements ExportService {
Integer[] film_group_id,
String[] columns) {
List<Map<String, Object>> list = this.queryFilmDataList(
admin_group_id,
keyword,
state,
apply_state,
......
......@@ -395,6 +395,7 @@ public class FilmServiceImpl implements FilmService {
@Override
public List<Map<String, Object>> queryChuShenList(
Integer admin_group_id,
String keyword,
Integer state,
Integer apply_state,
......@@ -411,6 +412,7 @@ public class FilmServiceImpl implements FilmService {
Integer[] film_type_id,
Page page) {
SqlWhere where1 = new SqlWhere()
.where("mf.film_type_name = agf.film_type_id and agf.group_id = ?", admin_group_id)
.eq("mf.state", state)
.eq("mf.apply_state", apply_state)
.eq("mf.upload_state", upload_state)
......@@ -439,7 +441,8 @@ public class FilmServiceImpl implements FilmService {
+ "left join fc_review r on r.film_id = mf.id "
+ "left join fc_film_group fg on fg.id = mf.film_group_id "
+ "left join fc_member m on m.id = mf.member_id "
+ "left join fc_admin a on a.adminid = mf.admin_creator "
+ "left join fc_admin a on a.adminid = mf.admin_creator"
+ ", fc_admin_group_filmtype agf"
+ StringUtil.join(" and ", " where ", " ", " ", where1.getStringList());
List<Object> objs = new ArrayList<Object>();
Object[] ary1 = where1.getObjectArray();
......
......@@ -21,6 +21,7 @@ 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;
......@@ -28,6 +29,7 @@ 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;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.model.LoginToken;
import com.egolm.film.util.Common;
......@@ -98,7 +100,8 @@ public class AdminFirstController {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
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, film_group_id, page);
Fc_admin admin = Util.mapTo(tokenService.getTokenObj(), Fc_admin.class);
List<Map<String, Object>> list = memberFilmService.queryChuShenList(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);
}
......@@ -128,9 +131,10 @@ public class AdminFirstController {
String[] columns,
HttpServletRequest request,
HttpServletResponse response) throws IOException {
Fc_admin admin = Util.mapTo(tokenService.getTokenObj(), Fc_admin.class);
response.setContentType("application/octet-stream");
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, film_group_id, columns);
exportService.export(response.getOutputStream(), admin.getGroup_id(), 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
......
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