“djh”
3 天以前 c0f16750cb9097a8db7b68f8c1794c2aec28ca15
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExPaperStudentServiceImpl.java
@@ -298,7 +298,7 @@
            }
            updateStudentAnswers.add(sa);
        }
        ExPaperStudent exPaperStudent = baseMapper.selectByPaperStudentId(paperStudent);
        studentAnswerService.saveOrUpdateBatch(updateStudentAnswers);
        paperStudent.setScore(totalScore);
        if(!easyViewFlag){
@@ -315,6 +315,11 @@
                l+=1;
                paperStudent.setNumber("AQSC-"+format+"-"+l);
            }
            if (exPaperStudent.getScore()>paperStudent.getScore()){
                paperStudent.setScore(exPaperStudent.getScore());
            }
        }
        int row=baseMapper.updateById(paperStudent);
        if(row<1){
@@ -322,6 +327,21 @@
        }
    }
    @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.updateByPaperStudentId(exPaperStudent);
        studentAnswerMapper.updateState(exPaperStudent);
    }
    private Integer getScore(ExExamPaper examPaper,Integer questionType){
        if(questionType.equals(QuestionTypeEnum.SINGLE.getCode())){
            return examPaper.getSingleScore();