吉安感知网项目-后端
linwei
2026-02-02 970567fcffdb6710288357a0d18fb66bc29d074e
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
@@ -311,10 +311,18 @@
                blade_dict_biz b ON (a.device_type = b.dict_key AND b.code = 'deviceType' AND b.parent_id != 0)
        where a.is_deleted = 0
        <if test="deptList != null and deptList.size > 0">
            and a.create_dept in
            and ( a.create_dept in
            <foreach collection="deptList" item="deptId" open="(" separator="," close=")">
                #{deptId}
            </foreach>
            <!-- <if test="currentDeptId != null and currentDeptId != '' "> -->
            <!--     or a.id in ( -->
            <!--     SELECT device_id FROM ja_fw_device_per_share -->
            <!--     WHERE loan_to_dept_id = #{currentDeptId} -->
            <!--     AND is_deleted = 0 -->
            <!--     ) -->
            <!-- </if> -->
            )
        </if>
        group by a.device_type,b.dict_value
    </select>
@@ -338,10 +346,18 @@
            and (d.effective_range_km is null or d.effective_range_km = 0)
        </if>
        <if test="deptList != null and deptList.size > 0">
            and d.create_dept in
            and ( d.create_dept in
            <foreach collection="deptList" item="deptId" open="(" separator="," close=")">
                #{deptId}
            </foreach>
            <if test="currentDeptId != null and currentDeptId != '' ">
                or d.id in (
                SELECT device_id FROM ja_fw_device_per_share
                WHERE loan_to_dept_id = #{currentDeptId}
                AND is_deleted = 0
                )
            </if>
            )
        </if>
        GROUP BY
            d.final_outbound_area