0918优化-点位列表电池簇特殊处理
This commit is contained in:
@ -339,4 +339,34 @@
|
||||
and t.data_point like CONCAT('%', #{dataPoint}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getClusterDevicePoints" resultType="com.xzzn.ems.domain.vo.PointQueryResponse">
|
||||
SELECT tmp.pointName,
|
||||
tmp.dataPoint,
|
||||
tmp.dataDevice,
|
||||
tmp.dataPointName
|
||||
FROM ( select t.point_name as pointName,
|
||||
case
|
||||
when t.need_diff_device_id = 1 and t.data_device = 'PCS' then concat(#{deviceId}, t.data_point)
|
||||
when t.need_diff_device_id = 1 and t.data_device = 'BMSD' then concat(#{parentDeviceId}, t.data_point)
|
||||
else t.data_point end as dataPoint,
|
||||
t.data_point_name as dataPointName,
|
||||
t.data_device as dataDevice
|
||||
from ems_point_match t
|
||||
where 1=1
|
||||
<if test="siteId != null and siteId != ''">
|
||||
and t.site_id = #{siteId}
|
||||
</if>
|
||||
<if test="deviceCategory != null and deviceCategory != ''">
|
||||
and t.device_category = #{deviceCategory}
|
||||
</if>
|
||||
) as tmp
|
||||
where 1=1
|
||||
<if test="dataPointName != null and dataPointName != ''">
|
||||
and tmp.dataPointName like CONCAT('%', #{dataPointName}, '%')
|
||||
</if>
|
||||
<if test="dataPoint != null and dataPoint != ''">
|
||||
and tmp.dataPoint like CONCAT('%', #{dataPoint}, '%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user