<?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.QfcbcbpqMapper">

    <resultMap id="qfcbcbpqMap" type="com.tofly.watermeter.entity.Qfcbcbpq">
        <id property="pqbm" column="PQBM"/>
        <result property="pqmc" column="PQMC"/>
        <result property="yxbz" column="YXBZ"/>
        <result property="createUser" column="CREATE_USER"/>
        <result property="createDate" column="CREATE_DATE"/>
        <result property="bz" column="BZ"/>
        <association property="createUserName" column="CREATE_USER"
                     select="com.tofly.baseapi.mapper.ToflyCodeCommonMapper.getUserName"></association>
    </resultMap>



    <select id="getCbbByPq" resultType="com.tofly.watermeter.entity.Qfcbcbbbm">
        select CBBBM , CBBMC , CBDZ from TF_YWPN_QFCBCBBBM_W where CBPQ=#{pqbm} AND YXBZ = '1'
    </select>



    <select id="getBmByMc" resultType="java.lang.String">
        select PQBM from TF_YWPN_QFCBCBPQ_W where PQMC = #{cbpq}
    </select>
    <select id="getMcByBm" resultType="java.lang.String">
        select PQMC from TF_YWPN_QFCBCBPQ_W where PQBM = #{cbb}
    </select>


</mapper>
