From ff2ee260472e3b43c6dfd4b1406b629dfeb2d3f4 Mon Sep 17 00:00:00 2001
From: rain <1679827795@qq.com>
Date: Wed, 28 Jan 2026 19:33:04 +0800
Subject: [PATCH] 吉安航线任务推送

---
 drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml |   57 ++++++++++++++++++++++++---------------------------------
 1 files changed, 24 insertions(+), 33 deletions(-)

diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml
index eb32dc8..ca99d1b 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml
+++ b/drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml
@@ -3,53 +3,48 @@
 <mapper namespace="org.sxkj.gd.workorder.mapper.GdManageDeviceMapper">
 
     <!-- 通用查询映射结果 -->
-    <resultMap id="gdManageDeviceResultMap" type="org.sxkj.gd.workorder.entity.GdManageDeviceEntity">
+    <resultMap id="gdManageDeviceResultMap" type="org.sxkj.gd.workorder.vo.GdManageDeviceVO">
         <result column="id" property="id"/>
         <result column="device_sn" property="deviceSn"/>
         <result column="device_name" property="deviceName"/>
         <result column="nickname" property="nickname"/>
-        <result column="device_type" property="deviceType"/>
         <result column="device_payload" property="devicePayload"/>
         <result column="longitude" property="longitude"/>
         <result column="latitude" property="latitude"/>
-        <result column="firmware_version" property="firmwareVersion"/>
-        <result column="child_sn" property="childSn"/>
          <result column="mode_code" property="modeCode"/>
-        <result column="insure_expired_time" property="insureExpiredTime"/>
-        <result column="traffic_remaining" property="trafficRemaining"/>
-        <result column="traffic_expire_time" property="trafficExpireTime"/>
         <result column="create_time" property="createTime"/>
-        <result column="update_time" property="updateTime"/>
-        <result column="is_deleted" property="isDeleted"/>
+        <result column="device_dept_name" property="deviceDeptName"/>
     </resultMap>
 
 
     <select id="selectGdManageDevicePage" resultMap="gdManageDeviceResultMap">
         select
-            id,
-            device_sn,
-            device_name,
-            nickname,
-            device_payload,
-            longitude,
-            latitude,
-            location
+            md.id,
+            md.device_sn,
+            md.device_name,
+            md.nickname,
+            md.mode_code,
+            md.device_payload,
+            md.longitude,
+            md.latitude,
+            md.location,
+            md.device_type,
+            bd.dept_name as device_dept_name
         from
-            ja_gd_manage_device
+            ja_gd_manage_device md
+        left join
+                blade_dept bd on md.create_dept = bd.id
         <where>
-            <if test="deviceName != null and deviceName != ''">
-                and device_name like concat('%',#{deviceName},'%')
+                and md.is_deleted = 0
+            <if test="param2.deviceName != null and param2.deviceName != ''">
+                and md.nickname like concat('%',#{param2.deviceName},'%')
             </if>
-            <if test="nickname != null and nickname != ''">
-                and nickname like concat('%',#{nickname},'%')
+            <if test="param2.deptId != null">
+                and md.create_dept = #{param2.deptId}
             </if>
-            <if test="deptId != null">
-                and create_dept = #{deptId}
+            <if test="param2.location != null and param2.location != ''">
+                and md.location like concat('%',#{param2.location},'%')
             </if>
-            <if test="location != null and location != ''">
-                and location like concat('%',#{location},'%')
-            </if>
-                and is_deleted = 0
         </where>
     </select>
 
@@ -88,10 +83,6 @@
             </if>
                 and is_deleted = 0
         </where>
-
-
-                <if test="isDeleted != null">
-                and is_deleted = #{isDeleted}
-            </if></select>
+    </select>
 
 </mapper>

--
Gitblit v1.9.3