he2802 2 lat temu
rodzic
commit
e2406a0cbf

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

@@ -92,6 +92,8 @@ public interface IClassGradeUserService extends IService<ClassGradeUser> {
 
 
 	List<UserPeriodExportV2Vo> listUserStudyRecordV2(ClassGradeUserQueryBo bo);
 	List<UserPeriodExportV2Vo> listUserStudyRecordV2(ClassGradeUserQueryBo bo);
 
 
+	List<UserPeriodExportV2Vo> listUserStudyRecordV2Week(ClassGradeUserQueryBo bo);
+
     List<ClassPeriodUserVo> listPeriod(ClassGradeUserQueryBo bo);
     List<ClassPeriodUserVo> listPeriod(ClassGradeUserQueryBo bo);
 
 
 	List<ClassPeriodVo> listPeriodAudit(ClassGradeUserQueryBo bo);
 	List<ClassPeriodVo> listPeriodAudit(ClassGradeUserQueryBo bo);

+ 125 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -1657,6 +1657,131 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         return studyList;
         return studyList;
     }
     }
 
 
+    @Override
+    public List<UserPeriodExportV2Vo> listUserStudyRecordV2Week(ClassGradeUserQueryBo bo) {
+        //查找最外层课程目录 模块 章 节
+        List<ClassPeriodVo> classPeriodVos = baseMapper.listPeriodAudit(bo);
+        classPeriodVos.addAll(baseMapper.listPeriodAuditSection(bo));
+        Collections.sort(classPeriodVos);
+        String moduleName = "";
+        String chapterName = "";
+        String sectionName = "";
+        List<UserPeriodExportV2Vo> studyList = new ArrayList<>();
+        long i = 0;
+        Long gradeId = bo.getGradeId();
+        Long userId = bo.getUserId();
+        Long goodsId = bo.getGoodsId();
+        Long courseId = bo.getCourseId();
+        for (ClassPeriodVo classPeriodVo : classPeriodVos) {
+            //为模块搜索下面的章 和节 并搜索学时记录
+            if (classPeriodVo.getType() == 1) {
+                moduleName = classPeriodVo.getTypeName();
+                List<ClassPeriodChapterVo> classPeriodChapterVos = baseMapper.listperiodChapter(classPeriodVo.getId(), goodsId, classPeriodVo.getCourseId(), userId, gradeId);
+                for (ClassPeriodChapterVo classPeriodChapterVo : classPeriodChapterVos) {
+                    if (classPeriodChapterVo.getType() == 2) {
+                        chapterName = classPeriodChapterVo.getTypeName();
+                        List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodChapterVo.getId(), goodsId, classPeriodVo.getCourseId(), userId);
+                        classPeriodSectionVos.addAll(baseMapper.listperiodExam(classPeriodChapterVo.getId(), goodsId, classPeriodVo.getCourseId(), userId, classPeriodVo.getId()));
+                        for (ClassPeriodSectionVo classPeriodSectionVo : classPeriodSectionVos) {
+                            i++;
+                            if (classPeriodSectionVo.getType() == 3) {
+                                //节
+                                sectionName = classPeriodSectionVo.getTypeName();
+                                UserStudyRecordQueryBo recordQueryBo = new UserStudyRecordQueryBo();
+                                recordQueryBo.setSectionId(classPeriodSectionVo.getId());
+                                recordQueryBo.setCourseId(classPeriodSectionVo.getCourseId());
+                                recordQueryBo.setGoodsId(goodsId);
+                                recordQueryBo.setUserId(classPeriodSectionVo.getUserId());
+                                recordQueryBo.setChapterId(classPeriodChapterVo.getId());
+                                recordQueryBo.setModuleId(classPeriodVo.getId());
+                                recordQueryBo.setGradeId(gradeId);
+                                recordQueryBo.setSearchWeekStartTime(bo.getSearchWeekStartTime());
+                                recordQueryBo.setSearchWeekEndTime(bo.getSearchWeekEndTime());
+                                studyList.add(mergeDataV2(i, moduleName, chapterName, sectionName,classPeriodSectionVo, recordQueryBo));
+                            } else {
+                                //章卷
+                                sectionName = classPeriodSectionVo.getTypeName();
+                                classPeriodSectionVo.setModuleId(classPeriodVo.getId());
+                                classPeriodSectionVo.setChapterId(classPeriodChapterVo.getId());
+                                classPeriodSectionVo.setGoodsId(goodsId);
+                                classPeriodSectionVo.setGradeId(gradeId);
+                                classPeriodSectionVo.setUserId(classPeriodSectionVo.getUserId());
+                                classPeriodSectionVo.setSearchWeekStartTime(bo.getSearchWeekStartTime());
+                                classPeriodSectionVo.setSearchWeekEndTime(bo.getSearchWeekEndTime());
+                                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);
+                    recordQueryBo.setSearchWeekStartTime(bo.getSearchWeekStartTime());
+                    recordQueryBo.setSearchWeekEndTime(bo.getSearchWeekEndTime());
+                    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());
+                    classPeriodSectionVo.setSearchWeekStartTime(bo.getSearchWeekStartTime());
+                    classPeriodSectionVo.setSearchWeekEndTime(bo.getSearchWeekEndTime());
+                    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);
+                recordQueryBo.setSearchWeekStartTime(bo.getSearchWeekStartTime());
+                recordQueryBo.setSearchWeekEndTime(bo.getSearchWeekEndTime());
+
+                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 studyList;
+    }
+
     @Override
     @Override
     public List<ClassPeriodUserVo> listPeriod(ClassGradeUserQueryBo bo) {
     public List<ClassPeriodUserVo> listPeriod(ClassGradeUserQueryBo bo) {
         //班级学员信息
         //班级学员信息

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodSectionVo.java

@@ -177,6 +177,11 @@ public class ClassPeriodSectionVo implements Comparable<ClassPeriodSectionVo> {
 	private Long preEndTime;
 	private Long preEndTime;
 	@ApiModelProperty("做题类型  1测试 2考试")
 	@ApiModelProperty("做题类型  1测试 2考试")
 	private Integer doType;
 	private Integer doType;
+	@ApiModelProperty("周查询开始时间")
+	private Long searchWeekStartTime;
+
+	@ApiModelProperty("周查询结束时间")
+	private Long searchWeekEndTime;
 	@Override
 	@Override
 	public int compareTo(ClassPeriodSectionVo o) {
 	public int compareTo(ClassPeriodSectionVo o) {
 		return this.getSort() - o.getSort();
 		return this.getSort() - o.getSort();

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

@@ -81,5 +81,10 @@ public class UserBankRecordQueryBo extends BaseEntity {
 	/** 模拟做题试卷ID */
 	/** 模拟做题试卷ID */
 	@ApiModelProperty("模拟做题试卷ID")
 	@ApiModelProperty("模拟做题试卷ID")
 	private Long simulateExamId;
 	private Long simulateExamId;
+	@ApiModelProperty("周查询开始时间")
+	private Long searchWeekStartTime;
+
+	@ApiModelProperty("周查询结束时间")
+	private Long searchWeekEndTime;
 
 
 }
 }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserStudyRecordQueryBo.java

@@ -108,4 +108,9 @@ public class UserStudyRecordQueryBo extends BaseEntity {
 	/**  来源平台 1小程序 2网站 */
 	/**  来源平台 1小程序 2网站 */
 	@ApiModelProperty(" 来源平台 1小程序 2网站")
 	@ApiModelProperty(" 来源平台 1小程序 2网站")
 	private String fromPlat;
 	private String fromPlat;
+	@ApiModelProperty("周查询开始时间")
+	private Long searchWeekStartTime;
+
+	@ApiModelProperty("周查询结束时间")
+	private Long searchWeekEndTime;
 }
 }

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

@@ -12,6 +12,7 @@ import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ip.IpUtils;
 import com.zhongzheng.common.utils.ip.IpUtils;
 import com.zhongzheng.modules.bank.domain.ExamTemp;
 import com.zhongzheng.modules.bank.domain.ExamTemp;
 import com.zhongzheng.modules.bank.service.IExamTempService;
 import com.zhongzheng.modules.bank.service.IExamTempService;
+import com.zhongzheng.modules.distribution.domain.DistributionCashWithdrawal;
 import com.zhongzheng.modules.exam.domain.ExamPaper;
 import com.zhongzheng.modules.exam.domain.ExamPaper;
 import com.zhongzheng.modules.exam.service.IExamPaperService;
 import com.zhongzheng.modules.exam.service.IExamPaperService;
 import com.zhongzheng.modules.grade.domain.UserPeriod;
 import com.zhongzheng.modules.grade.domain.UserPeriod;
@@ -116,6 +117,7 @@ public class UserBankRecordServiceImpl extends ServiceImpl<UserBankRecordMapper,
         lqw.eq(bo.getPerformance() != null, UserBankRecord::getPerformance, bo.getPerformance());
         lqw.eq(bo.getPerformance() != null, UserBankRecord::getPerformance, bo.getPerformance());
         lqw.eq(bo.getGradeId() != null, UserBankRecord::getGradeId, bo.getGradeId());
         lqw.eq(bo.getGradeId() != null, UserBankRecord::getGradeId, bo.getGradeId());
         lqw.eq(bo.getCurrentStatus() != null, UserBankRecord::getCurrentStatus, bo.getCurrentStatus());
         lqw.eq(bo.getCurrentStatus() != null, UserBankRecord::getCurrentStatus, bo.getCurrentStatus());
+        lqw.between(bo.getSearchWeekStartTime()!= null, UserBankRecord::getUpdateTime,bo.getSearchWeekStartTime(),bo.getSearchWeekEndTime());
         return entity2Vo(this.list(lqw));
         return entity2Vo(this.list(lqw));
     }
     }
 
 

+ 6 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

@@ -1666,6 +1666,12 @@
           AND chapter_id = #{chapterId}
           AND chapter_id = #{chapterId}
           AND goods_id = #{goodsId}
           AND goods_id = #{goodsId}
           AND current_status = 1
           AND current_status = 1
+        <if test="searchWeekStartTime != null and searchWeekStartTime != '' ">
+            AND update_time >= #{searchWeekStartTime}
+        </if>
+        <if test="searchWeekEndTime != null and searchWeekEndTime != '' ">
+            AND #{searchWeekEndTime} >=  update_time
+        </if>
     </select>
     </select>
 
 
     <select id="getStudyRecord" parameterType="map" resultType="com.zhongzheng.modules.user.domain.UserStudyRecord">
     <select id="getStudyRecord" parameterType="map" resultType="com.zhongzheng.modules.user.domain.UserStudyRecord">