0918优化-单站监控首页日期修改&点位模糊查询
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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>
|
||||
Reference in New Issue
Block a user