吉安感知网项目-后端
linwei
2026-04-02 b954d7a119eb635394bf4ff3619a9ab4b4978e48
drone-service/drone-fw/src/main/java/org/sxkj/fw/record/service/impl/FwDroneAlarmRecordServiceImpl.java
@@ -17,6 +17,7 @@
package org.sxkj.fw.record.service.impl;
import org.springblade.core.secure.utils.AuthUtil;
import org.sxkj.common.utils.HeaderUtils;
import org.sxkj.fw.cockpit.vo.AlarmStatisticsVO;
import org.sxkj.fw.record.dto.FwDroneAlarmRecordDTO;
import org.sxkj.fw.record.entity.FwDroneAlarmRecordEntity;
@@ -56,20 +57,19 @@
      Dept dept = SysCache.getDept(Long.valueOf(AuthUtil.getDeptId()));
      // 3. 查询不在这些部门区域内的设备
      Region byCode = RegionCache.getByCode(dept.getAreaCode());
      String regionName = byCode.getName();
      fwDroneAlarmRecord.setRegionName(regionName);
      // 获取当前部门及其子部门列表
      // List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId()));
      // fwDroneAlarmRecord.setDeptList(deptList);
      // 获取共享给当前部门的设备编号列表
      fwDroneAlarmRecord.setRegionName(byCode.getName());
      fwDroneAlarmRecord.setCurrentDeptId(AuthUtil.getDeptId());
      // 执行查询
      fwDroneAlarmRecord.setRegionCode(HeaderUtils.formatAreaCode(byCode.getCode()));
      return page.setRecords(baseMapper.selectFwDroneAlarmRecordPage(page, fwDroneAlarmRecord));
   }
   @Override
   public List<FwDroneAlarmRecordExcel> exportFwDroneAlarmRecord(FwDroneAlarmRecordExportParam fwDroneAlarmRecord) {
      Dept dept = SysCache.getDept(Long.valueOf(AuthUtil.getDeptId()));
      Region byCode = RegionCache.getByCode(dept.getAreaCode());
      fwDroneAlarmRecord.setRegionCode(HeaderUtils.formatAreaCode(byCode.getCode()));
      fwDroneAlarmRecord.setCurrentDeptId(AuthUtil.getDeptId());
      List<FwDroneAlarmRecordExcel> fwDroneAlarmRecordList = baseMapper.exportFwDroneAlarmRecord(fwDroneAlarmRecord);
      return fwDroneAlarmRecordList;
   }
@@ -80,7 +80,7 @@
    * @return
    */
   @Override
   public AlarmStatisticsVO alarmTypeStatistics(String regionName, String currentDeptId) {
      return baseMapper.alarmTypeStatistics(regionName, currentDeptId);
   public AlarmStatisticsVO alarmTypeStatistics(String regionCode, String currentDeptId) {
      return baseMapper.alarmTypeStatistics(regionCode, currentDeptId);
   }
}