“mitao”
2026-01-23 b2893120939390f1a4468ff52813b47bbda44444
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClientServiceImpl.java
@@ -471,6 +471,16 @@
            vo.setName(entry.getKey());
            vo.setTotal(entry.getValue().size());
            // 设置设备类型字段
            // 从当前分组的第一个设备使用记录中获取设备类型
            if (!entry.getValue().isEmpty()) {
                DeviceUsage firstUsage = entry.getValue().get(0);
                Device device = finalDeviceMap.get(firstUsage.getDeviceId());
                if (device != null && device.getType() != null) {
                    vo.setType(device.getType());
                }
            }
            long inspectedCount = entry.getValue().stream()
                    .filter(d -> deviceInspectionMap.getOrDefault(d.getId(), false))
                    .count();