he2802 2 rokov pred
rodič
commit
dc0a263671

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

@@ -133,6 +133,9 @@ public class ClassPeriodChapterVo implements Comparable<ClassPeriodChapterVo> {
 	@ApiModelProperty("审核人")
 	private String auditUserName;
 
+	@ApiModelProperty("做题类型  1测试 2考试")
+	private Integer doType;
+
 	@Override
 	public int compareTo(ClassPeriodChapterVo o) {
 		return this.getSort() - o.getSort();

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

@@ -175,6 +175,8 @@ public class ClassPeriodSectionVo implements Comparable<ClassPeriodSectionVo> {
 	private Long preStartTime;
 	@ApiModelProperty("上一次结束")
 	private Long preEndTime;
+	@ApiModelProperty("做题类型  1测试 2考试")
+	private Integer doType;
 	@Override
 	public int compareTo(ClassPeriodSectionVo o) {
 		return this.getSort() - o.getSort();

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

@@ -211,6 +211,10 @@ public class ClassPeriodVo implements Comparable<ClassPeriodVo> {
 	private Long examId;
 	@ApiModelProperty("题卷类型 1章卷 2节卷 3模块卷")
 	private Integer examType;
+	/** 做卷类型  1测试 2考试 */
+	@Excel(name = "做卷类型  1测试 2考试")
+	@ApiModelProperty("做题类型  1测试 2考试")
+	private Integer doType;
 	@Override
 	public int compareTo(ClassPeriodVo o) {
 		if(o.getCourseSort()==this.getCourseSort()){

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -744,6 +744,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                         ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
                         classSectionVo.setType(4L);
                         classSectionVo.setExamId(sectionVo.getId());
+                        classSectionVo.setDoType(sectionVo.getDoType());
                         sectionList.add(classSectionVo);
                     }
                 }
@@ -752,6 +753,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                     ClassPeriodVo classSectionVo = BeanUtil.toBean(chapterVo,ClassPeriodVo.class);
                     classSectionVo.setType(5L);
                     classSectionVo.setExamId(chapterVo.getId());
+                    classSectionVo.setDoType(chapterVo.getDoType());
                     sectionList.add(classSectionVo);
                 }
             }
@@ -774,6 +776,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                     ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
                     classSectionVo.setType(4L);
                     classSectionVo.setExamId(sectionVo.getId());
+                    classSectionVo.setDoType(sectionVo.getDoType());
                     sectionList.add(classSectionVo);
                 }
 
@@ -849,6 +852,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                             ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
                             classSectionVo.setType(4L);
                             classSectionVo.setExamId(sectionVo.getId());
+                            classSectionVo.setDoType(sectionVo.getDoType());
                             sectionList.add(classSectionVo);
                         }
                     }
@@ -857,6 +861,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                         ClassPeriodVo classSectionVo = BeanUtil.toBean(chapterVo,ClassPeriodVo.class);
                         classSectionVo.setType(5L);
                         classSectionVo.setExamId(chapterVo.getId());
+                        classSectionVo.setDoType(chapterVo.getDoType());
                         sectionList.add(classSectionVo);
                     }
                 }
@@ -879,6 +884,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                         ClassPeriodVo classSectionVo = BeanUtil.toBean(sectionVo,ClassPeriodVo.class);
                         classSectionVo.setType(4L);
                         classSectionVo.setExamId(sectionVo.getId());
+                        classSectionVo.setDoType(sectionVo.getDoType());
                         sectionList.add(classSectionVo);
                     }
 

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

@@ -198,6 +198,7 @@
         <result property="studyEndTime" column="study_end_time"/>
         <result property="performance" column="performance"/>
         <result property="sort" column="sort"/>
+        <result property="doType" column="do_type"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodSectionVo" id="ClassPeriodSectionVo">
@@ -220,6 +221,7 @@
         <result property="realLiveEndTime" column="real_live_end_time"/>
         <result property="realDuration" column="real_duration"/>
         <result property="recordingUrl" column="recording_url"/>
+        <result property="doType" column="do_type"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.course.vo.CourseChapterVo" id="CourseChapterResultVo">
@@ -1022,16 +1024,14 @@
         SELECT
         cme.exam_id as id,
         cme.course_id,
-
+        e.do_type,
         <if test="userId != null and userId !='' ">
             (SELECT u.realname FROM `user` u where 1=1
             and u.user_id = #{userId}
             ) as realname,
         </if>
         <if test="userId != null and userId !='' ">
-            (SELECT u.user_id FROM `user` u where 1=1
-            and u.user_id = #{userId}
-            ) as user_id,
+            #{userId} as user_id,
         </if>
 
         (SELECT e.exam_name FROM exam e where cme.exam_id = e.exam_id) as type_name,
@@ -1057,16 +1057,16 @@
         SELECT
         cme.exam_id as id,
         cme.course_id,
-        (SELECT u.realname FROM `user` u where 1=1
+        e.do_type,
         <if test="userId != null and userId !='' ">
+            (SELECT u.realname FROM `user` u where 1=1
             and u.user_id = #{userId}
+            ) as realname,
         </if>
-        ) as realname,
-        (SELECT u.user_id FROM `user` u where 1=1
+
         <if test="userId != null and userId !='' ">
-            and u.user_id = #{userId}
+            #{userId} as user_id,
         </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