Bladeren bron

add v2学习记录

he2802 3 jaren geleden
bovenliggende
commit
7231c98f41
28 gewijzigde bestanden met toevoegingen van 311 en 57 verwijderingen
  1. 13 1
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/grade/ClassGradeController.java
  2. 2 1
      zhongzheng-api/src/main/java/com/zhongzheng/controller/goods/GoodsController.java
  3. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java
  4. 6 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/collect/bo/CollectQuestionQueryBo.java
  5. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseServiceImpl.java
  6. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/domain/UserPeriodStatus.java
  7. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/IClassGradeUserService.java
  8. 141 37
      zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java
  9. 8 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodVo.java
  10. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/UserPeriodItemExportVo.java
  11. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderGoodsMapper.java
  12. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderGoodsService.java
  13. 3 2
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderGoodsServiceImpl.java
  14. 3 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserBankRecordAddBo.java
  15. 5 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserBankRecordEditBo.java
  16. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserBankRecordQueryBo.java
  17. 6 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserPlanQueryBo.java
  18. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/domain/UserBankRecord.java
  19. 1 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserBankRecordServiceImpl.java
  20. 7 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserBankRecordVo.java
  21. 6 0
      zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml
  22. 14 1
      zhongzheng-system/src/main/resources/mapper/modules/collect/CollectQuestionMapper.xml
  23. 3 3
      zhongzheng-system/src/main/resources/mapper/modules/course/CourseEducationTypeMapper.xml
  24. 9 1
      zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml
  25. 1 1
      zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml
  26. 10 1
      zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml
  27. 8 1
      zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml
  28. 51 0
      zhongzheng-system/src/main/resources/mapper/modules/user/UserBankRecordMapper.xml

+ 13 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/grade/ClassGradeController.java

