DDS数据同步

This commit is contained in:
2025-07-27 17:34:38 +08:00
parent 281e0f57c4
commit 9da5047148
9 changed files with 944 additions and 303 deletions

View File

@ -59,10 +59,32 @@
<result property="minCellSohId" column="min_cell_soh_id" />
<result property="totalChargeEnergy" column="total_charge_energy" />
<result property="totalDischargeEnergy" column="total_discharge_energy" />
<result property="disconnectDetectionIndication" column="disconnect_detection_indication" />
<result property="voltageTransforRatio" column="voltage_transfor_ratio" />
<result property="ratedPrimaryCurrentValue" column="rated_primary_current_value" />
<result property="switchInputOutputStatus" column="switch_input_output_status" />
<result property="alarmStatus" column="alarm_status" />
<result property="currentTotalVoltagePercent" column="current_total_voltage_percent" />
<result property="voltageContentPercent" column="voltage_content_percent" />
<result property="voltageAcPercent" column="voltage_ac_percent" />
<result property="currentTotalCurrentPercent" column="current_total_current_percent" />
<result property="currentContentPercent" column="current_content_percent" />
<result property="currentAcPercent" column="current_ac_percent" />
<result property="currentTotalPowerPercent" column="current_total_power_percent" />
<result property="powerContentPercent" column="power_content_percent" />
<result property="powerAcPercent" column="power_ac_percent" />
<result property="dataSettingYearMonth" column="data_setting_year_month" />
<result property="dataSettingDayHour" column="data_setting_day_hour" />
<result property="dataSettingMinutesSeconds" column="data_setting_minutes_seconds" />
<result property="currentRate" column="current_rate" />
<result property="versionNumber" column="version_number" />
<result property="voltage" column="voltage" />
<result property="current" column="current" />
<result property="power" column="power" />
</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, 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
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, disconnect_detection_indication, voltage_transfor_ratio, rated_primary_current_value, switch_input_output_status, alarm_status, current_total_voltage_percent, voltage_content_percent, voltage_ac_percent, current_total_current_percent, current_content_percent, current_ac_percent, current_total_power_percent, power_content_percent, power_ac_percent, data_setting_year_month, data_setting_day_hour, data_setting_minutes_seconds, current_rate, version_number, voltage, current, power from ems_battery_cluster
</sql>
<select id="selectEmsBatteryClusterList" parameterType="EmsBatteryCluster" resultMap="EmsBatteryClusterResult">
@ -116,6 +138,28 @@
<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>
<if test="disconnectDetectionIndication != null and disconnectDetectionIndication != ''"> and disconnect_detection_indication = #{disconnectDetectionIndication}</if>
<if test="voltageTransforRatio != null "> and voltage_transfor_ratio = #{voltageTransforRatio}</if>
<if test="ratedPrimaryCurrentValue != null "> and rated_primary_current_value = #{ratedPrimaryCurrentValue}</if>
<if test="switchInputOutputStatus != null and switchInputOutputStatus != ''"> and switch_input_output_status = #{switchInputOutputStatus}</if>
<if test="alarmStatus != null and alarmStatus != ''"> and alarm_status = #{alarmStatus}</if>
<if test="currentTotalVoltagePercent != null "> and current_total_voltage_percent = #{currentTotalVoltagePercent}</if>
<if test="voltageContentPercent != null "> and voltage_content_percent = #{voltageContentPercent}</if>
<if test="voltageAcPercent != null "> and voltage_ac_percent = #{voltageAcPercent}</if>
<if test="currentTotalCurrentPercent != null "> and current_total_current_percent = #{currentTotalCurrentPercent}</if>
<if test="currentContentPercent != null "> and current_content_percent = #{currentContentPercent}</if>
<if test="currentAcPercent != null "> and current_ac_percent = #{currentAcPercent}</if>
<if test="currentTotalPowerPercent != null "> and current_total_power_percent = #{currentTotalPowerPercent}</if>
<if test="powerContentPercent != null "> and power_content_percent = #{powerContentPercent}</if>
<if test="powerAcPercent != null "> and power_ac_percent = #{powerAcPercent}</if>
<if test="dataSettingYearMonth != null and dataSettingYearMonth != ''"> and data_setting_year_month = #{dataSettingYearMonth}</if>
<if test="dataSettingDayHour != null and dataSettingDayHour != ''"> and data_setting_day_hour = #{dataSettingDayHour}</if>
<if test="dataSettingMinutesSeconds != null and dataSettingMinutesSeconds != ''"> and data_setting_minutes_seconds = #{dataSettingMinutesSeconds}</if>
<if test="currentRate != null "> and current_rate = #{currentRate}</if>
<if test="versionNumber != null and versionNumber != ''"> and version_number = #{versionNumber}</if>
<if test="voltage != null "> and voltage = #{voltage}</if>
<if test="current != null "> and current = #{current}</if>
<if test="power != null "> and power = #{power}</if>
</where>
</select>
@ -180,6 +224,28 @@
<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>
<if test="disconnectDetectionIndication != null">disconnect_detection_indication,</if>
<if test="voltageTransforRatio != null">voltage_transfor_ratio,</if>
<if test="ratedPrimaryCurrentValue != null">rated_primary_current_value,</if>
<if test="switchInputOutputStatus != null">switch_input_output_status,</if>
<if test="alarmStatus != null">alarm_status,</if>
<if test="currentTotalVoltagePercent != null">current_total_voltage_percent,</if>
<if test="voltageContentPercent != null">voltage_content_percent,</if>
<if test="voltageAcPercent != null">voltage_ac_percent,</if>
<if test="currentTotalCurrentPercent != null">current_total_current_percent,</if>
<if test="currentContentPercent != null">current_content_percent,</if>
<if test="currentAcPercent != null">current_ac_percent,</if>
<if test="currentTotalPowerPercent != null">current_total_power_percent,</if>
<if test="powerContentPercent != null">power_content_percent,</if>
<if test="powerAcPercent != null">power_ac_percent,</if>
<if test="dataSettingYearMonth != null">data_setting_year_month,</if>
<if test="dataSettingDayHour != null">data_setting_day_hour,</if>
<if test="dataSettingMinutesSeconds != null">data_setting_minutes_seconds,</if>
<if test="currentRate != null">current_rate,</if>
<if test="versionNumber != null">version_number,</if>
<if test="voltage != null">voltage,</if>
<if test="current != null">current,</if>
<if test="power != null">power,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workStatus != null">#{workStatus},</if>
@ -235,6 +301,28 @@
<if test="minCellSohId != null">#{minCellSohId},</if>
<if test="totalChargeEnergy != null">#{totalChargeEnergy},</if>
<if test="totalDischargeEnergy != null">#{totalDischargeEnergy},</if>
<if test="disconnectDetectionIndication != null">#{disconnectDetectionIndication},</if>
<if test="voltageTransforRatio != null">#{voltageTransforRatio},</if>
<if test="ratedPrimaryCurrentValue != null">#{ratedPrimaryCurrentValue},</if>
<if test="switchInputOutputStatus != null">#{switchInputOutputStatus},</if>
<if test="alarmStatus != null">#{alarmStatus},</if>
<if test="currentTotalVoltagePercent != null">#{currentTotalVoltagePercent},</if>
<if test="voltageContentPercent != null">#{voltageContentPercent},</if>
<if test="voltageAcPercent != null">#{voltageAcPercent},</if>
<if test="currentTotalCurrentPercent != null">#{currentTotalCurrentPercent},</if>
<if test="currentContentPercent != null">#{currentContentPercent},</if>
<if test="currentAcPercent != null">#{currentAcPercent},</if>
<if test="currentTotalPowerPercent != null">#{currentTotalPowerPercent},</if>
<if test="powerContentPercent != null">#{powerContentPercent},</if>
<if test="powerAcPercent != null">#{powerAcPercent},</if>
<if test="dataSettingYearMonth != null">#{dataSettingYearMonth},</if>
<if test="dataSettingDayHour != null">#{dataSettingDayHour},</if>
<if test="dataSettingMinutesSeconds != null">#{dataSettingMinutesSeconds},</if>
<if test="currentRate != null">#{currentRate},</if>
<if test="versionNumber != null">#{versionNumber},</if>
<if test="voltage != null">#{voltage},</if>
<if test="current != null">#{current},</if>
<if test="power != null">#{power},</if>
</trim>
</insert>
@ -294,6 +382,28 @@
<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>
<if test="disconnectDetectionIndication != null">disconnect_detection_indication = #{disconnectDetectionIndication},</if>
<if test="voltageTransforRatio != null">voltage_transfor_ratio = #{voltageTransforRatio},</if>
<if test="ratedPrimaryCurrentValue != null">rated_primary_current_value = #{ratedPrimaryCurrentValue},</if>
<if test="switchInputOutputStatus != null">switch_input_output_status = #{switchInputOutputStatus},</if>
<if test="alarmStatus != null">alarm_status = #{alarmStatus},</if>
<if test="currentTotalVoltagePercent != null">current_total_voltage_percent = #{currentTotalVoltagePercent},</if>
<if test="voltageContentPercent != null">voltage_content_percent = #{voltageContentPercent},</if>
<if test="voltageAcPercent != null">voltage_ac_percent = #{voltageAcPercent},</if>
<if test="currentTotalCurrentPercent != null">current_total_current_percent = #{currentTotalCurrentPercent},</if>
<if test="currentContentPercent != null">current_content_percent = #{currentContentPercent},</if>
<if test="currentAcPercent != null">current_ac_percent = #{currentAcPercent},</if>
<if test="currentTotalPowerPercent != null">current_total_power_percent = #{currentTotalPowerPercent},</if>
<if test="powerContentPercent != null">power_content_percent = #{powerContentPercent},</if>
<if test="powerAcPercent != null">power_ac_percent = #{powerAcPercent},</if>
<if test="dataSettingYearMonth != null">data_setting_year_month = #{dataSettingYearMonth},</if>
<if test="dataSettingDayHour != null">data_setting_day_hour = #{dataSettingDayHour},</if>
<if test="dataSettingMinutesSeconds != null">data_setting_minutes_seconds = #{dataSettingMinutesSeconds},</if>
<if test="currentRate != null">current_rate = #{currentRate},</if>
<if test="versionNumber != null">version_number = #{versionNumber},</if>
<if test="voltage != null">voltage = #{voltage},</if>
<if test="current != null">current = #{current},</if>
<if test="power != null">power = #{power},</if>
</trim>
where id = #{id}
</update>