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

@ -107,18 +107,13 @@
<result property="reverseActiveEnergyEpMinus" column="reverse_active_energy_ep_minus" />
<result property="positiveReactiveEnergyEqPlus" column="positive_reactive_energy_eq_plus" />
<result property="positiveActiveEnergyEpPlus" column="positive_active_energy_ep_plus" />
<result property="absorbsActiveEnerygSecondSide" column="absorbs_active_eneryg_second_side" />
<result property="releaseActiveEnerygSecondSide" column="release_active_eneryg_second_side" />
<result property="inductorReactiveEnerySecondeSide" column="inductor_reactive_enery_seconde_side" />
<result property="capacitorReactiveEnerySecondeSide" column="capacitor_reactive_enery_seconde_side" />
<result property="absorbsActiveEnerygOneSide" column="absorbs_active_eneryg_one_side" />
<result property="releaseActiveEnerygOneSide" column="release_active_eneryg_one_side" />
<result property="inductorReactiveEneryOneSide" column="inductor_reactive_enery_one_side" />
<result property="capacitorReactiveEneryOneSide" column="capacitor_reactive_enery_one_side" />
<result property="currentPercent" column="current_percent" />
<result property="voltagePercent" column="voltage_percent" />
<result property="avgCurrent" column="avg_current" />
</resultMap>
<sql id="selectEmsAmmeterDataVo">
select id, data_update_time, current_comb_active_total, current_comb_active_peak, current_comb_active_high, current_comb_active_flat, current_comb_active_valley, current_forward_active_total, current_forward_active_peak, current_forward_active_high, current_forward_active_flat, current_forward_active_valley, current_reverse_active_total, current_reverse_active_peak, current_reverse_active_high, current_reverse_active_flat, current_reverse_active_valley, current_comb_reactive_total, current_comb_reactive_peak, current_comb_reactive_high, current_comb_reactive_flat, current_comb_reactive_valley, current_forward_reactive_total, current_forward_reactive_peak, current_forward_reactive_high, current_forward_reactive_flat, current_forward_reactive_valley, current_reverse_reactive_total, current_reverse_reactive_peak, current_reverse_reactive_high, current_reverse_reactive_flat, current_reverse_reactive_valley, phase_a_voltage, phase_b_voltage, phase_c_voltage, phase_a_current, phase_b_current, phase_c_current, frequency, ab_line_voltage, cb_line_voltage, ac_line_voltage, forward_ac_max_demand, reverse_ac_max_demand, phase_a_active_power, phase_b_active_power, phase_c_active_power, total_active_power, phase_a_reactive_power, phase_b_reactive_power, phase_c_reactive_power, total_reactive_power, phase_a_apparent_power, phase_b_apparent_power, phase_c_apparent_power, total_apparent_power, phase_a_power_factor, phase_b_power_factor, phase_c_power_factor, total_power_factor, daily_forward_max_demand, site_id, device_id, create_by, create_time, update_by, update_time, remark, secondary_ab_line_voltage, secondary_a_phase_current, secondary_a_phase_voltage, secondary_a_power_factor, secondary_a_apparent_power, secondary_a_reactive_power, secondary_a_active_power, secondary_bc_line_voltage, secondary_b_phase_current, secondary_b_phase_voltage, secondary_b_power_factor, secondary_b_apparent_power, secondary_b_reactive_power, secondary_b_active_power, secondary_ca_line_voltage, secondary_c_phase_current, secondary_c_phase_voltage, secondary_c_power_factor, secondary_c_apparent_power, secondary_c_reactive_power, secondary_c_active_power, secondary_grid_frequency, secondary_reverse_reactive_energy, secondary_negative_active_energy, secondary_total_power_factor, secondary_total_apparent_power, secondary_total_reactive_power, secondary_positive_reactive_energy, secondary_positive_active_energy, secondary_total_active_power, reverse_reactive_energy_eq_minus, reverse_active_energy_ep_minus, positive_reactive_energy_eq_plus, positive_active_energy_ep_plus, absorbs_active_eneryg_second_side, release_active_eneryg_second_side, inductor_reactive_enery_seconde_side, capacitor_reactive_enery_seconde_side, absorbs_active_eneryg_one_side, release_active_eneryg_one_side, inductor_reactive_enery_one_side, capacitor_reactive_enery_one_side from ems_ammeter_data
select id, data_update_time, current_comb_active_total, current_comb_active_peak, current_comb_active_high, current_comb_active_flat, current_comb_active_valley, current_forward_active_total, current_forward_active_peak, current_forward_active_high, current_forward_active_flat, current_forward_active_valley, current_reverse_active_total, current_reverse_active_peak, current_reverse_active_high, current_reverse_active_flat, current_reverse_active_valley, current_comb_reactive_total, current_comb_reactive_peak, current_comb_reactive_high, current_comb_reactive_flat, current_comb_reactive_valley, current_forward_reactive_total, current_forward_reactive_peak, current_forward_reactive_high, current_forward_reactive_flat, current_forward_reactive_valley, current_reverse_reactive_total, current_reverse_reactive_peak, current_reverse_reactive_high, current_reverse_reactive_flat, current_reverse_reactive_valley, phase_a_voltage, phase_b_voltage, phase_c_voltage, phase_a_current, phase_b_current, phase_c_current, frequency, ab_line_voltage, cb_line_voltage, ac_line_voltage, forward_ac_max_demand, reverse_ac_max_demand, phase_a_active_power, phase_b_active_power, phase_c_active_power, total_active_power, phase_a_reactive_power, phase_b_reactive_power, phase_c_reactive_power, total_reactive_power, phase_a_apparent_power, phase_b_apparent_power, phase_c_apparent_power, total_apparent_power, phase_a_power_factor, phase_b_power_factor, phase_c_power_factor, total_power_factor, daily_forward_max_demand, site_id, device_id, create_by, create_time, update_by, update_time, remark, secondary_ab_line_voltage, secondary_a_phase_current, secondary_a_phase_voltage, secondary_a_power_factor, secondary_a_apparent_power, secondary_a_reactive_power, secondary_a_active_power, secondary_bc_line_voltage, secondary_b_phase_current, secondary_b_phase_voltage, secondary_b_power_factor, secondary_b_apparent_power, secondary_b_reactive_power, secondary_b_active_power, secondary_ca_line_voltage, secondary_c_phase_current, secondary_c_phase_voltage, secondary_c_power_factor, secondary_c_apparent_power, secondary_c_reactive_power, secondary_c_active_power, secondary_grid_frequency, secondary_reverse_reactive_energy, secondary_negative_active_energy, secondary_total_power_factor, secondary_total_apparent_power, secondary_total_reactive_power, secondary_positive_reactive_energy, secondary_positive_active_energy, secondary_total_active_power, reverse_reactive_energy_eq_minus, reverse_active_energy_ep_minus, positive_reactive_energy_eq_plus, positive_active_energy_ep_plus, current_percent, voltage_percent, avg_current from ems_ammeter_data
</sql>
<select id="selectEmsAmmeterDataList" parameterType="EmsAmmeterData" resultMap="EmsAmmeterDataResult">
@ -220,14 +215,9 @@
<if test="reverseActiveEnergyEpMinus != null "> and reverse_active_energy_ep_minus = #{reverseActiveEnergyEpMinus}</if>
<if test="positiveReactiveEnergyEqPlus != null "> and positive_reactive_energy_eq_plus = #{positiveReactiveEnergyEqPlus}</if>
<if test="positiveActiveEnergyEpPlus != null "> and positive_active_energy_ep_plus = #{positiveActiveEnergyEpPlus}</if>
<if test="absorbsActiveEnerygSecondSide != null "> and absorbs_active_eneryg_second_side = #{absorbsActiveEnerygSecondSide}</if>
<if test="releaseActiveEnerygSecondSide != null "> and release_active_eneryg_second_side = #{releaseActiveEnerygSecondSide}</if>
<if test="inductorReactiveEnerySecondeSide != null "> and inductor_reactive_enery_seconde_side = #{inductorReactiveEnerySecondeSide}</if>
<if test="capacitorReactiveEnerySecondeSide != null "> and capacitor_reactive_enery_seconde_side = #{capacitorReactiveEnerySecondeSide}</if>
<if test="absorbsActiveEnerygOneSide != null "> and absorbs_active_eneryg_one_side = #{absorbsActiveEnerygOneSide}</if>
<if test="releaseActiveEnerygOneSide != null "> and release_active_eneryg_one_side = #{releaseActiveEnerygOneSide}</if>
<if test="inductorReactiveEneryOneSide != null "> and inductor_reactive_enery_one_side = #{inductorReactiveEneryOneSide}</if>
<if test="capacitorReactiveEneryOneSide != null "> and capacitor_reactive_enery_one_side = #{capacitorReactiveEneryOneSide}</if>
<if test="currentPercent != null "> and current_percent = #{currentPercent}</if>
<if test="voltagePercent != null "> and voltage_percent = #{voltagePercent}</if>
<if test="avgCurrent != null "> and avg_current = #{avgCurrent}</if>
</where>
</select>
@ -340,14 +330,9 @@
<if test="reverseActiveEnergyEpMinus != null">reverse_active_energy_ep_minus,</if>
<if test="positiveReactiveEnergyEqPlus != null">positive_reactive_energy_eq_plus,</if>
<if test="positiveActiveEnergyEpPlus != null">positive_active_energy_ep_plus,</if>
<if test="absorbsActiveEnerygSecondSide != null">absorbs_active_eneryg_second_side,</if>
<if test="releaseActiveEnerygSecondSide != null">release_active_eneryg_second_side,</if>
<if test="inductorReactiveEnerySecondeSide != null">inductor_reactive_enery_seconde_side,</if>
<if test="capacitorReactiveEnerySecondeSide != null">capacitor_reactive_enery_seconde_side,</if>
<if test="absorbsActiveEnerygOneSide != null">absorbs_active_eneryg_one_side,</if>
<if test="releaseActiveEnerygOneSide != null">release_active_eneryg_one_side,</if>
<if test="inductorReactiveEneryOneSide != null">inductor_reactive_enery_one_side,</if>
<if test="capacitorReactiveEneryOneSide != null">capacitor_reactive_enery_one_side,</if>
<if test="currentPercent != null">current_percent,</if>
<if test="voltagePercent != null">voltage_percent,</if>
<if test="avgCurrent != null">avg_current,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
@ -451,14 +436,9 @@
<if test="reverseActiveEnergyEpMinus != null">#{reverseActiveEnergyEpMinus},</if>
<if test="positiveReactiveEnergyEqPlus != null">#{positiveReactiveEnergyEqPlus},</if>
<if test="positiveActiveEnergyEpPlus != null">#{positiveActiveEnergyEpPlus},</if>
<if test="absorbsActiveEnerygSecondSide != null">#{absorbsActiveEnerygSecondSide},</if>
<if test="releaseActiveEnerygSecondSide != null">#{releaseActiveEnerygSecondSide},</if>
<if test="inductorReactiveEnerySecondeSide != null">#{inductorReactiveEnerySecondeSide},</if>
<if test="capacitorReactiveEnerySecondeSide != null">#{capacitorReactiveEnerySecondeSide},</if>
<if test="absorbsActiveEnerygOneSide != null">#{absorbsActiveEnerygOneSide},</if>
<if test="releaseActiveEnerygOneSide != null">#{releaseActiveEnerygOneSide},</if>
<if test="inductorReactiveEneryOneSide != null">#{inductorReactiveEneryOneSide},</if>
<if test="capacitorReactiveEneryOneSide != null">#{capacitorReactiveEneryOneSide},</if>
<if test="currentPercent != null">#{currentPercent},</if>
<if test="voltagePercent != null">#{voltagePercent},</if>
<if test="avgCurrent != null">#{avgCurrent},</if>
</trim>
</insert>
@ -566,14 +546,9 @@
<if test="reverseActiveEnergyEpMinus != null">reverse_active_energy_ep_minus = #{reverseActiveEnergyEpMinus},</if>
<if test="positiveReactiveEnergyEqPlus != null">positive_reactive_energy_eq_plus = #{positiveReactiveEnergyEqPlus},</if>
<if test="positiveActiveEnergyEpPlus != null">positive_active_energy_ep_plus = #{positiveActiveEnergyEpPlus},</if>
<if test="absorbsActiveEnerygSecondSide != null">absorbs_active_eneryg_second_side = #{absorbsActiveEnerygSecondSide},</if>
<if test="releaseActiveEnerygSecondSide != null">release_active_eneryg_second_side = #{releaseActiveEnerygSecondSide},</if>
<if test="inductorReactiveEnerySecondeSide != null">inductor_reactive_enery_seconde_side = #{inductorReactiveEnerySecondeSide},</if>
<if test="capacitorReactiveEnerySecondeSide != null">capacitor_reactive_enery_seconde_side = #{capacitorReactiveEnerySecondeSide},</if>
<if test="absorbsActiveEnerygOneSide != null">absorbs_active_eneryg_one_side = #{absorbsActiveEnerygOneSide},</if>
<if test="releaseActiveEnerygOneSide != null">release_active_eneryg_one_side = #{releaseActiveEnerygOneSide},</if>
<if test="inductorReactiveEneryOneSide != null">inductor_reactive_enery_one_side = #{inductorReactiveEneryOneSide},</if>
<if test="capacitorReactiveEneryOneSide != null">capacitor_reactive_enery_one_side = #{capacitorReactiveEneryOneSide},</if>
<if test="currentPercent != null">current_percent = #{currentPercent},</if>
<if test="voltagePercent != null">voltage_percent = #{voltagePercent},</if>
<if test="avgCurrent != null">avg_current = #{avgCurrent},</if>
</trim>
where id = #{id}
</update>

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>

