<?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.brilliance.isc.mda.dao.PtsMapper">

    <resultMap id="BaseResultMap" type="com.brilliance.isc.bo.Pts">
        <result property="inr" column="inr" jdbcType="VARCHAR"/>
        <result property="objtyp" column="objtyp" jdbcType="VARCHAR"/>
        <result property="objinr" column="objinr" jdbcType="VARCHAR"/>
        <result property="rol" column="rol" jdbcType="VARCHAR"/>
        <result property="ptainr" column="ptainr" jdbcType="VARCHAR"/>
        <result property="ptyinr" column="ptyinr" jdbcType="VARCHAR"/>
        <result property="extkey" column="extkey" jdbcType="VARCHAR"/>
        <result property="adrblk" column="adrblk" jdbcType="VARCHAR"/>
        <result property="ref" column="ref" jdbcType="VARCHAR"/>
        <result property="nam" column="nam" jdbcType="VARCHAR"/>
        <result property="ownref" column="ownref" jdbcType="VARCHAR"/>
        <result property="dftcur" column="dftcur" jdbcType="VARCHAR"/>
        <result property="dftdsp" column="dftdsp" jdbcType="VARCHAR"/>
        <result property="dftact" column="dftact" jdbcType="VARCHAR"/>
        <result property="dftfeecur" column="dftfeecur" jdbcType="VARCHAR"/>
        <result property="dftactptainr" column="dftactptainr" jdbcType="VARCHAR"/>
        <result property="dftsetrol" column="dftsetrol" jdbcType="VARCHAR"/>
        <result property="glggrpflg" column="glggrpflg" jdbcType="VARCHAR"/>
        <result property="extact" column="extact" jdbcType="VARCHAR"/>
        <result property="ver" column="ver" jdbcType="VARCHAR"/>
        <result property="ptcnam" column="ptcnam" jdbcType="VARCHAR"/>
        <result property="ptcoe" column="ptcoe" jdbcType="VARCHAR"/>
        <result property="issbaninf" column="issbaninf" jdbcType="VARCHAR"/>
        <result property="bankno" column="bankno" jdbcType="VARCHAR"/>
        <result property="jigomc" column="jigomc" jdbcType="VARCHAR"/>
        <result property="dizhii" column="dizhii" jdbcType="VARCHAR"/>
        <result property="youzbm" column="youzbm" jdbcType="VARCHAR"/>
        <result property="dihdig" column="dihdig" jdbcType="VARCHAR"/>
        <result property="cnnam" column="cnnam" jdbcType="VARCHAR"/>
        <result property="cnadr" column="cnadr" jdbcType="VARCHAR"/>
        <result property="ennam" column="ennam" jdbcType="VARCHAR"/>
        <result property="enadr" column="enadr" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        inr,objtyp,objinr,rol,ptainr,ptyinr,extkey,adrblk,"REF",nam,ownref,dftcur,dftdsp,dftact,dftfeecur,
        dftactptainr,dftsetrol,glggrpflg,extact,ver,ptcnam,ptcoe,issbaninf,bankno,jigomc,dizhii,youzbm,
        dihdig,cnnam,cnadr,ennam,enadr
    </sql>

    <select id="selectByPrimaryKey" resultMap="BaseResultMap">
        select
            <include refid="Base_Column_List" />
        from pts
        where inr = #{inr,jdbcType=VARCHAR}
    </select>

    <delete id="deleteByPrimaryKey">
        delete from pts
        where inr = #{inr,jdbcType=VARCHAR}
    </delete>

    <insert id="insert">
        insert into pts (<include refid="Base_Column_List" />)
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            #{inr,jdbcType=VARCHAR},
            #{objtyp,jdbcType=VARCHAR},
            #{objinr,jdbcType=VARCHAR},
            #{rol,jdbcType=VARCHAR},
            #{ptainr,jdbcType=VARCHAR},
            #{ptyinr,jdbcType=VARCHAR},
            #{extkey,jdbcType=VARCHAR},
            #{adrblk,jdbcType=VARCHAR},
            #{ref,jdbcType=VARCHAR},
            #{nam,jdbcType=VARCHAR},
            #{ownref,jdbcType=VARCHAR},
            #{dftcur,jdbcType=VARCHAR},
            #{dftdsp,jdbcType=VARCHAR},
            #{dftact,jdbcType=VARCHAR},
            #{dftfeecur,jdbcType=VARCHAR},
            #{dftactptainr,jdbcType=VARCHAR},
            #{dftsetrol,jdbcType=VARCHAR},
            #{glggrpflg,jdbcType=VARCHAR},
            #{extact,jdbcType=VARCHAR},
            #{ver,jdbcType=VARCHAR},
            #{ptcnam,jdbcType=VARCHAR},
            #{ptcoe,jdbcType=VARCHAR},
            #{issbaninf,jdbcType=VARCHAR},
            #{bankno,jdbcType=VARCHAR},
            #{jigomc,jdbcType=VARCHAR},
            #{dizhii,jdbcType=VARCHAR},
            #{youzbm,jdbcType=VARCHAR},
            #{dihdig,jdbcType=VARCHAR},
            #{cnnam,jdbcType=VARCHAR},
            #{cnadr,jdbcType=VARCHAR},
            #{ennam,jdbcType=VARCHAR},
            #{enadr,jdbcType=VARCHAR},
        </trim>
    </insert>

    <insert id="insertSelective">
        insert into pts
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="inr != null">inr,</if>
            <if test="objtyp != null">objtyp,</if>
            <if test="objinr != null">objinr,</if>
            <if test="rol != null">rol,</if>
            <if test="ptainr != null">ptainr,</if>
            <if test="ptyinr != null">ptyinr,</if>
            <if test="extkey != null">extkey,</if>
            <if test="adrblk != null">adrblk,</if>
            <if test="ref != null">ref,</if>
            <if test="nam != null">nam,</if>
            <if test="ownref != null">ownref,</if>
            <if test="dftcur != null">dftcur,</if>
            <if test="dftdsp != null">dftdsp,</if>
            <if test="dftact != null">dftact,</if>
            <if test="dftfeecur != null">dftfeecur,</if>
            <if test="dftactptainr != null">dftactptainr,</if>
            <if test="dftsetrol != null">dftsetrol,</if>
            <if test="glggrpflg != null">glggrpflg,</if>
            <if test="extact != null">extact,</if>
            <if test="ver != null">ver,</if>
            <if test="ptcnam != null">ptcnam,</if>
            <if test="ptcoe != null">ptcoe,</if>
            <if test="issbaninf != null">issbaninf,</if>
            <if test="bankno != null">bankno,</if>
            <if test="jigomc != null">jigomc,</if>
            <if test="dizhii != null">dizhii,</if>
            <if test="youzbm != null">youzbm,</if>
            <if test="dihdig != null">dihdig,</if>
            <if test="cnnam != null">cnnam,</if>
            <if test="cnadr != null">cnadr,</if>
            <if test="ennam != null">ennam,</if>
            <if test="enadr != null">enadr,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="inr != null">#{inr,jdbcType=VARCHAR}, </if>
            <if test="objtyp != null">#{objtyp,jdbcType=VARCHAR}, </if>
            <if test="objinr != null">#{objinr,jdbcType=VARCHAR}, </if>
            <if test="rol != null">#{rol,jdbcType=VARCHAR}, </if>
            <if test="ptainr != null">#{ptainr,jdbcType=VARCHAR}, </if>
            <if test="ptyinr != null">#{ptyinr,jdbcType=VARCHAR}, </if>
            <if test="extkey != null">#{extkey,jdbcType=VARCHAR}, </if>
            <if test="adrblk != null">#{adrblk,jdbcType=VARCHAR}, </if>
            <if test="ref != null">#{ref,jdbcType=VARCHAR}, </if>
            <if test="nam != null">#{nam,jdbcType=VARCHAR}, </if>
            <if test="ownref != null">#{ownref,jdbcType=VARCHAR}, </if>
            <if test="dftcur != null">#{dftcur,jdbcType=VARCHAR}, </if>
            <if test="dftdsp != null">#{dftdsp,jdbcType=VARCHAR}, </if>
            <if test="dftact != null">#{dftact,jdbcType=VARCHAR}, </if>
            <if test="dftfeecur != null">#{dftfeecur,jdbcType=VARCHAR}, </if>
            <if test="dftactptainr != null">#{dftactptainr,jdbcType=VARCHAR}, </if>
            <if test="dftsetrol != null">#{dftsetrol,jdbcType=VARCHAR}, </if>
            <if test="glggrpflg != null">#{glggrpflg,jdbcType=VARCHAR}, </if>
            <if test="extact != null">#{extact,jdbcType=VARCHAR}, </if>
            <if test="ver != null">#{ver,jdbcType=VARCHAR}, </if>
            <if test="ptcnam != null">#{ptcnam,jdbcType=VARCHAR}, </if>
            <if test="ptcoe != null">#{ptcoe,jdbcType=VARCHAR}, </if>
            <if test="issbaninf != null">#{issbaninf,jdbcType=VARCHAR}, </if>
            <if test="bankno != null">#{bankno,jdbcType=VARCHAR}, </if>
            <if test="jigomc != null">#{jigomc,jdbcType=VARCHAR}, </if>
            <if test="dizhii != null">#{dizhii,jdbcType=VARCHAR}, </if>
            <if test="youzbm != null">#{youzbm,jdbcType=VARCHAR}, </if>
            <if test="dihdig != null">#{dihdig,jdbcType=VARCHAR}, </if>
            <if test="cnnam != null">#{cnnam,jdbcType=VARCHAR}, </if>
            <if test="cnadr != null">#{cnadr,jdbcType=VARCHAR}, </if>
            <if test="ennam != null">#{ennam,jdbcType=VARCHAR}, </if>
            <if test="enadr != null">#{enadr,jdbcType=VARCHAR}, </if>
        </trim>
    </insert>

    <update id="updateByPrimaryKeySelective">
        update pts
        <set>
            <if test="objtyp != null">objtyp = #{objtyp,jdbcType=VARCHAR},</if>
            <if test="objinr != null">objinr = #{objinr,jdbcType=VARCHAR},</if>
            <if test="rol != null">rol = #{rol,jdbcType=VARCHAR},</if>
            <if test="ptainr != null">ptainr = #{ptainr,jdbcType=VARCHAR},</if>
            <if test="ptyinr != null">ptyinr = #{ptyinr,jdbcType=VARCHAR},</if>
            <if test="extkey != null">extkey = #{extkey,jdbcType=VARCHAR},</if>
            <if test="adrblk != null">adrblk = #{adrblk,jdbcType=VARCHAR},</if>
            <if test="ref != null">"REF" = #{ref,jdbcType=VARCHAR},</if>
            <if test="nam != null">nam = #{nam,jdbcType=VARCHAR},</if>
            <if test="ownref != null">ownref = #{ownref,jdbcType=VARCHAR},</if>
            <if test="dftcur != null">dftcur = #{dftcur,jdbcType=VARCHAR},</if>
            <if test="dftdsp != null">dftdsp = #{dftdsp,jdbcType=VARCHAR},</if>
            <if test="dftact != null">dftact = #{dftact,jdbcType=VARCHAR},</if>
            <if test="dftfeecur != null">dftfeecur = #{dftfeecur,jdbcType=VARCHAR},</if>
            <if test="dftactptainr != null">dftactptainr = #{dftactptainr,jdbcType=VARCHAR},</if>
            <if test="dftsetrol != null">dftsetrol = #{dftsetrol,jdbcType=VARCHAR},</if>
            <if test="glggrpflg != null">glggrpflg = #{glggrpflg,jdbcType=VARCHAR},</if>
            <if test="extact != null">extact = #{extact,jdbcType=VARCHAR},</if>
            <if test="ver != null">ver = #{ver,jdbcType=VARCHAR},</if>
            <if test="ptcnam != null">ptcnam = #{ptcnam,jdbcType=VARCHAR},</if>
            <if test="ptcoe != null">ptcoe = #{ptcoe,jdbcType=VARCHAR},</if>
            <if test="issbaninf != null">issbaninf = #{issbaninf,jdbcType=VARCHAR},</if>
            <if test="bankno != null">bankno = #{bankno,jdbcType=VARCHAR},</if>
            <if test="jigomc != null">jigomc = #{jigomc,jdbcType=VARCHAR},</if>
            <if test="dizhii != null">dizhii = #{dizhii,jdbcType=VARCHAR},</if>
            <if test="youzbm != null">youzbm = #{youzbm,jdbcType=VARCHAR},</if>
            <if test="dihdig != null">dihdig = #{dihdig,jdbcType=VARCHAR},</if>
            <if test="cnnam != null">cnnam = #{cnnam,jdbcType=VARCHAR},</if>
            <if test="cnadr != null">cnadr = #{cnadr,jdbcType=VARCHAR},</if>
            <if test="ennam != null">ennam = #{ennam,jdbcType=VARCHAR},</if>
            <if test="enadr != null">enadr = #{enadr,jdbcType=VARCHAR},</if>
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <update id="updateByPrimaryKey">
        update pts
        <set>
            objtyp = #{objtyp,jdbcType=VARCHAR},
            objinr = #{objinr,jdbcType=VARCHAR},
            rol = #{rol,jdbcType=VARCHAR},
            ptainr = #{ptainr,jdbcType=VARCHAR},
            ptyinr = #{ptyinr,jdbcType=VARCHAR},
            extkey = #{extkey,jdbcType=VARCHAR},
            adrblk = #{adrblk,jdbcType=VARCHAR},
            "REF" = #{ref,jdbcType=VARCHAR},
            nam = #{nam,jdbcType=VARCHAR},
            ownref = #{ownref,jdbcType=VARCHAR},
            dftcur = #{dftcur,jdbcType=VARCHAR},
            dftdsp = #{dftdsp,jdbcType=VARCHAR},
            dftact = #{dftact,jdbcType=VARCHAR},
            dftfeecur = #{dftfeecur,jdbcType=VARCHAR},
            dftactptainr = #{dftactptainr,jdbcType=VARCHAR},
            dftsetrol = #{dftsetrol,jdbcType=VARCHAR},
            glggrpflg = #{glggrpflg,jdbcType=VARCHAR},
            extact = #{extact,jdbcType=VARCHAR},
            ver = #{ver,jdbcType=VARCHAR},
            ptcnam = #{ptcnam,jdbcType=VARCHAR},
            ptcoe = #{ptcoe,jdbcType=VARCHAR},
            issbaninf = #{issbaninf,jdbcType=VARCHAR},
            bankno = #{bankno,jdbcType=VARCHAR},
            jigomc = #{jigomc,jdbcType=VARCHAR},
            dizhii = #{dizhii,jdbcType=VARCHAR},
            youzbm = #{youzbm,jdbcType=VARCHAR},
            dihdig = #{dihdig,jdbcType=VARCHAR},
            cnnam = #{cnnam,jdbcType=VARCHAR},
            cnadr = #{cnadr,jdbcType=VARCHAR},
            ennam = #{ennam,jdbcType=VARCHAR},
            enadr = #{enadr,jdbcType=VARCHAR},
        </set>
        where inr = #{inr,jdbcType=VARCHAR}
    </update>

    <delete id="deleteByIds">
        delete from act where inr in
        <foreach item="item" index="index" collection="collection" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <update id="dyncUpdate">
        update pts
        <set>
            <if test="module.objtyp != null">objtyp = #{module.objtyp,jdbcType=VARCHAR},</if>
            <if test="module.objinr != null">objinr = #{module.objinr,jdbcType=VARCHAR},</if>
            <if test="module.rol != null">rol = #{module.rol,jdbcType=VARCHAR},</if>
            <if test="module.ptainr != null">ptainr = #{module.ptainr,jdbcType=VARCHAR},</if>
            <if test="module.ptyinr != null">ptyinr = #{module.ptyinr,jdbcType=VARCHAR},</if>
            <if test="module.extkey != null">extkey = #{module.extkey,jdbcType=VARCHAR},</if>
            <if test="module.adrblk != null">adrblk = #{module.adrblk,jdbcType=VARCHAR},</if>
            <if test="module.ref != null">"REF" = #{module.ref,jdbcType=VARCHAR},</if>
            <if test="module.nam != null">nam = #{module.nam,jdbcType=VARCHAR},</if>
            <if test="module.ownref != null">ownref = #{module.ownref,jdbcType=VARCHAR},</if>
            <if test="module.dftcur != null">dftcur = #{module.dftcur,jdbcType=VARCHAR},</if>
            <if test="module.dftdsp != null">dftdsp = #{module.dftdsp,jdbcType=VARCHAR},</if>
            <if test="module.dftact != null">dftact = #{module.dftact,jdbcType=VARCHAR},</if>
            <if test="module.dftfeecur != null">dftfeecur = #{module.dftfeecur,jdbcType=VARCHAR},</if>
            <if test="module.dftactptainr != null">dftactptainr = #{module.dftactptainr,jdbcType=VARCHAR},</if>
            <if test="module.dftsetrol != null">dftsetrol = #{module.dftsetrol,jdbcType=VARCHAR},</if>
            <if test="module.glggrpflg != null">glggrpflg = #{module.glggrpflg,jdbcType=VARCHAR},</if>
            <if test="module.extact != null">extact = #{module.extact,jdbcType=VARCHAR},</if>
            <if test="module.ver != null">ver = #{module.ver,jdbcType=VARCHAR},</if>
            <if test="module.ptcnam != null">ptcnam = #{module.ptcnam,jdbcType=VARCHAR},</if>
            <if test="module.ptcoe != null">ptcoe = #{module.ptcoe,jdbcType=VARCHAR},</if>
            <if test="module.issbaninf != null">issbaninf = #{module.issbaninf,jdbcType=VARCHAR},</if>
            <if test="module.bankno != null">bankno = #{module.bankno,jdbcType=VARCHAR},</if>
            <if test="module.jigomc != null">jigomc = #{module.jigomc,jdbcType=VARCHAR},</if>
            <if test="module.dizhii != null">dizhii = #{module.dizhii,jdbcType=VARCHAR},</if>
            <if test="module.youzbm != null">youzbm = #{module.youzbm,jdbcType=VARCHAR},</if>
            <if test="module.dihdig != null">dihdig = #{module.dihdig,jdbcType=VARCHAR},</if>
            <if test="module.cnnam != null">cnnam = #{module.cnnam,jdbcType=VARCHAR},</if>
            <if test="module.cnadr != null">cnadr = #{module.cnadr,jdbcType=VARCHAR},</if>
            <if test="module.ennam != null">ennam = #{module.ennam,jdbcType=VARCHAR},</if>
            <if test="module.enadr != null">enadr = #{module.enadr,jdbcType=VARCHAR},</if>
        </set>
        ${conditions}
    </update>

    <delete id="dyncDelete">
        ${sql}
    </delete>

    <select id="dyncRead" resultMap="BaseResultMap">
        ${sql}
    </select>

    <select id="getPtsByObjInrTypAndRole" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from pts
        where objinr = #{objinr,jdbcType=VARCHAR}
        and objtyp = #{objtyp,jdbcType=VARCHAR}
        and rol = #{rol,jdbcType=VARCHAR}
        <if test="ptyinr != null and ptyinr != ''">
            and ptyinr = #{ptyinr,jdbcType=VARCHAR}
        </if>
    </select>

    <select id="getPtsByObjInrTyp" resultMap="BaseResultMap">
        select <include refid="Base_Column_List" />
         from pts
        where objinr = #{objinr,jdbcType=VARCHAR}
        and objtyp = #{objtyp,jdbcType=VARCHAR}
    </select>


    <select id="getPtsRolByObjInrTyp" resultType="java.lang.String">
        select
        rol
        from pts
        where objinr = #{objinr,jdbcType=VARCHAR}
        and objtyp = #{objtyp,jdbcType=VARCHAR}
    </select>

    <select id="selectCountByPtyinr" resultType="java.lang.Integer">
        select count(1) from pts where ptyinr = #{ptyinr}
    </select>

    <insert id="batchInsert" parameterType="com.brilliance.isc.bo.Pts">
        insert into pts (inr,objtyp,objinr,rol,ptainr,ptyinr,extkey,adrblk,ref,nam,ownref,dftcur,dftdsp,dftact,
                         dftfeecur,dftactptainr,dftsetrol,glggrpflg,extact,ver,ptcnam,ptcoe,issbaninf,
                         bankno,jigomc,dizhii,youzbm,dihdig,cnnam,cnadr,ennam,enadr) values
        <foreach collection="list" item="pts" separator="," close=";">
            (#{pts.inr}#{pts.objtyp},#{pts.objinr}{pts.rol}#{pts.ptainr}#{pts.ptyinr}#{pts.extkey}
            #{pts.adrblk}#{pts.ref}#{pts.nam}#{pts.ownref}#{pts.dftcur}#{pts.dftdsp}#{pts.dftact}
            #{pts.dftfeecur}#{pts.dftactptainr}#{pts.dftsetrol}#{pts.glggrpflg}#{pts.extact}
            #{pts.ver}#{pts.ptcnam}#{pts.ptcoe}#{pts.issbaninf}#{pts.bankno}#{pts.jigomc}
            #{pts.dizhii}#{pts.youzbm}#{pts.dihdig}#{pts.cnnam}#{pts.cnadr}#{pts.ennam}#{pts.enadr})
        </foreach>
    </insert>

    <delete id="batchDelete">
        delete from pts where inr in
        <foreach collection="list" item="items" open="(" separator="," close=")">
            #{items.inr}
        </foreach>
    </delete>

    <update id="batchUpdate" parameterType="java.util.List">
        <foreach collection="list" item="item" index="index" separator=";">
            UPDATE pts
            <set>
                objtyp = #{item.objtyp,jdbcType=VARCHAR},
                objinr = #{item.objinr,jdbcType=VARCHAR},
                rol = #{item.rol,jdbcType=VARCHAR},
                ptainr = #{item.ptainr,jdbcType=VARCHAR},
                ptyinr = #{item.ptyinr,jdbcType=VARCHAR},
                extkey = #{item.extkey,jdbcType=VARCHAR},
                adrblk = #{item.adrblk,jdbcType=VARCHAR},
                "REF" = #{item.ref,jdbcType=VARCHAR},
                nam = #{item.nam,jdbcType=VARCHAR},
                ownref = #{item.ownref,jdbcType=VARCHAR},
                dftcur = #{item.dftcur,jdbcType=VARCHAR},
                dftdsp = #{item.dftdsp,jdbcType=VARCHAR},
                dftact = #{item.dftact,jdbcType=VARCHAR},
                dftfeecur = #{item.dftfeecur,jdbcType=VARCHAR},
                dftactptainr = #{item.dftactptainr,jdbcType=VARCHAR},
                dftsetrol = #{item.dftsetrol,jdbcType=VARCHAR},
                glggrpflg = #{item.glggrpflg,jdbcType=VARCHAR},
                extact = #{item.extact,jdbcType=VARCHAR},
                ver = #{item.ver,jdbcType=VARCHAR},
                ptcnam = #{item.ptcnam,jdbcType=VARCHAR},
                ptcoe = #{item.ptcoe,jdbcType=VARCHAR},
                issbaninf = #{item.issbaninf,jdbcType=VARCHAR},
                bankno = #{item.bankno,jdbcType=VARCHAR},
                jigomc = #{item.jigomc,jdbcType=VARCHAR},
                dizhii = #{item.dizhii,jdbcType=VARCHAR},
                youzbm = #{item.youzbm,jdbcType=VARCHAR},
                dihdig = #{item.dihdig,jdbcType=VARCHAR},
                cnnam = #{item.cnnam,jdbcType=VARCHAR},
                cnadr = #{item.cnadr,jdbcType=VARCHAR},
                ennam = #{item.ennam,jdbcType=VARCHAR},
                enadr = #{item.enadr,jdbcType=VARCHAR},
            </set>
            WHERE inr = #{item.inr}
        </foreach>;
    </update>
    <select id="selectByObjtypAndObjinrLikeExtkey" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from pts WHERE PTYINR IN (SELECT INR FROM PTY
        WHERE EXTKEY LIKE  concat(#{extkey},'%')
        AND objtyp=#{objtyp}
        AND OBJINR=#{objinr})
    </select>

    <select id="selectPteinrByinr" resultType="String">
        SELECT PTE.INR
        FROM PTE, PTS
        WHERE PTS.OBJTYP='BFD'
        AND PTS.OBJINR= #{inr}
        AND PTE.OBJTYP='PTS'
        AND PTE.OBJINR=PTS.INR
        AND PTE.CBTPFX IN ('AKZ', 'DPZ', 'DPU')
    </select>

</mapper>