【修改】试题拉取增加编号,mysql增加判空写入

This commit is contained in:
YOHO\20373
2025-06-13 17:24:05 +08:00
parent 28e611df48
commit 0ea1272909
3 changed files with 17 additions and 2 deletions

View File

@@ -811,6 +811,10 @@ public class MysqlServericeImpl implements IMysqlServerice {
}
//如果这个小题对了,直接累加对应的权值分
private double accumulateScoreAndLog(List<ExamMysqlKeyword> examMysqlKeywordList, AtomicInteger total, String answerLogPath, String sql2, String totalKeyScore, double score,String answerId,double scoreTotal) {
if(StringUtils.isBlank(answerId)){
appendToFile(answerLogPath, "❌该语句找不到试题id请检查出题内容" );
return 0.0;
}
//用answerid查对应答案的权值 。除以总权值
String scoreRateStr= examQuestionAnswerMapper.selectExamQuestionAnswerScoreByAnswerId(answerId);
@@ -843,6 +847,10 @@ public class MysqlServericeImpl implements IMysqlServerice {
public double calculateTotalScoreRate(String sql, List<ExamMysqlKeyword> examQuestionKeywords, String totalKeyScore, double score,String answerId,double scoreTotal) {
if(StringUtils.isBlank(answerId)){
appendToFile(answerLogPath, "❌该语句找不到试题id请检查出题内容" );
return 0.0;
}
//用answerid查对应答案的权值 。除以总权值
String scoreRateStr= examQuestionAnswerMapper.selectExamQuestionAnswerScoreByAnswerId(answerId);