View File

@ -52,10 +52,24 @@
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="batteryNumber" column="battery_number" />
<result property="batteryAvgVoltage" column="battery_avg_voltage" />
<result property="batteryDifferentPressure" column="battery_different_pressure" />
<result property="avgTemperature" column="avg_temperature" />
<result property="batteryDifferentTemperature" column="battery_different_temperature" />
<result property="maxInternalResistance" column="max_internal_resistance" />
<result property="minInternalResistance" column="min_internal_resistance" />
<result property="avgInternalResistance" column="avg_internal_resistance" />
<result property="batteryDefferentResistance" column="battery_defferent_resistance" />
<result property="maxResistanceCellId" column="max_resistance_cell_id" />
<result property="minResistanceCellId" column="min_resistance_cell_id" />
<result property="environmentTemperature" column="environment_temperature" />
<result property="environmentHumidity" column="environment_humidity" />
<result property="circuitBreakerStatus" column="circuit_breaker_status" />
</resultMap>
<sql id="selectEmsBatteryStackVo">
select id, work_status, pcs_communication_status, ems_communication_status, operation_status, stack_voltage, stack_current, stack_soc, stack_soh, max_cell_voltage, max_voltage_group_id, max_voltage_cell_id, min_cell_voltage, min_voltage_group_id, min_voltage_cell_id, max_cell_temp, max_temp_group_id, max_temp_cell_id, min_cell_temp, min_temp_group_id, min_temp_cell_id, total_charge_capacity, total_discharge_capacity, session_charge_capacity, session_discharge_capacity, available_charge_capacity, available_discharge_capacity, remaining_discharge_time, remaining_charge_time, max_discharge_power, max_charge_power, max_discharge_current, max_charge_current, daily_discharge_cycles, daily_charge_cycles, daily_discharge_capacity, daily_charge_capacity, operating_temp, bms_status, bms_charge_status, stack_insulation_resistance, site_id, device_id, create_time, create_by, update_time, update_by from ems_battery_stack
select id, work_status, pcs_communication_status, ems_communication_status, operation_status, stack_voltage, stack_current, stack_soc, stack_soh, max_cell_voltage, max_voltage_group_id, max_voltage_cell_id, min_cell_voltage, min_voltage_group_id, min_voltage_cell_id, max_cell_temp, max_temp_group_id, max_temp_cell_id, min_cell_temp, min_temp_group_id, min_temp_cell_id, total_charge_capacity, total_discharge_capacity, session_charge_capacity, session_discharge_capacity, available_charge_capacity, available_discharge_capacity, remaining_discharge_time, remaining_charge_time, max_discharge_power, max_charge_power, max_discharge_current, max_charge_current, daily_discharge_cycles, daily_charge_cycles, daily_discharge_capacity, daily_charge_capacity, operating_temp, bms_status, bms_charge_status, stack_insulation_resistance, site_id, device_id, create_time, create_by, update_time, update_by, battery_number, battery_avg_voltage, battery_different_pressure, avg_temperature, battery_different_temperature, max_internal_resistance, min_internal_resistance, avg_internal_resistance, battery_defferent_resistance, max_resistance_cell_id, min_resistance_cell_id, environment_temperature, environment_humidity, circuit_breaker_status from ems_battery_stack
</sql>
<select id="selectEmsBatteryStackList" parameterType="EmsBatteryStack" resultMap="EmsBatteryStackResult">
@ -103,6 +117,20 @@
<if test="stackInsulationResistance != null "> and stack_insulation_resistance = #{stackInsulationResistance}</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="batteryNumber != null "> and battery_number = #{batteryNumber}</if>
<if test="batteryAvgVoltage != null "> and battery_avg_voltage = #{batteryAvgVoltage}</if>
<if test="batteryDifferentPressure != null "> and battery_different_pressure = #{batteryDifferentPressure}</if>
<if test="avgTemperature != null "> and avg_temperature = #{avgTemperature}</if>
<if test="batteryDifferentTemperature != null "> and battery_different_temperature = #{batteryDifferentTemperature}</if>
<if test="maxInternalResistance != null "> and max_internal_resistance = #{maxInternalResistance}</if>
<if test="minInternalResistance != null "> and min_internal_resistance = #{minInternalResistance}</if>
<if test="avgInternalResistance != null "> and avg_internal_resistance = #{avgInternalResistance}</if>
<if test="batteryDefferentResistance != null "> and battery_defferent_resistance = #{batteryDefferentResistance}</if>
<if test="maxResistanceCellId != null "> and max_resistance_cell_id = #{maxResistanceCellId}</if>
<if test="minResistanceCellId != null "> and min_resistance_cell_id = #{minResistanceCellId}</if>
<if test="environmentTemperature != null "> and environment_temperature = #{environmentTemperature}</if>
<if test="environmentHumidity != null "> and environment_humidity = #{environmentHumidity}</if>
<if test="circuitBreakerStatus != null and circuitBreakerStatus != ''"> and circuit_breaker_status = #{circuitBreakerStatus}</if>
</where>
</select>
@ -160,6 +188,20 @@
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="batteryNumber != null">battery_number,</if>
<if test="batteryAvgVoltage != null">battery_avg_voltage,</if>
<if test="batteryDifferentPressure != null">battery_different_pressure,</if>
<if test="avgTemperature != null">avg_temperature,</if>
<if test="batteryDifferentTemperature != null">battery_different_temperature,</if>
<if test="maxInternalResistance != null">max_internal_resistance,</if>
<if test="minInternalResistance != null">min_internal_resistance,</if>
<if test="avgInternalResistance != null">avg_internal_resistance,</if>
<if test="batteryDefferentResistance != null">battery_defferent_resistance,</if>
<if test="maxResistanceCellId != null">max_resistance_cell_id,</if>
<if test="minResistanceCellId != null">min_resistance_cell_id,</if>
<if test="environmentTemperature != null">environment_temperature,</if>
<if test="environmentHumidity != null">environment_humidity,</if>
<if test="circuitBreakerStatus != null">circuit_breaker_status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workStatus != null">#{workStatus},</if>
@ -208,6 +250,20 @@
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="batteryNumber != null">#{batteryNumber},</if>
<if test="batteryAvgVoltage != null">#{batteryAvgVoltage},</if>
<if test="batteryDifferentPressure != null">#{batteryDifferentPressure},</if>
<if test="avgTemperature != null">#{avgTemperature},</if>
<if test="batteryDifferentTemperature != null">#{batteryDifferentTemperature},</if>
<if test="maxInternalResistance != null">#{maxInternalResistance},</if>
<if test="minInternalResistance != null">#{minInternalResistance},</if>
<if test="avgInternalResistance != null">#{avgInternalResistance},</if>
<if test="batteryDefferentResistance != null">#{batteryDefferentResistance},</if>
<if test="maxResistanceCellId != null">#{maxResistanceCellId},</if>
<if test="minResistanceCellId != null">#{minResistanceCellId},</if>
<if test="environmentTemperature != null">#{environmentTemperature},</if>
<if test="environmentHumidity != null">#{environmentHumidity},</if>
<if test="circuitBreakerStatus != null">#{circuitBreakerStatus},</if>
</trim>
</insert>
@ -260,6 +316,20 @@
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="batteryNumber != null">battery_number = #{batteryNumber},</if>
<if test="batteryAvgVoltage != null">battery_avg_voltage = #{batteryAvgVoltage},</if>
<if test="batteryDifferentPressure != null">battery_different_pressure = #{batteryDifferentPressure},</if>
<if test="avgTemperature != null">avg_temperature = #{avgTemperature},</if>
<if test="batteryDifferentTemperature != null">battery_different_temperature = #{batteryDifferentTemperature},</if>
<if test="maxInternalResistance != null">max_internal_resistance = #{maxInternalResistance},</if>
<if test="minInternalResistance != null">min_internal_resistance = #{minInternalResistance},</if>
<if test="avgInternalResistance != null">avg_internal_resistance = #{avgInternalResistance},</if>
<if test="batteryDefferentResistance != null">battery_defferent_resistance = #{batteryDefferentResistance},</if>
<if test="maxResistanceCellId != null">max_resistance_cell_id = #{maxResistanceCellId},</if>
<if test="minResistanceCellId != null">min_resistance_cell_id = #{minResistanceCellId},</if>
<if test="environmentTemperature != null">environment_temperature = #{environmentTemperature},</if>
<if test="environmentHumidity != null">environment_humidity = #{environmentHumidity},</if>
<if test="circuitBreakerStatus != null">circuit_breaker_status = #{circuitBreakerStatus},</if>
</trim>
where id = #{id}
</update>

