<?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.tofly.watermeter.mapper.TfYwpnBwsjblglMapper">

    <resultMap id="tfYwpnBwsjblglMap" type="com.tofly.watermeter.entity.TfYwpnBwsjblgl">
        <id property="id" column="ID"/>
        <result property="kjbm" column="KJBM"/>
        <result property="sbkj" column="SBKJ"/>
        <result property="sjbl" column="SJBL"/>
        <result property="createUser" column="CREATE_USER"/>
        <result property="createDate" column="CREATE_DATE"/>
        <association property="createUserName" column="CREATE_USER"
                     select="com.tofly.baseapi.mapper.ToflyCodeCommonMapper.getUserName"/>
        <association property="sbkjName" column="SBKJ" select="getSbkj"/>
    </resultMap>

    <select id="getSbkj" resultType="string">
        select cname from TF_YWPN_SYSCHILDCODE_D where PCID = 1 and CCODE = to_char(${id})
    </select>


</mapper>
