【修改】mysql、文件处理、浏览器判分路径
This commit is contained in:
@@ -62,6 +62,9 @@ public class AutoForBrowerServiceImpl implements AutoForBrowerService {
|
||||
// 需要根据题号获取试题ID
|
||||
ExamQuestion examQuestion = examQuestionService.selectExamQuestionByQuNumber(quNumber);
|
||||
String quId = examQuestion.getQuId();
|
||||
File[] wjFiles = stFile.listFiles();
|
||||
for (File wjFile : wjFiles) {
|
||||
|
||||
// 3、根据题号进行查询试题的相关信息
|
||||
Optional<EducationPaperScheme> result = educationPaperSchemeList.stream().filter(quLists -> quLists.getSpName().equals(name)).findFirst();
|
||||
Optional<EducationPaperQu> results = educationPaperQus.stream().filter(quLists -> quLists.getQuId().equals(quId)).findFirst();
|
||||
@@ -108,6 +111,7 @@ public class AutoForBrowerServiceImpl implements AutoForBrowerService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return score;
|
||||
}
|
||||
}
|
||||
|
@@ -69,6 +69,8 @@ public class AutoForFileServiceImpl implements AutoForFileService {
|
||||
// 需要根据题号获取试题ID
|
||||
ExamQuestion examQuestion = examQuestionService.selectExamQuestionByQuNumber(quNumber);
|
||||
String quId = examQuestion.getQuId();
|
||||
File[] wjFiles = stFile.listFiles();
|
||||
for (File wjFile : wjFiles) {
|
||||
// 3、根据题号进行查询试题的相关信息
|
||||
Optional<EducationPaperScheme> result = educationPaperSchemeList.stream().filter(quLists -> quLists.getSpName().equals(name)).findFirst();
|
||||
Optional<EducationPaperQu> results = educationPaperQus.stream().filter(quLists -> quLists.getQuId().equals(quId)).findFirst();
|
||||
@@ -115,6 +117,7 @@ public class AutoForFileServiceImpl implements AutoForFileService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return score;
|
||||
}
|
||||
}
|
||||
|
@@ -63,12 +63,18 @@ public class AutoForMysqlServiceImpl implements AutoForMysqlService {
|
||||
// 需要根据题号获取试题ID
|
||||
ExamQuestion examQuestion = examQuestionService.selectExamQuestionByQuNumber(quNumber);
|
||||
String quId = examQuestion.getQuId();
|
||||
|
||||
File[] wjFiles = stFile.listFiles();
|
||||
for (File wjFile : wjFiles) {
|
||||
|
||||
// 3、根据题号进行查询试题的相关信息
|
||||
Optional<EducationPaperScheme> result = educationPaperSchemeList.stream().filter(quLists -> quLists.getSpName().equals(name)).findFirst();
|
||||
Optional<EducationPaperQu> results = educationPaperQus.stream().filter(quLists -> quLists.getQuId().equals(quId)).findFirst();
|
||||
EducationPaperScheme educationPaperScheme = result.get();
|
||||
EducationPaperQu educationPaperQu = results.get();
|
||||
String quScore = educationPaperScheme.getQuScores();
|
||||
if (wjFile.getName().contains(".sql")) {
|
||||
|
||||
String judgementStr = "<p>-----------------------------------------------------------</p>";
|
||||
judgementStr += "<p>试题序号:" + educationPaperQu.getSort() + "</p>";
|
||||
judgementStr += "<p>试题编号:" + examQuestion.getQuNum() + "</p>";
|
||||
@@ -106,8 +112,11 @@ public class AutoForMysqlServiceImpl implements AutoForMysqlService {
|
||||
stuPaperScoreService.insertStuPaperScore(insertInfo);
|
||||
}
|
||||
System.out.println(judgementStr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return score;
|
||||
|
Reference in New Issue
Block a user