he2802 преди 2 години
родител
ревизия
1dccab930e

+ 11 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserStudyRecordController.java

@@ -131,6 +131,17 @@ public class UserStudyRecordController extends BaseController {
         return AjaxResult.success(iUserStudyRecordService.menuAllList(bo));
     }
 
+    /**
+     * 查询课程目录结构列表
+     */
+    @ApiOperation("查询课程所有子目录带试卷结构列表")
+    @GetMapping("/menuAllListWithExam")
+    public AjaxResult<List<ClassPeriodVo>> menuAllListWithExam(UserStudyRecordQueryBo bo) {
+        ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
+        bo.setUserId(loginUser.getUser().getUserId());
+        return AjaxResult.success(iUserStudyRecordService.menuAllListWithExam(bo));
+    }
+
     @ApiOperation("查询用户每天学习记录列表")
     @GetMapping("/listUserRecord")
     public TableDataInfo<SectionStudyRecordVo> listUserRecord(UserStudyRecordQueryBo bo) {

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodVo.java

@@ -113,8 +113,8 @@ public class ClassPeriodVo implements Comparable<ClassPeriodVo> {
 
 
 	/** 1模块 2章 3节 4卷 */
-	@Excel(name = "1模块 2章 3节 4卷")
-	@ApiModelProperty("1模块 2章 3节 4卷")
+	@Excel(name = "1模块 2章 3节 4章卷 5模块卷")
+	@ApiModelProperty("1模块 2章 3节 4章卷 5模块卷")
 	private Long type;
 
 	/** 當前位置 */

+ 27 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -34,12 +34,11 @@ import com.zhongzheng.modules.grade.bo.UserPeriodQueryBo;
 import com.zhongzheng.modules.grade.domain.ClassGradeUser;
 import com.zhongzheng.modules.grade.domain.UserPeriod;
 import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
+import com.zhongzheng.modules.grade.mapper.ClassGradeUserMapper;
 import com.zhongzheng.modules.grade.service.IClassGradeUserService;
 import com.zhongzheng.modules.grade.service.IUserPeriodService;
 import com.zhongzheng.modules.grade.service.IUserPeriodStatusService;
-import com.zhongzheng.modules.grade.vo.ClassPeriodStudentVo;
-import com.zhongzheng.modules.grade.vo.ClassPeriodVo;
-import com.zhongzheng.modules.grade.vo.UserPeriodStatusVo;
+import com.zhongzheng.modules.grade.vo.*;
 import com.zhongzheng.modules.inform.bo.InformRemindQueryBo;
 import com.zhongzheng.modules.inform.bo.InformUserAddBo;
 import com.zhongzheng.modules.inform.service.IInformRemindService;
@@ -151,6 +150,9 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
     @Autowired
     private ICourseMenuExamService courseMenuExamService;
 
+    @Autowired
+    private ClassGradeUserMapper classGradeUserMapper;
+
     @Override
     public UserStudyRecordVo queryById(Long recordId) {
         UserStudyRecord db = this.baseMapper.selectById(recordId);
@@ -709,6 +711,20 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                         classSectionVo.setType(3L);
                         sectionList.add(classSectionVo);
                     }
+                    List<ClassPeriodSectionVo> cExamList= classGradeUserMapper.listperiodExam(classChapterVo.getId(), null, classPeriodVo.getCourseId(), null, classPeriodVo.getId());
+                    for (ClassPeriodSectionVo sectionVo : cExamList) {
+                        ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
+                        classSectionVo.setType(4L);
+                        classSectionVo.setExamId(sectionVo.getId());
+                        sectionList.add(classSectionVo);
+                    }
+                }
+                List<ClassPeriodChapterVo> mExamList =  classGradeUserMapper.listperiodModuleExam( null, classPeriodVo.getCourseId(), null, classPeriodVo.getId());
+                for (ClassPeriodChapterVo chapterVo : mExamList) {
+                    ClassPeriodVo classSectionVo = BeanUtil.toBean(chapterVo,ClassPeriodVo.class);
+                    classSectionVo.setType(5L);
+                    classSectionVo.setExamId(chapterVo.getId());
+                    sectionList.add(classSectionVo);
                 }
             }
             //为章搜索节记录
@@ -725,6 +741,14 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                     classSectionVo.setType(3L);
                     sectionList.add(classSectionVo);
                 }
+                List<ClassPeriodSectionVo> cExamList= classGradeUserMapper.listperiodExam(classPeriodVo.getId(), null, classPeriodVo.getCourseId(), null, 0L);
+                for (ClassPeriodSectionVo sectionVo : cExamList) {
+                    ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
+                    classSectionVo.setType(4L);
+                    classSectionVo.setExamId(sectionVo.getId());
+                    sectionList.add(classSectionVo);
+                }
+
             }
             //为节搜索学时记录
             if (classPeriodVo.getType() == 3){