فهرست منبع

fix 学时模块卷

he2802 3 سال پیش
والد
کامیت
993c51efe0

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/mapper/ClassGradeUserMapper.java

@@ -46,6 +46,8 @@ public interface ClassGradeUserMapper extends BaseMapper<ClassGradeUser> {
 
     List<ClassPeriodSectionVo> listperiodExam(@Param("chapterId") Long id,@Param("goodsId") Long goodsId,@Param("courseId") Long courseId,@Param("userId") Long userId,@Param("moduleId") Long moduleId);
 
+    List<ClassPeriodChapterVo> listperiodModuleExam(@Param("goodsId") Long goodsId,@Param("courseId") Long courseId,@Param("userId") Long userId,@Param("moduleId") Long moduleId);
+
     List<ClassPeriodSectionVo> listPeriodSectionExam(@Param("chapterId") Long id,@Param("goodsId") Long goodsId,@Param("courseId") Long courseId,@Param("userId") Long userId);
 
     List<Long> selectStart(@Param("userId") Long userId,@Param("goodsId") Long goodsId,@Param("gradeId") Long gradeId);

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

@@ -1569,6 +1569,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             if (classPeriodVo.getType() == 1) {
                 List<ClassPeriodChapterVo> classPeriodChapterVos = baseMapper.listperiodChapter(classPeriodVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), bo.getGradeId());
                 Collections.sort(classPeriodChapterVos);
+                classPeriodChapterVos.addAll(baseMapper.listperiodModuleExam( bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId(), classPeriodVo.getId()));
                 for (ClassPeriodChapterVo classPeriodChapterVo : classPeriodChapterVos) {
                     if (classPeriodChapterVo.getType() == 2) {
                         List<ClassPeriodSectionVo> classPeriodSectionVos = baseMapper.listPeriodSection(classPeriodChapterVo.getId(), bo.getGoodsId(), classPeriodVo.getCourseId(), bo.getUserId());
@@ -1616,6 +1617,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                 userPeriodQueryBo.setChapterId(classPeriodChapterVo.getId());
                                 userPeriodQueryBo.setModuleId(classPeriodVo.getId());
                                 userPeriodQueryBo.setGradeId(bo.getGradeId());
+                                userPeriodQueryBo.setType(2);
                                 List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
                                 if (!CollectionUtils.isEmpty(userPeriodStatusVos)) {
                                     int numIndex = userPeriodStatusVos.size() - 1;
@@ -1644,6 +1646,36 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
 
                         classPeriodChapterVo.setClassPeriodSectionList(classPeriodSectionVos);
                     }
+                    else if (classPeriodChapterVo.getType() == 5) {
+                        UserPeriodQueryBo userPeriodQueryBo = new UserPeriodQueryBo();
+                        userPeriodQueryBo.setExamId(classPeriodChapterVo.getId());
+                        userPeriodQueryBo.setCourseId(classPeriodChapterVo.getCourseId());
+                        userPeriodQueryBo.setGoodsId(bo.getGoodsId());
+                        userPeriodQueryBo.setUserId(classPeriodChapterVo.getUserId());
+                        userPeriodQueryBo.setModuleId(classPeriodVo.getId());
+                        userPeriodQueryBo.setGradeId(bo.getGradeId());
+                        userPeriodQueryBo.setType(3);
+                        List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
+                        if (!CollectionUtils.isEmpty(userPeriodStatusVos)) {
+                            int numIndex = userPeriodStatusVos.size() - 1;
+                            UserPeriodStatusVo userPeriodStatusVo = userPeriodStatusVos.get(numIndex);
+                            LambdaQueryWrapper<UserStudyRecordPhoto> lqw = Wrappers.lambdaQuery();
+                            lqw.eq(UserStudyRecordPhoto::getPeriodId, userPeriodStatusVo.getId());
+                            classPeriodChapterVo.setUserStudyRecordPhotoList(entity2PhotoVo(userStudyRecordPhotoService.list(lqw)));
+                            classPeriodChapterVo.setNumIndex(Convert.toLong(userPeriodStatusVos.size()));
+                            classPeriodChapterVo.setStatus(userPeriodStatusVo.getStatus());
+                            classPeriodChapterVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
+                            classPeriodChapterVo.setStudyEndTime(userPeriodStatusVo.getRecordEndTime());
+                            classPeriodChapterVo.setStudyStartTime(userPeriodStatusVo.getRecordStartTime());
+                            classPeriodChapterVo.setPeriodStatus(userPeriodStatusVo.getPeriodStatus());
+                            classPeriodChapterVo.setPeriodId(userPeriodStatusVo.getPeriodId());
+                            classPeriodChapterVo.setAuditTime(userPeriodStatusVo.getAuditTime());
+                            classPeriodChapterVo.setAuditUserName(userPeriodStatusVo.getAuditUserName());
+                            classPeriodChapterVo.setPeriodStatusId(userPeriodStatusVo.getId());
+                            classPeriodChapterVo.setPerformance(Convert.toBigDecimal(userPeriodStatusVo.getPerformance()));
+                        }
+
+                    }
                 }
                 classPeriodVo.setClassPeriods(classPeriodChapterVos);
             }

+ 40 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodChapterVo.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.grade.vo;
 
 import com.zhongzheng.common.annotation.Excel;
+import com.zhongzheng.modules.user.vo.UserStudyRecordPhotoVo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -64,7 +65,7 @@ public class ClassPeriodChapterVo implements Comparable<ClassPeriodChapterVo> {
 	/** 审核状态 */
 	@Excel(name = "审核状态")
 	@ApiModelProperty("审核状态 1通过 0作弊")
-	private String status;
+	private Integer status;
 
 	/** 分数 */
 	@Excel(name = "分数")
@@ -78,8 +79,8 @@ public class ClassPeriodChapterVo implements Comparable<ClassPeriodChapterVo> {
 
 
 	/** 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;
 
 	/** 章下面得节 */
@@ -95,6 +96,42 @@ public class ClassPeriodChapterVo implements Comparable<ClassPeriodChapterVo> {
 	@ApiModelProperty("排序")
 	private Integer sort;
 
+	/** 审核时间 */
+	@Excel(name = "审核照片")
+	@ApiModelProperty("审核照片")
+	private List<UserStudyRecordPhotoVo> userStudyRecordPhotoList;
+
+	/** 當前位置 */
+	@Excel(name = "當前位置")
+	@ApiModelProperty("當前位置")
+	private Long numIndex;
+
+	/** 审核时间 */
+	@Excel(name = "共有多少條")
+	@ApiModelProperty("共有多少條")
+	private Long numList;
+
+	/** 当前节状态 1 当前状态 0过往状态 */
+	/** 审核时间 */
+	@Excel(name = "当前节状态 1 当前状态 0过往状态")
+	@ApiModelProperty("当前节状态 1 当前状态 0过往状态")
+	private Integer periodStatus;
+
+
+	/** 当前节状态 1 当前状态 0过往状态 */
+	/** 审核时间 */
+	@Excel(name = "當前審核ID")
+	@ApiModelProperty("當前審核ID")
+	private Long periodId;
+
+	/** 当前节状态 1 当前状态 0过往状态 */
+	/** 审核时间 */
+	@Excel(name = "當前審核状态ID")
+	@ApiModelProperty("當前審核状态ID")
+	private Long periodStatusId;
+
+	@ApiModelProperty("审核人")
+	private String auditUserName;
 
 	@Override
 	public int compareTo(ClassPeriodChapterVo o) {

+ 29 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -983,6 +983,35 @@
         </if>
     </select>
 
+    <select id="listperiodModuleExam" parameterType="map" resultMap="ClassPeriodChapterVo">
+        SELECT
+        cme.exam_id as id,
+        cme.course_id,
+        (SELECT u.realname FROM `user` u where 1=1
+        <if test="userId != null and userId !='' ">
+            and u.user_id = #{userId}
+        </if>
+        ) as realname,
+        (SELECT u.user_id FROM `user` u where 1=1
+        <if test="userId != null and userId !='' ">
+            and u.user_id = #{userId}
+        </if>
+        ) as user_id,
+        (SELECT e.exam_name FROM exam e where cme.exam_id = e.exam_id) as type_name,
+        null as class_hours,
+        5 as type
+        FROM
+        course_menu_exam cme
+        LEFT JOIN exam e ON cme.exam_id = e.exam_id
+        WHERE 1=1
+        AND  cme.type=3
+        <if test="courseId != null and courseId !='' ">
+            AND  cme.course_id=#{courseId}
+        </if>
+        <if test="moduleId != null and moduleId !='' ">
+            AND cme.module_id =#{moduleId}
+        </if>
+    </select>
 
     <select id="listPeriodSection" parameterType="map" resultMap="ClassPeriodSectionVo">
         SELECT

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/grade/UserPeriodStatusMapper.xml

@@ -77,6 +77,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="examId != null ">
             and up.exam_id = #{examId}
         </if>
+        <if test="type != null ">
+            and up.`type` = #{type}
+        </if>
         ORDER BY
             ups.create_time asc
     </select>