wangliang 4 gadi atpakaļ
vecāks
revīzija
a6e77abe49

+ 2 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBExamCourseMapper.java

@@ -24,8 +24,9 @@ public interface TBExamCourseMapper extends BaseMapper<TBExamCourse> {
      * @param schoolId
      * @param examId
      * @param inspect
+     * @param collegeId
      * @return
      */
-    List<TBExamCourseResult> findCourseList(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("inspect") boolean inspect);
+    List<TBExamCourseResult> findCourseList(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("inspect") boolean inspect, @Param("collegeId") Long collegeId);
 
 }

+ 0 - 3
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TAExamCourseServiceImpl.java

@@ -164,9 +164,6 @@ public class TAExamCourseServiceImpl extends ServiceImpl<TAExamCourseMapper, TAE
         if (Objects.isNull(sysUser)) {
             throw ExceptionResultEnum.NOT_LOGIN.exception();
         }
-        // 开课课程考试概况
-        ExamCourseResult examCourseResult = taExamCourseService.getOverview(semester,examId,courseCode);
-
         //取总体和应届平均分
         SurveyTeacherExamCourseResult surveyTeacherExamCourseResult = reportCommonService.findAvgScore(schoolId, courseCode, examId);
 

+ 4 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamCourseServiceImpl.java

@@ -3,8 +3,10 @@ package com.qmth.teachcloud.report.business.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.qmth.teachcloud.common.entity.BasicCourse;
+import com.qmth.teachcloud.common.entity.SysUser;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import com.qmth.teachcloud.common.service.BasicCourseService;
+import com.qmth.teachcloud.common.util.ServletUtil;
 import com.qmth.teachcloud.report.business.bean.result.TBExamCourseResult;
 import com.qmth.teachcloud.report.business.entity.TBExamCourse;
 import com.qmth.teachcloud.report.business.enums.PublishStatusEnum;
@@ -101,6 +103,7 @@ public class TBExamCourseServiceImpl extends ServiceImpl<TBExamCourseMapper, TBE
      */
     @Override
     public List<TBExamCourseResult> findCourseList(Long schoolId, Long examId, boolean inspect) {
-        return tbExamCourseMapper.findCourseList(schoolId, examId, inspect);
+        SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
+        return tbExamCourseMapper.findCourseList(schoolId, examId, inspect, sysUser.getOrgId());
     }
 }

+ 10 - 0
teachcloud-report-business/src/main/resources/mapper/TBExamCourseMapper.xml

@@ -22,6 +22,16 @@
             <if test="schoolId != null and schoolId != ''">
                 and bc.school_id = #{schoolId}
             </if>
+            <if test="collegeId != null and collegeId != ''">
+                <choose>
+                    <when test="inspect != null and inspect == true">
+                        and tbs.inspect_college_id = #{collegeId}
+                    </when>
+                    <otherwise>
+                        and tbs.teach_college_id = #{collegeId}
+                    </otherwise>
+                </choose>
+            </if>
         </where>
     </select>
 </mapper>