Commit 3a0499ee authored by Quxl's avatar Quxl

x

parent c0a99d37
...@@ -504,15 +504,15 @@ public class FilmServiceImpl implements FilmService { ...@@ -504,15 +504,15 @@ public class FilmServiceImpl implements FilmService {
@Override @Override
@Transactional @Transactional
public void allot(Long member_film_id, Integer enroll_type_id, Integer review_round, Integer[] user_id) { public void allot(Long member_film_id, Integer enroll_type_id, Integer review_round, Integer[] user_id) {
jdbcTemplate.executeUpdate("delete from fc_review_user where film_id = ? and review_round = ?", member_film_id, review_round); Fc_review review = jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ? and review_round = ?", Fc_review.class, member_film_id, enroll_type_id, review_round);
jdbcTemplate.executeUpdate("update fc_review set review_state = 1 where film_id = ? and review_round = ? and review_state = 0", member_film_id.intValue(), review_round); jdbcTemplate.executeUpdate("delete from fc_review_user where review_id = ?", review.getId());
review.setReview_state(1);
jdbcTemplate.update(review);
if(user_id != null && user_id.length > 0) { if(user_id != null && user_id.length > 0) {
List<Fc_review_user> list = new ArrayList<Fc_review_user>(); List<Fc_review_user> list = new ArrayList<Fc_review_user>();
for(Integer i : user_id) { for(Integer i : user_id) {
Fc_review_user ru = new Fc_review_user(); Fc_review_user ru = new Fc_review_user();
ru.setFilm_id(member_film_id.intValue()); ru.setReview_id(review.getId());
ru.setReview_round(review_round);
ru.setEnroll_type_id(enroll_type_id);
ru.setUser_id(i); ru.setUser_id(i);
ru.setUser_view_state(0); ru.setUser_view_state(0);
ru.setUser_review_state(0); ru.setUser_review_state(0);
......
...@@ -7,7 +7,6 @@ import java.util.Map; ...@@ -7,7 +7,6 @@ import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.egolm.common.DateUtil;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.UserReviewService; import com.egolm.film.api.service.UserReviewService;
......
...@@ -31,14 +31,14 @@ public class Fc_review implements java.io.Serializable { ...@@ -31,14 +31,14 @@ public class Fc_review implements java.io.Serializable {
private Integer enroll_type_id; private Integer enroll_type_id;
/** /**
* 审片状态 0未分配评委,1已分配评委评选中,2通过,3否决,4参赛,5参赛备选,6参展 * 审片轮数,第几轮审片
*/ */
private Integer review_state; private Integer review_round;
/** /**
* 审片轮数,第几轮审片 * 审片状态 0未分配评委,1已分配评委评选中,2通过,3否决,4参赛,5参赛备选,6参展
*/ */
private Integer review_round; private Integer review_state;
/** /**
* 审片结论 * 审片结论
...@@ -60,17 +60,17 @@ public class Fc_review implements java.io.Serializable { ...@@ -60,17 +60,17 @@ public class Fc_review implements java.io.Serializable {
* @param id 审片记录ID * @param id 审片记录ID
* @param film_id 参审影片ID * @param film_id 参审影片ID
* @param enroll_type_id 影片性质(申报奖项)ID * @param enroll_type_id 影片性质(申报奖项)ID
* @param review_state 审片状态 0未分配评委,1已分配评委评选中,2通过,3否决,4参赛,5参赛备选,6参展
* @param review_round 审片轮数,第几轮审片 * @param review_round 审片轮数,第几轮审片
* @param review_state 审片状态 0未分配评委,1已分配评委评选中,2通过,3否决,4参赛,5参赛备选,6参展
* @param result_text 审片结论 * @param result_text 审片结论
* @param create_time * @param create_time
*/ */
public Fc_review(Integer id, Integer film_id, Integer enroll_type_id, Integer review_state, Integer review_round, String result_text, Date create_time) { public Fc_review(Integer id, Integer film_id, Integer enroll_type_id, Integer review_round, Integer review_state, String result_text, 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_state = review_state;
this.review_round = review_round; this.review_round = review_round;
this.review_state = review_state;
this.result_text = result_text; this.result_text = result_text;
this.create_time = create_time; this.create_time = create_time;
} }
...@@ -99,14 +99,6 @@ public class Fc_review implements java.io.Serializable { ...@@ -99,14 +99,6 @@ public class Fc_review implements java.io.Serializable {
return enroll_type_id; return enroll_type_id;
} }
public void setReview_state(Integer review_state) {
this.review_state = review_state;
}
public Integer getReview_state() {
return review_state;
}
public void setReview_round(Integer review_round) { public void setReview_round(Integer review_round) {
this.review_round = review_round; this.review_round = review_round;
} }
...@@ -115,6 +107,14 @@ public class Fc_review implements java.io.Serializable { ...@@ -115,6 +107,14 @@ public class Fc_review implements java.io.Serializable {
return review_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 setResult_text(String result_text) { public void setResult_text(String result_text) {
this.result_text = result_text; this.result_text = result_text;
} }
......
...@@ -4,11 +4,13 @@ import javax.persistence.Entity; ...@@ -4,11 +4,13 @@ import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
import java.util.Date;
/** /**
* @author 曲欣亮 * @author 曲欣亮
*/ */
@Entity(name="fc_review_user_result_doubtful") @Entity(name="fc_review_doubtful")
public class Fc_review_user_result_doubtful implements java.io.Serializable { public class Fc_review_doubtful implements java.io.Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -21,14 +23,14 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable { ...@@ -21,14 +23,14 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable {
private Integer film_id; private Integer film_id;
/** /**
* 审片环节ID * 影片性质
*/ */
private Integer review_round; private Integer enroll_type_id;
/** /**
* 影片性质ID * 第几轮审核
*/ */
private Integer enroll_type_id; private Integer review_round;
/** /**
* 评委ID * 评委ID
...@@ -36,20 +38,25 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable { ...@@ -36,20 +38,25 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable {
private Integer user_id; private Integer user_id;
/** /**
* 评委审片结论ID * 疑点类型
*/ */
private Integer result_id; private Integer doubtful_type_id;
/** /**
* 疑点 * 疑点介绍
*/ */
private String review_text; private String review_text;
/**
* 疑点时间
*/
private Date play_time;
/** /**
* 无参数构造方法 * 无参数构造方法
*/ */
public Fc_review_user_result_doubtful () { public Fc_review_doubtful () {
super(); super();
} }
...@@ -57,20 +64,22 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable { ...@@ -57,20 +64,22 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable {
* 全参数构造方法 * 全参数构造方法
* @param id * @param id
* @param film_id 影片ID * @param film_id 影片ID
* @param review_round 审片环节ID * @param enroll_type_id 影片性质
* @param enroll_type_id 影片性质ID * @param review_round 第几轮审核
* @param user_id 评委ID * @param user_id 评委ID
* @param result_id 评委审片结论ID * @param doubtful_type_id 疑点类型
* @param review_text 疑点 * @param review_text 疑点介绍
* @param play_time 疑点时间
*/ */
public Fc_review_user_result_doubtful(Integer id, Integer film_id, Integer review_round, Integer enroll_type_id, Integer user_id, Integer result_id, String review_text) { public Fc_review_doubtful(Integer id, Integer film_id, Integer enroll_type_id, Integer review_round, Integer user_id, Integer doubtful_type_id, String review_text, Date play_time) {
this.id = id; this.id = id;
this.film_id = film_id; this.film_id = film_id;
this.review_round = review_round;
this.enroll_type_id = enroll_type_id; this.enroll_type_id = enroll_type_id;
this.review_round = review_round;
this.user_id = user_id; this.user_id = user_id;
this.result_id = result_id; this.doubtful_type_id = doubtful_type_id;
this.review_text = review_text; this.review_text = review_text;
this.play_time = play_time;
} }
public void setId(Integer id) { public void setId(Integer id) {
...@@ -89,14 +98,6 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable { ...@@ -89,14 +98,6 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable {
return film_id; return film_id;
} }
public void setReview_round(Integer review_round) {
this.review_round = review_round;
}
public Integer getReview_round() {
return review_round;
}
public void setEnroll_type_id(Integer enroll_type_id) { public void setEnroll_type_id(Integer enroll_type_id) {
this.enroll_type_id = enroll_type_id; this.enroll_type_id = enroll_type_id;
} }
...@@ -105,6 +106,14 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable { ...@@ -105,6 +106,14 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable {
return enroll_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 setUser_id(Integer user_id) { public void setUser_id(Integer user_id) {
this.user_id = user_id; this.user_id = user_id;
} }
...@@ -113,12 +122,12 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable { ...@@ -113,12 +122,12 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable {
return user_id; return user_id;
} }
public void setResult_id(Integer result_id) { public void setDoubtful_type_id(Integer doubtful_type_id) {
this.result_id = result_id; this.doubtful_type_id = doubtful_type_id;
} }
public Integer getResult_id() { public Integer getDoubtful_type_id() {
return result_id; return doubtful_type_id;
} }
public void setReview_text(String review_text) { public void setReview_text(String review_text) {
...@@ -129,5 +138,13 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable { ...@@ -129,5 +138,13 @@ public class Fc_review_user_result_doubtful implements java.io.Serializable {
return review_text; return review_text;
} }
public void setPlay_time(Date play_time) {
this.play_time = play_time;
}
public Date getPlay_time() {
return play_time;
}
} }
...@@ -7,31 +7,28 @@ import javax.persistence.Id; ...@@ -7,31 +7,28 @@ import javax.persistence.Id;
/** /**
* @author 曲欣亮 * @author 曲欣亮
*/ */
@Entity(name="fc_review_user_result") @Entity(name="fc_review_result")
public class Fc_review_user_result implements java.io.Serializable { public class Fc_review_result implements java.io.Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
private Integer id; private Integer id;
private Integer film_id; /**
* 总审片记录ID
private Integer user_id; */
private Integer review_id; private Integer review_id;
private Integer review_round;
/** /**
* 2通过,3否决,4参赛,5参赛备选,6参展 * 审片评委ID
*/ */
private Integer review_state; private Integer user_id;
/** /**
* 影片性质ID * 2通过,3否决,4参赛,5参赛备选,6参展
*/ */
private Integer enroll_type_id; private Integer review_state;
/** /**
* 得分分数 * 得分分数
...@@ -67,19 +64,16 @@ public class Fc_review_user_result implements java.io.Serializable { ...@@ -67,19 +64,16 @@ public class Fc_review_user_result implements java.io.Serializable {
/** /**
* 无参数构造方法 * 无参数构造方法
*/ */
public Fc_review_user_result () { public Fc_review_result () {
super(); super();
} }
/** /**
* 全参数构造方法 * 全参数构造方法
* @param id * @param id
* @param film_id * @param review_id 总审片记录ID
* @param user_id * @param user_id 审片评委ID
* @param review_id
* @param review_round
* @param review_state 2通过,3否决,4参赛,5参赛备选,6参展 * @param review_state 2通过,3否决,4参赛,5参赛备选,6参展
* @param enroll_type_id 影片性质ID
* @param review_score 得分分数 * @param review_score 得分分数
* @param review_text 影片评论 * @param review_text 影片评论
* @param review_text_summary 影片概述 * @param review_text_summary 影片概述
...@@ -87,14 +81,11 @@ public class Fc_review_user_result implements java.io.Serializable { ...@@ -87,14 +81,11 @@ public class Fc_review_user_result implements java.io.Serializable {
* @param review_text_style 风格/美学 * @param review_text_style 风格/美学
* @param review_text_keynote 突出/优缺点 * @param review_text_keynote 突出/优缺点
*/ */
public Fc_review_user_result(Integer id, Integer film_id, Integer user_id, Integer review_id, Integer review_round, Integer review_state, Integer enroll_type_id, Double review_score, String review_text, String review_text_summary, String review_text_theme, String review_text_style, String review_text_keynote) { public Fc_review_result(Integer id, Integer review_id, Integer user_id, Integer review_state, Double review_score, String review_text, String review_text_summary, String review_text_theme, String review_text_style, String review_text_keynote) {
this.id = id; this.id = id;
this.film_id = film_id;
this.user_id = user_id;
this.review_id = review_id; this.review_id = review_id;
this.review_round = review_round; this.user_id = user_id;
this.review_state = review_state; this.review_state = review_state;
this.enroll_type_id = enroll_type_id;
this.review_score = review_score; this.review_score = review_score;
this.review_text = review_text; this.review_text = review_text;
this.review_text_summary = review_text_summary; this.review_text_summary = review_text_summary;
...@@ -111,22 +102,6 @@ public class Fc_review_user_result implements java.io.Serializable { ...@@ -111,22 +102,6 @@ public class Fc_review_user_result implements java.io.Serializable {
return id; return id;
} }
public void setFilm_id(Integer film_id) {
this.film_id = film_id;
}
public Integer getFilm_id() {
return film_id;
}
public void setUser_id(Integer user_id) {
this.user_id = user_id;
}
public Integer getUser_id() {
return user_id;
}
public void setReview_id(Integer review_id) { public void setReview_id(Integer review_id) {
this.review_id = review_id; this.review_id = review_id;
} }
...@@ -135,12 +110,12 @@ public class Fc_review_user_result implements java.io.Serializable { ...@@ -135,12 +110,12 @@ public class Fc_review_user_result implements java.io.Serializable {
return review_id; return review_id;
} }
public void setReview_round(Integer review_round) { public void setUser_id(Integer user_id) {
this.review_round = review_round; this.user_id = user_id;
} }
public Integer getReview_round() { public Integer getUser_id() {
return review_round; return user_id;
} }
public void setReview_state(Integer review_state) { public void setReview_state(Integer review_state) {
...@@ -151,14 +126,6 @@ public class Fc_review_user_result implements java.io.Serializable { ...@@ -151,14 +126,6 @@ public class Fc_review_user_result implements java.io.Serializable {
return review_state; return review_state;
} }
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_score(Double review_score) { public void setReview_score(Double review_score) {
this.review_score = review_score; this.review_score = review_score;
} }
......
...@@ -7,8 +7,8 @@ import javax.persistence.Id; ...@@ -7,8 +7,8 @@ import javax.persistence.Id;
/** /**
* @author 曲欣亮 * @author 曲欣亮
*/ */
@Entity(name="fc_review_user_result_ext") @Entity(name="fc_review_result_ext")
public class Fc_review_user_result_ext implements java.io.Serializable { public class Fc_review_result_ext implements java.io.Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -16,30 +16,15 @@ public class Fc_review_user_result_ext implements java.io.Serializable { ...@@ -16,30 +16,15 @@ public class Fc_review_user_result_ext implements java.io.Serializable {
private Integer id; private Integer id;
/** /**
* 影片ID * 总审片记录ID
*/ */
private Integer film_id; private Integer review_id;
/**
* 审片环节
*/
private Integer review_round;
/**
* 影片性质ID
*/
private Integer enroll_type_id;
/** /**
* 评委ID * 评委ID
*/ */
private Integer user_id; private Integer user_id;
/**
* 评委审片结论ID
*/
private Integer result_id;
/** /**
* 影片申报奖项ID * 影片申报奖项ID
*/ */
...@@ -59,29 +44,23 @@ public class Fc_review_user_result_ext implements java.io.Serializable { ...@@ -59,29 +44,23 @@ public class Fc_review_user_result_ext implements java.io.Serializable {
/** /**
* 无参数构造方法 * 无参数构造方法
*/ */
public Fc_review_user_result_ext () { public Fc_review_result_ext () {
super(); super();
} }
/** /**
* 全参数构造方法 * 全参数构造方法
* @param id * @param id
* @param film_id 影片ID * @param review_id 总审片记录ID
* @param review_round 审片环节
* @param enroll_type_id 影片性质ID
* @param user_id 评委ID * @param user_id 评委ID
* @param result_id 评委审片结论ID
* @param enroll_ext_id 影片申报奖项ID * @param enroll_ext_id 影片申报奖项ID
* @param enroll_ext_score 影片申报奖项评分 * @param enroll_ext_score 影片申报奖项评分
* @param review_text 评委审片结论 * @param review_text 评委审片结论
*/ */
public Fc_review_user_result_ext(Integer id, Integer film_id, Integer review_round, Integer enroll_type_id, Integer user_id, Integer result_id, Integer enroll_ext_id, Double enroll_ext_score, String review_text) { public Fc_review_result_ext(Integer id, Integer review_id, Integer user_id, Integer enroll_ext_id, Double enroll_ext_score, String review_text) {
this.id = id; this.id = id;
this.film_id = film_id; this.review_id = review_id;
this.review_round = review_round;
this.enroll_type_id = enroll_type_id;
this.user_id = user_id; this.user_id = user_id;
this.result_id = result_id;
this.enroll_ext_id = enroll_ext_id; this.enroll_ext_id = enroll_ext_id;
this.enroll_ext_score = enroll_ext_score; this.enroll_ext_score = enroll_ext_score;
this.review_text = review_text; this.review_text = review_text;
...@@ -95,28 +74,12 @@ public class Fc_review_user_result_ext implements java.io.Serializable { ...@@ -95,28 +74,12 @@ public class Fc_review_user_result_ext implements java.io.Serializable {
return id; return id;
} }
public void setFilm_id(Integer film_id) { public void setReview_id(Integer review_id) {
this.film_id = film_id; this.review_id = review_id;
}
public Integer getFilm_id() {
return film_id;
} }
public void setReview_round(Integer review_round) { public Integer getReview_id() {
this.review_round = review_round; return review_id;
}
public Integer getReview_round() {
return review_round;
}
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 setUser_id(Integer user_id) { public void setUser_id(Integer user_id) {
...@@ -127,14 +90,6 @@ public class Fc_review_user_result_ext implements java.io.Serializable { ...@@ -127,14 +90,6 @@ public class Fc_review_user_result_ext implements java.io.Serializable {
return user_id; return user_id;
} }
public void setResult_id(Integer result_id) {
this.result_id = result_id;
}
public Integer getResult_id() {
return result_id;
}
public void setEnroll_ext_id(Integer enroll_ext_id) { public void setEnroll_ext_id(Integer enroll_ext_id) {
this.enroll_ext_id = enroll_ext_id; this.enroll_ext_id = enroll_ext_id;
} }
......
...@@ -12,23 +12,13 @@ public class Fc_review_user implements java.io.Serializable { ...@@ -12,23 +12,13 @@ public class Fc_review_user implements java.io.Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**
* 影片ID
*/
@Id @Id
private Integer film_id; private Integer id;
/** /**
* 审片环节 * 审片记录ID
*/ */
@Id private Integer review_id;
private Integer review_round;
/**
* 影片性质ID
*/
@Id
private Integer enroll_type_id;
/** /**
* 评委ID * 评委ID
...@@ -55,44 +45,34 @@ public class Fc_review_user implements java.io.Serializable { ...@@ -55,44 +45,34 @@ public class Fc_review_user implements java.io.Serializable {
/** /**
* 全参数构造方法 * 全参数构造方法
* @param film_id 影片ID * @param id
* @param review_round 审片环节 * @param review_id 审片记录ID
* @param enroll_type_id 影片性质ID
* @param user_id 评委ID * @param user_id 评委ID
* @param user_view_state 0未观看,1已观看 * @param user_view_state 0未观看,1已观看
* @param user_review_state 0未审片,1暂存,2已提交 * @param user_review_state 0未审片,1暂存,2已提交
*/ */
public Fc_review_user(Integer film_id, Integer review_round, Integer enroll_type_id, Integer user_id, Integer user_view_state, Integer user_review_state) { public Fc_review_user(Integer id, Integer review_id, Integer user_id, Integer user_view_state, Integer user_review_state) {
this.film_id = film_id; this.id = id;
this.review_round = review_round; this.review_id = review_id;
this.enroll_type_id = enroll_type_id;
this.user_id = user_id; this.user_id = user_id;
this.user_view_state = user_view_state; this.user_view_state = user_view_state;
this.user_review_state = user_review_state; this.user_review_state = user_review_state;
} }
public void setFilm_id(Integer film_id) { public void setId(Integer id) {
this.film_id = film_id; this.id = id;
}
public Integer getFilm_id() {
return film_id;
}
public void setReview_round(Integer review_round) {
this.review_round = review_round;
} }
public Integer getReview_round() { public Integer getId() {
return review_round; return id;
} }
public void setEnroll_type_id(Integer enroll_type_id) { public void setReview_id(Integer review_id) {
this.enroll_type_id = enroll_type_id; this.review_id = review_id;
} }
public Integer getEnroll_type_id() { public Integer getReview_id() {
return enroll_type_id; return review_id;
} }
public void setUser_id(Integer user_id) { public void setUser_id(Integer user_id) {
......
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