@@ -186,11 +186,23 @@ public class ClassGradeController extends BaseController {
     @ApiOperation("查询学员学习记录列表")
     @PreAuthorize("@ss.hasPermi('grade:user:list')")
     @GetMapping("/listUserStudyRecord")
+    public TableDataInfo<UserPeriodExportV2Vo> listUserStudyRecord(ClassGradeUserQueryBo bo) {
+        startPage();
+        List<UserPeriodExportV2Vo> list = iClassGradeUserService.listUserStudyRecordV2(bo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询学时学员记录列表
+     *//*
+    @ApiOperation("查询学员学习记录列表")
+    @PreAuthorize("@ss.hasPermi('grade:user:list')")
+    @GetMapping("/listUserStudyRecord")
     public TableDataInfo<UserPeriodExportVo> listUserStudyRecord(ClassGradeUserQueryBo bo) {
         startPage();
         List<UserPeriodExportVo> list = iClassGradeUserService.listUserStudyRecord(bo);
         return getDataTable(list);
-    }
+    }*/
 
     /**
      * 导出资料审核列表

+ 2 - 1
zhongzheng-api/src/main/java/com/zhongzheng/controller/goods/GoodsController.java

@@ -214,7 +214,8 @@ public class GoodsController extends BaseController {
     public TableDataInfo<OrderGoodsVo> listGoodsUserQuestionVo(GoodsQueryBo bo) {
         startPage();
         ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
-        List<OrderGoodsVo> list = iOrderGoodsService.listGoodsUserLive(loginUser.getUser().getUserId());
+        bo.setUserId(loginUser.getUser().getUserId());
+        List<OrderGoodsVo> list = iOrderGoodsService.listGoodsUserLive(bo);
         return getDataTable(list);
     }
 

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -125,6 +125,8 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
 
     @Override
     public List<GoodsUserQuestionVo> listFreeGoodsList(GoodsQueryBo bo) {
+        System.out.println(123545);
+        System.out.println(bo);
         List<GoodsUserQuestionVo> list = this.baseMapper.listFreeGoodsList(bo);
         for(GoodsUserQuestionVo vo : list){
             Long totalNum = iGoodsService.getExamNum(vo.getGoodsId());

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/collect/bo/CollectQuestionQueryBo.java

@@ -55,4 +55,10 @@ public class CollectQuestionQueryBo extends BaseEntity {
 	/** 订单商品ID */
 	@ApiModelProperty("订单商品ID")
 	private Long orderGoodsId;
+	/** 教育类型id */
+	@ApiModelProperty("教育类型id")
+	private Long educationTypeId;
+	/** 业务层次id */
+	@ApiModelProperty("业务层次id")
+	private Long businessId;
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseServiceImpl.java

@@ -478,6 +478,7 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
             lq.eq(UserSubscribe::getOrderGoodsId, goodsUserVo.getOrderGoodsId());
             lq.eq(UserSubscribe::getSubscribeStatus, 1);
             lq.eq(UserSubscribe::getBeforeStatus, 1);
+            lq.last("limit 1");
             UserSubscribe userSubscribe = iUserSubscribeService.getOne(lq);
             if (userSubscribe != null) {
                 LambdaQueryWrapper<ExamBefore> lqw1 = Wrappers.lambdaQuery();

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/domain/UserPeriodStatus.java

@@ -46,7 +46,7 @@ private static final long serialVersionUID=1L;
     /** 审核时间 */
     private Long auditTime;
     /** 分数 */
-    private Long performance;
+    private BigDecimal performance;
     /** 审核用户名 */
     private String auditUserName;
     /** 审核原因 */

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/IClassGradeUserService.java

@@ -84,7 +84,7 @@ public interface IClassGradeUserService extends IService<ClassGradeUser> {
 
 	List<UserPeriodExportVo> listUserStudyRecord(ClassGradeUserQueryBo bo);
 
-	List<ClassPeriodVo> listUserStudyRecordV2(ClassGradeUserQueryBo bo);
+	List<UserPeriodExportV2Vo> listUserStudyRecordV2(ClassGradeUserQueryBo bo);
 
     List<ClassPeriodUserVo> listPeriod(ClassGradeUserQueryBo bo);
 

+ 141 - 37
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -55,19 +55,19 @@ import com.zhongzheng.modules.order.service.IOrderService;
 import com.zhongzheng.modules.order.vo.OrderGoodsVo;
 import com.zhongzheng.modules.system.domain.SysTenant;
 import com.zhongzheng.modules.user.bo.SubjectStudyRecordQueryBo;
+import com.zhongzheng.modules.user.bo.UserBankRecordQueryBo;
 import com.zhongzheng.modules.user.bo.UserQueryBo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo;
 import com.zhongzheng.modules.user.domain.User;
+import com.zhongzheng.modules.user.domain.UserBankRecord;
 import com.zhongzheng.modules.user.domain.UserPlan;
 import com.zhongzheng.modules.user.domain.UserStudyRecordPhoto;
 import com.zhongzheng.modules.user.mapper.UserMapper;
 import com.zhongzheng.modules.user.mapper.UserStudyRecordPhotoMapper;
+import com.zhongzheng.modules.user.service.IUserBankRecordService;
 import com.zhongzheng.modules.user.service.IUserStudyRecordPhotoService;
 import com.zhongzheng.modules.user.service.IUserStudyRecordService;
-import com.zhongzheng.modules.user.vo.SectionStudyRecordVo;
-import com.zhongzheng.modules.user.vo.SubjectStudyRecordVo;
-import com.zhongzheng.modules.user.vo.UserStudyRecordPhotoVo;
-import com.zhongzheng.modules.user.vo.UserStudyRecordVo;
+import com.zhongzheng.modules.user.vo.*;
 import org.apache.commons.codec.binary.Base64;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -105,6 +105,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     @Autowired
     private IUserStudyRecordService iUserStudyRecordService;
 
+    @Autowired
+    private IUserBankRecordService iUserBankRecordService;
+
     @Autowired
     private IUserPeriodStatusService userPeriodStatusService;
 
@@ -808,6 +811,27 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         return rs;
     }
 
+    private UserPeriodExportV2Vo mergeEamDataV2(Long index, String moduleName, String chapterName, String sectionName,ClassPeriodSectionVo classPeriodSectionVo) {
+        //试卷学习记录
+        UserBankRecordQueryBo recordQueryBo = BeanUtil.toBean(classPeriodSectionVo, UserBankRecordQueryBo.class);
+        List<UserBankRecordVo> recordList = iUserBankRecordService.queryList(recordQueryBo);
+        //录入学时记录
+        UserPeriodExportV2Vo userPeriodExportVo = new UserPeriodExportV2Vo();
+        List<UserPeriodItemExportVo> studyList = new ArrayList<>();
+        for(UserBankRecordVo vo : recordList){
+            UserPeriodItemExportVo exportVo = new UserPeriodItemExportVo();
+            exportVo.setStudyStartTime(vo.getCreateTime());
+            exportVo.setStudyEndTime(vo.getUpdateTime());
+            exportVo.setSectionType(4);
+            exportVo.setStatus(vo.getStatus());
+            exportVo.setScore(vo.getPerformance());
+            exportVo.setRightRate(vo.getRightRate());
+            studyList.add(exportVo);
+        }
+        userPeriodExportVo.setRecordList(studyList);
+        return userPeriodExportVo;
+    }
+
     private UserPeriodExportV2Vo mergeDataV2(Long index, String moduleName, String chapterName, String sectionName,ClassPeriodSectionVo classPeriodSectionVo, UserStudyRecordQueryBo recordQueryBo) {
         //节学习记录
         List<SectionStudyRecordVo> recordList = iUserStudyRecordService.selectSectionRecord(recordQueryBo);
@@ -819,7 +843,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         userPeriodExportVo.setSectionName(sectionName);
         List<UserPeriodItemExportVo> studyList = new ArrayList<>();
         //录播
-        if(classPeriodSectionVo.getSectionType()==3){
+        if(classPeriodSectionVo.getSectionType()==1){
             Long startTime = null;
             Long endTime = null;
             int studyIndex = -1;
@@ -830,6 +854,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                     studyIndex++;
                     exportVo.setStudyStartTime(startTime);
                     exportVo.setStatus(0);
+                    exportVo.setDurationTime(classPeriodSectionVo.getDurationTime());
+                    exportVo.setSectionType(classPeriodSectionVo.getSectionType());
                     studyList.add(exportVo);
                 }
                 endTime = vo.getEndTime();
@@ -841,8 +867,52 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             }
         }
         //回放或者直播
-        if(classPeriodSectionVo.getSectionType()==2||classPeriodSectionVo.getSectionType()==1){
-
+        if(classPeriodSectionVo.getSectionType()==2||classPeriodSectionVo.getSectionType()==3){
+            //默认加上直播
+            UserPeriodItemExportVo exportVo = new UserPeriodItemExportVo();
+            exportVo.setSectionType(2);
+            exportVo.setStatus(0); //直播未参与
+            exportVo.setDurationTime(classPeriodSectionVo.getRealDuration());
+            studyList.add(exportVo);
+            Long startTime = null;
+            Long endTime = null;
+            int studyIndex = 0;
+            boolean isReplay = false;
+            if(Validator.isNotEmpty(classPeriodSectionVo.getRealLiveEndTime())){ //直播结束时间
+                for(SectionStudyRecordVo vo : recordList){
+                    if(vo.getStartTime().longValue()>classPeriodSectionVo.getRealLiveEndTime().longValue()){  //回放
+                        if(!isReplay){
+                            //结束直播第一次进回放
+                            isReplay = true;
+                            startTime = null;
+                        }
+                        if(Validator.isEmpty(startTime)){
+                            startTime = vo.getStartTime();
+                            UserPeriodItemExportVo exportItemVo = new UserPeriodItemExportVo();
+                            studyIndex++; //跳过第一条直播
+                            exportItemVo.setStudyStartTime(startTime);
+                            exportItemVo.setStatus(0);
+                            exportItemVo.setDurationTime(classPeriodSectionVo.getDurationTime());
+                            exportVo.setSectionType(3);
+                            studyList.add(exportItemVo);
+                        }
+                        endTime = vo.getEndTime();
+                        studyList.get(studyIndex).setStudyEndTime(endTime);
+                        if(Validator.isNotEmpty(vo.getStatus())&&vo.getStatus()==1){
+                            studyList.get(studyIndex).setStatus(1);
+                            startTime = null;
+                        }
+                    }else{ //直播
+                        studyList.get(0).setStatus(1); //直播参与
+                        if(Validator.isEmpty(startTime)){
+                            startTime = vo.getStartTime();
+                            studyList.get(0).setStudyStartTime(startTime);
+                        }
+                        endTime = vo.getEndTime();
+                        studyList.get(0).setStudyEndTime(endTime);
+                    }
+                }
+            }
         }
         userPeriodExportVo.setRecordList(studyList);
         return userPeriodExportVo;
@@ -1314,7 +1384,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
      * @return
      */
     @Override
-    public List<ClassPeriodVo> listUserStudyRecordV2(ClassGradeUserQueryBo bo) {
+    public List<UserPeriodExportV2Vo> listUserStudyRecordV2(ClassGradeUserQueryBo bo) {
         //查找最外层课程目录 模块 章 节
         List<ClassPeriodVo> classPeriodVos = baseMapper.listPeriodAudit(bo);
         classPeriodVos.addAll(baseMapper.listPeriodAuditSection(bo));
@@ -1322,7 +1392,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         String moduleName = "";
         String chapterName = "";
         String sectionName = "";
-        List<UserPeriodExportVo> studyList = new ArrayList<>();
+        List<UserPeriodExportV2Vo> studyList = new ArrayList<>();
         long i = 0;
         Long gradeId = bo.getGradeId();
         Long userId = bo.getUserId();
@@ -1351,47 +1421,81 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                 recordQueryBo.setChapterId(classPeriodChapterVo.getId());
                                 recordQueryBo.setModuleId(classPeriodVo.getId());
                                 recordQueryBo.setGradeId(gradeId);
-                                mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo);
-                            //    studyList.add();
+                                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
                             } else {
                                 //章卷
                                 sectionName = classPeriodSectionVo.getTypeName();
-                                UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
-                                userPeriodQueryBo.setExamId(classPeriodSectionVo.getId());
-                                userPeriodQueryBo.setCourseId(classPeriodSectionVo.getCourseId());
-                                userPeriodQueryBo.setGoodsId(goodsId);
-                                userPeriodQueryBo.setUserId(classPeriodSectionVo.getUserId());
-                                userPeriodQueryBo.setChapterId(classPeriodChapterVo.getId());
-                                userPeriodQueryBo.setModuleId(classPeriodVo.getId());
-                                userPeriodQueryBo.setGradeId(gradeId);
-                                List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
-                                if (!CollectionUtils.isEmpty(userPeriodStatusVos)) {
-                                    int numIndex = userPeriodStatusVos.size() - 1;
-                                    UserPeriodStatusVo userPeriodStatusVo = userPeriodStatusVos.get(numIndex);
-                                    classPeriodSectionVo.setNumIndex(Convert.toLong(userPeriodStatusVos.size()));
-                                    classPeriodSectionVo.setStatus(userPeriodStatusVo.getStatus());
-                                    classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
-                                    classPeriodSectionVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
-                                    classPeriodSectionVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
-                                    classPeriodSectionVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
-                                    classPeriodSectionVo.setPeriodId(userPeriodStatusVo.getPeriodId());
-                                    classPeriodSectionVo.setAuditTime(userPeriodStatusVo.getAuditTime());
-                                    classPeriodSectionVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
-                                    classPeriodSectionVo.setPeriodStatusId(userPeriodStatusVo.getId());
-                                    classPeriodChapterVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
-                                }
                                 classPeriodSectionVo.setModuleId(classPeriodVo.getId());
                                 classPeriodSectionVo.setChapterId(classPeriodChapterVo.getId());
                                 classPeriodSectionVo.setGoodsId(goodsId);
                                 classPeriodSectionVo.setGradeId(gradeId);
-                                studyList.add(mergeData(i, moduleName, chapterName, sectionName, classPeriodSectionVo, classPeriodChapterVo.getPerformance(), true));
+                                classPeriodSectionVo.setUserId(classPeriodSectionVo.getUserId());
+                                studyList.add(mergeEamDataV2(i, moduleName, chapterName, sectionName, classPeriodSectionVo));
                             }
                         }
                     }
                 }
             }
