|
@@ -13,7 +13,7 @@
|
|
<result column="teacher_id_" property="teacherId" />
|
|
<result column="teacher_id_" property="teacherId" />
|
|
<result column="student_id_" property="studentId" />
|
|
<result column="student_id_" property="studentId" />
|
|
<result column="evaluation_content_" property="evaluationContent" />
|
|
<result column="evaluation_content_" property="evaluationContent" />
|
|
- <result column="evaluation_result_" property="evaluationResult" typeHandler="com.keao.edu.common.dal.CustomEnumTypeHandler"/>
|
|
|
|
|
|
+ <result column="evaluation_result_" property="evaluationResult"/>
|
|
<result column="create_time_" property="createTime" />
|
|
<result column="create_time_" property="createTime" />
|
|
<result column="update_time_" property="updateTime" />
|
|
<result column="update_time_" property="updateTime" />
|
|
<result column="tenant_id_" property="tenantId" />
|
|
<result column="tenant_id_" property="tenantId" />
|
|
@@ -40,7 +40,7 @@
|
|
INSERT INTO exam_review (id_,examination_basic_id_,teacher_id_,student_id_,evaluation_content_,
|
|
INSERT INTO exam_review (id_,examination_basic_id_,teacher_id_,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_)
|
|
VALUES(#{id},#{examinationBasicId},#{teacherId},#{studentId},#{evaluationContent},
|
|
VALUES(#{id},#{examinationBasicId},#{teacherId},#{studentId},#{evaluationContent},
|
|
- #{evaluationResult,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},NOW(),NOW(),
|
|
|
|
|
|
+ #{evaluationResult},NOW(),NOW(),
|
|
#{tenantId},#{enableEdit,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examRegistrationId})
|
|
#{tenantId},#{enableEdit,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{examRegistrationId})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -58,7 +58,7 @@
|
|
teacher_id_ = #{teacherId},
|
|
teacher_id_ = #{teacherId},
|
|
</if>
|
|
</if>
|
|
<if test="evaluationResult != null">
|
|
<if test="evaluationResult != null">
|
|
- evaluation_result_ = #{evaluationResult,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},
|
|
|
|
|
|
+ evaluation_result_ = #{evaluationResult},
|
|
</if>
|
|
</if>
|
|
<if test="tenantId != null">
|
|
<if test="tenantId != null">
|
|
tenant_id_ = #{tenantId},
|
|
tenant_id_ = #{tenantId},
|
|
@@ -101,6 +101,9 @@
|
|
#{organId}
|
|
#{organId}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="registId!=null">
|
|
|
|
+ AND er.exam_registration_id_=#{registId}
|
|
|
|
+ </if>
|
|
<if test="examinationBaseId!=null">
|
|
<if test="examinationBaseId!=null">
|
|
AND ere.examination_basic_id_ = #{examinationBaseId}
|
|
AND ere.examination_basic_id_ = #{examinationBaseId}
|
|
</if>
|
|
</if>
|
|
@@ -123,26 +126,26 @@
|
|
</sql>
|
|
</sql>
|
|
<select id="findExamResult" resultMap="ExamReviewDto">
|
|
<select id="findExamResult" resultMap="ExamReviewDto">
|
|
SELECT
|
|
SELECT
|
|
|
|
+ er.*,
|
|
ere.id_ regist_id_,
|
|
ere.id_ regist_id_,
|
|
ere.student_id_ regist_student_id_,
|
|
ere.student_id_ regist_student_id_,
|
|
ere.organ_id_ regist_organ_id_,
|
|
ere.organ_id_ regist_organ_id_,
|
|
ere.subject_id_ regist_subject_id_,
|
|
ere.subject_id_ regist_subject_id_,
|
|
ere.level_ regist_level_,
|
|
ere.level_ regist_level_,
|
|
- ere.status_ regist_status_,
|
|
|
|
- er.evaluation_result_
|
|
|
|
|
|
+ ere.status_ regist_status_
|
|
FROM
|
|
FROM
|
|
- exam_registration ere
|
|
|
|
- LEFT JOIN exam_review er ON ere.student_id_ = er.student_id_ AND ere.examination_basic_id_=er.examination_basic_id_
|
|
|
|
|
|
+ exam_review er
|
|
|
|
+ LEFT JOIN exam_registration ere ON ere.id_=er.exam_registration_id_
|
|
<include refid="findExamResultCondition"/>
|
|
<include refid="findExamResultCondition"/>
|
|
ORDER BY ere.id_ DESC
|
|
ORDER BY ere.id_ DESC
|
|
<include refid="global.limit"/>
|
|
<include refid="global.limit"/>
|
|
</select>
|
|
</select>
|
|
<select id="countExamResult" resultType="int">
|
|
<select id="countExamResult" resultType="int">
|
|
SELECT
|
|
SELECT
|
|
- COUNT(ere.id_)
|
|
|
|
|
|
+ COUNT(er.id_)
|
|
FROM
|
|
FROM
|
|
- exam_registration ere
|
|
|
|
- LEFT JOIN exam_review er ON ere.student_id_ = er.student_id_ AND ere.examination_basic_id_=er.examination_basic_id_
|
|
|
|
|
|
+ exam_review er
|
|
|
|
+ LEFT JOIN exam_registration ere ON ere.id_=er.exam_registration_id_
|
|
<include refid="findExamResultCondition"/>
|
|
<include refid="findExamResultCondition"/>
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|