Commit f32bfddb authored by Quxl's avatar Quxl

x

parent 14f0da4f
...@@ -127,7 +127,7 @@ public interface FilmService { ...@@ -127,7 +127,7 @@ public interface FilmService {
* @return * @return
*/ */
List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short, List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short,
String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer promotion_state, Page page); String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer state, Page page);
void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id); void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id);
......
...@@ -540,7 +540,7 @@ public class FilmServiceImpl implements FilmService { ...@@ -540,7 +540,7 @@ public class FilmServiceImpl implements FilmService {
*/ */
@Override @Override
public List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name, public List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name,
Integer film_type_name_short, String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer promotion_state, Integer film_type_name_short, String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer state,
Page page) { Page page) {
SqlWhere w1 = new SqlWhere() SqlWhere w1 = new SqlWhere()
.where("mf.film_type_name in (select agft.film_type_id from fc_admin_group_filmtype agft where agft.group_id = ?)", new Object[]{group_id}) .where("mf.film_type_name in (select agft.film_type_id from fc_admin_group_filmtype agft where agft.group_id = ?)", new Object[]{group_id})
...@@ -554,7 +554,7 @@ public class FilmServiceImpl implements FilmService { ...@@ -554,7 +554,7 @@ public class FilmServiceImpl implements FilmService {
.eq("r.enroll_type_id", enroll_type_id) .eq("r.enroll_type_id", enroll_type_id)
.eq("r.review_state", review_state) .eq("r.review_state", review_state)
.eq("r.allot_state", allot_state) .eq("r.allot_state", allot_state)
.eq("r.promotion_state", promotion_state); .eq("r.state", state);
String sql = "select mf.id, mf.film_no, r.id review_id, r.review_round, r.review_state, r.enroll_type_id, mf.origion_name, mf.en_name, mf.cn_name, mf.film_type_name, mf.film_country, (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, fc_review r where r.film_id = mf.id" + StringUtil.join(" and ", " and ", "", "", w1.getStringList()); String sql = "select mf.id, mf.film_no, r.id review_id, r.review_round, r.review_state, r.enroll_type_id, mf.origion_name, mf.en_name, mf.cn_name, mf.film_type_name, mf.film_country, (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, fc_review r where r.film_id = mf.id" + StringUtil.join(" and ", " and ", "", "", w1.getStringList());
return jdbcTemplate.limit(sql, page, w1.getObjectList()); return jdbcTemplate.limit(sql, page, w1.getObjectList());
} }
...@@ -568,7 +568,7 @@ public class FilmServiceImpl implements FilmService { ...@@ -568,7 +568,7 @@ public class FilmServiceImpl implements FilmService {
objs[i] = new Object[]{review_id, user_id[i], review_round, review_id, user_id[i], review_round}; objs[i] = new Object[]{review_id, user_id[i], review_round, review_id, user_id[i], review_round};
} }
jdbcTemplate.batchUpdate(sql, objs); jdbcTemplate.batchUpdate(sql, objs);
jdbcTemplate.executeUpdate("update fc_review set allot_state = 1, promotion_state = 0 where review_id = ? and review_round = ?", review_id, review_round); jdbcTemplate.executeUpdate("update fc_review set allot_state = 1, state = 0 where review_id = ? and review_round = ?", review_id, review_round);
} }
@Override @Override
......
...@@ -47,7 +47,7 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -47,7 +47,7 @@ public class ReviewServiceImpl implements ReviewService {
+ "r.enroll_type_id, " + "r.enroll_type_id, "
+ "r.review_round, " + "r.review_round, "
+ "r.allot_state, " + "r.allot_state, "
+ "r.promotion_state, " + "r.state, "
+ "r.review_state, " + "r.review_state, "
+ "r.push_time, " + "r.push_time, "
+ "rr.view_state, " + "rr.view_state, "
......
...@@ -31,7 +31,7 @@ public class VoteServiceImpl implements VoteService { ...@@ -31,7 +31,7 @@ public class VoteServiceImpl implements VoteService {
review.setReview_round(1); review.setReview_round(1);
review.setPush_time(now); review.setPush_time(now);
review.setAllot_state(0); review.setAllot_state(0);
review.setPromotion_state(null); review.setState(0);
review.setReview_state(null); review.setReview_state(null);
review.setCreate_time(now); review.setCreate_time(now);
jdbcTemplate.save(review); jdbcTemplate.save(review);
...@@ -42,7 +42,7 @@ public class VoteServiceImpl implements VoteService { ...@@ -42,7 +42,7 @@ public class VoteServiceImpl implements VoteService {
public void toNextRound(Integer review_id) { public void toNextRound(Integer review_id) {
Integer count = jdbcTemplate.queryForInt("select count(*) from fc_review_record where review_id = ?", review_id); Integer count = jdbcTemplate.queryForInt("select count(*) from fc_review_record where review_id = ?", review_id);
Integer allot_state = count > 0 ? 1 : 0; Integer allot_state = count > 0 ? 1 : 0;
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, allot_state = ?, review_state = ?, push_time = ? where id = ?", allot_state, null, new Date(), review_id); jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, state = 0, allot_state = ?, review_state = null, push_time = now() where id = ?", allot_state, review_id);
} }
private Integer reviewStateElection(List<Fc_review_record> records) { private Integer reviewStateElection(List<Fc_review_record> records) {
...@@ -94,9 +94,9 @@ public class VoteServiceImpl implements VoteService { ...@@ -94,9 +94,9 @@ public class VoteServiceImpl implements VoteService {
if(review_state == null) { if(review_state == null) {
return; return;
} else if(review_state == -1) { } else if(review_state == -1) {
jdbcTemplate.executeUpdate("update fc_review set promotion_state = 1 where id = ?", review.getId()); jdbcTemplate.executeUpdate("update fc_review set state = 1 where id = ?", review.getId());
} else if((enroll_type_id.intValue() == 2 || enroll_type_id.intValue() == 4) && (review_round == 2 || review_round == 3)) { } else if((enroll_type_id.intValue() == 2 || enroll_type_id.intValue() == 4) && (review_round == 2 || review_round == 3)) {
jdbcTemplate.executeUpdate("update fc_review set promotion_state = 2 where id = ?", review.getId()); jdbcTemplate.executeUpdate("update fc_review set state = 2 where id = ?", review.getId());
} else { } else {
this.toNextRound(review.getId());//第一轮审片完成,进入下一轮 this.toNextRound(review.getId());//第一轮审片完成,进入下一轮
} }
......
...@@ -41,18 +41,18 @@ public class AdminReviewController { ...@@ -41,18 +41,18 @@ public class AdminReviewController {
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_name_short", value="影片类型扩展分类"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="film_type_name_short", 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="review_round", value="审片当前第几轮[1,2,3,4,5,6]"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="review_round", value="审片当前第几轮[1,2,3,4,5,6]"),
@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_state", value="评委分配状态 0未分配评委,1已分配评委评选中"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="allot_state", value="分配状态 0未分配评委,1已分配评委评"),
@ApiImplicitParam(paramType="query", dataType="int", required=false, name="promotion_state", value="晋级方式 1有争议 2管理员分配"), @ApiImplicitParam(paramType="query", dataType="int", required=false, name="state", value="评选状态 0未评选 1有争议 2管理员分配 3已完成"),
@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="分页大小"),
}) })
public Object list(String keyword, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short, String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer promotion_state, Long index, Long limit) { public Object list(String keyword, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short, String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer state, Long index, Long limit) {
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); Page page = new Page(index, limit);
Fc_admin admin = (Fc_admin)tokenService.getTokenObj(); Fc_admin admin = (Fc_admin)tokenService.getTokenObj();
List<Map<String, Object>> list = filmService.queryReviewList(keyword, admin.getGroup_id(), enroll_type_id, film_type_name, film_type_name_short, film_country, review_round, review_state, allot_state, promotion_state, page); List<Map<String, Object>> list = filmService.queryReviewList(keyword, admin.getGroup_id(), enroll_type_id, film_type_name, film_type_name_short, film_country, review_round, review_state, allot_state, state, page);
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
......
...@@ -38,14 +38,18 @@ public class Fc_review implements java.io.Serializable { ...@@ -38,14 +38,18 @@ public class Fc_review implements java.io.Serializable {
private Integer allot_state; private Integer allot_state;
/** /**
* 审片状态 1通过,2否决,3参赛,4参赛备选,5参展 * 审片结论 1通过,2否决,3参赛,4参赛备选,5参展
*/ */
private Integer review_state; private Integer review_state;
/** /**
* 晋级方式 1有争议 2管理员分配 * 评选状态
0未评选
1有争议
2管理员分配
3已完成
*/ */
private Integer promotion_state; private Integer state;
/** /**
* 推送时间 * 推送时间
...@@ -69,19 +73,23 @@ public class Fc_review implements java.io.Serializable { ...@@ -69,19 +73,23 @@ public class Fc_review implements java.io.Serializable {
* @param enroll_type_id 影片性质(申报奖项)ID * @param enroll_type_id 影片性质(申报奖项)ID
* @param review_round 审片轮数,第几轮审片 * @param review_round 审片轮数,第几轮审片
* @param allot_state 评委分配状态 0未分配评委,1已分配评委评选中 * @param allot_state 评委分配状态 0未分配评委,1已分配评委评选中
* @param review_state 审片状态 1通过,2否决,3参赛,4参赛备选,5参展 * @param review_state 审片结论 1通过,2否决,3参赛,4参赛备选,5参展
* @param promotion_state 晋级方式 1有争议 2管理员分配 * @param state 评选状态
0未评选
1有争议
2管理员分配
3已完成
* @param push_time 推送时间 * @param push_time 推送时间
* @param create_time * @param create_time
*/ */
public Fc_review(Integer id, Integer film_id, Integer enroll_type_id, Integer review_round, Integer allot_state, Integer review_state, Integer promotion_state, Date push_time, Date create_time) { public Fc_review(Integer id, Integer film_id, Integer enroll_type_id, Integer review_round, Integer allot_state, Integer review_state, Integer state, Date push_time, Date create_time) {
this.id = id; this.id = id;
this.film_id = film_id; this.film_id = film_id;
this.enroll_type_id = enroll_type_id; this.enroll_type_id = enroll_type_id;
this.review_round = review_round; this.review_round = review_round;
this.allot_state = allot_state; this.allot_state = allot_state;
this.review_state = review_state; this.review_state = review_state;
this.promotion_state = promotion_state; this.state = state;
this.push_time = push_time; this.push_time = push_time;
this.create_time = create_time; this.create_time = create_time;
} }
...@@ -134,12 +142,12 @@ public class Fc_review implements java.io.Serializable { ...@@ -134,12 +142,12 @@ public class Fc_review implements java.io.Serializable {
return review_state; return review_state;
} }
public void setPromotion_state(Integer promotion_state) { public void setState(Integer state) {
this.promotion_state = promotion_state; this.state = state;
} }
public Integer getPromotion_state() { public Integer getState() {
return promotion_state; return state;
} }
public void setPush_time(Date push_time) { public void setPush_time(Date push_time) {
......
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