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

    <resultMap type="cn.cecep.talroad.domain.MonDevDlHour" id="MonDevDlHourResult">
        <result property="dataId"    column="data_id"    />
        <result property="factoryId"    column="factory_id"    />
        <result property="deviceId"    column="device_id"    />
        <result property="timeType"    column="time_type"    />
        <result property="dataTime"    column="data_time"    />
        <result property="g101"    column="g101"    />
        <result property="g102"    column="g102"    />
        <result property="g104"    column="g104"    />
        <result property="g109"    column="g109"    />
        <result property="g115"    column="g115"    />
        <result property="g119"    column="g119"    />
        <result property="g120"    column="g120"    />
        <result property="g121"    column="g121"    />
        <result property="g122"    column="g122"    />
        <result property="g123"    column="g123"    />
        <result property="g124"    column="g124"    />
        <result property="g125"    column="g125"    />
        <result property="g126"    column="g126"    />
        <result property="g127"    column="g127"    />
        <result property="g128"    column="g128"    />
        <result property="g129"    column="g129"    />
        <result property="g130"    column="g130"    />
        <result property="g131"    column="g131"    />
        <result property="g132"    column="g132"    />
        <result property="g133"    column="g133"    />
        <result property="g134"    column="g134"    />
        <result property="g136"    column="g136"    />
        <result property="g138"    column="g138"    />
        <result property="g139"    column="g139"    />
        <result property="g141"    column="g141"    />
        <result property="g201"    column="g201"    />
        <result property="g202"    column="g202"    />
        <result property="g213"    column="g213"    />
        <result property="g214"    column="g214"    />
        <result property="g215"    column="g215"    />
        <result property="g216"    column="g216"    />
        <result property="g217"    column="g217"    />
        <result property="g218"    column="g218"    />
        <result property="g219"    column="g219"    />
        <result property="g220"    column="g220"    />
        <result property="g221"    column="g221"    />
        <result property="g222"    column="g222"    />
        <result property="g223"    column="g223"    />
        <result property="g224"    column="g224"    />
        <result property="g225"    column="g225"    />
        <result property="g226"    column="g226"    />
        <result property="g227"    column="g227"    />
        <result property="g228"    column="g228"    />
        <result property="g301"    column="g301"    />
        <result property="g302"    column="g302"    />
        <result property="g303"    column="g303"    />
        <result property="g304"    column="g304"    />
        <result property="g305"    column="g305"    />
        <result property="g306"    column="g306"    />
        <result property="g307"    column="g307"    />
        <result property="g308"    column="g308"    />
        <result property="g309"    column="g309"    />
        <result property="g310"    column="g310"    />
        <result property="g311"    column="g311"    />
        <result property="g312"    column="g312"    />
        <result property="g315"    column="g315"    />
        <result property="g316"    column="g316"    />
        <result property="g317"    column="g317"    />
        <result property="g318"    column="g318"    />
        <result property="g319"    column="g319"    />
        <result property="g320"    column="g320"    />
        <result property="g321"    column="g321"    />
        <result property="g322"    column="g322"    />
        <result property="g323"    column="g323"    />
        <result property="g324"    column="g324"    />
        <result property="g325"    column="g325"    />
        <result property="g326"    column="g326"    />
        <result property="g327"    column="g327"    />
        <result property="g328"    column="g328"    />
        <result property="g501"    column="g501"    />
        <result property="g502"    column="g502"    />
        <result property="g602"    column="g602"    />
        <result property="g705"    column="g705"    />
        <result property="g903"    column="g903"    />
        <result property="g904"    column="g904"    />
        <result property="g905"    column="g905"    />
        <result property="g906"    column="g906"    />
        <result property="g947"    column="g947"    />
        <result property="gb00"    column="gb00"    />
        <result property="gb01"    column="gb01"    />
        <result property="gb02"    column="gb02"    />
        <result property="gb03"    column="gb03"    />
        <result property="gb04"    column="gb04"    />
        <result property="gb05"    column="gb05"    />
        <result property="gb06"    column="gb06"    />
        <result property="gb07"    column="gb07"    />
        <result property="gb08"    column="gb08"    />
        <result property="gb09"    column="gb09"    />
        <result property="hq100"    column="hq100"    />
        <result property="hs100"    column="hs100"    />
        <result property="hs101"    column="hs101"    />
        <result property="hz100"    column="hz100"    />
        <result property="hz101"    column="hz101"    />
        <result property="hz102"    column="hz102"    />
        <result property="hz103"    column="hz103"    />
        <result property="hz105"    column="hz105"    />
        <result property="hz106"    column="hz106"    />
        <result property="hz107"    column="hz107"    />
        <result property="hz108"    column="hz108"    />
        <result property="p103"    column="p103"    />
        <result property="addiParam"    column="addi_param"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createTime"    column="create_time"    />
        <result property="g103"    column="g103"    />
        <result property="g203"    column="g203"    />
        <result property="g204"    column="g204"    />
    </resultMap>


    <sql id="selectMonDevDlHourVo">
        select data_id, factory_id, device_id, time_type, data_time, g101, g102, g104, g109, g115, g119, g120, g121, g122, g123, g124, g125, g126, g127, g128, g129, g130, g131, g132, g133, g134, g136, g138, g139, g141, g201, g202, g213, g214, g215, g216, g217, g218, g219, g220, g221, g222, g223, g224, g225, g226, g227, g228, g301, g302, g303, g304, g305, g306, g307, g308, g309, g310, g311, g312, g315, g316, g317, g318, g319, g320, g321, g322, g323, g324, g325, g326, g327, g328, g501, g502, g602, g705, g903, g904, g905, g906, g947, gb00, gb01, gb02, gb03, gb04, gb05, gb06, gb07, gb08, gb09, hq100, hs100, hs101, hz100, hz101, hz102, hz103, hz105, hz106, hz107, hz108, p103, addi_param, update_time, create_time, g103, g203, g204 from mon_dev_dl_hour
    </sql>

    <select id="selectMonDevDlHourList" parameterType="cn.cecep.talroad.domain.MonDevDlHour" resultMap="MonDevDlHourResult">
        <include refid="selectMonDevDlHourVo"/>
        <where>
            <if test="dataId != null "> and data_id = #{dataId}</if>
            <if test="factoryId != null "> and factory_id = #{factoryId}</if>
            <if test="deviceId != null  and deviceId != ''"> and device_id = #{deviceId}</if>
            <if test="timeType != null  and timeType != ''"> and time_type = #{timeType}</if>
            <if test="dataTime != null  and dataTime != ''"> and data_time = #{dataTime}</if>
            <if test="g101 != null "> and g101 = #{g101}</if>
            <if test="g102 != null  and g102 != ''"> and g102 = #{g102}</if>
            <if test="g104 != null  and g104 != ''"> and g104 = #{g104}</if>
            <if test="g109 != null "> and g109 = #{g109}</if>
            <if test="g115 != null  and g115 != ''"> and g115 = #{g115}</if>
            <if test="g119 != null  and g119 != ''"> and g119 = #{g119}</if>
            <if test="g120 != null  and g120 != ''"> and g120 = #{g120}</if>
            <if test="g121 != null  and g121 != ''"> and g121 = #{g121}</if>
            <if test="g122 != null  and g122 != ''"> and g122 = #{g122}</if>
            <if test="g123 != null  and g123 != ''"> and g123 = #{g123}</if>
            <if test="g124 != null  and g124 != ''"> and g124 = #{g124}</if>
            <if test="g125 != null  and g125 != ''"> and g125 = #{g125}</if>
            <if test="g126 != null  and g126 != ''"> and g126 = #{g126}</if>
            <if test="g127 != null  and g127 != ''"> and g127 = #{g127}</if>
            <if test="g128 != null  and g128 != ''"> and g128 = #{g128}</if>
            <if test="g129 != null  and g129 != ''"> and g129 = #{g129}</if>
            <if test="g130 != null  and g130 != ''"> and g130 = #{g130}</if>
            <if test="g131 != null  and g131 != ''"> and g131 = #{g131}</if>
            <if test="g132 != null  and g132 != ''"> and g132 = #{g132}</if>
            <if test="g133 != null  and g133 != ''"> and g133 = #{g133}</if>
            <if test="g134 != null  and g134 != ''"> and g134 = #{g134}</if>
            <if test="g136 != null  and g136 != ''"> and g136 = #{g136}</if>
            <if test="g138 != null "> and g138 = #{g138}</if>
            <if test="g139 != null  and g139 != ''"> and g139 = #{g139}</if>
            <if test="g141 != null  and g141 != ''"> and g141 = #{g141}</if>
            <if test="g201 != null  and g201 != ''"> and g201 = #{g201}</if>
            <if test="g202 != null  and g202 != ''"> and g202 = #{g202}</if>
            <if test="g213 != null  and g213 != ''"> and g213 = #{g213}</if>
            <if test="g214 != null  and g214 != ''"> and g214 = #{g214}</if>
            <if test="g215 != null  and g215 != ''"> and g215 = #{g215}</if>
            <if test="g216 != null  and g216 != ''"> and g216 = #{g216}</if>
            <if test="g217 != null  and g217 != ''"> and g217 = #{g217}</if>
            <if test="g218 != null  and g218 != ''"> and g218 = #{g218}</if>
            <if test="g219 != null  and g219 != ''"> and g219 = #{g219}</if>
            <if test="g220 != null  and g220 != ''"> and g220 = #{g220}</if>
            <if test="g221 != null  and g221 != ''"> and g221 = #{g221}</if>
            <if test="g222 != null  and g222 != ''"> and g222 = #{g222}</if>
            <if test="g223 != null  and g223 != ''"> and g223 = #{g223}</if>
            <if test="g224 != null  and g224 != ''"> and g224 = #{g224}</if>
            <if test="g225 != null  and g225 != ''"> and g225 = #{g225}</if>
            <if test="g226 != null  and g226 != ''"> and g226 = #{g226}</if>
            <if test="g227 != null  and g227 != ''"> and g227 = #{g227}</if>
            <if test="g228 != null  and g228 != ''"> and g228 = #{g228}</if>
            <if test="g301 != null  and g301 != ''"> and g301 = #{g301}</if>
            <if test="g302 != null "> and g302 = #{g302}</if>
            <if test="g303 != null  and g303 != ''"> and g303 = #{g303}</if>
            <if test="g304 != null  and g304 != ''"> and g304 = #{g304}</if>
            <if test="g305 != null  and g305 != ''"> and g305 = #{g305}</if>
            <if test="g306 != null  and g306 != ''"> and g306 = #{g306}</if>
            <if test="g307 != null  and g307 != ''"> and g307 = #{g307}</if>
            <if test="g308 != null  and g308 != ''"> and g308 = #{g308}</if>
            <if test="g309 != null  and g309 != ''"> and g309 = #{g309}</if>
            <if test="g310 != null  and g310 != ''"> and g310 = #{g310}</if>
            <if test="g311 != null  and g311 != ''"> and g311 = #{g311}</if>
            <if test="g312 != null  and g312 != ''"> and g312 = #{g312}</if>
            <if test="g315 != null  and g315 != ''"> and g315 = #{g315}</if>
            <if test="g316 != null  and g316 != ''"> and g316 = #{g316}</if>
            <if test="g317 != null  and g317 != ''"> and g317 = #{g317}</if>
            <if test="g318 != null  and g318 != ''"> and g318 = #{g318}</if>
            <if test="g319 != null  and g319 != ''"> and g319 = #{g319}</if>
            <if test="g320 != null  and g320 != ''"> and g320 = #{g320}</if>
            <if test="g321 != null  and g321 != ''"> and g321 = #{g321}</if>
            <if test="g322 != null  and g322 != ''"> and g322 = #{g322}</if>
            <if test="g323 != null  and g323 != ''"> and g323 = #{g323}</if>
            <if test="g324 != null  and g324 != ''"> and g324 = #{g324}</if>
            <if test="g325 != null  and g325 != ''"> and g325 = #{g325}</if>
            <if test="g326 != null  and g326 != ''"> and g326 = #{g326}</if>
            <if test="g327 != null  and g327 != ''"> and g327 = #{g327}</if>
            <if test="g328 != null  and g328 != ''"> and g328 = #{g328}</if>
            <if test="g501 != null  and g501 != ''"> and g501 = #{g501}</if>
            <if test="g502 != null  and g502 != ''"> and g502 = #{g502}</if>
            <if test="g602 != null  and g602 != ''"> and g602 = #{g602}</if>
            <if test="g705 != null  and g705 != ''"> and g705 = #{g705}</if>
            <if test="g903 != null  and g903 != ''"> and g903 = #{g903}</if>
            <if test="g904 != null  and g904 != ''"> and g904 = #{g904}</if>
            <if test="g905 != null "> and g905 = #{g905}</if>
            <if test="g906 != null  and g906 != ''"> and g906 = #{g906}</if>
            <if test="g947 != null  and g947 != ''"> and g947 = #{g947}</if>
            <if test="gb00 != null  and gb00 != ''"> and gb00 = #{gb00}</if>
            <if test="gb01 != null  and gb01 != ''"> and gb01 = #{gb01}</if>
            <if test="gb02 != null  and gb02 != ''"> and gb02 = #{gb02}</if>
            <if test="gb03 != null  and gb03 != ''"> and gb03 = #{gb03}</if>
            <if test="gb04 != null  and gb04 != ''"> and gb04 = #{gb04}</if>
            <if test="gb05 != null  and gb05 != ''"> and gb05 = #{gb05}</if>
            <if test="gb06 != null  and gb06 != ''"> and gb06 = #{gb06}</if>
            <if test="gb07 != null  and gb07 != ''"> and gb07 = #{gb07}</if>
            <if test="gb08 != null  and gb08 != ''"> and gb08 = #{gb08}</if>
            <if test="gb09 != null  and gb09 != ''"> and gb09 = #{gb09}</if>
            <if test="hq100 != null  and hq100 != ''"> and hq100 = #{hq100}</if>
            <if test="hs100 != null  and hs100 != ''"> and hs100 = #{hs100}</if>
            <if test="hs101 != null  and hs101 != ''"> and hs101 = #{hs101}</if>
            <if test="hz100 != null  and hz100 != ''"> and hz100 = #{hz100}</if>
            <if test="hz101 != null  and hz101 != ''"> and hz101 = #{hz101}</if>
            <if test="hz102 != null  and hz102 != ''"> and hz102 = #{hz102}</if>
            <if test="hz103 != null  and hz103 != ''"> and hz103 = #{hz103}</if>
            <if test="hz105 != null  and hz105 != ''"> and hz105 = #{hz105}</if>
            <if test="hz106 != null  and hz106 != ''"> and hz106 = #{hz106}</if>
            <if test="hz107 != null "> and hz107 = #{hz107}</if>
            <if test="hz108 != null  and hz108 != ''"> and hz108 = #{hz108}</if>
            <if test="p103 != null  and p103 != ''"> and p103 = #{p103}</if>
            <if test="addiParam != null  and addiParam != ''"> and addi_param = #{addiParam}</if>
            <if test="g103 != null  and g103 != ''"> and g103 = #{g103}</if>
            <if test="g203 != null  and g203 != ''"> and g203 = #{g203}</if>
            <if test="g204 != null  and g204 != ''"> and g204 = #{g204}</if>
        </where>
    </select>
    <select id="getDataPage" resultType="cn.cecep.talroad.vo.MonDevDlVO">
        SELECT r.*, d.name
        from mon_dev_dl_hour r
                 LEFT JOIN bas_device d on r.device_id = d.device_id
            ${ew.customSqlSegment}
    </select>

</mapper>
