|  | @@ -12,7 +12,7 @@
 | 
	
		
			
				|  |  |  		<result column="exam_registration_id_" property="examRegistrationId" />
 | 
	
		
			
				|  |  |  		<result column="exam_room_id_" property="examRoomId" />
 | 
	
		
			
				|  |  |  		<result column="student_id_" property="studentId" />
 | 
	
		
			
				|  |  | -		<result column="classroom_switch_" property="classroomSwitch" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler"/>
 | 
	
		
			
				|  |  | +		<result column="classroom_switch_" property="classroomSwitch"/>
 | 
	
		
			
				|  |  |  		<result column="sign_in_time_" property="signInTime" />
 | 
	
		
			
				|  |  |  		<result column="create_time_" property="createTime" />
 | 
	
		
			
				|  |  |  		<result column="update_time_" property="updateTime" />
 | 
	
	
		
			
				|  | @@ -67,7 +67,7 @@
 | 
	
		
			
				|  |  |  				exam_registration_id_ = #{examRegistrationId},
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  			<if test="classroomSwitch != null">
 | 
	
		
			
				|  |  | -				classroom_switch_ = #{classroomSwitch,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
 | 
	
		
			
				|  |  | +				classroom_switch_ = #{classroomSwitch},
 | 
	
		
			
				|  |  |  			</if>
 | 
	
		
			
				|  |  |  			<if test="tenantId != null and tenantId != 0">
 | 
	
		
			
				|  |  |  				tenant_id_ = #{tenantId},
 | 
	
	
		
			
				|  | @@ -169,7 +169,8 @@
 | 
	
		
			
				|  |  |  	</select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	<select id="findStudentsWithExamRoom" resultMap="ExamRoomStudentRelation">
 | 
	
		
			
				|  |  | -		SELECT id_, exam_registration_id_, examination_basic_id_, exam_room_id_, student_id_ FROM exam_room_student_relation WHERE exam_room_id_=#{examRoomId}
 | 
	
		
			
				|  |  | +		SELECT id_, exam_registration_id_, examination_basic_id_, exam_room_id_, student_id_
 | 
	
		
			
				|  |  | +		FROM exam_room_student_relation WHERE exam_room_id_=#{examRoomId}
 | 
	
		
			
				|  |  |  	</select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	<select id="findStudentsWithExamRooms" resultMap="ExamRoomStudentRelation">
 | 
	
	
		
			
				|  | @@ -204,16 +205,18 @@
 | 
	
		
			
				|  |  |  		<result property="level" column="level_"/>
 | 
	
		
			
				|  |  |  		<result property="realName" column="real_name_"/>
 | 
	
		
			
				|  |  |  		<result property="examRoomId" column="exam_room_id_"/>
 | 
	
		
			
				|  |  | +		<result property="signInTime" column="sign_in_time_"/>
 | 
	
		
			
				|  |  |  		<result property="examRoomStudentRelationId" column="exam_room_student_relation_id_"/>
 | 
	
		
			
				|  |  |  	</resultMap>
 | 
	
		
			
				|  |  |  	<select id="queryStudentList" resultMap="RoomStudentListDtoMap">
 | 
	
		
			
				|  |  | -		SELECT ersr.id_ exam_room_student_relation_id_,ersr.exam_registration_id_,su.real_name_,
 | 
	
		
			
				|  |  | +		SELECT ersr.id_ exam_room_student_relation_id_,ersr.exam_registration_id_,su.real_name_,ersr.sign_in_time_,
 | 
	
		
			
				|  |  |  		s.name_ subject_name_,ec.level_,ersr.exam_room_id_,ersr.student_id_ FROM exam_room_student_relation ersr
 | 
	
		
			
				|  |  |  		LEFT JOIN exam_certification ec ON ec.exam_registration_id_ = ersr.exam_registration_id_
 | 
	
		
			
				|  |  |  		LEFT JOIN `subject` s ON s.id_ = ec.subject_id_
 | 
	
		
			
				|  |  |  		LEFT JOIN sys_user su ON ersr.student_id_ = su.id_
 | 
	
		
			
				|  |  |  		LEFT JOIN student_exam_result ser ON ser.exam_registration_id_ = ersr.exam_registration_id_
 | 
	
		
			
				|  |  |  		WHERE ersr.exam_room_id_ = #{roomId} AND ser.is_finished_exam_ = 0
 | 
	
		
			
				|  |  | +		ORDER BY ersr.sign_in_time_ IS NULL,ersr.sign_in_time_ ASC
 | 
	
		
			
				|  |  |  	</select>
 | 
	
		
			
				|  |  |      <select id="querySignTotalNum" resultType="java.lang.Integer">
 | 
	
		
			
				|  |  |  		SELECT COUNT(ersr.id_) FROM exam_room_student_relation ersr
 | 
	
	
		
			
				|  | @@ -241,6 +244,11 @@
 | 
	
		
			
				|  |  |      <select id="getStudentIds" resultType="java.lang.String">
 | 
	
		
			
				|  |  |  		SELECT GROUP_CONCAT(DISTINCT student_id_) FROM exam_room_student_relation WHERE exam_room_id_ = #{examRoomId}
 | 
	
		
			
				|  |  |  	</select>
 | 
	
		
			
				|  |  | +	<select id="getStuRegistrationMap" resultType="java.util.Map">
 | 
	
		
			
				|  |  | +		SELECT student_id_ 'key',GROUP_CONCAT(exam_registration_id_) 'value' FROM exam_room_student_relation
 | 
	
		
			
				|  |  | +		WHERE exam_room_id_ = #{examRoomId}
 | 
	
		
			
				|  |  | +		GROUP BY student_id_
 | 
	
		
			
				|  |  | +	</select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="getNoSendExamPlanRooms" resultMap="ExamRoomStudentRelation">
 | 
	
		
			
				|  |  |  		SELECT
 |