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

    <resultMap type="cn.cecep.talroad.domain.SEnvWaterSelfDay" id="SEnvWaterSelfDayResult">
        <result property="id"    column="id"    />
        <result property="factoryId"    column="factory_id"    />
        <result property="outletId"    column="outlet_id"    />
        <result property="dataType"    column="data_type"    />
        <result property="monitoringTime"    column="monitoring_time"    />
        <result property="sewage"    column="sewage"    />
        <result property="sewageEmission"    column="sewage_emission"    />
        <result property="phValue"    column="ph_value"    />
        <result property="cod"    column="cod"    />
        <result property="codEmission"    column="cod_emission"    />
        <result property="ammoniaNitrogen"    column="ammonia_nitrogen"    />
        <result property="ammoniaNitrogenEmission"    column="ammonia_nitrogen_emission"    />
        <result property="codConcentration"    column="cod_concentration"    />
        <result property="wastewaterFlow"    column="wastewater_flow"    />
        <result property="nitrogenConcentration"    column="nitrogen_concentration"    />
        <result property="nitrogenConcentrationEmission"    column="nitrogen_concentration_emission"    />
        <result property="phosphorusConcentration"    column="phosphorus_concentration"    />
        <result property="phosphorusConcentrationEmission"    column="phosphorus_concentration_emission"    />
        <result property="dateTime"    column="date_time"    />
        <result property="sewageFlag"    column="sewage_flag"    />
        <result property="phValueFlag"    column="ph_value_flag"    />
        <result property="codFlag"    column="cod_flag"    />
        <result property="ammoniaNitrogenFlag"    column="ammonia_nitrogen_flag"    />
        <result property="nitrogenConcentrationFlag"    column="nitrogen_concentration_flag"    />
        <result property="phosphorusConcentrationFlag"    column="phosphorus_concentration_flag"    />
        <result property="dataFlag"    column="data_flag"    />
        <result property="codCorrectEmission"    column="cod_correct_emission"    />
        <result property="ammoniaCorrectEmission"    column="ammonia_correct_emission"    />
        <result property="nitrogenCorrectEmission"    column="nitrogen_correct_emission"    />
        <result property="phosphorusCorrectEmission"    column="phosphorus_correct_emission"    />
    </resultMap>


    <sql id="selectSEnvWaterSelfDayVo">
        select id, factory_id, outlet_id, data_type, monitoring_time, sewage, sewage_emission, ph_value, cod, cod_emission, ammonia_nitrogen, ammonia_nitrogen_emission, cod_concentration, wastewater_flow, nitrogen_concentration, nitrogen_concentration_emission, phosphorus_concentration, phosphorus_concentration_emission, date_time, sewage_flag, ph_value_flag, cod_flag, ammonia_nitrogen_flag, nitrogen_concentration_flag, phosphorus_concentration_flag, data_flag, cod_correct_emission, ammonia_correct_emission, nitrogen_correct_emission, phosphorus_correct_emission from s_env_water_self_day
    </sql>

    <select id="selectSEnvWaterSelfDayList" parameterType="cn.cecep.talroad.domain.SEnvWaterSelfDay" resultMap="SEnvWaterSelfDayResult">
        <include refid="selectSEnvWaterSelfDayVo"/>
        <where>
            <if test="sewage != null  and sewage != ''"> and sewage = #{sewage}</if>
            <if test="sewageEmission != null  and sewageEmission != ''"> and sewage_emission = #{sewageEmission}</if>
            <if test="phValue != null  and phValue != ''"> and ph_value = #{phValue}</if>
            <if test="cod != null  and cod != ''"> and cod = #{cod}</if>
            <if test="codEmission != null  and codEmission != ''"> and cod_emission = #{codEmission}</if>
            <if test="ammoniaNitrogen != null  and ammoniaNitrogen != ''"> and ammonia_nitrogen = #{ammoniaNitrogen}</if>
            <if test="ammoniaNitrogenEmission != null  and ammoniaNitrogenEmission != ''"> and ammonia_nitrogen_emission = #{ammoniaNitrogenEmission}</if>
            <if test="codConcentration != null  and codConcentration != ''"> and cod_concentration = #{codConcentration}</if>
            <if test="wastewaterFlow != null  and wastewaterFlow != ''"> and wastewater_flow = #{wastewaterFlow}</if>
            <if test="nitrogenConcentration != null  and nitrogenConcentration != ''"> and nitrogen_concentration = #{nitrogenConcentration}</if>
            <if test="nitrogenConcentrationEmission != null  and nitrogenConcentrationEmission != ''"> and nitrogen_concentration_emission = #{nitrogenConcentrationEmission}</if>
            <if test="phosphorusConcentration != null  and phosphorusConcentration != ''"> and phosphorus_concentration = #{phosphorusConcentration}</if>
            <if test="phosphorusConcentrationEmission != null  and phosphorusConcentrationEmission != ''"> and phosphorus_concentration_emission = #{phosphorusConcentrationEmission}</if>
            <if test="dateTime != null  and dateTime != ''"> and date_time = #{dateTime}</if>
            <if test="sewageFlag != null  and sewageFlag != ''"> and sewage_flag = #{sewageFlag}</if>
            <if test="phValueFlag != null  and phValueFlag != ''"> and ph_value_flag = #{phValueFlag}</if>
            <if test="codFlag != null  and codFlag != ''"> and cod_flag = #{codFlag}</if>
            <if test="ammoniaNitrogenFlag != null  and ammoniaNitrogenFlag != ''"> and ammonia_nitrogen_flag = #{ammoniaNitrogenFlag}</if>
            <if test="nitrogenConcentrationFlag != null  and nitrogenConcentrationFlag != ''"> and nitrogen_concentration_flag = #{nitrogenConcentrationFlag}</if>
            <if test="phosphorusConcentrationFlag != null  and phosphorusConcentrationFlag != ''"> and phosphorus_concentration_flag = #{phosphorusConcentrationFlag}</if>
            <if test="dataFlag != null  and dataFlag != ''"> and data_flag = #{dataFlag}</if>
            <if test="codCorrectEmission != null  and codCorrectEmission != ''"> and cod_correct_emission = #{codCorrectEmission}</if>
            <if test="ammoniaCorrectEmission != null  and ammoniaCorrectEmission != ''"> and ammonia_correct_emission = #{ammoniaCorrectEmission}</if>
            <if test="nitrogenCorrectEmission != null  and nitrogenCorrectEmission != ''"> and nitrogen_correct_emission = #{nitrogenCorrectEmission}</if>
            <if test="phosphorusCorrectEmission != null  and phosphorusCorrectEmission != ''"> and phosphorus_correct_emission = #{phosphorusCorrectEmission}</if>
        </where>
    </select>

</mapper>
