Commit 7b1cae75 authored by Quxl's avatar Quxl

x

parent c385d3de
......@@ -21,6 +21,7 @@ import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_enroll;
import com.egolm.film.bean.Fc_review;
import com.egolm.film.bean.Fc_review_doubtful;
import com.egolm.film.bean.Fc_review_history;
import com.egolm.film.bean.Fc_review_record;
import com.egolm.film.bean.Fc_review_record_ext;
import com.egolm.film.config.XRException;
......@@ -351,6 +352,7 @@ public class ReviewServiceImpl implements ReviewService {
* 1通过 2否决 3参赛 4参赛备选 5参展
* 0未评选 1有争议 2管理员分配 3审片完成
*/
@Transactional
public void tryNextRound(Integer review_id) {
Fc_review review = jdbcTemplate.queryForBean("select * from fc_review where id = ?", Fc_review.class, review_id);
List<Fc_review_record> records = jdbcTemplate.queryForBeans("select * from fc_review_record where review_id = ? and review_round = ?", Fc_review_record.class, review.getId(), review.getReview_round());
......@@ -365,6 +367,16 @@ public class ReviewServiceImpl implements ReviewService {
jdbcTemplate.executeUpdate("update fc_review set opt_state = 3, review_state = 2 where id = ?", review.getId());
return;
}
Fc_review_history history = new Fc_review_history();
history.setReview_id(review.getId());
history.setEnroll_type_id(enroll_type_id);
history.setFilm_id(review.getFilm_id());
history.setReview_round(review_round);
history.setReview_state(review_state);
history.setCreate_time(new Date());
jdbcTemplate.save(history);
if(review_state.intValue() == -1) {//争议
if(enroll_type_id.intValue() == 4 && review_round.intValue() == 4 && this.queryUserCount(review.getId(), review_round) >= 4) {
this.toNextRound(review.getId());
......
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Date;
/**
* @author 曲欣亮
*/
@Entity(name="fc_review_history")
public class Fc_review_history implements java.io.Serializable {
private static final long serialVersionUID = 1L;
@Id
private Integer id;
/**
* 参审影片ID
*/
private Integer film_id;
private Integer review_id;
/**
* 影片性质
*/
private Integer enroll_type_id;
/**
* 审片轮数,第几轮审片
*/
private Integer review_round;
/**
* 审片结论 1通过 2否决 3参赛 4参赛备选 5参展
*/
private Integer review_state;
/**
* 评选状态 0未评选 1有争议 2管理员分配 3审片完成
*/
private Integer opt_state;
private Date create_time;
/**
* 无参数构造方法
*/
public Fc_review_history () {
super();
}
/**
* 全参数构造方法
* @param id
* @param film_id 参审影片ID
* @param review_id
* @param enroll_type_id 影片性质
* @param review_round 审片轮数,第几轮审片
* @param review_state 审片结论 1通过 2否决 3参赛 4参赛备选 5参展
* @param opt_state 评选状态 0未评选 1有争议 2管理员分配 3审片完成
* @param create_time
*/
public Fc_review_history(Integer id, Integer film_id, Integer review_id, Integer enroll_type_id, Integer review_round, Integer review_state, Integer opt_state, Date create_time) {
this.id = id;
this.film_id = film_id;
this.review_id = review_id;
this.enroll_type_id = enroll_type_id;
this.review_round = review_round;
this.review_state = review_state;
this.opt_state = opt_state;
this.create_time = create_time;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setFilm_id(Integer film_id) {
this.film_id = film_id;
}
public Integer getFilm_id() {
return film_id;
}
public void setReview_id(Integer review_id) {
this.review_id = review_id;
}
public Integer getReview_id() {
return review_id;
}
public void setEnroll_type_id(Integer enroll_type_id) {
this.enroll_type_id = enroll_type_id;
}
public Integer getEnroll_type_id() {
return enroll_type_id;
}
public void setReview_round(Integer review_round) {
this.review_round = review_round;
}
public Integer getReview_round() {
return review_round;
}
public void setReview_state(Integer review_state) {
this.review_state = review_state;
}
public Integer getReview_state() {
return review_state;
}
public void setOpt_state(Integer opt_state) {
this.opt_state = opt_state;
}
public Integer getOpt_state() {
return opt_state;
}
public void setCreate_time(Date create_time) {
this.create_time = create_time;
}
public Date getCreate_time() {
return create_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