<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xhkjedu.smarking.mapper.scan.MsScanbatchPaperBlockMapper">
    
    <!--扫描记录-查看原卷-客观题-->
    <resultMap id="blockQuestions" type="com.xhkjedu.smarking.model.scan.MsScanbatchPaperBlock">
        <result property="mspbid" column="mspbid"/>
        <result property="mblockid" column="mblockid"/>
        <result property="picpath" column="picpath"/>
        <result property="extendpath" column="extendpath"/>
        <result property="identifycont" column="identifycont"/>
        <result property="msptype" column="msptype"/>
        <collection property="questions" ofType="com.xhkjedu.smarking.model.scan.MsScanbatchPaperBlockQuestion" javaType="java.util.ArrayList">
            <result property="mspbqid" column="mspbqid"/>
            <result property="mptqid" column="mptqid"/>
            <result property="identifycont" column="identifycont"/>
        </collection>
    </resultMap>
    <!--扫描记录-查看原卷-->
    <select id="listBlockQuestions" resultMap="blockQuestions">
        select b.mspbid,b.mblockid,b.picpath,b.extendpath,b.identifycont,b.msptype
        ,q.mspbqid,q.mptqid,q.identifycont
        from ms_scanbatch_paper_block b
        left join ms_scanbatch_paper_block_question q on b.mspbid=q.mspbid
        where b.mspid=#{mspid} order by b.mspbid,q.mspbqid
    </select>
</mapper>
