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

    <resultMap type="cn.cecep.talroad.domain.BMainPollDisSelfMonOther" id="BMainPollDisSelfMonOtherResult">
        <result property="monOtherId"    column="mon_other_id"    />
        <result property="factoryId"    column="factory_id"    />
        <result property="pollDisId"    column="poll_dis_id"    />
        <result property="pollutantType"    column="pollutant_type"    />
        <result property="outletCode"    column="outlet_code"    />
        <result property="outletName"    column="outlet_name"    />
        <result property="monitoringContent"    column="monitoring_content"    />
        <result property="pollutantsName"    column="pollutants_name"    />
        <result property="monitoringFacility"    column="monitoring_facility"    />
        <result property="monitoringAutomaticNetworking"    column="monitoring_automatic_networking"    />
        <result property="monitoringAutomaticName"    column="monitoring_automatic_name"    />
        <result property="monitoringAutomaticAddress"    column="monitoring_automatic_address"    />
        <result property="monitoringAutomaticRequire"    column="monitoring_automatic_require"    />
        <result property="monitoringManualSampling"    column="monitoring_manual_sampling"    />
        <result property="monitoringManualFrequency"    column="monitoring_manual_frequency"    />
        <result property="monitoringManualMeans"    column="monitoring_manual_means"    />
        <result property="otherInformation"    column="other_information"    />
    </resultMap>


    <sql id="selectBMainPollDisSelfMonOtherVo">
        select "mon_other_id", factory_id, poll_dis_id, pollutant_type, outlet_code, outlet_name, monitoring_content, pollutants_name, monitoring_facility, monitoring_automatic_networking, monitoring_automatic_name, monitoring_automatic_address, monitoring_automatic_require, monitoring_manual_sampling, monitoring_manual_frequency, monitoring_manual_means, other_information from b_main_poll_dis_self_mon_other
    </sql>

    <select id="selectBMainPollDisSelfMonOtherList" parameterType="cn.cecep.talroad.domain.BMainPollDisSelfMonOther" resultMap="BMainPollDisSelfMonOtherResult">
        <include refid="selectBMainPollDisSelfMonOtherVo"/>
        <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="pollutantType != null  and pollutantType != ''"> and pollutant_type = #{pollutantType}</if>
            <if test="outletCode != null  and outletCode != ''"> and outlet_code = #{outletCode}</if>
            <if test="outletName != null  and outletName != ''"> and outlet_name like concat('%', #{outletName}, '%')</if>
            <if test="monitoringContent != null  and monitoringContent != ''"> and monitoring_content = #{monitoringContent}</if>
            <if test="pollutantsName != null  and pollutantsName != ''"> and pollutants_name like concat('%', #{pollutantsName}, '%')</if>
            <if test="monitoringFacility != null  and monitoringFacility != ''"> and monitoring_facility = #{monitoringFacility}</if>
            <if test="monitoringAutomaticNetworking != null  and monitoringAutomaticNetworking != ''"> and monitoring_automatic_networking = #{monitoringAutomaticNetworking}</if>
            <if test="monitoringAutomaticName != null  and monitoringAutomaticName != ''"> and monitoring_automatic_name like concat('%', #{monitoringAutomaticName}, '%')</if>
            <if test="monitoringAutomaticAddress != null  and monitoringAutomaticAddress != ''"> and monitoring_automatic_address = #{monitoringAutomaticAddress}</if>
            <if test="monitoringAutomaticRequire != null  and monitoringAutomaticRequire != ''"> and monitoring_automatic_require = #{monitoringAutomaticRequire}</if>
            <if test="monitoringManualSampling != null  and monitoringManualSampling != ''"> and monitoring_manual_sampling = #{monitoringManualSampling}</if>
            <if test="monitoringManualFrequency != null  and monitoringManualFrequency != ''"> and monitoring_manual_frequency = #{monitoringManualFrequency}</if>
            <if test="monitoringManualMeans != null  and monitoringManualMeans != ''"> and monitoring_manual_means = #{monitoringManualMeans}</if>
            <if test="otherInformation != null  and otherInformation != ''"> and other_information = #{otherInformation}</if>
        </where>
    </select>

</mapper>
