| | |
| | | clear.setCreateTime(date); |
| | | //插入对应的站点id,用于后期用户相关 |
| | | Integer alarmType = clear.getAlarmType(); |
| | | String stationId; |
| | | Integer num = clear.getNum(); |
| | | if(alarmType == 1){ //电池告警 |
| | | stationId = battInfService.getStationIdByBattGroupId(clear.getBattGroupId()); |
| | | //添加到历史告警,移除告警确认数据 |
| | | BattAlarmDataVerify data = battAlarmService.getById(num); |
| | | battAlarmHistoryService.add(data); |
| | | battAlarmService.delete(num); |
| | | } else if (alarmType == 2) { //设备告警 |
| | | stationId = battInfService.getStationIdByDeviceId(clear.getDeviceId()); |
| | | DevAlarmDataVerify data = devAlarmService.getById(num); |
| | | devAlarmHistoryService.add(data); |
| | | devAlarmService.delete(num); |
| | | |
| | | }else{ //电源告警 |
| | | stationId = powerInfService.getStationIdByPowerDeviceId(clear.getPowerDeviceId()); |
| | | PwrDevAlarmVerify data = powerAlarmService.getById(num); |
| | | powerAlarmHistoryService.add(data); |
| | | powerAlarmService.delete(num); |
| | | } |
| | | clear.setStationId(stationId); |
| | | //处理文件 |
| | | String fileDirName = ""; |
| | | ApplicationHome applicationHome = new ApplicationHome(getClass()); |