change пре 3 година
родитељ
комит
8c61c08fc0

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

@@ -90,14 +90,14 @@ public class ClassGradeController extends BaseController {
     /**
      * 查询学时学员记录列表
      */
-/*    @ApiOperation("查询学员记录列表")
+    @ApiOperation("查询学员记录列表")
     @PreAuthorize("@ss.hasPermi('grade:user:list')")
     @GetMapping("/listUserPeriod")
     public TableDataInfo<ClassGradeUserVo> listUserPeriod(ClassGradeUserQueryBo bo) {
         startPage();
         List<ClassGradeUserVo> list = iClassGradeUserService.listUserPeriod(bo);
         return getDataTable(list);
-    }*/
+    }
 
 
 

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

@@ -52,4 +52,6 @@ public interface IClassGradeUserService extends IService<ClassGradeUser> {
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
 
     List<ClassGradeUserGoodsVo> listUser(ClassGradeUserQueryBo bo);
+
+	List<ClassGradeUserVo> listUserPeriod(ClassGradeUserQueryBo bo);
 }

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

@@ -100,4 +100,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     public List<ClassGradeUserGoodsVo> listUser(ClassGradeUserQueryBo bo) {
         return baseMapper.listUser(bo);
     }
+
+    @Override
+    public List<ClassGradeUserVo> listUserPeriod(ClassGradeUserQueryBo bo) {
+        return null;
+    }
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserStudyRecordMapper.java

@@ -33,4 +33,6 @@ public interface UserStudyRecordMapper extends BaseMapper<UserStudyRecord> {
     List<ExamStudyRecordVo> querExamStudy(UserQueryBo bo);
 
     List<ExamSonStudyRecordVo> listExamSon(SubjectStudyRecordQueryBo bo);
+
+    List<String> examTypes(Long id);
 }

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

@@ -199,6 +199,16 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
             subjectStudyRecordQueryBo.setUserId(examStudyRecordVo.getUserId());
             subjectStudyRecordQueryBo.setGoodsId(examStudyRecordVo.getGoodsId());
             List<ExamSonStudyRecordVo> examSonStudyRecordVos = baseMapper.listExamSon(subjectStudyRecordQueryBo);
+            for (ExamSonStudyRecordVo examSonStudyRecordVo : examSonStudyRecordVos) {
+                List<String> examTypes = baseMapper.examTypes(examSonStudyRecordVo.getQuestionId());
+                String s = "";
+                for (String examType : examTypes) {
+                    if (StringUtils.isNotBlank(examType)) {
+                        s= s.concat(examType + ",");
+                    }
+                }
+                examSonStudyRecordVo.setExamType(s.substring(0, s.length() - 1));
+            }
             examStudyRecordVo.setExamSonStudyRecordVos(examSonStudyRecordVos);
         }
         return examStudyRecordVos;

+ 12 - 0
zhongzheng-system/src/main/resources/mapper/modules/bank/ExamMapper.xml

@@ -78,6 +78,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="businessId != null and businessId != ''">
             AND qb.business_id = #{businessId}
         </if>
+     <if test="projectId != null and projectId != ''">
+            AND cpt.project_id = #{projectId}
+        </if>
+        <if test="examPaperId != null and examPaperId != ''">
+            AND e.exam_paper_id = #{examPaperId}
+        </if>
+        <if test="publishStatus != null and publishStatus != ''">
+            AND e.publish_status = #{publishStatus}
+        </if>
+        <if test="examName != null and examName != ''">
+            AND e.exam_name = #{exam_name}
+        </if>
         ORDER BY e.exam_id DESC
     </select>
 </mapper>

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

@@ -391,4 +391,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
 
     </select>
+
+    <select id="examTypes" parameterType="Long" resultType="String">
+        SELECT
+            ( SELECT DISTINCT ep.paper_name FROM exam_paper ep WHERE ep.paper_id = e.exam_paper_id ) AS paper_name
+        FROM
+            goods_attached a
+                LEFT JOIN exam e ON a.major_id = e.exam_id
+        WHERE
+            a.type = 3
+        <if test="id != null and id !=''">
+            and a.id =#{id}
+        </if>
+        UNION
+        SELECT
+            ( SELECT DISTINCT ep.paper_name FROM exam_paper ep WHERE ep.paper_id = e.exam_paper_id ) AS paper_name
+        FROM
+            goods_attached a
+                LEFT JOIN question_chapter c ON a.major_id = c.chapter_exam_id
+                LEFT JOIN question_chapter_exam qce ON qce.chapter_exam_id = c.chapter_exam_id
+                LEFT JOIN exam e ON e.exam_id = qce.exam_id
+        WHERE
+            a.type = 2
+        <if test="id != null and id !=''">
+            and a.id =#{id}
+        </if>
+        UNION
+        SELECT
+            ( SELECT DISTINCT ep.paper_name FROM exam_paper ep WHERE ep.paper_id = e.exam_paper_id ) AS paper_name
+        FROM
+            goods_attached a
+                LEFT JOIN question_module c ON a.major_id = c.module_exam_id
+                LEFT JOIN question_module_chapter qmc ON c.module_exam_id = qmc.module_exam_id
+                LEFT JOIN question_chapter qc ON qmc.chapter_exam_id = qc.chapter_exam_id
+                LEFT JOIN question_chapter_exam qce ON qce.chapter_exam_id = qc.chapter_exam_id
+                LEFT JOIN exam e ON e.exam_id = qce.exam_id
+        WHERE
+            a.type = 1
+        <if test="id != null and id !=''">
+            and a.id =#{id}
+        </if>
+    </select>
 </mapper>