| 
					
				 | 
			
			
				@@ -10,7 +10,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="id_" property="id" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="examination_basic_id_" property="examinationBasicId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="exam_registration_id_" property="examRegistrationId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result column="exam_room_id_" property="examRoomId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="teacher_id_" property="teacherId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result column="teacher_type_" property="teacherType"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="student_id_" property="studentId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="evaluation_content_" property="evaluationContent" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="evaluation_result_" property="evaluationResult"/> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -18,10 +20,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="update_time_" property="updateTime" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="tenant_id_" property="tenantId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<result column="enable_edit_" property="enableEdit" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		<association property="examinationBasic" javaType="com.keao.edu.user.entity.ExaminationBasic"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<association property="examinationBasic" column="exam_" resultMap="com.keao.edu.user.dao.ExaminationBasicDao.ExaminationBasic"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<resultMap id="ExamReviewDto" type="com.keao.edu.user.dto.ExamReviewDto" extends="ExamReview"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		<result column="exam_start_time_" property="examStartTime"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<association property="examRegistration" columnPrefix="regist_" resultMap="com.keao.edu.user.dao.ExamRegistrationDao.ExamRegistration"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -37,9 +40,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<!-- 向数据库增加一条记录 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<insert id="insert" parameterType="com.keao.edu.user.entity.ExamReview" useGeneratedKeys="true" keyColumn="id" keyProperty="id"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		INSERT INTO exam_review (id_,examination_basic_id_,teacher_id_,student_id_,evaluation_content_, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		INSERT INTO exam_review (id_,examination_basic_id_,exam_room_id_,teacher_id_,teacher_type_,student_id_,evaluation_content_, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		evaluation_result_,create_time_,update_time_,tenant_id_,enable_edit_,exam_registration_id_) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		VALUES(#{id},#{examinationBasicId},#{teacherId},#{studentId},#{evaluationContent}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		VALUES(#{id},#{examinationBasicId},#{examRoomId},#{teacherId},#{teacherType},#{studentId},#{evaluationContent}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		#{evaluationResult},NOW(),NOW(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		#{tenantId},#{enableEdit,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examRegistrationId}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</insert> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -54,9 +57,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="examRegistrationId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				exam_registration_id_ = #{examRegistrationId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="examRoomId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				exam_room_id_ = #{examRoomId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="teacherId != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				teacher_id_ = #{teacherId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="teacherType != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				teacher_type_ = #{teacherType}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="evaluationResult != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				evaluation_result_ = #{evaluationResult}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -122,6 +131,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			<if test="studentStatus!=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				AND ere.status_=#{studentStatus,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="teacherType!=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				AND er.teacher_type_=#{teacherType} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="examStartTime!=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				AND DATE_FORMAT( ero.exam_start_time_, '%Y-%m-%d' ) = #{examStartTime} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			<if test="search!=null and search!=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				AND er.real_name_ LIKE CONCAT(#{search}, '%') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		</where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	<select id="findExamResult" resultMap="ExamReviewDto"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -132,10 +150,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			ere.organ_id_ regist_organ_id_, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			ere.subject_id_ regist_subject_id_, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			ere.level_ regist_level_, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			ere.status_ regist_status_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			ere.status_ regist_status_, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			ere.card_no_ regist_card_no_, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			ero.exam_start_time_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			exam_review er 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			LEFT JOIN exam_registration ere ON ere.id_=er.exam_registration_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			LEFT JOIN exam_room ero ON ero.id_=er.exam_room_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			LEFT JOIN sys_user su ON su.id_=er.teacher_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<include refid="findExamResultCondition"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		ORDER BY ere.id_ DESC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<include refid="global.limit"/> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -146,6 +168,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			exam_review er 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			LEFT JOIN exam_registration ere ON ere.id_=er.exam_registration_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			LEFT JOIN sys_user su ON su.id_=er.teacher_id_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		<include refid="findExamResultCondition"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	</select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </mapper> 
			 |