kongzy
2024-07-05 14821e28286d773ad5ff2c13510e39c5eb117daf
exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentStudyServiceImpl.java
@@ -64,12 +64,12 @@
    }
    @Override
    public List<StudentStudyVO> selectStudyByPhaseAndStundentId(Long phaseId,Long studentId) {
    public List<StudentStudyVO> selectStudyByPhaseAndStundentId(Long phaseId,Long studentId,Integer status) {
        ExCoursePhase coursePhase=coursePhaseMapper.selectById(phaseId);
        Long courseId=coursePhase.getCourseId();
        List<ExStudentStudy> studentStudyList= baseMapper.selectStudyByPhaseAndStudentId(phaseId,courseId,studentId);
        Map<Long,ExStudentStudy> studentStudyMap=studentStudyList.stream().collect(Collectors.toMap(ExStudentStudy::getPeriodId, item->item));
        List<ExCourseChapter> courseChapterList=courseChapterService.selectChapterByCourseId(courseId);
        List<ExCourseChapter> courseChapterList=courseChapterService.selectChapterByCourseId(courseId, status);
        List<StudentStudyVO> studentStudyVOList=courseChapterList.stream().map(item ->{
            StudentStudyVO studentStudyVO=new StudentStudyVO();
            studentStudyVO.setChapterId(item.getId());
@@ -81,6 +81,7 @@
                studentStudyPeriodVO.setPeriodName(courseChapterPeriod.getName());
                studentStudyPeriodVO.setPeriodId(courseChapterPeriod.getId());
                studentStudyPeriodVO.setPeriod(courseChapterPeriod.getPeriod());
                studentStudyPeriodVO.setResourceId(courseChapterPeriod.getResourceId());
                ExStudentStudy exStudentStudy=studentStudyMap.get(courseChapterPeriod.getId());
                if(exStudentStudy!=null){
                    studentStudyPeriodVO.setProgress(exStudentStudy.getProgress());