View File

@ -56,10 +56,11 @@
<result property="sysUCurrent" column="sys_u_current" />
<result property="sysVCurrent" column="sys_v_current" />
<result property="sysWCurrent" column="sys_w_current" />
<result property="dwFrequency" column="dw_frequency" />
</resultMap>
<sql id="selectEmsPcsDataVo">
select id, data_update_time, work_status, grid_status, device_status, control_mode, total_active_power, daily_ac_charge_energy, a_phase_voltage, a_phase_current, total_reactive_power, daily_ac_discharge_energy, b_phase_voltage, b_phase_current, total_apparent_power, pcs_module_temperature, c_phase_voltage, c_phase_current, total_power_factor, pcs_environment_temperature, ac_frequency, branch_status, discharge_status, dc_power, dc_voltage, dc_current, create_by, create_time, update_by, update_time, remark, site_id, device_id, date_month, date_day, total_ac_charge_energy, total_ac_discharge_energy, ac_charge_active_power, ac_capacitive_reactive_power, ac_discharge_active_power, ac_inductive_reactive_power, max_capacitive_power_capacity, max_inductive_power_capacity, max_charge_power_capacity, max_discharge_power_capacity, ac_switch_status, dc_switch_status, remote_control_status, sys_u_current, sys_v_current, sys_w_current from ems_pcs_data
select id, data_update_time, work_status, grid_status, device_status, control_mode, total_active_power, daily_ac_charge_energy, a_phase_voltage, a_phase_current, total_reactive_power, daily_ac_discharge_energy, b_phase_voltage, b_phase_current, total_apparent_power, pcs_module_temperature, c_phase_voltage, c_phase_current, total_power_factor, pcs_environment_temperature, ac_frequency, branch_status, discharge_status, dc_power, dc_voltage, dc_current, create_by, create_time, update_by, update_time, remark, site_id, device_id, date_month, date_day, total_ac_charge_energy, total_ac_discharge_energy, ac_charge_active_power, ac_capacitive_reactive_power, ac_discharge_active_power, ac_inductive_reactive_power, max_capacitive_power_capacity, max_inductive_power_capacity, max_charge_power_capacity, max_discharge_power_capacity, ac_switch_status, dc_switch_status, remote_control_status, sys_u_current, sys_v_current, sys_w_current, dw_frequency from ems_pcs_data
</sql>
<select id="selectEmsPcsDataList" parameterType="EmsPcsData" resultMap="EmsPcsDataResult">
@ -110,6 +111,7 @@
<if test="sysUCurrent != null "> and sys_u_current = #{sysUCurrent}</if>
<if test="sysVCurrent != null "> and sys_v_current = #{sysVCurrent}</if>
<if test="sysWCurrent != null "> and sys_w_current = #{sysWCurrent}</if>
<if test="dwFrequency != null "> and dw_frequency = #{dwFrequency}</if>
</where>
</select>
@ -171,6 +173,7 @@
<if test="sysUCurrent != null">sys_u_current,</if>
<if test="sysVCurrent != null">sys_v_current,</if>
<if test="sysWCurrent != null">sys_w_current,</if>
<if test="dwFrequency != null">dw_frequency,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
@ -223,6 +226,7 @@
<if test="sysUCurrent != null">#{sysUCurrent},</if>
<if test="sysVCurrent != null">#{sysVCurrent},</if>
<if test="sysWCurrent != null">#{sysWCurrent},</if>
<if test="dwFrequency != null">#{dwFrequency},</if>
</trim>
</insert>
@ -279,6 +283,7 @@
<if test="sysUCurrent != null">sys_u_current = #{sysUCurrent},</if>
<if test="sysVCurrent != null">sys_v_current = #{sysVCurrent},</if>
<if test="sysWCurrent != null">sys_w_current = #{sysWCurrent},</if>
<if test="dwFrequency != null">dw_frequency = #{dwFrequency},</if>
</trim>
where id = #{id}
</update>