吉安感知网项目-后端
rain
2026-02-02 4fa212add5bb7689331e9e070c802bfcb5dcafa2
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml
@@ -49,32 +49,32 @@
    <select id="selectGdManageDevice" resultType="org.sxkj.gd.workorder.vo.GdManageDeviceVO">
        select
            d.id,
            d.device_sn,
            d.device_name,
            d.nickname,
            d.device_payload,
            d.longitude,
            d.latitude,
            d.geom,
            md.id,
            md.device_sn,
            md.device_name,
            md.nickname,
            md.device_payload,
            md.longitude,
            md.latitude,
            md.geom,
            d2.height as height
        from
            ja_gd_manage_device d
        left join ja_gd_manage_device d2 on d.device_sn = d2.device_sn and d2.device_type = '0'
            ja_gd_manage_device md
        left join ja_gd_manage_device d2 on md.device_sn = d2.device_sn and d2.device_type = '0'
        <where>
            <if test="deviceIds != null and deviceIds.size() > 0">
                and id in
                and md.id in
                <foreach item="item" collection="deviceIds" index="index" open="(" close=")" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="devicePayload != null and devicePayload != ''">
                and device_payload like concat('%',#{devicePayload},'%')
                and md.device_payload like concat('%',#{devicePayload},'%')
            </if>
            <if test="geom != null and geom != ''">
                and ST_Intersects(geom, ST_GeomFromText(#{geom}))
                and ST_Intersects(md.geom, ST_GeomFromText(#{geom}))
            </if>
                and is_deleted = 0
                and md.is_deleted = 0
        </where>
    </select>