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

    <resultMap type="cn.cecep.talroad.domain.MonDevTcHour" id="MonDevTcHourResult">
        <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="g983"    column="g983"    />
        <result property="g987"    column="g987"    />
        <result property="g988"    column="g988"    />
        <result property="g989"    column="g989"    />
        <result property="g990"    column="g990"    />
        <result property="g991"    column="g991"    />
        <result property="g985"    column="g985"    />
        <result property="g986"    column="g986"    />
        <result property="g140"    column="g140"    />
        <result property="gb08"    column="gb08"    />
        <result property="gb09"    column="gb09"    />
        <result property="g141"    column="g141"    />
        <result property="g313"    column="g313"    />
        <result property="g314"    column="g314"    />
        <result property="g329"    column="g329"    />
        <result property="g604"    column="g604"    />
        <result property="g605"    column="g605"    />
        <result property="g601"    column="g601"    />
        <result property="g501"    column="g501"    />
        <result property="g502"    column="g502"    />
        <result property="g503"    column="g503"    />
        <result property="g504"    column="g504"    />
        <result property="addiParam"    column="addi_param"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createTime"    column="create_time"    />
    </resultMap>


    <sql id="selectMonDevTcHourVo">
        select data_id, factory_id, device_id, time_type, data_time, g983, g987, g988, g989, g990, g991, g985, g986, g140, gb08, gb09, g141, g313, g314, g329, g604, g605, g601, g501, g502, g503, g504, addi_param, update_time, create_time from mon_dev_tc_hour
    </sql>

    <select id="selectMonDevTcHourList" parameterType="cn.cecep.talroad.domain.MonDevTcHour" resultMap="MonDevTcHourResult">
        <include refid="selectMonDevTcHourVo"/>
        <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="g983 != null  and g983 != ''"> and g983 = #{g983}</if>
            <if test="g987 != null  and g987 != ''"> and g987 = #{g987}</if>
            <if test="g988 != null  and g988 != ''"> and g988 = #{g988}</if>
            <if test="g989 != null  and g989 != ''"> and g989 = #{g989}</if>
            <if test="g990 != null  and g990 != ''"> and g990 = #{g990}</if>
            <if test="g991 != null  and g991 != ''"> and g991 = #{g991}</if>
            <if test="g985 != null  and g985 != ''"> and g985 = #{g985}</if>
            <if test="g986 != null  and g986 != ''"> and g986 = #{g986}</if>
            <if test="g140 != null  and g140 != ''"> and g140 = #{g140}</if>
            <if test="gb08 != null  and gb08 != ''"> and gb08 = #{gb08}</if>
            <if test="gb09 != null  and gb09 != ''"> and gb09 = #{gb09}</if>
            <if test="g141 != null  and g141 != ''"> and g141 = #{g141}</if>
            <if test="g313 != null  and g313 != ''"> and g313 = #{g313}</if>
            <if test="g314 != null  and g314 != ''"> and g314 = #{g314}</if>
            <if test="g329 != null  and g329 != ''"> and g329 = #{g329}</if>
            <if test="g604 != null  and g604 != ''"> and g604 = #{g604}</if>
            <if test="g605 != null  and g605 != ''"> and g605 = #{g605}</if>
            <if test="g601 != null  and g601 != ''"> and g601 = #{g601}</if>
            <if test="g501 != null  and g501 != ''"> and g501 = #{g501}</if>
            <if test="g502 != null  and g502 != ''"> and g502 = #{g502}</if>
            <if test="g503 != null  and g503 != ''"> and g503 = #{g503}</if>
            <if test="g504 != null  and g504 != ''"> and g504 = #{g504}</if>
            <if test="addiParam != null  and addiParam != ''"> and addi_param = #{addiParam}</if>
        </where>
    </select>

</mapper>
