Administrator
2021-08-10 c8ebf3038d2a7f69d9eb40f5a276dc3fa826fa9b
src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
@@ -122,10 +122,56 @@
        <if test="paper.examName!=null and paper.examName!=''">
            and exam_name like concat('%', #{paper.examName},'%')
        </if>
        <if test="paper.examType!=null">
            and exam_type = #{paper.examType}
        </if>
    </select>
    <delete id="UnbindSubject">
       delete from exam_examination_subject where examination_id = #{paperid} and subject_id = #{subjectid}
    </delete>
    <!--查询考试人员考试信息-->
    <select id="getExamDetail" resultType="org.springblade.modules.exam.vo.ExamPaperVO">
        (select
            ke.id,ke.exam_name examName,
            sa.candidate_no candidateNo,
            bu.real_name realName,bu.sex
        from
            ksxt_exam ke
        left join
            sys_apply sa
        on
            sa.exam_id = ke.id
        left join
            blade_user bu
        on
            bu.id = sa.user_id
        where sa.user_id = #{userId}
        and is_exam = 1
        and sa.apply_status = 2
        )
        union all
        (select
            ke.id,ke.exam_name examName,
            str.candidate_no candidateNo,
            bu.real_name realName,bu.sex
        from
            ksxt_exam ke
        left join
            sys_training_registration str
        on
            str.train_exam_id = ke.id
        left join
            blade_user bu
        on
            bu.id = str.user_id
        where str.user_id = #{userId}
        and is_exam = 1
        and str.cancel = 3
        )
    </select>
</mapper>