吉安感知网项目-后端
rain
2026-01-29 335552671e353fff124298a1cf819e9354b1b304
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceServiceImpl.java
@@ -67,6 +67,7 @@
   @Override
   public IPage<FwDeviceVO> selectFwDevicePageVo(FwDevicePageParam fwDevice, Query query) {
      FwDeviceDTO fwDeviceDTO = GenericConverter.convert(fwDevice, FwDeviceDTO.class);
      // 按当前部门及下级部门范围过滤数据
      List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()));
      fwDeviceDTO.setDeptList(deptList);
      IPage<FwDeviceEntity> pages = selectFwDevicePage(Condition.getPage(query), fwDeviceDTO);
@@ -77,6 +78,7 @@
            .map(FwDeviceVO::getId)
            .filter(id -> id != null)
            .collect(Collectors.toList());
         // 批量补充设备关联场景名称
         Map<Long, String> sceneNameMap = selectSceneNameByDeviceIds(deviceIds);
         for (FwDeviceVO record : records) {
            String sceneName = sceneNameMap.get(record.getId());
@@ -135,18 +137,21 @@
    */
   @Override
   public List<DeviceTypeStatisticsVO> getDeviceTypeStatistics() {
      // 统计范围限定在当前部门及下级部门
      List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()));
      return baseMapper.getDeviceTypeStatistics(deptList);
   }
   @Override
   public List<DeviceStatisticsVO> getDeviceOutStatistics(String effectiveRangeKmIsNotNull) {
      // 统计范围限定在当前部门及下级部门
      List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()));
      return baseMapper.getDeviceOutStatistics(effectiveRangeKmIsNotNull, deptList);
   }
   @Override
   public List<DeviceStatisticsVO> getDeviceManufacturerStatistics() {
      // 统计范围限定在当前部门及下级部门
      List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()));
      return baseMapper.getDeviceManufacturerStatistics(deptList);
   }
@@ -179,6 +184,7 @@
    */
   @Override
   public boolean saveOrUpdateDevice(FwDeviceEntity fwDeviceEntity) {
      // 无效范围时清空坐标,避免显示无意义位置
      if (fwDeviceEntity.getEffectiveRangeKm() == null || fwDeviceEntity.getEffectiveRangeKm().compareTo(BigDecimal.ZERO) == 0) {
         fwDeviceEntity.setLatitude("");
         fwDeviceEntity.setLongitude("");