Commit 9c8fb07c authored by Quxl's avatar Quxl

x

parent 6ee1c7d7
......@@ -136,4 +136,6 @@ public interface ReviewService {
boolean isBeginReview(Long film_id);
Map<String, Object> queryFilmReport(Integer user_id);
Fc_review_record queryReviewRecord(Integer record_id);
}
\ No newline at end of file
......@@ -235,53 +235,56 @@ public class ExportServiceImpl implements ExportService {
map.put("enroll_type_name_other", StringUtil.join(",", others));
}
Integer review_id = ((Number)map.get("review_id")).intValue();
for(int i = 1; i <= 6 && i <= reviewRound; i++) {
StringBuffer sb = new StringBuffer();
List<Map<String, Object>> recordList = recordML.get(review_id + "," + i);
if(recordList != null) {
for(Map<String, Object> recordMap : recordList) {
String realname = (String)recordMap.get("realname");
String review_text = (String)recordMap.get("review_text");
String review_text_1 = (String)recordMap.get("review_text_1");
String review_text_2 = (String)recordMap.get("review_text_2");
String review_text_3 = (String)recordMap.get("review_text_3");
String review_text_4 = (String)recordMap.get("review_text_4");
Double review_score = Util.toDouble(recordMap.get("review_score"));
Integer record_review_state = Util.toInt(recordMap.get("review_state"));
sb.append("评委:").append(realname).append("\r\n");
if(review_score != null) {
sb.append("评分:").append(review_score).append("\r\n");
}
if(record_review_state != null) {
sb.append("结论:").append(ExportConstant.reviewState[Integer.valueOf(record_review_state)]).append("\r\n");
}
if(StringUtil.isNotBlank(review_text)) {
sb.append("评论:").append(review_text).append("\r\n");
}
if(StringUtil.isNotBlank(review_text_1)) {
sb.append("评语1:").append(review_text_1).append("\r\n");
}
if(StringUtil.isNotBlank(review_text_2)) {
sb.append("评语2:").append(review_text_2).append("\r\n");
}
if(StringUtil.isNotBlank(review_text_3)) {
sb.append("评语3:").append(review_text_3).append("\r\n");
}
if(StringUtil.isNotBlank(review_text_4)) {
sb.append("评语4:").append(review_text_4).append("\r\n");
}
Integer record_id = ((Number)recordMap.get("id")).intValue();
List<Map<String, Object>> extList = extML.get(String.valueOf(record_id));
if(extList != null) {
for(Map<String, Object> extMap : extList) {
sb.append("\t").append("奖项:").append("最佳").append(ExportConstant.playactorTypes.get(extMap.get("ext_type"))).append(" ").append(extMap.get("ext_name")).append(", 得分:").append(extMap.get("ext_score")).append("\r\n");
Object obj_review_id = map.get("review_id");
if(obj_review_id != null) {
Integer review_id = ((Number)obj_review_id).intValue();
for(int i = 1; i <= 6 && i <= reviewRound; i++) {
StringBuffer sb = new StringBuffer();
List<Map<String, Object>> recordList = recordML.get(review_id + "," + i);
if(recordList != null) {
for(Map<String, Object> recordMap : recordList) {
String realname = (String)recordMap.get("realname");
String review_text = (String)recordMap.get("review_text");
String review_text_1 = (String)recordMap.get("review_text_1");
String review_text_2 = (String)recordMap.get("review_text_2");
String review_text_3 = (String)recordMap.get("review_text_3");
String review_text_4 = (String)recordMap.get("review_text_4");
Double review_score = Util.toDouble(recordMap.get("review_score"));
Integer record_review_state = Util.toInt(recordMap.get("review_state"));
sb.append("评委:").append(realname).append("\r\n");
if(review_score != null) {
sb.append("评分:").append(review_score).append("\r\n");
}
if(record_review_state != null) {
sb.append("结论:").append(ExportConstant.reviewState[Integer.valueOf(record_review_state)]).append("\r\n");
}
if(StringUtil.isNotBlank(review_text)) {
sb.append("评论:").append(review_text).append("\r\n");
}
if(StringUtil.isNotBlank(review_text_1)) {
sb.append("评语1:").append(review_text_1).append("\r\n");
}
if(StringUtil.isNotBlank(review_text_2)) {
sb.append("评语2:").append(review_text_2).append("\r\n");
}
if(StringUtil.isNotBlank(review_text_3)) {
sb.append("评语3:").append(review_text_3).append("\r\n");
}
if(StringUtil.isNotBlank(review_text_4)) {
sb.append("评语4:").append(review_text_4).append("\r\n");
}
Integer record_id = ((Number)recordMap.get("id")).intValue();
List<Map<String, Object>> extList = extML.get(String.valueOf(record_id));
if(extList != null) {
for(Map<String, Object> extMap : extList) {
sb.append("\t").append("奖项:").append("最佳").append(ExportConstant.playactorTypes.get(extMap.get("ext_type"))).append(" ").append(extMap.get("ext_name")).append(", 得分:").append(extMap.get("ext_score")).append("\r\n");
}
}
sb.append("\r\n\r\n");
}
sb.append("\r\n\r\n");
}
map.put("round_" + i + "_text", sb.toString());
}
map.put("round_" + i + "_text", sb.toString());
}
}
......
......@@ -260,6 +260,11 @@ public class ReviewServiceImpl implements ReviewService {
@Override
@Transactional
public void saveReviewRecord(Fc_review_record ru, List<Fc_review_record_ext> exts) {
Fc_review review = this.queryReviewById(ru.getReview_id());
Fc_review_record record = this.queryReviewRecord(ru.getId());
if(!ru.getReview_state().equals(record.getReview_state()) && review.getReview_round().intValue() != ru.getReview_round().intValue()) {
throw new XRException("不能修改历史审片结论");
}
jdbcTemplate.update(ru);
jdbcTemplate.executeUpdate("update fc_review set review_time = now() where id = ?", ru.getReview_id());
if(exts != null && exts.size() > 0) {
......@@ -268,6 +273,11 @@ public class ReviewServiceImpl implements ReviewService {
}
}
@Override
public Fc_review_record queryReviewRecord(Integer record_id) {
return jdbcTemplate.queryForBean("select * from fc_review_record where id = ?", Fc_review_record.class, record_id);
}
@Override
public List<Fc_review_record_ext> queryReviewRecordExtList(Integer record_id) {
return jdbcTemplate.queryForBeans("select * from fc_review_record_ext where record_id = ?", Fc_review_record_ext.class, record_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