|
|
|
@ -491,18 +491,20 @@ public class TheoryTestServiceImpl implements TheoryTestService {
|
|
|
|
|
return objectiveQuestionList;
|
|
|
|
|
} else { //在两个小时内 返回最近的一条试卷
|
|
|
|
|
String singleIds = stuTheoryExam.getSingleIds();
|
|
|
|
|
String multipleIds = stuTheoryExam.getMultipleIds(); //todo 测试考试中心只有单选题的考试 是否会报错
|
|
|
|
|
String multipleIds = stuTheoryExam.getMultipleIds();
|
|
|
|
|
String judgeIds = stuTheoryExam.getJudgeIds();
|
|
|
|
|
List<String> singleIdList = Arrays.asList(singleIds.substring(1, singleIds.length() - 1).split(", "));
|
|
|
|
|
|
|
|
|
|
List<String> singleIdList = Arrays.asList(singleIds.split(", "));
|
|
|
|
|
System.out.println(Collections.singletonList(singleIdList).size());
|
|
|
|
|
|
|
|
|
|
List<ObjectiveQuestionWithBLOBs> returnQuestionList = new ArrayList<>();
|
|
|
|
|
if (StringUtils.isNotBlank(multipleIds)) {
|
|
|
|
|
List<String> multipleIdList = Arrays.asList(multipleIds.substring(1, multipleIds.length() - 1).split(", "));
|
|
|
|
|
List<String> multipleIdList = Arrays.asList(multipleIds.split(", "));
|
|
|
|
|
List<ObjectiveQuestionWithBLOBs> mulQuestionList = selectBatchByIdList(multipleIdList);
|
|
|
|
|
returnQuestionList.addAll(mulQuestionList);
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotBlank(judgeIds)) {
|
|
|
|
|
List<String> judgeIdList = Arrays.asList(judgeIds.substring(1, judgeIds.length() - 1).split(", "));
|
|
|
|
|
List<String> judgeIdList = Arrays.asList(judgeIds.split(", "));
|
|
|
|
|
List<ObjectiveQuestionWithBLOBs> judgeQuestionList = selectBatchByIdList(judgeIdList);
|
|
|
|
|
returnQuestionList.addAll(judgeQuestionList);
|
|
|
|
|
}
|
|
|
|
@ -741,10 +743,9 @@ public class TheoryTestServiceImpl implements TheoryTestService {
|
|
|
|
|
if (ids == null || ids.length() <= 2) {
|
|
|
|
|
return Collections.emptyList();
|
|
|
|
|
}
|
|
|
|
|
return Arrays.asList(ids.substring(1, ids.length() - 1).split(", "));
|
|
|
|
|
return Arrays.asList(ids.split(", "));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public List<ObjectiveQuestionWithBLOBs> selectErrors(String userId, String schoolId) {
|
|
|
|
|