wangliang před 4 roky
rodič
revize
e5fa79e706

+ 4 - 2
teachcloud-report-business/src/main/resources/mapper/TBExamCourseMapper.xml

@@ -10,13 +10,13 @@
         <choose>
             <when test="inspect != null and inspect == true">
                 so.id = tbs.inspect_college_id and tbs.absent = 0
+                join t_b_exam_course tbec on
+                    tbec.course_code = bc.code
             </when>
             <otherwise>
                 so.id = tbs.teach_college_id
             </otherwise>
         </choose>
-        join t_b_exam_course tbec on
-            tbec.course_code = bc.code
         <where>
             <if test="examId != null and examId != ''">
                 and tbs.exam_id = #{examId}
@@ -37,7 +37,9 @@
                     #{collegeId}
                 </foreach>
             </if>
+            <if test="inspect != null and inspect == true">
                 and tbec.publish_status = 'PUBLISH'
+            </if>
         </where>
     </select>