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

    <resultMap id="readbigysxzMap" type="com.tofly.watermeter.entity.Readbigysxz">
        <id property="id" column="ID"/>
        <result property="typeName" column="TYPE_NAME"/>
        <result property="createDate" column="CREATE_DATE"/>
        <result property="createUser" column="CREATE_USER"/>
        <association property="createUserName" column="CREATE_USER"
                     select="com.tofly.baseapi.mapper.ToflyCodeCommonMapper.getUserName"/>
        <collection property="readbingysxzList" column="ID"
                    select="com.tofly.watermeter.mapper.ReadbingysxzMapper.getYsxzBing"/>
    </resultMap>

    <select id="getNoBingYsxz" resultType="com.tofly.watermeter.entity.QfmidysxzbmE">
        SELECT YSXZ_BM ysxzBm, YSXZ_MC ysxzMc
        FROM TF_YWPN_QFMIDYSXZBM_E a
        WHERE
        NOT EXISTS (SELECT YSXZ_BM FROM TF_YWPN_READBINGYSXZ_W b WHERE a.YSXZ_BM = b.YSXZ_BM )
    </select>


</mapper>
