|
|
|
|
@ -1,64 +1,81 @@
|
|
|
|
|
<?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">
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.ruoyi.system.mapper.T_CollectDeviceInfoMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="T_CollectDeviceInfo" id="T_CollectDeviceInfoResult">
|
|
|
|
|
<result property="objid" column="objid" />
|
|
|
|
|
<result property="collectDeviceId" column="collectDeviceId" />
|
|
|
|
|
<result property="manufacturer" column="manufacturer" />
|
|
|
|
|
<result property="model" column="model" />
|
|
|
|
|
<result property="factoryNumber" column="factoryNumber" />
|
|
|
|
|
<result property="produceDate" column="produceDate" />
|
|
|
|
|
<result property="settingAddress" column="settingAddress" />
|
|
|
|
|
<result property="energyTypeId" column="energyTypeId" />
|
|
|
|
|
<result property="ip" column="ip" />
|
|
|
|
|
<result property="objid" column="objid"/>
|
|
|
|
|
<result property="collectDeviceId" column="collectDeviceId"/>
|
|
|
|
|
<result property="manufacturer" column="manufacturer"/>
|
|
|
|
|
<result property="model" column="model"/>
|
|
|
|
|
<result property="factoryNumber" column="factoryNumber"/>
|
|
|
|
|
<result property="produceDate" column="produceDate"/>
|
|
|
|
|
<result property="settingAddress" column="settingAddress"/>
|
|
|
|
|
<result property="energyTypeId" column="energyTypeId"/>
|
|
|
|
|
<result property="ip" column="ip"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<resultMap type="T_CollectDeviceInfoDTO" id="T_CollectDeviceInfoDTOResult">
|
|
|
|
|
<result property="objid" column="objid" />
|
|
|
|
|
<result property="collectDeviceId" column="collectDeviceId" />
|
|
|
|
|
<result property="manufacturer" column="manufacturer" />
|
|
|
|
|
<result property="model" column="model" />
|
|
|
|
|
<result property="factoryNumber" column="factoryNumber" />
|
|
|
|
|
<result property="produceDate" column="produceDate" />
|
|
|
|
|
<result property="settingAddress" column="settingAddress" />
|
|
|
|
|
<result property="energyTypeId" column="energyTypeId" />
|
|
|
|
|
<result property="ip" column="ip" />
|
|
|
|
|
<result property="objid" column="objid"/>
|
|
|
|
|
<result property="collectDeviceId" column="collectDeviceId"/>
|
|
|
|
|
<result property="manufacturer" column="manufacturer"/>
|
|
|
|
|
<result property="model" column="model"/>
|
|
|
|
|
<result property="factoryNumber" column="factoryNumber"/>
|
|
|
|
|
<result property="produceDate" column="produceDate"/>
|
|
|
|
|
<result property="settingAddress" column="settingAddress"/>
|
|
|
|
|
<result property="energyTypeId" column="energyTypeId"/>
|
|
|
|
|
<result property="ip" column="ip"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectT_CollectDeviceInfoVo">
|
|
|
|
|
select objid, collectDeviceId, manufacturer, model, factoryNumber, produceDate, settingAddress, energyTypeId, ip from T_CollectDeviceInfo
|
|
|
|
|
select objid,
|
|
|
|
|
collectDeviceId,
|
|
|
|
|
manufacturer,
|
|
|
|
|
model,
|
|
|
|
|
factoryNumber,
|
|
|
|
|
produceDate,
|
|
|
|
|
settingAddress,
|
|
|
|
|
energyTypeId,
|
|
|
|
|
ip
|
|
|
|
|
from T_CollectDeviceInfo
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<sql id="selectT_CollectDeviceInfoDTOVo">
|
|
|
|
|
select t1.objid as objid, t1.collectDeviceId as collectDeviceId,t1.manufacturer as manufacturer,t1.model as model,
|
|
|
|
|
t1.factoryNumber as factoryNumber,t1.produceDate as produceDate,t1.settingAddress as settingAddress,
|
|
|
|
|
t2.energyName as energyTypeId, t1.ip as ip
|
|
|
|
|
from T_CollectDeviceInfo t1
|
|
|
|
|
left join T_EnergyType t2 on t1.energyTypeId = t2.energyTypeId
|
|
|
|
|
select t1.objid as objid,
|
|
|
|
|
t1.collectDeviceId as collectDeviceId,
|
|
|
|
|
t1.manufacturer as manufacturer,
|
|
|
|
|
t1.model as model,
|
|
|
|
|
t1.factoryNumber as factoryNumber,
|
|
|
|
|
t1.produceDate as produceDate,
|
|
|
|
|
t1.settingAddress as settingAddress,
|
|
|
|
|
t2.energyName as energyTypeId,
|
|
|
|
|
t1.ip as ip
|
|
|
|
|
from T_CollectDeviceInfo t1
|
|
|
|
|
left join T_EnergyType t2 on t1.energyTypeId = t2.energyTypeId
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectT_CollectDeviceInfoList" parameterType="T_CollectDeviceInfo" resultMap="T_CollectDeviceInfoResult">
|
|
|
|
|
<select id="selectT_CollectDeviceInfoList" parameterType="T_CollectDeviceInfo"
|
|
|
|
|
resultMap="T_CollectDeviceInfoResult">
|
|
|
|
|
<include refid="selectT_CollectDeviceInfoVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="collectDeviceId != null and collectDeviceId != ''"> and collectDeviceId = #{collectDeviceId}</if>
|
|
|
|
|
<if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
|
|
|
|
|
<if test="model != null and model != ''"> and model = #{model}</if>
|
|
|
|
|
<if test="factoryNumber != null and factoryNumber != ''"> and factoryNumber = #{factoryNumber}</if>
|
|
|
|
|
<if test="produceDate != null "> and produceDate = #{produceDate}</if>
|
|
|
|
|
<if test="settingAddress != null and settingAddress != ''"> and settingAddress = #{settingAddress}</if>
|
|
|
|
|
<if test="energyTypeId != null "> and energyTypeId = #{energyTypeId}</if>
|
|
|
|
|
<if test="ip != null and ip != ''"> and ip = #{ip}</if>
|
|
|
|
|
<if test="collectDeviceId != null and collectDeviceId != ''">and collectDeviceId = #{collectDeviceId}</if>
|
|
|
|
|
<if test="manufacturer != null and manufacturer != ''">and manufacturer = #{manufacturer}</if>
|
|
|
|
|
<if test="model != null and model != ''">and model = #{model}</if>
|
|
|
|
|
<if test="factoryNumber != null and factoryNumber != ''">and factoryNumber = #{factoryNumber}</if>
|
|
|
|
|
<if test="produceDate != null ">and produceDate = #{produceDate}</if>
|
|
|
|
|
<if test="settingAddress != null and settingAddress != ''">and settingAddress = #{settingAddress}</if>
|
|
|
|
|
<if test="energyTypeId != null ">and energyTypeId = #{energyTypeId}</if>
|
|
|
|
|
<if test="ip != null and ip != ''">and ip = #{ip}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectT_CollectDeviceInfoDTOList" parameterType="T_CollectDeviceInfoDTO" resultMap="T_CollectDeviceInfoDTOResult">
|
|
|
|
|
<select id="selectT_CollectDeviceInfoDTOList" parameterType="T_CollectDeviceInfoDTO"
|
|
|
|
|
resultMap="T_CollectDeviceInfoDTOResult">
|
|
|
|
|
<include refid="selectT_CollectDeviceInfoDTOVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="settingAddress != null and settingAddress != ''"> and t1.settingAddress = #{settingAddress}</if>
|
|
|
|
|
<if test="energyTypeId != '' "> and t2.energyTypeId = #{energyTypeId}</if>
|
|
|
|
|
<if test="settingAddress != null and settingAddress != ''">and t1.settingAddress = #{settingAddress}</if>
|
|
|
|
|
<if test="energyTypeId != '' ">and t2.energyTypeId = #{energyTypeId}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
@ -79,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="settingAddress != null">settingAddress,</if>
|
|
|
|
|
<if test="energyTypeId != null">energyTypeId,</if>
|
|
|
|
|
<if test="ip != null">ip,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="objid != null">#{objid},</if>
|
|
|
|
|
<if test="collectDeviceId != null">#{collectDeviceId},</if>
|
|
|
|
|
@ -90,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="settingAddress != null">#{settingAddress},</if>
|
|
|
|
|
<if test="energyTypeId != null">#{energyTypeId},</if>
|
|
|
|
|
<if test="ip != null">#{ip},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateT_CollectDeviceInfo" parameterType="T_CollectDeviceInfo">
|
|
|
|
|
@ -109,7 +126,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteT_CollectDeviceInfoById" parameterType="Long">
|
|
|
|
|
delete from T_CollectDeviceInfo where objid = #{objid}
|
|
|
|
|
delete
|
|
|
|
|
from T_CollectDeviceInfo
|
|
|
|
|
where objid = #{objid}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteT_CollectDeviceInfoByIds" parameterType="String">
|
|
|
|
|
|