单体电池-框架
This commit is contained in:
@ -157,4 +157,16 @@
|
||||
and t.device_id = tmp.device_id)
|
||||
order by tmp.device_id
|
||||
</select>
|
||||
|
||||
<select id="getBmsBatteryData" resultType="com.xzzn.ems.domain.vo.BMSBatteryDataList">
|
||||
select t.cluster_voltage as clusterVoltage,t.cluster_current as clusterCurrent,
|
||||
t.current_soc as currentSoc,MAX(tb.voltage) as maxVoltage,MIN(tb.voltage) as minVoltage,
|
||||
MAX(tb.temperature) as maxTemperature,MIN(tb.temperature) as minTemperature,
|
||||
tb.site_id as siteId,tb.cluster_device_id as clusterId,tb.device_id as stackDeviceId
|
||||
from ems_battery_cluster t left join ems_battery_data tb on t.device_id = tb.cluster_device_id
|
||||
where t.site_id = #{siteId} and t.stack_device_id = #{stackDeviceId}
|
||||
and t.update_time = (select MAX(update_time) FROM ems_battery_cluster where site_id = t.site_id
|
||||
and device_id = t.device_id and stack_device_id = t.stack_device_id)
|
||||
group by t.cluster_voltage,t.cluster_current,t.current_soc,tb.site_id,tb.cluster_device_id,tb.device_id
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user