吉安感知网项目-后端
linwei
2026-02-05 bf45f88ff9ea1ea1d4976f97dbe2a12eae9a52f9
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
@@ -342,13 +342,13 @@
            <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 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
@@ -396,10 +396,18 @@
        WHERE
            is_deleted = 0
        <if test="deptList != null and deptList.size > 0">
            and create_dept in
            and ( create_dept in
            <foreach collection="deptList" item="deptId" open="(" separator="," close=")">
                #{deptId}
            </foreach>
            <if test="currentDeptId != null and currentDeptId != '' ">
                or 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
            manufacturer