吉安感知网项目-后端
linwei
2026-02-05 bf45f88ff9ea1ea1d4976f97dbe2a12eae9a52f9
反无优化
3 files modified
28 ■■■■■ changed files
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.java 2 ●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml 24 ●●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceServiceImpl.java 2 ●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.java
@@ -98,7 +98,7 @@
     * 设备生产厂商统计
     * @return 统计数据
     */
    List<DeviceStatisticsVO> getDeviceManufacturerStatistics(List<Long> deptList);
    List<DeviceStatisticsVO> getDeviceManufacturerStatistics(List<Long> deptList, String currentDeptId);
    /**
     * 告警统计
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
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceServiceImpl.java
@@ -171,7 +171,7 @@
        if (!AuthUtil.isAdministrator()) {
            deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()));
        }
        return baseMapper.getDeviceManufacturerStatistics(deptList);
        return baseMapper.getDeviceManufacturerStatistics(deptList, AuthUtil.getDeptId());
    }
    /**