|
@@ -20,6 +20,7 @@
|
|
|
<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"/>
|
|
|
+ <result column="additional_evaluation_" property="additionalEvaluation"/>
|
|
|
<association property="examinationBasic" column="exam_" resultMap="com.keao.edu.user.dao.ExaminationBasicDao.ExaminationBasic"/>
|
|
|
</resultMap>
|
|
|
|
|
@@ -41,17 +42,20 @@
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.keao.edu.user.entity.ExamReview" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
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_)
|
|
|
+ evaluation_result_,create_time_,update_time_,tenant_id_,enable_edit_,exam_registration_id_,additional_evaluation_)
|
|
|
VALUES(#{id},#{examinationBasicId},#{examRoomId},#{teacherId},
|
|
|
#{teacherType,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{studentId},#{evaluationContent},
|
|
|
#{evaluationResult},NOW(),NOW(),
|
|
|
- #{tenantId},#{enableEdit,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examRegistrationId})
|
|
|
+ #{tenantId},#{enableEdit,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examRegistrationId},#{additionalEvaluation})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<update id="update" parameterType="com.keao.edu.user.entity.ExamReview">
|
|
|
UPDATE exam_review
|
|
|
<set>
|
|
|
+ <if test="additionalEvaluation != null">
|
|
|
+ additional_evaluation_ = #{additionalEvaluation},
|
|
|
+ </if>
|
|
|
<if test="examinationBasicId != null">
|
|
|
examination_basic_id_ = #{examinationBasicId},
|
|
|
</if>
|
|
@@ -133,8 +137,8 @@
|
|
|
<if test="cardNo!=null">
|
|
|
AND ere.card_no_=#{cardNo}
|
|
|
</if>
|
|
|
- <if test="organId!=null">
|
|
|
- AND ere.organ_id_=#{organId}
|
|
|
+ <if test="organId != null and organId != 0 and organIds==null">
|
|
|
+ AND ere.organ_id_ = #{organId}
|
|
|
</if>
|
|
|
<if test="subjectId!=null">
|
|
|
AND ere.subject_id_=#{subjectId}
|
|
@@ -208,6 +212,7 @@
|
|
|
<result property="videoUrl" column="video_url_"/>
|
|
|
<result property="examRegistrationId" column="exam_registration_id_"/>
|
|
|
<result property="openFlag" column="open_flag_"/>
|
|
|
+ <result property="additionalEvaluation" column="additional_evaluation_"/>
|
|
|
</resultMap>
|
|
|
<sql id="queryExamReviewRecordListSql">
|
|
|
<where>
|
|
@@ -228,7 +233,7 @@
|
|
|
|
|
|
<select id="queryExamReviewRecordList" resultMap="ExamReviewRecordDtoMap">
|
|
|
SELECT ser.is_finished_exam_,ser.record_flag_,ser.confirm_status_,er.evaluation_content_,
|
|
|
- er.evaluation_result_,ersr.exam_registration_id_,er.id_,ersr.student_id_,ser.video_url_,erm.open_flag_
|
|
|
+ er.evaluation_result_,ersr.exam_registration_id_,er.id_,ersr.student_id_,ser.video_url_,erm.open_flag_,er.additional_evaluation_
|
|
|
FROM exam_room_student_relation ersr
|
|
|
LEFT JOIN exam_room erm ON erm.id_ = ersr.exam_room_id_
|
|
|
LEFT JOIN student_exam_result ser ON ser.exam_registration_id_ = ersr.exam_registration_id_
|