Bläddra i källkod

班级成绩查看导出

dzx 1 månad sedan
förälder
incheckning
f4deabe651
1 ändrade filer med 7 tillägg och 1 borttagningar
  1. 7 1
      src/main/resources/mapper/xycxedu/ExamSubjectScoreMappper.xml

+ 7 - 1
src/main/resources/mapper/xycxedu/ExamSubjectScoreMappper.xml

@@ -59,10 +59,16 @@
         INNER JOIN exam_plan t2 ON (t1.exam_plan_id = t2.id OR t2.milexamids LIKE CONCAT('%', t1.milexamid, '%'))
         INNER JOIN base_student_school_roll t3 ON t1.user_id = t3.user_id
         LEFT JOIN base_course_subject t4 ON t1.course_subject_id = t4.id
+        LEFT JOIN base_class t5 ON t3.class_id = t5.id
         WHERE t1.delete_mark = 0
         AND t1.semester_id = #{dto.semesterId}
         AND t2.id = #{dto.examPlanId}
-        AND t3.class_id = #{dto.treeId}
+        <if test="dto.treeId != null">
+            AND t3.class_id = #{dto.treeId}
+        </if>
+        <if test="dto.teacherId != null">
+            AND t5.teacher_id = #{dto.teacherId}
+        </if>
         <if test="dto.userIdList != null and dto.userIdList.size() > 0">
             AND t1.user_id in
             <foreach item="userId" index="index" collection="dto.userIdList" open="(" separator="," close=")">