Administrator
2021-08-03 372ec8892f5ed3d11736e75abdd7f33ea34e0d2d
src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
@@ -128,4 +128,47 @@
       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>