Commit a4ce646b authored by Quxl's avatar Quxl

x

parent 396f2daa
...@@ -38,7 +38,6 @@ public class VoteServiceImpl implements VoteService { ...@@ -38,7 +38,6 @@ public class VoteServiceImpl implements VoteService {
} }
@Override @Override
@Transactional
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;
...@@ -92,13 +91,22 @@ public class VoteServiceImpl implements VoteService { ...@@ -92,13 +91,22 @@ public class VoteServiceImpl implements VoteService {
Integer review_round = review.getReview_round(); Integer review_round = review.getReview_round();
Integer review_state = this.reviewStateElection(records); Integer review_state = this.reviewStateElection(records);
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 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 state = 2 where id = ?", review.getId()); jdbcTemplate.executeUpdate("update fc_review set state = 2 where id = ?", review.getId());
} else { } else {
this.toNextRound(review.getId());//第一轮审片完成,进入下一轮 if(review_round < 6) {
//自动进入下一轮评选
this.toNextRound(review.getId());
} else {
//已经是最后一轮评选
jdbcTemplate.executeUpdate("update fc_review set state = 3 where id = ?", review.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