Commit 40954934 authored by Quxl's avatar Quxl

x

parent f1132f91
...@@ -88,8 +88,6 @@ public interface ReviewService { ...@@ -88,8 +88,6 @@ public interface ReviewService {
void toFirstRound(Long member_film_id); void toFirstRound(Long member_film_id);
void toNextRound(Integer review_id);
void toRound(Integer review_id, Integer review_round); void toRound(Integer review_id, Integer review_round);
void tryNextRound(Integer review_id); void tryNextRound(Integer review_id);
......
...@@ -339,11 +339,11 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -339,11 +339,11 @@ public class ReviewServiceImpl implements ReviewService {
Fc_review review = new Fc_review(); Fc_review review = new Fc_review();
review.setFilm_id(member_film_id.intValue()); review.setFilm_id(member_film_id.intValue());
review.setEnroll_type_id(enroll_type_id); review.setEnroll_type_id(enroll_type_id);
review.setReview_round(1); review.setReview_round(0);
review.setPush_time(now); review.setPush_time(now);
review.setAllot_state(0); review.setAllot_state(0);
review.setOpt_state(0); review.setOpt_state(3);
review.setReview_state(null); review.setReview_state(0);
review.setCreate_time(now); review.setCreate_time(now);
review.setFrom_round(0); review.setFrom_round(0);
jdbcTemplate.save(review); jdbcTemplate.save(review);
...@@ -352,17 +352,6 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -352,17 +352,6 @@ public class ReviewServiceImpl implements ReviewService {
} }
} }
@Override
public void toNextRound(Integer review_id) {
this.toNextStepRound(review_id, 1);
}
public void toNextStepRound(Integer review_id, Integer step) {
Integer count = jdbcTemplate.queryForInt("select count(rr.id) from fc_review_record rr, fc_review r where rr.review_id = r.id and rr.review_round = (r.review_round + " + step + ") and r.id = ?", review_id);
Integer allot_state = count > 0 ? 1 : 0;
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + " + step + ", opt_state = 0, allot_state = ?, review_state = null, push_time = now() where id = ?", allot_state, review_id);
}
public void toRound(Integer review_id, Integer review_round) { public void toRound(Integer review_id, Integer review_round) {
Integer count = jdbcTemplate.queryForInt("select count(rr.id) from fc_review_record rr, fc_review r where rr.review_id = r.id and rr.review_round = ? and r.id = ?", review_round, review_id); Integer count = jdbcTemplate.queryForInt("select count(rr.id) from fc_review_record rr, fc_review r where rr.review_id = r.id and rr.review_round = ? and r.id = ?", review_round, review_id);
Integer allot_state = count > 0 ? 1 : 0; Integer allot_state = count > 0 ? 1 : 0;
......
...@@ -314,42 +314,6 @@ public class AdminReviewController { ...@@ -314,42 +314,6 @@ public class AdminReviewController {
return Rjx.jsonOk().setData(list); return Rjx.jsonOk().setData(list);
} }
@ResponseBody
@Transactional
@PostMapping("toNextRound")
@ApiOperation("进入下一轮审片")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="review_id", value="审片主表ID"),
})
public Object toNextRound(Integer review_id) {
Fc_review review = reviewService.queryReviewById(review_id);
Fc_review_history history = new Fc_review_history();
history.setReview_id(review.getId());
history.setEnroll_type_id(review.getEnroll_type_id());
history.setFilm_id(review.getFilm_id());
history.setReview_round(review.getReview_round() + 1);
history.setReview_state(review.getReview_state());
history.setCreate_time(new Date());
history.setOpt_state(review.getOpt_state());
reviewService.toNextRound(review_id);
reviewService.save(history);
return Rjx.jsonOk();
}
@ResponseBody
@Transactional
@PostMapping("toNextRoundBatch")
@ApiOperation("进入下一轮审片")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="review_id", value="审片主表ID", allowMultiple=true),
})
public Object toNextRoundBatch(Integer[] review_id) {
for(Integer id : review_id) {
this.toNextRound(id);
}
return Rjx.jsonOk();
}
@ResponseBody @ResponseBody
@Transactional @Transactional
@PostMapping("saveReviewRecord") @PostMapping("saveReviewRecord")
......
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