wangliang hace 4 años
padre
commit
d7654b5e1d

+ 3 - 2
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/mapper/TBExamStudentMapper.java

@@ -46,9 +46,10 @@ public interface TBExamStudentMapper extends BaseMapper<TBExamStudent> {
      * @param schoolId
      * @param examId
      * @param courseCode
+     * @param inspectCollegeId
      * @return
      */
-    List<TBExamStudentResult> selectTeachList(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("courseCode") String courseCode);
+    List<TBExamStudentResult> selectTeachList(@Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("inspectCollegeId") Long inspectCollegeId);
 
     /**
      * 查询班级列表
@@ -108,7 +109,7 @@ public interface TBExamStudentMapper extends BaseMapper<TBExamStudent> {
      * @param absent
      * @return
      */
-    IPage<TBStudentReportResult> reportList(IPage<Map> iPage, @Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("collegeId") Long collegeId, @Param("courseCode") String courseCode, @Param("clazzId") Long clazzId, @Param("absent") Boolean absent,@Param("studentCode") String studentCode);
+    IPage<TBStudentReportResult> reportList(IPage<Map> iPage, @Param("schoolId") Long schoolId, @Param("examId") Long examId, @Param("collegeId") Long collegeId, @Param("courseCode") String courseCode, @Param("clazzId") Long clazzId, @Param("absent") Boolean absent, @Param("studentCode") String studentCode);
 
     List<ExamInfo> listExamBySchoolIdAndStudentCode(@Param("schoolId") Long schoolId, @Param("studentCode") String studentCode);
 

+ 5 - 2
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/TBExamStudentService.java

@@ -47,9 +47,10 @@ public interface TBExamStudentService extends IService<TBExamStudent> {
      * @param schoolId
      * @param examId
      * @param courseCode
+     * @param inspectCollegeId
      * @return
      */
-    List<TBExamStudentResult> selectTeachList(Long schoolId, Long examId, String courseCode);
+    List<TBExamStudentResult> selectTeachList(Long schoolId, Long examId, String courseCode, Long inspectCollegeId);
 
     /**
      * 查询班级列表
@@ -144,10 +145,11 @@ public interface TBExamStudentService extends IService<TBExamStudent> {
      * @param absent
      * @return
      */
-    IPage<TBStudentReportResult> reportList(IPage<Map> iPage, Long schoolId, Long examId, Long collegeId, String courseCode, Long clazzId, Boolean absent,String studentCode);
+    IPage<TBStudentReportResult> reportList(IPage<Map> iPage, Long schoolId, Long examId, Long collegeId, String courseCode, Long clazzId, Boolean absent, String studentCode);
 
     /**
      * 学生报告-个人成绩总览接口
+     *
      * @param schoolId
      * @param studentCode
      * @return
@@ -156,6 +158,7 @@ public interface TBExamStudentService extends IService<TBExamStudent> {
 
     /**
      * 学生报告接口
+     *
      * @param schoolId
      * @param studentCode
      * @param examId

+ 3 - 2
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/service/impl/TBExamStudentServiceImpl.java

@@ -108,11 +108,12 @@ public class TBExamStudentServiceImpl extends ServiceImpl<TBExamStudentMapper, T
      * @param schoolId
      * @param examId
      * @param courseCode
+     * @param inspectCollegeId
      * @return
      */
     @Override
-    public List<TBExamStudentResult> selectTeachList(Long schoolId, Long examId, String courseCode) {
-        return tbExamStudentMapper.selectTeachList(schoolId, examId, courseCode);
+    public List<TBExamStudentResult> selectTeachList(Long schoolId, Long examId, String courseCode, Long inspectCollegeId) {
+        return tbExamStudentMapper.selectTeachList(schoolId, examId, courseCode, inspectCollegeId);
     }
 
     /**

+ 3 - 0
teachcloud-report-business/src/main/resources/mapper/TBExamStudentMapper.xml

@@ -54,6 +54,9 @@
         su.id = tbes.teacher_id
         <where>
             <include refid="conditionSql"/>
+            <if test="inspectCollegeId != null and inspectCollegeId != ''">
+                and tbes.inspect_college_id = #{inspectCollegeId}
+            </if>
         </where>
     </select>
 

+ 3 - 2
teachcloud-report/src/main/java/com/qmth/teachcloud/report/api/SysReportController.java

@@ -107,8 +107,9 @@ public class SysReportController {
     @ApiResponses({@ApiResponse(code = 200, message = "考生信息", response = TBExamStudentResult.class)})
     public Result listTeacher(@ApiParam(value = "学校id", required = true) @RequestParam String schoolId,
                               @ApiParam(value = "考试id", required = true) @RequestParam String examId,
-                              @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode) {
-        return ResultUtil.ok(tbExamStudentService.selectTeachList(SystemConstant.convertIdToLong(schoolId), SystemConstant.convertIdToLong(examId), courseCode));
+                              @ApiParam(value = "科目编码", required = true) @RequestParam String courseCode,
+                              @ApiParam(value = "考查学院id", required = false) @RequestParam(required = false) String inspectCollegeId) {
+        return ResultUtil.ok(tbExamStudentService.selectTeachList(SystemConstant.convertIdToLong(schoolId), SystemConstant.convertIdToLong(examId), courseCode, Objects.nonNull(inspectCollegeId) ? SystemConstant.convertIdToLong(inspectCollegeId) : null));
     }
 
     @ApiOperation(value = "班级列表")