集成modbus连接本地设备读取数据代码-配置文件方式读取;
PCS开关机功能通过modbus连接设备发送控制命令;
This commit is contained in:
@ -64,10 +64,22 @@
|
||||
<result property="module2Temp" column="module2_temp" />
|
||||
<result property="module3Temp" column="module3_temp" />
|
||||
<result property="module4Temp" column="module4_temp" />
|
||||
<result property="cluster1ActivePower" column="cluster1_active_power" />
|
||||
<result property="cluster2ActivePower" column="cluster2_active_power" />
|
||||
<result property="cluster3ActivePower" column="cluster3_active_power" />
|
||||
<result property="cluster4ActivePower" column="cluster4_active_power" />
|
||||
</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, dw_frequency, u_temperature, v_temperature, w_temperature, module1_temp, module2_temp, module3_temp, module4_temp 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, u_temperature, v_temperature, w_temperature,
|
||||
module1_temp, module2_temp, module3_temp, module4_temp, cluster1_active_power, cluster2_active_power, cluster3_active_power, cluster4_active_power from ems_pcs_data
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsPcsDataList" parameterType="EmsPcsData" resultMap="EmsPcsDataResult">
|
||||
@ -126,6 +138,10 @@
|
||||
<if test="module2Temp != null "> and module2_temp = #{module2Temp}</if>
|
||||
<if test="module3Temp != null "> and module3_temp = #{module3Temp}</if>
|
||||
<if test="module4Temp != null "> and module4_temp = #{module4Temp}</if>
|
||||
<if test="cluster1ActivePower != null "> and cluster1_active_power = #{cluster1ActivePower}</if>
|
||||
<if test="cluster2ActivePower != null "> and cluster2_active_power = #{cluster2ActivePower}</if>
|
||||
<if test="cluster3ActivePower != null "> and cluster3_active_power = #{cluster3ActivePower}</if>
|
||||
<if test="cluster4ActivePower != null "> and cluster4_active_power = #{cluster4ActivePower}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -195,6 +211,10 @@
|
||||
<if test="module2Temp != null">module2_temp,</if>
|
||||
<if test="module3Temp != null">module3_temp,</if>
|
||||
<if test="module4Temp != null">module4_temp,</if>
|
||||
<if test="cluster1ActivePower != null">cluster1_active_power,</if>
|
||||
<if test="cluster2ActivePower != null">cluster2_active_power,</if>
|
||||
<if test="cluster3ActivePower != null">cluster3_active_power,</if>
|
||||
<if test="cluster4ActivePower != null">cluster4_active_power,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="dataUpdateTime != null">#{dataUpdateTime},</if>
|
||||
@ -255,6 +275,10 @@
|
||||
<if test="module2Temp != null">#{module2Temp},</if>
|
||||
<if test="module3Temp != null">#{module3Temp},</if>
|
||||
<if test="module4Temp != null">#{module4Temp},</if>
|
||||
<if test="cluster1ActivePower != null">#{cluster1ActivePower},</if>
|
||||
<if test="cluster2ActivePower != null">#{cluster2ActivePower},</if>
|
||||
<if test="cluster3ActivePower != null">#{cluster3ActivePower},</if>
|
||||
<if test="cluster4ActivePower != null">#{cluster4ActivePower},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -319,6 +343,10 @@
|
||||
<if test="module2Temp != null">module2_temp = #{module2Temp},</if>
|
||||
<if test="module3Temp != null">module3_temp = #{module3Temp},</if>
|
||||
<if test="module4Temp != null">module4_temp = #{module4Temp},</if>
|
||||
<if test="cluster1ActivePower != null">cluster1_active_power = #{cluster1ActivePower},</if>
|
||||
<if test="cluster2ActivePower != null">cluster2_active_power = #{cluster2ActivePower},</if>
|
||||
<if test="cluster3ActivePower != null">cluster3_active_power = #{cluster3ActivePower},</if>
|
||||
<if test="cluster4ActivePower != null">cluster4_active_power = #{cluster4ActivePower},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user