+            //为章搜索节记录和学时记录
+            if (classPeriodVo.getType() == 2) {
+                moduleName = "";
+                chapterName = classPeriodVo.getTypeName();
+                List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodVo.getId(), goodsId, classPeriodVo.getCourseId(), userId);
+                for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
+                    i++;
+                    sectionName = classPeriodSectionVo.getTypeName();
+                    UserStudyRecordQueryBo recordQueryBo = new UserStudyRecordQueryBo();
+                    recordQueryBo.setSectionId(classPeriodSectionVo.getId());
+                    recordQueryBo.setCourseId(classPeriodSectionVo.getCourseId());
+                    recordQueryBo.setGoodsId(goodsId);
+                    recordQueryBo.setUserId(classPeriodSectionVo.getUserId());
+                    recordQueryBo.setChapterId(classPeriodVo.getId());
+                    recordQueryBo.setModuleId(classPeriodVo.getId());
+                    recordQueryBo.setGradeId(gradeId);
+                    studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
+                }
+                List<ClassPeriodSectionVo> classPeriodSectionVos1 = baseMapper.listPeriodSectionExam(classPeriodVo.getId(), goodsId, classPeriodVo.getCourseId(), userId);
+                for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos1) {
+                    //章卷
+                    i++;
+                    sectionName = classPeriodSectionVo.getTypeName();
+                    sectionName = classPeriodSectionVo.getTypeName();
+                    classPeriodSectionVo.setModuleId(classPeriodVo.getId());
+                    classPeriodSectionVo.setChapterId(classPeriodVo.getId());
+                    classPeriodSectionVo.setGoodsId(goodsId);
+                    classPeriodSectionVo.setGradeId(gradeId);
+                    classPeriodSectionVo.setUserId(classPeriodSectionVo.getUserId());
+                    studyList.add(mergeEamDataV2(i, moduleName, chapterName, sectionName, classPeriodSectionVo));
+                }
+                classPeriodSectionVos.addAll(classPeriodSectionVos1);
+                classPeriodVo.setClassPeriodSectionList(classPeriodSectionVos);
+            }
+            //为节搜索学时记录
+            if (classPeriodVo.getType() == 3) {
+                i++;
+                sectionName = classPeriodVo.getTypeName();
+                UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
+                userPeriodQueryBo.setSectionId(classPeriodVo.getId());
+                userPeriodQueryBo.setCourseId(classPeriodVo.getCourseId());
+                userPeriodQueryBo.setGoodsId(bo.getGoodsId());
+                userPeriodQueryBo.setUserId(classPeriodVo.getUserId());
+                userPeriodQueryBo.setChapterId(0L);
+                userPeriodQueryBo.setModuleId(0L);
+                userPeriodQueryBo.setGradeId(bo.getGradeId());
+                UserStudyRecordQueryBo recordQueryBo = BeanUtil.toBean(userPeriodQueryBo, UserStudyRecordQueryBo.class);
+
+                ClassPeriodSectionVo classPeriodSectionVo = BeanUtil.toBean(userPeriodQueryBo, ClassPeriodSectionVo.class);
+                classPeriodSectionVo.setSectionType(classPeriodVo.getSectionType());
+                classPeriodSectionVo.setRealDuration(classPeriodVo.getRealDuration());
+                classPeriodSectionVo.setDurationTime(classPeriodVo.getDurationTime());
+                classPeriodSectionVo.setRealLiveStartTime(classPeriodVo.getRealLiveStartTime());
+                classPeriodSectionVo.setRealLiveEndTime(classPeriodVo.getRealLiveEndTime());
+                System.out.println("EER");
+                System.out.println(classPeriodSectionVo);
+                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
+            }
         }
