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

    <resultMap type="cn.cecep.talroad.domain.MonDevSnOther" id="MonDevSnOtherResult">
        <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="ss100"    column="ss100"    />
        <result property="ss101"    column="ss101"    />
        <result property="sz100"    column="sz100"    />
        <result property="sz101"    column="sz101"    />
        <result property="sz102"    column="sz102"    />
        <result property="sz103"    column="sz103"    />
        <result property="sz104"    column="sz104"    />
        <result property="sz105"    column="sz105"    />
        <result property="sz106"    column="sz106"    />
        <result property="sz107"    column="sz107"    />
        <result property="sz108"    column="sz108"    />
        <result property="sz109"    column="sz109"    />
        <result property="sz110"    column="sz110"    />
        <result property="sz111"    column="sz111"    />
        <result property="sz112"    column="sz112"    />
        <result property="sz113"    column="sz113"    />
        <result property="sz114"    column="sz114"    />
        <result property="sz115"    column="sz115"    />
        <result property="addiParam"    column="addi_param"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createTime"    column="create_time"    />
    </resultMap>


    <sql id="selectMonDevSnOtherVo">
        select data_id, factory_id, device_id, time_type, data_time, ss100, ss101, sz100, sz101, sz102, sz103, sz104, sz105, sz106, sz107, sz108, sz109, sz110, sz111, sz112, sz113, sz114, sz115, addi_param, update_time, create_time from mon_dev_sn_other
    </sql>

    <select id="selectMonDevSnOtherList" parameterType="cn.cecep.talroad.domain.MonDevSnOther" resultMap="MonDevSnOtherResult">
        <include refid="selectMonDevSnOtherVo"/>
        <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="ss100 != null  and ss100 != ''"> and ss100 = #{ss100}</if>
            <if test="ss101 != null  and ss101 != ''"> and ss101 = #{ss101}</if>
            <if test="sz100 != null  and sz100 != ''"> and sz100 = #{sz100}</if>
            <if test="sz101 != null  and sz101 != ''"> and sz101 = #{sz101}</if>
            <if test="sz102 != null  and sz102 != ''"> and sz102 = #{sz102}</if>
            <if test="sz103 != null  and sz103 != ''"> and sz103 = #{sz103}</if>
            <if test="sz104 != null  and sz104 != ''"> and sz104 = #{sz104}</if>
            <if test="sz105 != null  and sz105 != ''"> and sz105 = #{sz105}</if>
            <if test="sz106 != null  and sz106 != ''"> and sz106 = #{sz106}</if>
            <if test="sz107 != null  and sz107 != ''"> and sz107 = #{sz107}</if>
            <if test="sz108 != null  and sz108 != ''"> and sz108 = #{sz108}</if>
            <if test="sz109 != null  and sz109 != ''"> and sz109 = #{sz109}</if>
            <if test="sz110 != null  and sz110 != ''"> and sz110 = #{sz110}</if>
            <if test="sz111 != null  and sz111 != ''"> and sz111 = #{sz111}</if>
            <if test="sz112 != null  and sz112 != ''"> and sz112 = #{sz112}</if>
            <if test="sz113 != null  and sz113 != ''"> and sz113 = #{sz113}</if>
            <if test="sz114 != null  and sz114 != ''"> and sz114 = #{sz114}</if>
            <if test="sz115 != null  and sz115 != ''"> and sz115 = #{sz115}</if>
            <if test="addiParam != null  and addiParam != ''"> and addi_param = #{addiParam}</if>
        </where>
    </select>
    <select id="getDataPage" resultType="cn.cecep.talroad.vo.MonDevSnVO">
        SELECT r.*, d.name
        from mon_dev_sn_other r
                 LEFT JOIN bas_device d on r.device_id = d.device_id
            ${ew.customSqlSegment}
    </select>

</mapper>
