0918优化-单站监控首页日期修改&点位模糊查询

This commit is contained in:
2025-09-23 14:01:24 +08:00
parent 630f77a783
commit 2099b94e73
7 changed files with 14 additions and 8 deletions

View File

@ -387,7 +387,7 @@
<select id="getAvgTempByHour" parameterType="com.xzzn.ems.domain.vo.DateSearchRequest" resultType="java.util.Map">
SELECT latest.statisDate, avg(t.avg_cell_temp) as avgTemp
FROM ( SELECT p.site_id, p.device_id, DATE_FORMAT( p.update_time, '%H:00') AS statisDate, MAX(p.update_time) AS max_update_time
FROM ( SELECT p.site_id, p.device_id, DATE_FORMAT( p.update_time, '%Y-%m-%d %H:00') AS statisDate, MAX(p.update_time) AS max_update_time
FROM ems_battery_cluster p
<include refid="statisCommonFilter"/>
GROUP BY p.site_id, p.device_id, statisDate

View File

@ -449,7 +449,7 @@
avg(t.stack_soc) as avgSoc,
avg(t.stack_soh) as avgSoh,
avg(t.avg_temperature) as avgTemp
from ( SELECT p.site_id, p.device_id, DATE_FORMAT(p.update_time, '%H:00') AS dateHour,MAX(p.update_time) as max_update_time
from ( SELECT p.site_id, p.device_id, DATE_FORMAT(p.update_time, '%Y-%m-%d %H:00') AS dateHour,MAX(p.update_time) as max_update_time
FROM ems_battery_stack p
<include refid="statisCommonFilter"/>
GROUP BY p.site_id,p.device_id,dateHour

View File

@ -335,5 +335,8 @@
<if test="dataPointName != null and dataPointName != ''">
and t.data_point_name like CONCAT('%', #{dataPointName}, '%')
</if>
<if test="dataPoint != null and dataPoint != ''">
and t.data_point like CONCAT('%', #{dataPoint}, '%')
</if>
</select>
</mapper>