dev #2

Merged
dashixiong merged 349 commits from dev into main 2026-02-11 01:55:46 +00:00
95 changed files with 6487 additions and 413 deletions
Showing only changes of commit 342439e3a9 - Show all commits

View File

@ -178,17 +178,17 @@
</select>
<select id="getAllBatteryDataByClusterId" resultType="com.xzzn.ems.domain.vo.BatteryDataStatsListVo">
SELECT t.update_time as updateTime, t.voltage, t.temperature,
SELECT t.data_timestamp as updateTime, t.voltage, t.temperature,
t.soc, t.soh, t.device_id as deviceId
FROM ems_battery_data t
JOIN ( SELECT device_id, MAX(update_time) AS max_update_time
JOIN ( SELECT device_id, MAX(data_timestamp) AS max_update_time
FROM ems_battery_data
WHERE site_id = #{siteId}
<if test="clusterDeviceId != null and clusterDeviceId != ''">
and cluster_device_id = #{clusterDeviceId}
</if>
GROUP BY device_id
) latest ON t.device_id = latest.device_id AND t.update_time = latest.max_update_time
) latest ON t.device_id = latest.device_id AND t.data_timestamp = latest.max_update_time
WHERE t.site_id = #{siteId}
<if test="clusterDeviceId != null and clusterDeviceId != ''">
and t.cluster_device_id = #{clusterDeviceId}