<?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="cn.cecep.talroad.mapper.BMainPollDisWaterToutMapper">

    <resultMap type="cn.cecep.talroad.domain.BMainPollDisWaterTout" id="BMainPollDisWaterToutResult">
        <result property="toutId"    column="tout_id"    />
        <result property="factoryId"    column="factory_id"    />
        <result property="pollDisId"    column="poll_dis_id"    />
        <result property="pollutantsType"    column="pollutants_type"    />
        <result property="pollutantsTotalFrist"    column="pollutants_total_frist"    />
        <result property="pollutantsTotalSecond"    column="pollutants_total_second"    />
        <result property="pollutantsTotalThird"    column="pollutants_total_third"    />
        <result property="pollutantsTotalFourth"    column="pollutants_total_fourth"    />
        <result property="pollutantsTotalFifth"    column="pollutants_total_fifth"    />
    </resultMap>


    <sql id="selectBMainPollDisWaterToutVo">
        select tout_id, factory_id, poll_dis_id, pollutants_type, pollutants_total_frist, pollutants_total_second, pollutants_total_third, pollutants_total_fourth, pollutants_total_fifth from b_main_poll_dis_water_tout
    </sql>

    <select id="selectBMainPollDisWaterToutList" parameterType="cn.cecep.talroad.domain.BMainPollDisWaterTout" resultMap="BMainPollDisWaterToutResult">
        <include refid="selectBMainPollDisWaterToutVo"/>
        <where>
            <if test="factoryId != null  and factoryId != ''"> and factory_id = #{factoryId}</if>
            <if test="pollDisId != null  and pollDisId != ''"> and poll_dis_id = #{pollDisId}</if>
            <if test="pollutantsType != null  and pollutantsType != ''"> and pollutants_type = #{pollutantsType}</if>
            <if test="pollutantsTotalFrist != null  and pollutantsTotalFrist != ''"> and pollutants_total_frist = #{pollutantsTotalFrist}</if>
            <if test="pollutantsTotalSecond != null  and pollutantsTotalSecond != ''"> and pollutants_total_second = #{pollutantsTotalSecond}</if>
            <if test="pollutantsTotalThird != null  and pollutantsTotalThird != ''"> and pollutants_total_third = #{pollutantsTotalThird}</if>
            <if test="pollutantsTotalFourth != null  and pollutantsTotalFourth != ''"> and pollutants_total_fourth = #{pollutantsTotalFourth}</if>
            <if test="pollutantsTotalFifth != null  and pollutantsTotalFifth != ''"> and pollutants_total_fifth = #{pollutantsTotalFifth}</if>
            <if test="........pg.dropped.10........ != null  and ........pg.dropped.10........ != ''"> and ........pg.dropped.10........ = #{........pg.dropped.10........}</if>
            <if test="........pg.dropped.11........ != null  and ........pg.dropped.11........ != ''"> and ........pg.dropped.11........ = #{........pg.dropped.11........}</if>
            <if test="........pg.dropped.12........ != null  and ........pg.dropped.12........ != ''"> and ........pg.dropped.12........ = #{........pg.dropped.12........}</if>
            <if test="........pg.dropped.13........ != null  and ........pg.dropped.13........ != ''"> and ........pg.dropped.13........ = #{........pg.dropped.13........}</if>
        </where>
    </select>

</mapper>
