123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?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="com.bizmatics.persistence.mapper.HookupMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.bizmatics.model.Hookup">
- <id column="id" property="id"/>
- <result column="outerType" property="outerType"/>
- <result column="title" property="title"/>
- <result column="template" property="template"/>
- <result column="props" property="props"/>
- <result column="default_color" property="defaultColor"/>
- <result column="priview_img" property="priviewImg"/>
- <result column="site_id" property="siteId"/>
- <result column="creator" property="creator"/>
- <result column="create_time" property="createTime"/>
- <result column="dataType" property="dataType"/>
- <result column="createType" property="createType"/>
- <result column="echartsOption" property="echartsOption"/>
- <result column="svgLineSelectval" property="svgLineSelectval"/>
- <result column="elementBool" property="elementBool"/>
- </resultMap>
- <select id="getDevidetype" resultType="com.bizmatics.model.vo.DeviceTypeVo">
- SELECT
- b.variable_coding,
- c.device_code,
- c.device_type,
- b.data_area
- FROM
- hookup_component_complete AS a
- JOIN device_analog_variable_list AS b ON a.variable_id = b.id
- JOIN device AS c ON b.communication_equipment = c.id
- <where>
- <if test="siteId != null and siteId != 0">
- a.site_id = #{siteId}
- </if>
- </where>
- </select>
- <select id="getVariable" resultType="com.bizmatics.model.vo.RtAnalogDataOneVo">
- SELECT
- b.variable_coding,
- d.*
- FROM
- hookup_component_complete AS a
- JOIN device_analog_variable_list AS b ON a.variable_id = b.id
- JOIN device AS c ON b.communication_equipment = c.id
- JOIN ${table} AS d ON c.device_code = d.deviceName
- <where>
- <if test="siteId != null and siteId != 0">
- a.site_id = #{siteId}
- </if>
- </where>
- GROUP BY
- b.variable_coding
- </select>
- <select id="getVariable171" resultType="com.bizmatics.model.vo.RtAnalogDataOneVo">
- SELECT
- b.variable_coding,
- d.*
- FROM
- hookup_component_complete AS a
- JOIN device_analog_variable_list AS b ON a.variable_id = b.id
- JOIN device AS c ON b.communication_equipment = c.id
- JOIN ${table} AS d ON c.device_code = d.deviceName
- <where>
- <if test="siteId != null and siteId != 0">
- a.site_id = #{siteId}
- </if>
- </where>
- GROUP BY
- b.variable_coding
- </select>
- <select id="getVariable173" resultType="com.bizmatics.model.vo.RtAnalogDataOneVo">
- SELECT
- b.variable_coding,
- d.*
- FROM
- hookup_component_complete AS a
- JOIN device_analog_variable_list AS b ON a.variable_id = b.id
- JOIN device AS c ON b.communication_equipment = c.id
- JOIN ${table} AS d ON c.device_code = d.deviceName
- <where>
- <if test="siteId != null and siteId != 0">
- a.site_id = #{siteId}
- </if>
- </where>
- GROUP BY
- b.variable_coding
- </select>
- <select id="getHookupComponentComplete" resultType="com.bizmatics.model.vo.HookupComponentCompleteTowVo">
- SELECT
- a.*, b.variable_coding
- FROM
- hookup_component_complete AS a
- JOIN device_analog_variable_list AS b ON a.variable_id = b.id
- <where>
- <if test="siteId != null and siteId != 0">
- a.site_id = #{siteId}
- </if>
- </where>
- </select>
- </mapper>
|