0918优化-点位列表电池簇特殊处理

This commit is contained in:
2025-09-26 16:37:46 +08:00
parent 553e30c6ef
commit b2d5023122
3 changed files with 69 additions and 23 deletions

View File

@ -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>