PCS+BMS总览+电池簇抽数逻辑
This commit is contained in:
@ -144,8 +144,17 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getBMSBatteryCluster" parameterType="Long" resultMap="EmsBatteryClusterResult">
|
||||
<include refid="selectEmsBatteryClusterVo"/>
|
||||
where site_id = #{siteId}
|
||||
<select id="getBMSBatteryCluster" parameterType="Long" resultType="com.xzzn.ems.domain.vo.BMSBatteryClusterVo">
|
||||
select td.device_name as deviceName, tmp.work_status as workStatus,
|
||||
tmp.pcs_communication_status as pcsCommunicationStatus, tmp.ems_communication_status as emsCommunicationStatus,
|
||||
tmp.cluster_voltage as clusterVoltage,tmp.chargeable_capacity as chargeableCapacity, tmp.total_charged_capacity as totalChargedCapacity,
|
||||
tmp.cluster_current as clusterCurrent,tmp.dischargeable_capacity as dischargeableCapacity, tmp.total_discharged_capacity as totalDischargedCapacity,
|
||||
tmp.soh as soh,tmp.average_temperature as averageTemperature,tmp.insulation_resistance as insulationResistance,
|
||||
tmp.current_soc as currentSoc,tmp.site_id as siteId,tmp.device_id as deviceId
|
||||
from ems_battery_cluster tmp left join ems_devices_setting td on tmp.device_id = td.id and tmp.site_id = td.site_id
|
||||
where tmp.site_id = #{siteId}
|
||||
and tmp.update_time = (select MAX(t.update_time) FROM ems_battery_cluster t where t.site_id = tmp.site_id
|
||||
and t.device_id = tmp.device_id)
|
||||
order by tmp.device_id
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user