重构
This commit is contained in:
@ -175,6 +175,7 @@
|
||||
from ems_devices_setting t
|
||||
where t.site_id = #{siteId}
|
||||
and t.parent_id = #{parentId}
|
||||
order by t.device_id
|
||||
</select>
|
||||
|
||||
<select id="getAllBatteryDeviceBySiteId" parameterType="String" resultType="com.xzzn.ems.domain.EmsDevicesSetting">
|
||||
@ -206,9 +207,10 @@
|
||||
|
||||
<select id="getDeviceBySiteAndDeviceId" parameterType="String" resultMap="EmsDevicesSettingResult">
|
||||
<include refid="selectEmsDevicesSettingVo"/>
|
||||
where device_id = #{deviceId}
|
||||
AND site_id = #{siteId}
|
||||
limit 1
|
||||
where site_id = #{siteId}
|
||||
<if test="deviceId != null and deviceId != ''">
|
||||
AND device_id = #{deviceId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getAmmeterNameList" parameterType="String" resultType="java.util.Map">
|
||||
@ -235,4 +237,4 @@
|
||||
and site_id = #{siteId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@ -31,6 +31,12 @@
|
||||
where site_id = #{siteId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBySiteIdAndDeviceId">
|
||||
delete from ems_site_monitor_point_match
|
||||
where site_id = #{siteId}
|
||||
and device_id = #{deviceId}
|
||||
</delete>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into ems_site_monitor_point_match
|
||||
(site_id, field_code, device_id, data_point, fixed_data_point, use_fixed_display, create_by, create_time, update_by, update_time)
|
||||
|
||||
Reference in New Issue
Block a user