修改site_id & device_id

This commit is contained in:
2025-06-29 10:55:05 +08:00
parent 177e235c0e
commit d1aa8dbd2c
50 changed files with 2142 additions and 336 deletions

View File

@ -26,10 +26,43 @@
<result property="remark" column="remark" />
<result property="siteId" column="site_id" />
<result property="deviceId" column="device_id" />
<result property="stackDeviceId" column="stack_device_id" />
<result property="maxAllowedChargePower" column="max_allowed_charge_power" />
<result property="maxAllowedDischargePower" column="max_allowed_discharge_power" />
<result property="maxAllowedChargeVoltage" column="max_allowed_charge_voltage" />
<result property="maxAllowedDischargeVoltage" column="max_allowed_discharge_voltage" />
<result property="maxAllowedChargeCurrent" column="max_allowed_charge_current" />
<result property="maxAllowedDischargeCurrent" column="max_allowed_discharge_current" />
<result property="batteryPackVoltage" column="battery_pack_voltage" />
<result property="batteryPackCurrent" column="battery_pack_current" />
<result property="batteryPackTemp" column="battery_pack_temp" />
<result property="batteryPackSoc" column="battery_pack_soc" />
<result property="batteryPackSoh" column="battery_pack_soh" />
<result property="batteryPackInsulationResistance" column="battery_pack_insulation_resistance" />
<result property="avgCellVoltage" column="avg_cell_voltage" />
<result property="avgCellTemp" column="avg_cell_temp" />
<result property="maxCellVoltage" column="max_cell_voltage" />
<result property="maxCellVoltageId" column="max_cell_voltage_id" />
<result property="minCellVoltage" column="min_cell_voltage" />
<result property="minCellVoltageId" column="min_cell_voltage_id" />
<result property="maxCellTemp" column="max_cell_temp" />
<result property="maxCellTempId" column="max_cell_temp_id" />
<result property="minCellTemp" column="min_cell_temp" />
<result property="minCellTempId" column="min_cell_temp_id" />
<result property="maxCellSoc" column="max_cell_soc" />
<result property="maxCellSocId" column="max_cell_soc_id" />
<result property="minCellSoc" column="min_cell_soc" />
<result property="minCellSocId" column="min_cell_soc_id" />
<result property="maxCellSoh" column="max_cell_soh" />
<result property="maxCellSohId" column="max_cell_soh_id" />
<result property="minCellSoh" column="min_cell_soh" />
<result property="minCellSohId" column="min_cell_soh_id" />
<result property="totalChargeEnergy" column="total_charge_energy" />
<result property="totalDischargeEnergy" column="total_discharge_energy" />
</resultMap>
<sql id="selectEmsBatteryClusterVo">
select id, work_status, pcs_communication_status, ems_communication_status, cluster_voltage, chargeable_capacity, total_charged_capacity, cluster_current, dischargeable_capacity, total_discharged_capacity, soh, average_temperature, insulation_resistance, current_soc, create_by, create_time, update_by, update_time, remark, site_id, device_id from ems_battery_cluster
select id, work_status, pcs_communication_status, ems_communication_status, cluster_voltage, chargeable_capacity, total_charged_capacity, cluster_current, dischargeable_capacity, total_discharged_capacity, soh, average_temperature, insulation_resistance, current_soc, create_by, create_time, update_by, update_time, remark, site_id, device_id, stack_device_id, max_allowed_charge_power, max_allowed_discharge_power, max_allowed_charge_voltage, max_allowed_discharge_voltage, max_allowed_charge_current, max_allowed_discharge_current, battery_pack_voltage, battery_pack_current, battery_pack_temp, battery_pack_soc, battery_pack_soh, battery_pack_insulation_resistance, avg_cell_voltage, avg_cell_temp, max_cell_voltage, max_cell_voltage_id, min_cell_voltage, min_cell_voltage_id, max_cell_temp, max_cell_temp_id, min_cell_temp, min_cell_temp_id, max_cell_soc, max_cell_soc_id, min_cell_soc, min_cell_soc_id, max_cell_soh, max_cell_soh_id, min_cell_soh, min_cell_soh_id, total_charge_energy, total_discharge_energy from ems_battery_cluster
</sql>
<select id="selectEmsBatteryClusterList" parameterType="EmsBatteryCluster" resultMap="EmsBatteryClusterResult">
@ -48,8 +81,41 @@
<if test="averageTemperature != null "> and average_temperature = #{averageTemperature}</if>
<if test="insulationResistance != null "> and insulation_resistance = #{insulationResistance}</if>
<if test="currentSoc != null "> and current_soc = #{currentSoc}</if>
<if test="siteId != null "> and site_id = #{siteId}</if>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
<if test="stackDeviceId != null and stackDeviceId != ''"> and stack_device_id = #{stackDeviceId}</if>
<if test="maxAllowedChargePower != null "> and max_allowed_charge_power = #{maxAllowedChargePower}</if>
<if test="maxAllowedDischargePower != null "> and max_allowed_discharge_power = #{maxAllowedDischargePower}</if>
<if test="maxAllowedChargeVoltage != null "> and max_allowed_charge_voltage = #{maxAllowedChargeVoltage}</if>
<if test="maxAllowedDischargeVoltage != null "> and max_allowed_discharge_voltage = #{maxAllowedDischargeVoltage}</if>
<if test="maxAllowedChargeCurrent != null "> and max_allowed_charge_current = #{maxAllowedChargeCurrent}</if>
<if test="maxAllowedDischargeCurrent != null "> and max_allowed_discharge_current = #{maxAllowedDischargeCurrent}</if>
<if test="batteryPackVoltage != null "> and battery_pack_voltage = #{batteryPackVoltage}</if>
<if test="batteryPackCurrent != null "> and battery_pack_current = #{batteryPackCurrent}</if>
<if test="batteryPackTemp != null "> and battery_pack_temp = #{batteryPackTemp}</if>
<if test="batteryPackSoc != null "> and battery_pack_soc = #{batteryPackSoc}</if>
<if test="batteryPackSoh != null "> and battery_pack_soh = #{batteryPackSoh}</if>
<if test="batteryPackInsulationResistance != null "> and battery_pack_insulation_resistance = #{batteryPackInsulationResistance}</if>
<if test="avgCellVoltage != null "> and avg_cell_voltage = #{avgCellVoltage}</if>
<if test="avgCellTemp != null "> and avg_cell_temp = #{avgCellTemp}</if>
<if test="maxCellVoltage != null "> and max_cell_voltage = #{maxCellVoltage}</if>
<if test="maxCellVoltageId != null "> and max_cell_voltage_id = #{maxCellVoltageId}</if>
<if test="minCellVoltage != null "> and min_cell_voltage = #{minCellVoltage}</if>
<if test="minCellVoltageId != null "> and min_cell_voltage_id = #{minCellVoltageId}</if>
<if test="maxCellTemp != null "> and max_cell_temp = #{maxCellTemp}</if>
<if test="maxCellTempId != null "> and max_cell_temp_id = #{maxCellTempId}</if>
<if test="minCellTemp != null "> and min_cell_temp = #{minCellTemp}</if>
<if test="minCellTempId != null "> and min_cell_temp_id = #{minCellTempId}</if>
<if test="maxCellSoc != null "> and max_cell_soc = #{maxCellSoc}</if>
<if test="maxCellSocId != null "> and max_cell_soc_id = #{maxCellSocId}</if>
<if test="minCellSoc != null "> and min_cell_soc = #{minCellSoc}</if>
<if test="minCellSocId != null "> and min_cell_soc_id = #{minCellSocId}</if>
<if test="maxCellSoh != null "> and max_cell_soh = #{maxCellSoh}</if>
<if test="maxCellSohId != null "> and max_cell_soh_id = #{maxCellSohId}</if>
<if test="minCellSoh != null "> and min_cell_soh = #{minCellSoh}</if>
<if test="minCellSohId != null "> and min_cell_soh_id = #{minCellSohId}</if>
<if test="totalChargeEnergy != null "> and total_charge_energy = #{totalChargeEnergy}</if>
<if test="totalDischargeEnergy != null "> and total_discharge_energy = #{totalDischargeEnergy}</if>
</where>
</select>
@ -80,7 +146,40 @@
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="siteId != null">site_id,</if>
<if test="deviceId != null">device_id,</if>
<if test="deviceId != null and deviceId != ''">device_id,</if>
<if test="stackDeviceId != null and stackDeviceId != ''">stack_device_id,</if>
<if test="maxAllowedChargePower != null">max_allowed_charge_power,</if>
<if test="maxAllowedDischargePower != null">max_allowed_discharge_power,</if>
<if test="maxAllowedChargeVoltage != null">max_allowed_charge_voltage,</if>
<if test="maxAllowedDischargeVoltage != null">max_allowed_discharge_voltage,</if>
<if test="maxAllowedChargeCurrent != null">max_allowed_charge_current,</if>
<if test="maxAllowedDischargeCurrent != null">max_allowed_discharge_current,</if>
<if test="batteryPackVoltage != null">battery_pack_voltage,</if>
<if test="batteryPackCurrent != null">battery_pack_current,</if>
<if test="batteryPackTemp != null">battery_pack_temp,</if>
<if test="batteryPackSoc != null">battery_pack_soc,</if>
<if test="batteryPackSoh != null">battery_pack_soh,</if>
<if test="batteryPackInsulationResistance != null">battery_pack_insulation_resistance,</if>
<if test="avgCellVoltage != null">avg_cell_voltage,</if>
<if test="avgCellTemp != null">avg_cell_temp,</if>
<if test="maxCellVoltage != null">max_cell_voltage,</if>
<if test="maxCellVoltageId != null">max_cell_voltage_id,</if>
<if test="minCellVoltage != null">min_cell_voltage,</if>
<if test="minCellVoltageId != null">min_cell_voltage_id,</if>
<if test="maxCellTemp != null">max_cell_temp,</if>
<if test="maxCellTempId != null">max_cell_temp_id,</if>
<if test="minCellTemp != null">min_cell_temp,</if>
<if test="minCellTempId != null">min_cell_temp_id,</if>
<if test="maxCellSoc != null">max_cell_soc,</if>
<if test="maxCellSocId != null">max_cell_soc_id,</if>
<if test="minCellSoc != null">min_cell_soc,</if>
<if test="minCellSocId != null">min_cell_soc_id,</if>
<if test="maxCellSoh != null">max_cell_soh,</if>
<if test="maxCellSohId != null">max_cell_soh_id,</if>
<if test="minCellSoh != null">min_cell_soh,</if>
<if test="minCellSohId != null">min_cell_soh_id,</if>
<if test="totalChargeEnergy != null">total_charge_energy,</if>
<if test="totalDischargeEnergy != null">total_discharge_energy,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workStatus != null">#{workStatus},</if>
@ -102,7 +201,40 @@
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="siteId != null">#{siteId},</if>
<if test="deviceId != null">#{deviceId},</if>
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
<if test="stackDeviceId != null and stackDeviceId != ''">#{stackDeviceId},</if>
<if test="maxAllowedChargePower != null">#{maxAllowedChargePower},</if>
<if test="maxAllowedDischargePower != null">#{maxAllowedDischargePower},</if>
<if test="maxAllowedChargeVoltage != null">#{maxAllowedChargeVoltage},</if>
<if test="maxAllowedDischargeVoltage != null">#{maxAllowedDischargeVoltage},</if>
<if test="maxAllowedChargeCurrent != null">#{maxAllowedChargeCurrent},</if>
<if test="maxAllowedDischargeCurrent != null">#{maxAllowedDischargeCurrent},</if>
<if test="batteryPackVoltage != null">#{batteryPackVoltage},</if>
<if test="batteryPackCurrent != null">#{batteryPackCurrent},</if>
<if test="batteryPackTemp != null">#{batteryPackTemp},</if>
<if test="batteryPackSoc != null">#{batteryPackSoc},</if>
<if test="batteryPackSoh != null">#{batteryPackSoh},</if>
<if test="batteryPackInsulationResistance != null">#{batteryPackInsulationResistance},</if>
<if test="avgCellVoltage != null">#{avgCellVoltage},</if>
<if test="avgCellTemp != null">#{avgCellTemp},</if>
<if test="maxCellVoltage != null">#{maxCellVoltage},</if>
<if test="maxCellVoltageId != null">#{maxCellVoltageId},</if>
<if test="minCellVoltage != null">#{minCellVoltage},</if>
<if test="minCellVoltageId != null">#{minCellVoltageId},</if>
<if test="maxCellTemp != null">#{maxCellTemp},</if>
<if test="maxCellTempId != null">#{maxCellTempId},</if>
<if test="minCellTemp != null">#{minCellTemp},</if>
<if test="minCellTempId != null">#{minCellTempId},</if>
<if test="maxCellSoc != null">#{maxCellSoc},</if>
<if test="maxCellSocId != null">#{maxCellSocId},</if>
<if test="minCellSoc != null">#{minCellSoc},</if>
<if test="minCellSocId != null">#{minCellSocId},</if>
<if test="maxCellSoh != null">#{maxCellSoh},</if>
<if test="maxCellSohId != null">#{maxCellSohId},</if>
<if test="minCellSoh != null">#{minCellSoh},</if>
<if test="minCellSohId != null">#{minCellSohId},</if>
<if test="totalChargeEnergy != null">#{totalChargeEnergy},</if>
<if test="totalDischargeEnergy != null">#{totalDischargeEnergy},</if>
</trim>
</insert>
@ -128,7 +260,40 @@
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="siteId != null">site_id = #{siteId},</if>
<if test="deviceId != null">device_id = #{deviceId},</if>
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
<if test="stackDeviceId != null and stackDeviceId != ''">stack_device_id = #{stackDeviceId},</if>
<if test="maxAllowedChargePower != null">max_allowed_charge_power = #{maxAllowedChargePower},</if>
<if test="maxAllowedDischargePower != null">max_allowed_discharge_power = #{maxAllowedDischargePower},</if>
<if test="maxAllowedChargeVoltage != null">max_allowed_charge_voltage = #{maxAllowedChargeVoltage},</if>
<if test="maxAllowedDischargeVoltage != null">max_allowed_discharge_voltage = #{maxAllowedDischargeVoltage},</if>
<if test="maxAllowedChargeCurrent != null">max_allowed_charge_current = #{maxAllowedChargeCurrent},</if>
<if test="maxAllowedDischargeCurrent != null">max_allowed_discharge_current = #{maxAllowedDischargeCurrent},</if>
<if test="batteryPackVoltage != null">battery_pack_voltage = #{batteryPackVoltage},</if>
<if test="batteryPackCurrent != null">battery_pack_current = #{batteryPackCurrent},</if>
<if test="batteryPackTemp != null">battery_pack_temp = #{batteryPackTemp},</if>
<if test="batteryPackSoc != null">battery_pack_soc = #{batteryPackSoc},</if>
<if test="batteryPackSoh != null">battery_pack_soh = #{batteryPackSoh},</if>
<if test="batteryPackInsulationResistance != null">battery_pack_insulation_resistance = #{batteryPackInsulationResistance},</if>
<if test="avgCellVoltage != null">avg_cell_voltage = #{avgCellVoltage},</if>
<if test="avgCellTemp != null">avg_cell_temp = #{avgCellTemp},</if>
<if test="maxCellVoltage != null">max_cell_voltage = #{maxCellVoltage},</if>
<if test="maxCellVoltageId != null">max_cell_voltage_id = #{maxCellVoltageId},</if>
<if test="minCellVoltage != null">min_cell_voltage = #{minCellVoltage},</if>
<if test="minCellVoltageId != null">min_cell_voltage_id = #{minCellVoltageId},</if>
<if test="maxCellTemp != null">max_cell_temp = #{maxCellTemp},</if>
<if test="maxCellTempId != null">max_cell_temp_id = #{maxCellTempId},</if>
<if test="minCellTemp != null">min_cell_temp = #{minCellTemp},</if>
<if test="minCellTempId != null">min_cell_temp_id = #{minCellTempId},</if>
<if test="maxCellSoc != null">max_cell_soc = #{maxCellSoc},</if>
<if test="maxCellSocId != null">max_cell_soc_id = #{maxCellSocId},</if>
<if test="minCellSoc != null">min_cell_soc = #{minCellSoc},</if>
<if test="minCellSocId != null">min_cell_soc_id = #{minCellSocId},</if>
<if test="maxCellSoh != null">max_cell_soh = #{maxCellSoh},</if>
<if test="maxCellSohId != null">max_cell_soh_id = #{maxCellSohId},</if>
<if test="minCellSoh != null">min_cell_soh = #{minCellSoh},</if>
<if test="minCellSohId != null">min_cell_soh_id = #{minCellSohId},</if>
<if test="totalChargeEnergy != null">total_charge_energy = #{totalChargeEnergy},</if>
<if test="totalDischargeEnergy != null">total_discharge_energy = #{totalDischargeEnergy},</if>
</trim>
where id = #{id}
</update>
@ -144,7 +309,7 @@
</foreach>
</delete>
<select id="getBMSBatteryCluster" parameterType="Long" resultType="com.xzzn.ems.domain.vo.BMSBatteryClusterVo">
<select id="getBMSBatteryCluster" parameterType="String" 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,