Commit 91dfd979 authored by Quxl's avatar Quxl

审片列表

parent 22a64a91
......@@ -111,8 +111,30 @@ public interface FilmService {
void mergeMemberFilm(Fc_member_film film);
/**
* 更新影片基本信息
* @param filmBase
*/
void updateFilmBase(Fc_member_film_base_model filmBase);
/**
* 进入下一个审片环节
* @param member_film_id
*/
void toNextRound(Long member_film_id);
/**
* 检索审片列表
* @param keyword
* @param film_type_name
* @param film_type_name_short
* @param film_country
* @param review_round
* @param review_state
* @param page
* @return
*/
List<Map<String, Object>> queryReviewList(String keyword, Integer film_type_name, Integer film_type_name_short,
String film_country, Integer[] review_round, Integer[] review_state, Page page);
}
......@@ -492,17 +492,18 @@ public class FilmServiceImpl implements FilmService {
}
@Override
@Transactional
public void toNextRound(Long member_film_id) {
Fc_member_film film = this.jdbcTemplate.queryForBean("select * from fc_member_film where id = ?", Fc_member_film.class, member_film_id);
Integer round = film.getRound();
Integer round = film.getReview_round();
Integer nextRound = null;
if(round == null || round == 0) {
nextRound = 1;
} else {
nextRound = round + 1;
}
jdbcTemplate.executeUpdate("update fc_member_film set round = ? where id = ?", nextRound, member_film_id);
List<Fc_review> reviews = jdbcTemplate.queryForBeans("select * from fc_review where film_id = ? and round = ?", Fc_review.class, member_film_id, nextRound);
jdbcTemplate.executeUpdate("update fc_member_film set review_round = ? where id = ?", nextRound, member_film_id);
List<Fc_review> reviews = jdbcTemplate.queryForBeans("select * from fc_review where film_id = ? and review_round = ?", Fc_review.class, member_film_id, nextRound);
if(reviews == null || reviews.size() ==0) {
Fc_review review = new Fc_review();
review.setFilm_id(member_film_id.intValue());
......@@ -512,4 +513,23 @@ public class FilmServiceImpl implements FilmService {
}
}
/**
* 检索审片列表
*/
@Override
public List<Map<String, Object>> queryReviewList(String keyword, Integer film_type_name,
Integer film_type_name_short, String film_country, Integer[] review_round, Integer[] review_state,
Page page) {
SqlWhere w1 = new SqlWhere()
.lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword)
.eq("mf.film_type_name", film_type_name)
.eq("mf.film_type_name_short", film_type_name_short)
.eq("mf.film_country", film_country)
.in("mf.review_round", review_round);
;
String sql = "select mf.*, r.review_state, r.result_text, (select GROUP_CONCAT(mfd.playactor_name) from fc_member_film_playactor mfd where mfd.film_id = mf.id and mfd.playactor_type = 'director') director_name from fc_member_film mf left join fc_review r on r.film_id = mf.id and r.review_round = mf.review_round" + StringUtil.join(" and ", " where ", "", "", w1.getStringList());
return jdbcTemplate.limit(sql, page, w1.getObjectList());
}
}
package com.egolm.film.api.web.admin;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -7,6 +11,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.FilmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -14,7 +19,10 @@ import io.swagger.annotations.ApiOperation;
@Api
@Controller
@RequestMapping("admin/review")
public class AllotController {
public class AdminReviewController {
@Autowired
FilmService filmService;
@ResponseBody
@PostMapping("list")
......@@ -23,8 +31,8 @@ public class AllotController {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit);
return Rjx.jsonOk();
List<Map<String, Object>> list = filmService.queryReviewList(keyword, film_type_name, film_type_name_short, film_country, review_round, review_state, page);
return Rjx.jsonOk().setData(list);
}
}
......@@ -298,7 +298,7 @@ public class Fc_member_film implements java.io.Serializable {
/**
* 当前审片是第几轮
*/
private Integer round;
private Integer review_round;
/**
......@@ -367,9 +367,9 @@ public class Fc_member_film implements java.io.Serializable {
* @param film_district 区域
* @param is_check_director 状态
* @param pass_time 通过时间
* @param round 当前审片是第几轮
* @param review_round 当前审片是第几轮
*/
public Fc_member_film(Long id, String film_no, String origion_name, String en_name, String cn_name, Integer type, Long film_group_id, Integer film_type, String film_type_name, String film_type_name_short, String show_date, Long show_time, String first_show_date, String first_show_city, Integer is_apply_other_filmfest, String other_filmfest_name, String film_medium, String film_format, String completion_date, String film_country, String co_production_country, String film_producers, String production_company, String enroll_type_name, Integer enroll_type, Integer is_like_show, Long create_time, Integer member_id, String create_ip, String prize, String dialogue_lang, String subtitle_lang, String play_shanghai, String has_joined_award, String intro, String en_intro, Long last_modify_time, String film_side_demand, String film_total_time, Integer is_show, String film_apply_company, String film_apply_realname, String film_apply_email, String film_apply_tel, String film_apply_mobile, String film_apply_country, String enroll_type_name_other, String film_format_url, String film_format_passw, String film_format_other, String lang, Integer state, Integer apply_state, String apply_state_intro, String film_district, Integer is_check_director, Long pass_time, Integer round) {
public Fc_member_film(Long id, String film_no, String origion_name, String en_name, String cn_name, Integer type, Long film_group_id, Integer film_type, String film_type_name, String film_type_name_short, String show_date, Long show_time, String first_show_date, String first_show_city, Integer is_apply_other_filmfest, String other_filmfest_name, String film_medium, String film_format, String completion_date, String film_country, String co_production_country, String film_producers, String production_company, String enroll_type_name, Integer enroll_type, Integer is_like_show, Long create_time, Integer member_id, String create_ip, String prize, String dialogue_lang, String subtitle_lang, String play_shanghai, String has_joined_award, String intro, String en_intro, Long last_modify_time, String film_side_demand, String film_total_time, Integer is_show, String film_apply_company, String film_apply_realname, String film_apply_email, String film_apply_tel, String film_apply_mobile, String film_apply_country, String enroll_type_name_other, String film_format_url, String film_format_passw, String film_format_other, String lang, Integer state, Integer apply_state, String apply_state_intro, String film_district, Integer is_check_director, Long pass_time, Integer review_round) {
this.id = id;
this.film_no = film_no;
this.origion_name = origion_name;
......@@ -427,7 +427,7 @@ public class Fc_member_film implements java.io.Serializable {
this.film_district = film_district;
this.is_check_director = is_check_director;
this.pass_time = pass_time;
this.round = round;
this.review_round = review_round;
}
public void setId(Long id) {
......@@ -886,12 +886,12 @@ public class Fc_member_film implements java.io.Serializable {
return pass_time;
}
public void setRound(Integer round) {
this.round = round;
public void setReview_round(Integer review_round) {
this.review_round = review_round;
}
public Integer getRound() {
return round;
public Integer getReview_round() {
return review_round;
}
}
......
......@@ -24,7 +24,7 @@ public class Fc_review implements java.io.Serializable {
private Integer film_id;
/**
* 审片状态 0未分配评委 1通过,2否决,3参赛,4参赛备选,5参展
* 审片状态 0未分配评委,1已分配评委评选中,2通过,3否决,4参赛,5参赛备选,6参展
*/
private Integer review_state;
......@@ -50,7 +50,7 @@ public class Fc_review implements java.io.Serializable {
* 全参数构造方法
* @param id 审片记录ID
* @param film_id 参审影片ID
* @param review_state 审片状态 0未分配评委 1通过,2否决,3参赛,4参赛备选,5参展
* @param review_state 审片状态 0未分配评委,1已分配评委评选中,2通过,3否决,4参赛,5参赛备选,6参展
* @param review_round 审片轮数,第几轮审片
* @param result_text 审片结论
*/
......
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