whycxzp
2023-08-18 bd4c654ea41f8ed02d10d30ab27ab3076b8e16f2
更新告警手动消除
1个文件已修改
5 ■■■■■ 已修改文件
src/main/java/com/whyc/service/AlarmManualClearService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/AlarmManualClearService.java
@@ -64,27 +64,22 @@
        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());