-        return classPeriodVos;
+        return studyList;
     }
 
     @Override

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

@@ -182,13 +182,20 @@ public class ClassPeriodVo implements Comparable<ClassPeriodVo> {
 	@Excel(name = "保利威真实直播时长,单位秒")
 	@ApiModelProperty("保利威真实直播时长,单位秒")
 	private Long realDuration;
+	/** 保利威真实直播开始时间 */
+	@Excel(name = "保利威真实直播开始时间")
+	@ApiModelProperty("保利威真实直播开始时间")
+	private Long realLiveStartTime;
+	/** 保利威真实直播结束时间 */
+	@Excel(name = "保利威真实直播结束时间")
+	@ApiModelProperty("保利威真实直播结束时间")
+	private Long realLiveEndTime;
 	@ApiModelProperty("节名称")
 	private String sectionName;
 	@ApiModelProperty("订单商品ID")
 	private Long orderGoodsId;
 
 
-
 	@Override
 	public int compareTo(ClassPeriodVo o) {
 		if(o.getCourseSort()==this.getCourseSort()){

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/UserPeriodItemExportVo.java

@@ -39,5 +39,9 @@ public class UserPeriodItemExportVo {
 
 	@ApiModelProperty("节类型 1录播 2直播 3回放 4题卷")
 	private Integer sectionType;
+	/** 准确率 */
+	@com.zhongzheng.common.annotation.Excel(name = "准确率")
+	@ApiModelProperty("准确率")
+	private BigDecimal rightRate;
 
 }

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderGoodsMapper.java

@@ -43,7 +43,7 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
 
     List<OrderGoodsVo> listLiveGoodsList(GoodsQueryBo bo);
 
-    List<OrderGoodsVo> listGoodsUserLive(Long userId);
+    List<OrderGoodsVo> listGoodsUserLive(GoodsQueryBo bo);
 
     List<OrderGoodsVo> listUserSubjectGoods(GoodsQueryBo bo);
 

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderGoodsService.java

@@ -82,7 +82,7 @@ public interface IOrderGoodsService extends IService<OrderGoods> {
 
     void listGoodsStudyList(OrderGoodsQueryBo bo);
 
-    List<OrderGoodsVo> listGoodsUserLive(Long userId);
+    List<OrderGoodsVo> listGoodsUserLive(GoodsQueryBo bo);
 
     List<OrderUserGoodsVo> listUserSubjectGoods(OrderSubjectUserBuyBo bo);
 

+ 3 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderGoodsServiceImpl.java

@@ -163,6 +163,7 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
             if(goodsVo.getGoodsType()==1){
                 ConsoleQueryBo consoleQueryBo = new ConsoleQueryBo();
                 consoleQueryBo.setOrderGoodsId(orderGoods.getOrderGoodsId());
+                consoleQueryBo.setSubscribeStatus(1);
                 Integer usNum = iUserSubscribeService.getConsoleTestSubscribeNum(consoleQueryBo);
                 if(usNum>0){
                     throw new CustomException("已预约了考试,不符合关闭条件");
@@ -393,8 +394,8 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
     }
 
     @Override
-    public List<OrderGoodsVo> listGoodsUserLive(Long userId) {
-        List<OrderGoodsVo> list = this.baseMapper.listGoodsUserLive(userId);
+    public List<OrderGoodsVo> listGoodsUserLive(GoodsQueryBo bo) {
+        List<OrderGoodsVo> list = this.baseMapper.listGoodsUserLive(bo);
         for(OrderGoodsVo goodsVo : list){
             Long startTime = null;
             Long endTime = null;

+ 3 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserBankRecordAddBo.java

@@ -66,5 +66,7 @@ public class UserBankRecordAddBo {
     /** 当前状态 1 当前状态 0过往状态 */
     @ApiModelProperty("当前状态 1 当前状态 0过往状态")
     private Integer currentStatus;
-
+    /** 准确率 */
+    @ApiModelProperty("准确率")
+    private BigDecimal rightRate;
 }

+ 5 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserBankRecordEditBo.java

@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
+
+import java.math.BigDecimal;
 import java.util.Date;
 
 
@@ -67,5 +69,7 @@ public class UserBankRecordEditBo {
     /** 当前状态 1 当前状态 0过往状态 */
     @ApiModelProperty("当前状态 1 当前状态 0过往状态")
     private Integer currentStatus;
-
+    /** 准确率 */
+    @ApiModelProperty("准确率")
+    private BigDecimal rightRate;
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserBankRecordQueryBo.java

@@ -77,5 +77,6 @@ public class UserBankRecordQueryBo extends BaseEntity {
 	/** grade_id */
 	@ApiModelProperty("grade_id")
 	private Long gradeId;
+	private Integer currentStatus;
 
 }

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserPlanQueryBo.java

@@ -80,4 +80,10 @@ public class UserPlanQueryBo extends BaseEntity {
 	/** 已学习节数 */
 	@ApiModelProperty("已学习节数")
 	private Long studyNum;
+	/** 教育类型id */
+	@ApiModelProperty("教育类型id")
+	private Long educationTypeId;
+	/** 业务层次id */
+	@ApiModelProperty("业务层次id")
+	private Long businessId;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/domain/UserBankRecord.java

@@ -60,4 +60,6 @@ private static final long serialVersionUID=1L;
     private Long gradeId;
     /** 当前状态 1 当前状态 0过往状态 */
     private Integer currentStatus;
+    /** 准确率 */
+    private BigDecimal rightRate;
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserBankRecordServiceImpl.java

@@ -99,6 +99,7 @@ public class UserBankRecordServiceImpl extends ServiceImpl<UserBankRecordMapper,
         lqw.eq(bo.getChapterId() != null, UserBankRecord::getChapterId, bo.getChapterId());
         lqw.eq(bo.getPerformance() != null, UserBankRecord::getPerformance, bo.getPerformance());
         lqw.eq(bo.getGradeId() != null, UserBankRecord::getGradeId, bo.getGradeId());
+        lqw.eq(bo.getCurrentStatus() != null, UserBankRecord::getCurrentStatus, bo.getCurrentStatus());
         return entity2Vo(this.list(lqw));
     }
 

+ 7 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserBankRecordVo.java

@@ -7,6 +7,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+
+import java.math.BigDecimal;
 import java.util.Date;
 
 
@@ -69,11 +71,15 @@ public class UserBankRecordVo {
 	/** 分数 */
 	@Excel(name = "分数")
 	@ApiModelProperty("分数")
-	private Long performance;
+	private BigDecimal performance;
 	/** grade_id */
 	@Excel(name = "grade_id")
 	@ApiModelProperty("grade_id")
 	private Long gradeId;
+	/** 准确率 */
+	@Excel(name = "准确率")
+	@ApiModelProperty("准确率")
+	private BigDecimal rightRate;
 
 	/** 创建时间 */
 	private Long createTime;

+ 6 - 0
zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml

@@ -320,6 +320,9 @@
         <if test="educationTypeId != null and educationTypeId != ''">
             AND g.education_type_id = #{educationTypeId}
         </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
         ORDER BY og.create_time DESC
     </select>
 
@@ -362,6 +365,9 @@
             <if test="educationTypeId != null and educationTypeId != ''">
                 AND g.education_type_id = #{educationTypeId}
             </if>
+            <if test="businessId != null and businessId != ''">
+                AND g.business_id = #{businessId}
+            </if>
             ORDER BY og.create_time DESC
     </select>
 

+ 14 - 1
zhongzheng-system/src/main/resources/mapper/modules/collect/CollectQuestionMapper.xml

@@ -68,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         collect_question cq
         LEFT JOIN exam e ON cq.exam_id = e.exam_id
         LEFT JOIN exam_paper ep ON ep.paper_id = e.exam_paper_id
+        LEFT JOIN goods g ON g.goods_id = cq.goods_id
         WHERE
         1 = 1
         AND cq.user_id = #{userId}
@@ -80,6 +81,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="orderGoodsId != null and orderGoodsId != ''">
             AND cq.order_goods_id = #{orderGoodsId}
         </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND g.education_type_id = #{educationTypeId}
+        </if>
         GROUP BY
         e.exam_id
         ORDER BY
@@ -118,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
                     ) cq
                     LEFT JOIN question q ON cq.question_id = q.question_id
-
+        LEFT JOIN goods g ON g.goods_id = cq.goods_id
         WHERE
             1 = 1
         <if test="goodsId != null and goodsId != ''">
@@ -127,6 +134,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="orderGoodsId != null and orderGoodsId != ''">
             AND cq.order_goods_id = #{orderGoodsId}
         </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND g.education_type_id = #{educationTypeId}
+        </if>
         GROUP BY
             q.type
     </select>

+ 3 - 3
zhongzheng-system/src/main/resources/mapper/modules/course/CourseEducationTypeMapper.xml

@@ -69,9 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectUserAllBusinessList" parameterType="map" resultMap="BaseFilterVoResult">
         SELECT
-            g.education_type_id,
-            g.business_id,
-            g.project_id,
+            cet.id as education_type_id,
+            cb.id as business_id,
+            cpt.id as project_id,
             cb.business_name,
             cb.alias_name,
             cet.education_name,

+ 9 - 1
zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml

@@ -453,7 +453,12 @@
         WHERE
             cgu.user_id =#{userId}
         AND cg.status=1 AND cgu.`status`=1 AND cgu.change_grade=0
-
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND g.education_type_id = #{educationTypeId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
         ORDER BY cgu.create_time DESC
     </select>
 
@@ -552,6 +557,9 @@
         <if test="educationTypeId != null and educationTypeId != ''">
             AND g.education_type_id = #{educationTypeId}
         </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
         order by o.create_time desc
     </select>
     <select id="courseList" parameterType="com.zhongzheng.modules.course.bo.CourseQueryBo"  resultMap="CourseUserVo">

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -412,7 +412,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN course_business cb ON g.business_id = cb.id
         LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
         where 1=1
-        and cgu.`status` =1
+      
         <if test="gradeId != null and gradeId !='' ">
           and cgu.grade_id = #{gradeId}
         </if>

+ 10 - 1
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -158,6 +158,11 @@
         <result property="studyEndTime" column="study_end_time"/>
         <result property="durationTime" column="duration_time"/>
         <result property="courseSort" column="course_sort"/>
+
+        <result property="sectionType" column="section_type"/>
+        <result property="realLiveStartTime" column="real_live_start_time"/>
+        <result property="realLiveEndTime" column="real_live_end_time"/>
+        <result property="realDuration" column="real_duration"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodChapterVo" id="ClassPeriodChapterVo">
@@ -191,7 +196,7 @@
         <result property="auditNum" column="audit_num"/>
         <result property="sort" column="sort"/>
 
-        <result property="section_type" column="section_type"/>
+        <result property="sectionType" column="section_type"/>
         <result property="realLiveStartTime" column="real_live_start_time"/>
         <result property="realLiveEndTime" column="real_live_end_time"/>
         <result property="realDuration" column="real_duration"/>
@@ -702,6 +707,10 @@
         ) as user_id,
         cs.`name` as type_name,
         cs.duration_time,
+        cs.real_live_start_time,
+        cs.real_live_end_time,
+        cs.real_duration,
+        cs.section_type,
         null as class_hours,
         3 as type
         FROM

+ 8 - 1
zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml

@@ -236,6 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE
             o.user_id = #{userId}
           AND og.goods_id = #{goodsId}
+          AND og.`status` = 1
           AND og.pay_status > 1 AND og.refund_status != 2
     </select>
     <select id="getBuyGoodsReadyPay" parameterType="com.zhongzheng.modules.order.bo.OrderGoodsQueryBo" resultType="Long">
@@ -383,7 +384,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ORDER BY og.create_time DESC
     </select>
 
-    <select id="listGoodsUserLive" parameterType="Long" resultMap="OrderGoodsResultVo">
+    <select id="listGoodsUserLive" parameterType="com.zhongzheng.modules.goods.bo.GoodsQueryBo" resultMap="OrderGoodsResultVo">
         SELECT
             g.*,
             cet.education_name,
@@ -408,6 +409,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           AND og.`status` =1
           and og.pay_status in (2,3,4)
           AND og.refund_status in (0,3,1)
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND g.education_type_id = #{educationTypeId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
         ORDER BY og.create_time DESC
     </select>
 

+ 51 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserBankRecordMapper.xml

@@ -23,6 +23,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="performance" column="performance"/>
         <result property="gradeId" column="grade_id"/>
         <result property="currentStatus" column="current_status"/>
+        <result property="rightRate" column="right_rate"/>
+    </resultMap>
+
+
+    <resultMap type="com.zhongzheng.modules.user.domain.UserBankRecord" id="UserBankRecordVoResult">
+        <result property="recordId" column="record_id"/>
+        <result property="type" column="type"/>
+        <result property="simulateId" column="simulate_id"/>
+        <result property="examId" column="exam_id"/>
+        <result property="bankId" column="bank_id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="userId" column="user_id"/>
+        <result property="status" column="status"/>
+        <result property="goodsId" column="goods_id"/>
+        <result property="reportStatus" column="report_status"/>
+        <result property="courseId" column="course_id"/>
+        <result property="sectionId" column="section_id"/>
+        <result property="moduleId" column="module_id"/>
+        <result property="chapterId" column="chapter_id"/>
+        <result property="performance" column="performance"/>
+        <result property="gradeId" column="grade_id"/>
+        <result property="currentStatus" column="current_status"/>
+        <result property="rightRate" column="right_rate"/>
     </resultMap>
 
     <select id="getUserExamDoNum" parameterType="com.zhongzheng.modules.user.bo.UserBankRecordQueryBo" resultType="Long">
@@ -53,5 +77,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         AND ubr.user_id = #{userId}
     </select>
 
+    <select id="getUserExamList" parameterType="com.zhongzheng.modules.user.bo.UserBankRecordQueryBo" resultMap="UserBankRecordVoResult">
+        SELECT
+        ubr.*
+        FROM
+        user_bank_record ubr
+        WHERE
+        1 =1
+        <if test="chapterId != null and chapterId != ''">
+            AND ubr.chapter_id = #{chapterId}
+        </if>
+        <if test="moduleId != null and moduleId != ''">
+            AND ubr.module_id = #{moduleId}
+        </if>
+        <if test="courseId != null and courseId != ''">
+            AND ubr.course_id = #{courseId}
+        </if>
+        <if test="gradeId != null and gradeId != ''">
+            AND ubr.grade_id = #{gradeId}
+        </if>
+        <if test="goodsId != null and goodsId != ''">
+            AND ubr.goods_id = #{goodsId}
+        </if>
+        <if test="examId != null and examId != ''">
+            AND ubr.exam_id = #{examId}
+        </if>
+        AND ubr.user_id = #{userId}
+    </select>
 
 </mapper>