Commit 5fb59b65 authored by Quxl's avatar Quxl

x

parent 6a57e180
......@@ -274,38 +274,34 @@ public class ReviewServiceImpl implements ReviewService {
@Override
@Transactional
public void toFirstRound(Long member_film_id) {
Integer count = jdbcTemplate.queryForInt("select count(id) from fc_review where film_id = ?", member_film_id);
if(count == 0) {
List<Fc_member_film_enroll> enrolls = filmService.queryFilmEnrollList(member_film_id);
Integer enroll_type_id = null;
for(Fc_member_film_enroll enroll : enrolls) {
Integer enroll_type_id_tmp = enroll.getEnroll_type_id();
if(enroll_type_id_tmp == 1 || enroll_type_id_tmp == 2) {
if(enroll_type_id == null || enroll_type_id == enroll_type_id_tmp) {
enroll_type_id = enroll_type_id_tmp;
} else {
throw new XRException("申报影片" + member_film_id + "中同时包含亚新和金爵流程");
}
this.rmReviewData(member_film_id);
List<Fc_member_film_enroll> enrolls = filmService.queryFilmEnrollList(member_film_id);
Integer enroll_type_id = null;
for(Fc_member_film_enroll enroll : enrolls) {
Integer enroll_type_id_tmp = enroll.getEnroll_type_id();
if(enroll_type_id_tmp == 1 || enroll_type_id_tmp == 2) {
if(enroll_type_id == null || enroll_type_id == enroll_type_id_tmp) {
enroll_type_id = enroll_type_id_tmp;
} else {
throw new XRException("申报影片" + member_film_id + "中同时包含亚新和金爵流程");
}
}
if(enroll_type_id == null) {
enroll_type_id = 4;
}
Date now = new Date();
Fc_review review = new Fc_review();
review.setFilm_id(member_film_id.intValue());
review.setEnroll_type_id(enroll_type_id);
review.setReview_round(0);
review.setPush_time(now);
review.setAllot_state(0);
review.setOpt_state(2);
review.setReview_state(0);
review.setCreate_time(now);
review.setFrom_round(0);
jdbcTemplate.save(review);
} else {
throw new XRException("该影片已存在审片流程");
}
if(enroll_type_id == null) {
enroll_type_id = 4;
}
Date now = new Date();
Fc_review review = new Fc_review();
review.setFilm_id(member_film_id.intValue());
review.setEnroll_type_id(enroll_type_id);
review.setReview_round(0);
review.setPush_time(now);
review.setAllot_state(0);
review.setOpt_state(2);
review.setReview_state(0);
review.setCreate_time(now);
review.setFrom_round(0);
jdbcTemplate.save(review);
}
public void toRound(Integer review_id, Integer review_round) {
......
......@@ -182,14 +182,16 @@ public class FilmController {
String create_ip = WebMvcConfig.getRemoteIp();
filmService.saveCreateBase(filmBase.getId(), admin_id, member_id, create_ip);
} else {
boolean isBeginReview = reviewService.isBeginReview(filmBase.getId());
Fc_member_film film = filmService.queryMemberFilmById(filmBase.getId());
boolean isInitReview = film.getEnroll_type_name() != null && !film.getEnroll_type_name().equals(filmBase.getEnroll_type_name()) && !reviewService.isBeginReview(filmBase.getId());
filmService.updateFilmBase(filmBase);
if(isInitReview) {
if(isBeginReview) {
if(film.getEnroll_type_name() != null && !film.getEnroll_type_name().equals(filmBase.getEnroll_type_name())) {
throw new XRException("审片流程已经开始,不能修改影片性质");
}
} else if(film.getApply_state().intValue() == 2) {
reviewService.rmReviewData(filmBase.getId());
reviewService.toFirstRound(filmBase.getId());
} else {
throw new XRException("影片已经进入审片流程,不能修改影片性质");
}
}
filmService.initKeywords(filmBase.getId());
......
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