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

    <resultMap type="cn.cecep.talroad.domain.BMainPollDisGasTout" id="BMainPollDisGasToutResult">
        <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="selectBMainPollDisGasToutVo">
        select tout_id, factory_id, poll_dis_id, ........pg.dropped.4........, ........pg.dropped.5........, ........pg.dropped.6........, pollutants_type, ........pg.dropped.8........, ........pg.dropped.9........, ........pg.dropped.10........, pollutants_total_frist, pollutants_total_second, pollutants_total_third, pollutants_total_fourth, pollutants_total_fifth, ........pg.dropped.16........ from b_main_poll_dis_gas_tout
    </sql>

    <select id="selectBMainPollDisGasToutList" parameterType="cn.cecep.talroad.domain.BMainPollDisGasTout" resultMap="BMainPollDisGasToutResult">
        <include refid="selectBMainPollDisGasToutVo"/>
        <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="........pg.dropped.4........ != null  and ........pg.dropped.4........ != ''"> and ........pg.dropped.4........ = #{........pg.dropped.4........}</if>
            <if test="........pg.dropped.5........ != null  and ........pg.dropped.5........ != ''"> and ........pg.dropped.5........ = #{........pg.dropped.5........}</if>
            <if test="........pg.dropped.6........ != null  and ........pg.dropped.6........ != ''"> and ........pg.dropped.6........ = #{........pg.dropped.6........}</if>
            <if test="pollutantsType != null  and pollutantsType != ''"> and pollutants_type = #{pollutantsType}</if>
            <if test="........pg.dropped.8........ != null  and ........pg.dropped.8........ != ''"> and ........pg.dropped.8........ = #{........pg.dropped.8........}</if>
            <if test="........pg.dropped.9........ != null  and ........pg.dropped.9........ != ''"> and ........pg.dropped.9........ = #{........pg.dropped.9........}</if>
            <if test="........pg.dropped.10........ != null  and ........pg.dropped.10........ != ''"> and ........pg.dropped.10........ = #{........pg.dropped.10........}</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.16........ != null  and ........pg.dropped.16........ != ''"> and ........pg.dropped.16........ = #{........pg.dropped.16........}</if>
        </where>
    </select>

</mapper>
