【修改】 Mysql判分启用
This commit is contained in:
@@ -546,37 +546,37 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
||||
|
||||
break;
|
||||
}
|
||||
// if ("程序设计".equals(one_file.getName().split("\\.")[0])) {
|
||||
// String judgementStrMysql = "";
|
||||
// System.out.println(one_file);
|
||||
// File mysql_file = new File(one_file.getPath());
|
||||
// SourceAndText judgementpojo = mysqlServerice.Judgement(Double.parseDouble(quScore),mysql_file, examQuestion, judgementStrMysql);
|
||||
// double judgement = judgementpojo.getScore();
|
||||
// judgementStr += "<p>-----------------------------------------------------------</p>";
|
||||
// judgementStr += judgementpojo.getText();
|
||||
// score+=judgement;
|
||||
// stuPaperScoreDO.setScore(new BigDecimal(judgement));
|
||||
// // 原始正确分数
|
||||
// stuPaperScoreDO.setTrueScore(new BigDecimal(quScore));
|
||||
// // 判断题是否正确
|
||||
// if (judgement == Double.parseDouble(quScore)) {
|
||||
// stuPaperScoreDO.setIsTrue(0);
|
||||
// } else if (judgement == 0) {
|
||||
// stuPaperScoreDO.setIsTrue(1);
|
||||
// } else {
|
||||
// stuPaperScoreDO.setIsTrue(2);
|
||||
// }
|
||||
// stuPaperScoreDO.setSubjectName(examQuestion.getSubjectName());
|
||||
// if (isNull) {
|
||||
// // 如果之前没做过,则插入该题的分数
|
||||
// stuPaperScoreService.insertStuPaperScore(stuPaperScoreDO);
|
||||
// } else {
|
||||
// // 如果之前做过,则更新该题的分数
|
||||
// stuPaperScoreService.updateStuPaperScore(stuPaperScoreDO);
|
||||
// }
|
||||
// System.out.println(judgement+"mysql得分");
|
||||
// break;
|
||||
// }
|
||||
if ("程序设计".equals(one_file.getName().split("\\.")[0])) {
|
||||
String judgementStrMysql = "";
|
||||
System.out.println(one_file);
|
||||
File mysql_file = new File(one_file.getPath());
|
||||
SourceAndText judgementpojo = mysqlServerice.Judgement(Double.parseDouble(quScore),mysql_file, examQuestion, judgementStrMysql);
|
||||
double judgement = judgementpojo.getScore();
|
||||
judgementStr += "<p>-----------------------------------------------------------</p>";
|
||||
judgementStr += judgementpojo.getText();
|
||||
score+=judgement;
|
||||
stuPaperScoreDO.setScore(new BigDecimal(judgement));
|
||||
// 原始正确分数
|
||||
stuPaperScoreDO.setTrueScore(new BigDecimal(quScore));
|
||||
// 判断题是否正确
|
||||
if (judgement == Double.parseDouble(quScore)) {
|
||||
stuPaperScoreDO.setIsTrue(0);
|
||||
} else if (judgement == 0) {
|
||||
stuPaperScoreDO.setIsTrue(1);
|
||||
} else {
|
||||
stuPaperScoreDO.setIsTrue(2);
|
||||
}
|
||||
stuPaperScoreDO.setSubjectName(examQuestion.getSubjectName());
|
||||
if (isNull) {
|
||||
// 如果之前没做过,则插入该题的分数
|
||||
stuPaperScoreService.insertStuPaperScore(stuPaperScoreDO);
|
||||
} else {
|
||||
// 如果之前做过,则更新该题的分数
|
||||
stuPaperScoreService.updateStuPaperScore(stuPaperScoreDO);
|
||||
}
|
||||
System.out.println(judgement+"mysql得分");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user