From c04afebf9cebfd65bf55c2395e732f36f558d208 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 28 Jan 2026 10:30:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
index 4c6b154..09f05c9 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
@@ -81,6 +81,12 @@
             <if test="param2.status != null">
                 and status = #{param2.status}
             </if>
+            <if test="param2.isTrack != null and param2.isTrack == 1">
+                and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) > 0
+            </if>
+            <if test="param2.isTrack != null and param2.isTrack == 2">
+                and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) = 0
+            </if>
         </where>
     </select>
 
@@ -126,6 +132,12 @@
             </if>
             <if test="status != null">
                 and status = #{status}
+            </if>
+            <if test="isTrack != null and isTrack == 1">
+                and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) > 0
+            </if>
+            <if test="isTrack != null and isTrack == 2">
+                and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) = 0
             </if>
         </where>
     </select>
@@ -225,6 +237,13 @@
         WHERE
             d.is_deleted = 0
           AND t.out_target IS NOT NULL
+        <if test="effectiveRangeKmIsNotNull != null and effectiveRangeKmIsNotNull == 1">
+            and d.effective_range_km is not null
+            and d.effective_range_km > 0
+        </if>
+        <if test="effectiveRangeKmIsNotNull != null and effectiveRangeKmIsNotNull == 2">
+            and (d.effective_range_km is null or d.effective_range_km = 0)
+        </if>
         GROUP BY
             t.out_target;
     </select>

--
Gitblit v1.9.3