PCS+BMS总览+电池簇抽数逻辑

This commit is contained in:
2025-06-25 11:27:53 +08:00
parent 7b64e193fc
commit 46e0b94571
15 changed files with 643 additions and 67 deletions

View File

@ -268,9 +268,20 @@
group by dateMonth
</select>
<select id="getPcsDetailInfoBySiteId" parameterType="Long" resultMap="EmsPcsDataResult">
select tmp.*
from ems_pcs_data tmp
<select id="getPcsDetailInfoBySiteId" parameterType="Long" resultType="com.xzzn.ems.domain.vo.PcsDetailInfoVo">
select td.device_name as deviceName,td.communication_status as communicationStatus,
tmp.site_id as siteId,tmp.device_id as deviceId,
tmp.data_update_time as dataUpdateTime,tmp.work_status as workStatus,
tmp.grid_status as gridStatus,tmp.device_status as deviceStatus,tmp.control_mode as controlMode,
tmp.total_active_power as totalActivePower,tmp.daily_ac_charge_energy as dailyAcChargeEnergy,
tmp.a_phase_voltage as aPhaseVoltage,tmp.a_phase_current as aPhaseCurrent,
tmp.total_reactive_power as totalReactivePower,tmp.daily_ac_discharge_energy as dailyAcDischargeEnergy,
tmp.b_phase_voltage as bPhaseVoltage,tmp.b_phase_current as bPhaseCurrent,
tmp.total_apparent_power as totalApparentPower,tmp.pcs_module_temperature as pcsModuleTemperature,
tmp.c_phase_current as cPhaseVoltage,tmp.c_phase_current as cPhaseCurrent,
tmp.total_power_factor as totalPowerFactor,
tmp.pcs_environment_temperature as pcsEnvironmentTemperature,tmp.ac_frequency as acFrequency
from ems_pcs_data 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.data_update_time = (select MAX(data_update_time) FROM ems_pcs_data where site_id = tmp.site_id
and device_id = tmp.device_id)