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