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

    <resultMap type="cn.cecep.talroad.domain.MonDevFsHour" id="MonDevFsHourResult">
        <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="fs100"    column="fs100"    />
        <result property="fs101"    column="fs101"    />
        <result property="fz100"    column="fz100"    />
        <result property="fz101"    column="fz101"    />
        <result property="fz102"    column="fz102"    />
        <result property="fz103"    column="fz103"    />
        <result property="fz104"    column="fz104"    />
        <result property="fz105"    column="fz105"    />
        <result property="fz106"    column="fz106"    />
        <result property="fz107"    column="fz107"    />
        <result property="fz108"    column="fz108"    />
        <result property="g229"    column="g229"    />
        <result property="g230"    column="g230"    />
        <result property="g231"    column="g231"    />
        <result property="g232"    column="g232"    />
        <result property="g233"    column="g233"    />
        <result property="g234"    column="g234"    />
        <result property="g332"    column="g332"    />
        <result property="g333"    column="g333"    />
        <result property="g334"    column="g334"    />
        <result property="g335"    column="g335"    />
        <result property="g602"    column="g602"    />
        <result property="ga04"    column="ga04"    />
        <result property="gb14"    column="gb14"    />
        <result property="gb15"    column="gb15"    />
        <result property="gb16"    column="gb16"    />
        <result property="gb17"    column="gb17"    />
        <result property="gb18"    column="gb18"    />
        <result property="gb19"    column="gb19"    />
        <result property="gc00"    column="gc00"    />
        <result property="gc01"    column="gc01"    />
        <result property="gc02"    column="gc02"    />
        <result property="gc03"    column="gc03"    />
        <result property="gc04"    column="gc04"    />
        <result property="gc05"    column="gc05"    />
        <result property="gc06"    column="gc06"    />
        <result property="gc07"    column="gc07"    />
        <result property="gc08"    column="gc08"    />
        <result property="gc09"    column="gc09"    />
        <result property="gc10"    column="gc10"    />
        <result property="gc11"    column="gc11"    />
        <result property="gc12"    column="gc12"    />
        <result property="gc13"    column="gc13"    />
        <result property="gc14"    column="gc14"    />
        <result property="gc15"    column="gc15"    />
        <result property="gc16"    column="gc16"    />
        <result property="gc17"    column="gc17"    />
        <result property="gc19"    column="gc19"    />
        <result property="gc20"    column="gc20"    />
        <result property="gc21"    column="gc21"    />
        <result property="gc22"    column="gc22"    />
        <result property="gc23"    column="gc23"    />
        <result property="gc25"    column="gc25"    />
        <result property="gc26"    column="gc26"    />
        <result property="gc27"    column="gc27"    />
        <result property="gc28"    column="gc28"    />
        <result property="gc29"    column="gc29"    />
        <result property="gc30"    column="gc30"    />
        <result property="gc31"    column="gc31"    />
        <result property="addiParam"    column="addi_param"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createTime"    column="create_time"    />
        <result property="gc24"    column="gc24"    />
    </resultMap>


    <sql id="selectMonDevFsHourVo">
        select data_id, factory_id, device_id, time_type, data_time, fs100, fs101, fz100, fz101, fz102, fz103, fz104, fz105, fz106, fz107, fz108, g229, g230, g231, g232, g233, g234, g332, g333, g334, g335, g602, ga04, gb14, gb15, gb16, gb17, gb18, gb19, gc00, gc01, gc02, gc03, gc04, gc05, gc06, gc07, gc08, gc09, gc10, gc11, gc12, gc13, gc14, gc15, gc16, gc17, gc19, gc20, gc21, gc22, gc23, gc25, gc26, gc27, gc28, gc29, gc30, gc31, addi_param, update_time, create_time, gc24 from mon_dev_fs_hour
    </sql>

    <select id="selectMonDevFsHourList" parameterType="cn.cecep.talroad.domain.MonDevFsHour" resultMap="MonDevFsHourResult">
        <include refid="selectMonDevFsHourVo"/>
        <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="fs100 != null  and fs100 != ''"> and fs100 = #{fs100}</if>
            <if test="fs101 != null  and fs101 != ''"> and fs101 = #{fs101}</if>
            <if test="fz100 != null  and fz100 != ''"> and fz100 = #{fz100}</if>
            <if test="fz101 != null  and fz101 != ''"> and fz101 = #{fz101}</if>
            <if test="fz102 != null  and fz102 != ''"> and fz102 = #{fz102}</if>
            <if test="fz103 != null  and fz103 != ''"> and fz103 = #{fz103}</if>
            <if test="fz104 != null  and fz104 != ''"> and fz104 = #{fz104}</if>
            <if test="fz105 != null  and fz105 != ''"> and fz105 = #{fz105}</if>
            <if test="fz106 != null  and fz106 != ''"> and fz106 = #{fz106}</if>
            <if test="fz107 != null  and fz107 != ''"> and fz107 = #{fz107}</if>
            <if test="fz108 != null  and fz108 != ''"> and fz108 = #{fz108}</if>
            <if test="g229 != null  and g229 != ''"> and g229 = #{g229}</if>
            <if test="g230 != null  and g230 != ''"> and g230 = #{g230}</if>
            <if test="g231 != null  and g231 != ''"> and g231 = #{g231}</if>
            <if test="g232 != null  and g232 != ''"> and g232 = #{g232}</if>
            <if test="g233 != null  and g233 != ''"> and g233 = #{g233}</if>
            <if test="g234 != null  and g234 != ''"> and g234 = #{g234}</if>
            <if test="g332 != null  and g332 != ''"> and g332 = #{g332}</if>
            <if test="g333 != null  and g333 != ''"> and g333 = #{g333}</if>
            <if test="g334 != null  and g334 != ''"> and g334 = #{g334}</if>
            <if test="g335 != null  and g335 != ''"> and g335 = #{g335}</if>
            <if test="g602 != null  and g602 != ''"> and g602 = #{g602}</if>
            <if test="ga04 != null  and ga04 != ''"> and ga04 = #{ga04}</if>
            <if test="gb14 != null  and gb14 != ''"> and gb14 = #{gb14}</if>
            <if test="gb15 != null  and gb15 != ''"> and gb15 = #{gb15}</if>
            <if test="gb16 != null  and gb16 != ''"> and gb16 = #{gb16}</if>
            <if test="gb17 != null  and gb17 != ''"> and gb17 = #{gb17}</if>
            <if test="gb18 != null  and gb18 != ''"> and gb18 = #{gb18}</if>
            <if test="gb19 != null  and gb19 != ''"> and gb19 = #{gb19}</if>
            <if test="gc00 != null  and gc00 != ''"> and gc00 = #{gc00}</if>
            <if test="gc01 != null  and gc01 != ''"> and gc01 = #{gc01}</if>
            <if test="gc02 != null  and gc02 != ''"> and gc02 = #{gc02}</if>
            <if test="gc03 != null  and gc03 != ''"> and gc03 = #{gc03}</if>
            <if test="gc04 != null  and gc04 != ''"> and gc04 = #{gc04}</if>
            <if test="gc05 != null  and gc05 != ''"> and gc05 = #{gc05}</if>
            <if test="gc06 != null  and gc06 != ''"> and gc06 = #{gc06}</if>
            <if test="gc07 != null  and gc07 != ''"> and gc07 = #{gc07}</if>
            <if test="gc08 != null  and gc08 != ''"> and gc08 = #{gc08}</if>
            <if test="gc09 != null  and gc09 != ''"> and gc09 = #{gc09}</if>
            <if test="gc10 != null  and gc10 != ''"> and gc10 = #{gc10}</if>
            <if test="gc11 != null  and gc11 != ''"> and gc11 = #{gc11}</if>
            <if test="gc12 != null  and gc12 != ''"> and gc12 = #{gc12}</if>
            <if test="gc13 != null  and gc13 != ''"> and gc13 = #{gc13}</if>
            <if test="gc14 != null  and gc14 != ''"> and gc14 = #{gc14}</if>
            <if test="gc15 != null  and gc15 != ''"> and gc15 = #{gc15}</if>
            <if test="gc16 != null  and gc16 != ''"> and gc16 = #{gc16}</if>
            <if test="gc17 != null  and gc17 != ''"> and gc17 = #{gc17}</if>
            <if test="gc19 != null  and gc19 != ''"> and gc19 = #{gc19}</if>
            <if test="gc20 != null  and gc20 != ''"> and gc20 = #{gc20}</if>
            <if test="gc21 != null  and gc21 != ''"> and gc21 = #{gc21}</if>
            <if test="gc22 != null  and gc22 != ''"> and gc22 = #{gc22}</if>
            <if test="gc23 != null  and gc23 != ''"> and gc23 = #{gc23}</if>
            <if test="gc25 != null  and gc25 != ''"> and gc25 = #{gc25}</if>
            <if test="gc26 != null  and gc26 != ''"> and gc26 = #{gc26}</if>
            <if test="gc27 != null  and gc27 != ''"> and gc27 = #{gc27}</if>
            <if test="gc28 != null  and gc28 != ''"> and gc28 = #{gc28}</if>
            <if test="gc29 != null  and gc29 != ''"> and gc29 = #{gc29}</if>
            <if test="gc30 != null  and gc30 != ''"> and gc30 = #{gc30}</if>
            <if test="gc31 != null  and gc31 != ''"> and gc31 = #{gc31}</if>
            <if test="addiParam != null  and addiParam != ''"> and addi_param = #{addiParam}</if>
            <if test="gc24 != null  and gc24 != ''"> and gc24 = #{gc24}</if>
        </where>
    </select>
    <select id="getDataPage" resultType="cn.cecep.talroad.vo.MonDevFsVO">
        SELECT r.*, d.name
        from mon_dev_fs_hour r
                 LEFT JOIN bas_device d on r.device_id = d.device_id
            ${ew.customSqlSegment}
    </select>

</mapper>
