| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.sxkj.fw.cockpit.service.ICockpitService; |
| | | import org.sxkj.fw.cockpit.vo.AlarmStatisticsVO; |
| | |
| | | import org.sxkj.fw.record.entity.FwDroneAlarmRecordEntity; |
| | | import org.sxkj.fw.record.service.IFwDroneAlarmRecordService; |
| | | import org.sxkj.fw.record.vo.FwDroneAlarmRecordVO; |
| | | import org.sxkj.system.cache.SysCache; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | |
| | | @Override |
| | | public IPage<CockpitFwDeviceVO> selectCockpitDevicePage(IPage<CockpitFwDeviceVO> page, FwDeviceDTO fwDevice) { |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | fwDevice.setDeptList(deptList); |
| | | return fwDeviceService.selectCockpitDevicePage(page, fwDevice); |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceStatisticsVO> statisticalDeviceType() { |
| | | return fwDeviceService.statisticalDeviceType(); |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | return fwDeviceService.statisticalDeviceType(deptList); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public AlarmStatisticsVO statisticsAlarmsAndDeviceRecords() { |
| | | // 设备统计 |
| | | AlarmStatisticsVO alarmStatisticsVO = fwDeviceService.statisticalDeviceAtt(); |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | // 设备统计 |
| | | AlarmStatisticsVO alarmStatisticsVO = fwDeviceService.statisticalDeviceAtt(deptList); |
| | | // 告警统计 |
| | | AlarmStatisticsVO alarmStatistics = fwDroneAlarmRecordService.alarmTypeStatistics(); |
| | | AlarmStatisticsVO alarmStatistics = fwDroneAlarmRecordService.alarmTypeStatistics(deptList); |
| | | alarmStatisticsVO.setHistoryAlarmCount(alarmStatistics.getHistoryAlarmCount()); |
| | | alarmStatisticsVO.setRealTimeAlarmCount(alarmStatistics.getRealTimeAlarmCount()); |
| | | return alarmStatisticsVO; |