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

    <resultMap type="cn.cecep.talroad.domain.OdsInorganizationWeiStationHourI" id="OdsInorganizationWeiStationHourIResult">
        <result property="id"    column="id"    />
        <result property="stationId"    column="station_id"    />
        <result property="stationCode"    column="station_code"    />
        <result property="receiveTime"    column="receive_time"    />
        <result property="co"    column="co"    />
        <result property="no2"    column="no2"    />
        <result property="so2"    column="so2"    />
        <result property="o3"    column="o3"    />
        <result property="voc"    column="voc"    />
        <result property="noise"    column="noise"    />
        <result property="pm25"    column="pm25"    />
        <result property="pm10"    column="pm10"    />
        <result property="temperature"    column="temperature"    />
        <result property="utc"    column="utc"    />
        <result property="humidity"    column="humidity"    />
        <result property="wdirect"    column="wdirect"    />
        <result property="wspeed"    column="wspeed"    />
        <result property="apress"    column="apress"    />
        <result property="equstatename"    column="equstatename"    />
        <result property="equstate"    column="equstate"    />
        <result property="no"    column="no"    />
        <result property="tsp"    column="tsp"    />
        <result property="aqi"    column="aqi"    />
        <result property="aqiLevel"    column="aqi_level"    />
        <result property="priPollute"    column="pri_pollute"    />
        <result property="type"    column="type"    />
        <result property="o38h"    column="o38h"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="nox"    column="nox"    />
        <result property="tvoc"    column="tvoc"    />
    </resultMap>


    <sql id="selectOdsInorganizationWeiStationHourIVo">
        select id, station_id, station_code, receive_time, co, no2, so2, o3, voc, noise, pm25, pm10, temperature, utc, humidity, wdirect, wspeed, apress, equstatename, equstate, no, tsp, aqi, aqi_level, pri_pollute, type, o38h, create_time, update_time, nox, tvoc from ods_inorganization_wei_station_hour_i
    </sql>

    <select id="selectOdsInorganizationWeiStationHourIList" parameterType="cn.cecep.talroad.domain.OdsInorganizationWeiStationHourI" resultMap="OdsInorganizationWeiStationHourIResult">
        <include refid="selectOdsInorganizationWeiStationHourIVo"/>
        <where>
            <if test="stationId != null  and stationId != ''"> and station_id = #{stationId}</if>
            <if test="stationCode != null  and stationCode != ''"> and station_code = #{stationCode}</if>
            <if test="receiveTime != null  and receiveTime != ''"> and receive_time = #{receiveTime}</if>
            <if test="co != null  and co != ''"> and co = #{co}</if>
            <if test="no2 != null  and no2 != ''"> and no2 = #{no2}</if>
            <if test="so2 != null  and so2 != ''"> and so2 = #{so2}</if>
            <if test="o3 != null  and o3 != ''"> and o3 = #{o3}</if>
            <if test="voc != null  and voc != ''"> and voc = #{voc}</if>
            <if test="noise != null  and noise != ''"> and noise = #{noise}</if>
            <if test="pm25 != null  and pm25 != ''"> and pm25 = #{pm25}</if>
            <if test="pm10 != null  and pm10 != ''"> and pm10 = #{pm10}</if>
            <if test="temperature != null  and temperature != ''"> and temperature = #{temperature}</if>
            <if test="utc != null  and utc != ''"> and utc = #{utc}</if>
            <if test="humidity != null  and humidity != ''"> and humidity = #{humidity}</if>
            <if test="wdirect != null  and wdirect != ''"> and wdirect = #{wdirect}</if>
            <if test="wspeed != null  and wspeed != ''"> and wspeed = #{wspeed}</if>
            <if test="apress != null  and apress != ''"> and apress = #{apress}</if>
            <if test="equstatename != null  and equstatename != ''"> and equstatename like concat('%', #{equstatename}, '%')</if>
            <if test="equstate != null  and equstate != ''"> and equstate = #{equstate}</if>
            <if test="no != null  and no != ''"> and no = #{no}</if>
            <if test="tsp != null  and tsp != ''"> and tsp = #{tsp}</if>
            <if test="aqi != null  and aqi != ''"> and aqi = #{aqi}</if>
            <if test="aqiLevel != null  and aqiLevel != ''"> and aqi_level = #{aqiLevel}</if>
            <if test="priPollute != null  and priPollute != ''"> and pri_pollute = #{priPollute}</if>
            <if test="type != null  and type != ''"> and type = #{type}</if>
            <if test="o38h != null  and o38h != ''"> and o38h = #{o38h}</if>
            <if test="nox != null  and nox != ''"> and nox = #{nox}</if>
            <if test="tvoc != null  and tvoc != ''"> and tvoc = #{tvoc}</if>
        </where>
    </select>

</mapper>
