Commit c52c77cd authored by Quxl's avatar Quxl

x

parent bf8eee48
......@@ -211,8 +211,10 @@ public class ReviewServiceImpl implements ReviewService {
@Transactional
public void saveReviewRecord(Fc_review_record ru, List<Fc_review_record_ext> exts) {
jdbcTemplate.update(ru);
jdbcTemplate.executeUpdate("delete from fc_review_record_ext where record_id = ?", ru.getId());
jdbcTemplate.batchSave(exts);
if(exts != null && exts.size() > 0) {
jdbcTemplate.executeUpdate("delete from fc_review_record_ext where record_id = ?", ru.getId());
jdbcTemplate.batchSave(exts);
}
}
@Override
......
......@@ -86,7 +86,18 @@ public class WebUtilController {
}
}
if(!film_type_name.equals("4")) {
String s = enroll_type_name_other.replace(",6,", ",").replace("6,", "").replace(",6", "").replace("6", "").replace(",,", ",");
String s = enroll_type_name_other;
s = s.replace(",6,", ",").replace("6,", "").replace(",6", "").replace("6", "").replace(",,", ",");
s = s.replace(",7,", ",").replace("7,", "").replace(",7", "").replace("7", "").replace(",,", ",");
objList.add(new Object[] {s, id});
} else {
String s = enroll_type_name_other;
s = s.replace(",1,", ",").replace("1,", "").replace(",1", "").replace("1", "").replace(",,", ",");
s = s.replace(",2,", ",").replace("2,", "").replace(",2", "").replace("2", "").replace(",,", ",");
s = s.replace(",3,", ",").replace("3,", "").replace(",3", "").replace("3", "").replace(",,", ",");
s = s.replace(",4,", ",").replace("4,", "").replace(",4", "").replace("4", "").replace(",,", ",");
s = s.replace(",5,", ",").replace("5,", "").replace(",5", "").replace("5", "").replace(",,", ",");
s = s.replace(",8,", ",").replace("8,", "").replace(",8", "").replace("8", "").replace(",,", ",");
objList.add(new Object[] {s, id});
}
}
......
......@@ -142,16 +142,18 @@ public class UserReviewController {
ru.setReview_text_3(review_text_3);
ru.setReview_text_4(review_text_4);
List<Fc_review_record_ext> exts = new ArrayList<Fc_review_record_ext>();
if(ext_title != null && ext_score != null && ext_title.length == ext_score.length) {
for(int i = 0; i < ext_title.length; i++) {
Fc_review_record_ext ext = new Fc_review_record_ext();
ext.setRecord_id(ru.getId());
ext.setExt_title(ext_title[i]);
ext.setExt_score(ext_score[i]);
exts.add(ext);
if(ext_title != null && ext_score != null) {
if(ext_title.length == ext_score.length) {
for(int i = 0; i < ext_title.length; i++) {
Fc_review_record_ext ext = new Fc_review_record_ext();
ext.setRecord_id(ru.getId());
ext.setExt_title(ext_title[i]);
ext.setExt_score(ext_score[i]);
exts.add(ext);
}
} else {
throw new XException("评奖项目参数数量错误");
}
} else {
throw new XException("评奖项目参数数量错误");
}
service.saveReviewRecord(ru, exts);
service.tryNextRound(review_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