吉安感知网项目-后端
rain
2026-01-29 335552671e353fff124298a1cf819e9354b1b304
drone-service/drone-fw/src/main/java/org/sxkj/fw/area/service/impl/FwDefenseSceneServiceImpl.java
@@ -78,6 +78,7 @@
         areaIdSet.addAll(parseIdList(record.getAreaDivideIds()));
      }
      // 汇总场景关联的区域与设备,便于统计设备数量
      Map<Long, BigDecimal> areaSizeMap = new HashMap<>();
      Map<Long, List<Long>> areaDeviceMap = new HashMap<>();
      Set<Long> deviceIdSet = new HashSet<>();
@@ -96,6 +97,7 @@
      Map<Long, String> deviceTypeMap = new HashMap<>();
      if (!deviceIdSet.isEmpty()) {
         // 批量拉取设备类型,降低循环查询成本
         List<FwDeviceEntity> deviceList = fwDeviceService.listByIds(deviceIdSet);
         for (FwDeviceEntity device : deviceList) {
            if (device == null || device.getId() == null) {
@@ -168,6 +170,7 @@
      if (areaIds == null || areaIds.isEmpty()) {
         return 0;
      }
      // 面积按平方米整数返回
      BigDecimal total = BigDecimal.ZERO;
      for (Long areaId : areaIds) {
         BigDecimal areaSize = areaSizeMap.get(areaId);