wangliang 4 vuotta sitten
vanhempi
commit
e3e38d30d9

+ 20 - 13
themis-business/src/main/java/com/qmth/themis/business/dao/TEExamStudentMapper.java

@@ -1,16 +1,16 @@
 package com.qmth.themis.business.dao;
 
-import java.util.List;
-import java.util.Map;
-
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.qmth.themis.business.bean.backend.ExamViewCountListBean;
+import com.qmth.themis.business.dto.response.RoomCodeQueryDto;
 import com.qmth.themis.business.dto.response.TEExamStudentDto;
 import com.qmth.themis.business.entity.TEExamStudent;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 考生库 Mapper 接口
@@ -45,11 +45,18 @@ public interface TEExamStudentMapper extends BaseMapper<TEExamStudent> {
     public List<Map<String, Object>> getTotalCount(@Param("examId") Long examId, @Param("activityId") Long activityId,
                                                    @Param("roomCode") String roomCode, @Param("courseCode") String courseCode);
 
-	public IPage<ExamViewCountListBean> getTotalCountInfo(IPage<Map> iPage,@Param("examId") Long examId, @Param("activityId") Long activityId,
-                                                   @Param("roomCode") String roomCode, @Param("courseCode") String courseCode);
-	
-	public List<Map<String,Object>> getDoneCountByActivityIds(@Param("examId") Long examId,@Param("activityIds") List<Long> activityIds);
-	
-	public List<Map<String,Object>> getAbsentCountByActivityIds(@Param("examId") Long examId,@Param("activityIds") List<Long> activityIds);
-	
+    public IPage<ExamViewCountListBean> getTotalCountInfo(IPage<Map> iPage, @Param("examId") Long examId, @Param("activityId") Long activityId,
+                                                          @Param("roomCode") String roomCode, @Param("courseCode") String courseCode);
+
+    public List<Map<String, Object>> getDoneCountByActivityIds(@Param("examId") Long examId, @Param("activityIds") List<Long> activityIds);
+
+    public List<Map<String, Object>> getAbsentCountByActivityIds(@Param("examId") Long examId, @Param("activityIds") List<Long> activityIds);
+
+    /**
+     * 考场查询
+     *
+     * @param roomName
+     * @return
+     */
+    public List<RoomCodeQueryDto> examRoomQuery(@Param("roomName") String roomName);
 }

+ 14 - 1
themis-business/src/main/resources/mapper/TEExamStudentMapper.xml

@@ -110,5 +110,18 @@
         </if>
         group by t.exam_activity_id, t.room_code
     </select>
-    
+
+    <select id="examRoomQuery" resultType="com.qmth.themis.business.dto.response.RoomCodeQueryDto">
+        select
+        DISTINCT
+        tees.room_code as roomCode,
+        tees.room_name as roomName
+        from
+        t_e_exam_student tees
+        <where>
+            <if test="roomName != null and roomName != ''">
+                and tees.room_name like concat('%', #{roomName}, '%')
+            </if>
+        </where>
+    </select>
 </mapper>