单体电池-增加簇号
This commit is contained in:
@ -24,10 +24,11 @@
|
||||
<result property="siteId" column="site_id" />
|
||||
<result property="communicationStatus" column="communication_status" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmsDevicesSettingVo">
|
||||
select id, device_name, device_type, slave_id, timeout_ms, retries, ip_address, ip_port, serial_port, baud_rate, data_bits, stop_bits, parity, description, created_at, updated_at, site_id, communication_status, device_id from ems_devices_setting
|
||||
select id, device_name, device_type, slave_id, timeout_ms, retries, ip_address, ip_port, serial_port, baud_rate, data_bits, stop_bits, parity, description, created_at, updated_at, site_id, communication_status, device_id, parent_id from ems_devices_setting
|
||||
</sql>
|
||||
|
||||
<select id="selectEmsDevicesSettingList" parameterType="EmsDevicesSetting" resultMap="EmsDevicesSettingResult">
|
||||
@ -51,6 +52,7 @@
|
||||
<if test="siteId != null and siteId != ''"> and site_id = #{siteId}</if>
|
||||
<if test="communicationStatus != null and communicationStatus != ''"> and communication_status = #{communicationStatus}</if>
|
||||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
|
||||
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -80,6 +82,7 @@
|
||||
<if test="siteId != null">site_id,</if>
|
||||
<if test="communicationStatus != null">communication_status,</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||
@ -100,6 +103,7 @@
|
||||
<if test="siteId != null">#{siteId},</if>
|
||||
<if test="communicationStatus != null">#{communicationStatus},</if>
|
||||
<if test="deviceId != null and deviceId != ''">#{deviceId},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -124,6 +128,7 @@
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="communicationStatus != null">communication_status = #{communicationStatus},</if>
|
||||
<if test="deviceId != null and deviceId != ''">device_id = #{deviceId},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -146,9 +151,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getAllClusterInfoByStackId" parameterType="String" resultType="java.util.Map">
|
||||
select device_id as id,device_name as deviceName
|
||||
from ems_devices_setting
|
||||
where device_id in (select distinct eb.device_id from ems_battery_cluster eb where eb.stack_device_id = #{stackDeviceId})
|
||||
select distinct t.device_id,t.device_name from ems_devices_setting t where t.parent_id = #{stackDeviceId}
|
||||
</select>
|
||||
|
||||
<select id="getAllBatteryDeviceBySiteId" parameterType="String" resultType="com.xzzn.ems.domain.EmsDevicesSetting">
|
||||
|
Reference in New Issue
Block a user