20250808优化-告警优化&主路线图优化
This commit is contained in:
@ -162,6 +162,13 @@
|
||||
<if test="deviceId != null and deviceId != ''">
|
||||
AND t.device_id = #{deviceId}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND t.status IN (
|
||||
<foreach collection="status.split(',')" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="alarmStartTime != null and alarmStartTime != null and alarmEndTime != null and alarmEndTime != ''">
|
||||
AND (date_format(t.alarm_start_time,'%Y%m%d') BETWEEN date_format(#{alarmStartTime},'%Y%m%d') and date_format(#{alarmEndTime},'%Y%m%d')
|
||||
or date_format(t.alarm_end_time,'%Y%m%d') BETWEEN date_format(#{alarmStartTime},'%Y%m%d') and date_format(#{alarmEndTime},'%Y%m%d') )
|
||||
|
||||
@ -198,4 +198,19 @@
|
||||
update_by = IF(VALUES(temperature) > temperature, VALUES(update_by), update_by),
|
||||
temperature = IF(VALUES(temperature) > temperature, VALUES(temperature), temperature)
|
||||
</insert>
|
||||
|
||||
<select id="getBatteryDayData" parameterType="com.xzzn.ems.domain.vo.DateSearchRequest" resultType="com.xzzn.ems.domain.vo.BatteryDataStatsListVo">
|
||||
SELECT day_time as dataTimestamp,
|
||||
voltage, temperature, soc, soh,
|
||||
device_id as deviceId,
|
||||
cluster_device_id as clusterDeviceId
|
||||
FROM ems_battery_data_day
|
||||
WHERE site_id = #{siteId}
|
||||
and cluster_device_id = #{clusterDeviceId}
|
||||
and device_id = #{deviceId}
|
||||
and day_time >= #{startDate}
|
||||
and day_time <= #{endDate}
|
||||
order by day_time
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user