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

    <resultMap type="cn.cecep.talroad.domain.BMainPollDisNoiseRequire" id="BMainPollDisNoiseRequireResult">
        <result property="requireId"    column="require_id"    />
        <result property="factoryId"    column="factory_id"    />
        <result property="pollDisId"    column="poll_dis_id"    />
        <result property="requireGas"    column="require_gas"    />
        <result property="requireWater"    column="require_water"    />
        <result property="requireSoil"    column="require_soil"    />
        <result property="requireSolid"    column="require_solid"    />
        <result property="otherInformationRequire"    column="other_information_require"    />
    </resultMap>


    <sql id="selectBMainPollDisNoiseRequireVo">
        select require_id, factory_id, poll_dis_id, require_gas, require_water, require_soil, require_solid, other_information_require from b_main_poll_dis_noise_require
    </sql>

    <select id="selectBMainPollDisNoiseRequireList" parameterType="cn.cecep.talroad.domain.BMainPollDisNoiseRequire" resultMap="BMainPollDisNoiseRequireResult">
        <include refid="selectBMainPollDisNoiseRequireVo"/>
        <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="requireGas != null  and requireGas != ''"> and require_gas = #{requireGas}</if>
            <if test="requireWater != null  and requireWater != ''"> and require_water = #{requireWater}</if>
            <if test="requireSoil != null  and requireSoil != ''"> and require_soil = #{requireSoil}</if>
            <if test="requireSolid != null  and requireSolid != ''"> and require_solid = #{requireSolid}</if>
            <if test="otherInformationRequire != null  and otherInformationRequire != ''"> and other_information_require = #{otherInformationRequire}</if>
        </where>
    </select>

</mapper>
