|
|
|
@ -141,10 +141,8 @@ public class StuExpermentTrainingServiceImpl implements StuExpermentTrainingServ
|
|
|
|
|
stuTaskPracticeRecordList.get(0).setSubState(1);
|
|
|
|
|
stuTaskPracticeRecordMapper.updateByPrimaryKeyWithBLOBs(stuTaskPracticeRecordList.get(0));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "提交成功");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//不保存做题记录和平均分
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK, "提交成功!", "超出三次提交计分,不计入总分");
|
|
|
|
@ -197,8 +195,6 @@ public class StuExpermentTrainingServiceImpl implements StuExpermentTrainingServ
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -209,9 +205,9 @@ public class StuExpermentTrainingServiceImpl implements StuExpermentTrainingServ
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity academicRecordInfo(String schoolId, String module,Integer page,Integer size) {
|
|
|
|
|
public ResultEntity academicRecordInfo(String schoolId, String module, Integer page, Integer size) {
|
|
|
|
|
|
|
|
|
|
PageHelper.startPage(page,size);
|
|
|
|
|
PageHelper.startPage(page, size);
|
|
|
|
|
|
|
|
|
|
StuWrongQuestionRankingExample example = new StuWrongQuestionRankingExample();
|
|
|
|
|
example.setOrderByClause("asc task_number");
|
|
|
|
@ -236,9 +232,9 @@ public class StuExpermentTrainingServiceImpl implements StuExpermentTrainingServ
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ResultEntity trainingTaskDetails(String userId, String module,Integer page,Integer size) {
|
|
|
|
|
public ResultEntity trainingTaskDetails(String userId, String module, Integer page, Integer size) {
|
|
|
|
|
|
|
|
|
|
PageHelper.startPage(page,size);
|
|
|
|
|
PageHelper.startPage(page, size);
|
|
|
|
|
StuExpermentTrainingScoreExample expermentTrainingScoreExample = new StuExpermentTrainingScoreExample();
|
|
|
|
|
expermentTrainingScoreExample.createCriteria()
|
|
|
|
|
.andUserIdEqualTo(userId).andModuleEqualTo(module);
|
|
|
|
@ -274,21 +270,16 @@ public class StuExpermentTrainingServiceImpl implements StuExpermentTrainingServ
|
|
|
|
|
wrongQuestionRanking.setModule(module);
|
|
|
|
|
stuWrongQuestionRankingMapper.insertSelective(wrongQuestionRanking);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
for (int i = 0; i < stuWrongQuestionRankingList.size(); i++) {
|
|
|
|
|
|
|
|
|
|
for (int j = 0; j < taskList.size(); j++) {
|
|
|
|
|
|
|
|
|
|
if (stuWrongQuestionRankingList.get(i).getTaskNumber().equals(taskList.get(j).getTaskNumber())
|
|
|
|
|
&& stuWrongQuestionRankingList.get(i).getTaskName().equals(taskList.get(j).getTaskName())) {
|
|
|
|
|
|
|
|
|
|
//答错次数
|
|
|
|
|
//当前任务序号总答错次数
|
|
|
|
|
Integer numberOfIncorrectAnswers = stuWrongQuestionRankingList.get(i).getNumberOfIncorrectAnswers();
|
|
|
|
|
//当前任务序号总错误次数
|
|
|
|
|
Integer errorCount = taskList.get(j).getErrorCount();
|
|
|
|
|
|
|
|
|
|
stuWrongQuestionRankingList.get(i).setNumberOfIncorrectAnswers(numberOfIncorrectAnswers + errorCount);
|
|
|
|
|
//用户第一次 添加人数 为0不添加人数
|
|
|
|
|
if (state == 1) {
|
|
|
|
@ -297,16 +288,10 @@ public class StuExpermentTrainingServiceImpl implements StuExpermentTrainingServ
|
|
|
|
|
stuWrongQuestionRankingList.get(i).setNumberErrotOfPeople(studentAll + 1);
|
|
|
|
|
}
|
|
|
|
|
stuWrongQuestionRankingMapper.updateByPrimaryKeySelective(stuWrongQuestionRankingList.get(i));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|