【修改】试题拉取增加编号,mysql增加判空写入
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user