吉安感知网项目-后端
rain
2026-02-09 66bfbdb9251c22ffa2b5f05595a76a3547a2f5eb
drone-service/drone-fw/src/main/java/org/sxkj/fw/record/mapper/FwDroneFlightRecordMapper.xml
@@ -33,8 +33,8 @@
                dfr.is_deleted = 0
                and d.track_status = 1
                and d.is_enabled = 1
            <if test="param2.regionName != null and param2.regionName != ''">
                and (d.final_outbound_area = #{param2.regionName}
            <if test="param2.regionCode != null and param2.regionCode != ''">
                and (d.final_outbound_area_code like CONCAT(#{param2.regionCode}, '%')
                <!-- 或者设备是共享给当前部门的 -->
                <if test="param2.currentDeptId != null and param2.currentDeptId != '' ">
                    or dfr.device_id in (
@@ -75,13 +75,6 @@
            <if test="param2.areaName != null and param2.areaName != ''">
                and dfr.area_name like CONCAT('%', #{param2.areaName}, '%')
            </if>
            <!-- <if test="param2.deptList != null and param2.deptList.size > 0"> -->
            <!--     and (dfr.create_dept in -->
            <!--     <foreach collection="param2.deptList" item="deptId" open="(" separator="," close=")"> -->
            <!--         #{deptId} -->
            <!--     </foreach> -->
            <!--     ) -->
            <!-- </if> -->
        </where>
    </select>
@@ -101,6 +94,8 @@
        FROM
            ja_fw_drone_flight_record dfr
        left join
            ja_fw_device d on dfr.device_id = d.id
        left join
            ja_fw_drone_flight_record_detail dfrd on dfr.id = dfrd.flight_record_id
        <where>
            dfr.is_deleted = 0
@@ -110,6 +105,18 @@
                    #{item}
                </foreach>
            </if>
            <if test="regionCode != null and regionCode != ''">
                and (d.final_outbound_area_code like CONCAT(#{regionCode}, '%')
                <!-- 或者设备是共享给当前部门的 -->
                <if test="currentDeptId != null and currentDeptId != '' ">
                    or dfr.device_id in (
                    SELECT device_id FROM ja_fw_device_per_share
                    WHERE loan_to_dept_id = #{currentDeptId}
                    AND is_deleted = 0
                    )
                </if>
                )
            </if>
        </where>
    </select>