| | |
| | | } |
| | | updateStudentAnswers.add(sa); |
| | | } |
| | | |
| | | ExPaperStudent exPaperStudent = baseMapper.selectByPaperStudentId(paperStudent); |
| | | studentAnswerService.saveOrUpdateBatch(updateStudentAnswers); |
| | | paperStudent.setScore(totalScore); |
| | | if(!easyViewFlag){ |
| | |
| | | l+=1; |
| | | paperStudent.setNumber("AQSC-"+format+"-"+l); |
| | | } |
| | | |
| | | |
| | | if (exPaperStudent.getScore()>paperStudent.getScore()){ |
| | | paperStudent.setScore(exPaperStudent.getScore()); |
| | | } |
| | | } |
| | | int row=baseMapper.updateById(paperStudent); |
| | | if(row<1){ |
| | |
| | | @Override |
| | | @Transactional |
| | | public void againExam(ExPaperStudent exPaperStudent) { |
| | | baseMapper.deleteByPaperStudentId(exPaperStudent.getPaperId(),exPaperStudent.getStudentId()); |
| | | studentAnswerMapper.deletedByPaperStudentId(exPaperStudent.getPaperId(),exPaperStudent.getStudentId()); |
| | | BatchPaperStudentVO batchPaperStudentVO = new BatchPaperStudentVO(); |
| | | batchPaperStudentVO.setPaperId(exPaperStudent.getPaperId()); |
| | | List<Long> longs = new ArrayList<>(); |
| | | longs.add(exPaperStudent.getStudentId()); |
| | | batchPaperStudentVO.setStudentIds(longs); |
| | | batchAddPaperStudent(batchPaperStudentVO); |
| | | // baseMapper.deleteByPaperStudentId(exPaperStudent.getPaperId(),exPaperStudent.getStudentId()); |
| | | // studentAnswerMapper.deletedByPaperStudentId(exPaperStudent.getPaperId(),exPaperStudent.getStudentId()); |
| | | // BatchPaperStudentVO batchPaperStudentVO = new BatchPaperStudentVO(); |
| | | // batchPaperStudentVO.setPaperId(exPaperStudent.getPaperId()); |
| | | // List<Long> longs = new ArrayList<>(); |
| | | // longs.add(exPaperStudent.getStudentId()); |
| | | // batchPaperStudentVO.setStudentIds(longs); |
| | | // batchAddPaperStudent(batchPaperStudentVO); |
| | | baseMapper.updateByPaperStudentId(exPaperStudent); |
| | | studentAnswerMapper.updateState(exPaperStudent); |
| | | } |
| | | |
| | | private Integer getScore(ExExamPaper examPaper,Integer questionType){ |