This commit is contained in:
2026-03-18 10:06:42 +08:00
parent 5ab2cb8f90
commit e4cfd15cb4
25 changed files with 2948 additions and 891 deletions

View File

@ -52,7 +52,7 @@
<include refid="selectEmsPointConfigVo"/>
<where>
<if test="siteId != null and siteId != ''">and site_id = #{siteId}</if>
<if test="pointId != null and pointId != ''">and point_id = #{pointId}</if>
<if test="pointId != null and pointId != ''">and point_id like concat('%', #{pointId}, '%')</if>
<if test="deviceCategory != null and deviceCategory != ''">and device_category = #{deviceCategory}</if>
<if test="deviceId != null and deviceId != ''">and device_id = #{deviceId}</if>
<if test="dataKey != null and dataKey != ''">and data_key like concat('%', #{dataKey}, '%')</if>
@ -202,6 +202,36 @@
where id = #{id}
</update>
<update id="updateEmsPointConfigForImport" parameterType="EmsPointConfig">
update ems_point_config
set point_id = #{pointId},
site_id = #{siteId},
device_category = #{deviceCategory},
device_id = #{deviceId},
point_name = #{pointName},
data_key = #{dataKey},
point_desc = #{pointDesc},
register_address = #{registerAddress},
data_unit = #{dataUnit},
data_a = #{dataA},
data_k = #{dataK},
data_b = #{dataB},
data_bit = #{dataBit},
is_alarm = #{isAlarm},
point_type = #{pointType},
calc_expression = #{calcExpression},
collect_enabled = #{collectEnabled},
collect_source = #{collectSource},
modbus_register_type = #{modbusRegisterType},
modbus_data_type = #{modbusDataType},
modbus_read_order = #{modbusReadOrder},
modbus_group = #{modbusGroup},
update_by = #{updateBy},
update_time = now(),
remark = #{remark}
where id = #{id}
</update>
<delete id="deleteEmsPointConfigById" parameterType="Long">
delete from ems_point_config where id = #{id}
</delete>
@ -329,11 +359,11 @@
<include refid="selectEmsPointConfigVo"/>
where collect_enabled = 1
and collect_source = 'MODBUS'
and (point_type is null or point_type <> 'calc')
and (point_type is null or point_type &lt;&gt; 'calc')
and (is_alarm is null or is_alarm = 0)
and register_address is not null and register_address <> ''
and modbus_register_type is not null and modbus_register_type <> ''
and modbus_data_type is not null and modbus_data_type <> ''
and register_address is not null and register_address &lt;&gt; ''
and modbus_register_type is not null and modbus_register_type &lt;&gt; ''
and modbus_data_type is not null and modbus_data_type &lt;&gt; ''
<if test="siteId != null and siteId != ''">
and site_id = #{siteId}
</if>