| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.whyc.dto.AlarmDaoFactory; |
| | | import com.whyc.dto.GroupWithStationAndAlarmDTO; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.BaoJiGroupMapper; |
| | |
| | | import com.whyc.mapper.BaoJiGroupBattGroupMapper; |
| | | import com.whyc.mapper.CommonMapper; |
| | | import com.whyc.pojo.*; |
| | | import com.whyc.util.MessageUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | List<String> stationIdList = stationInfList.stream().map(StationInf::getStationId).collect(Collectors.toList()); |
| | | //电池 |
| | | List<BattalarmData> battAlarmList = battAlarmDataService.getListByStationIds(stationIdList); |
| | | for (BattalarmData data : battAlarmList) { |
| | | data.setAlmSignalIdName(AlarmDaoFactory.getAllAlarmName(data.getAlmSignalId())); |
| | | } |
| | | //设备 |
| | | List<DevalarmData> deviceAlarmList = deviceAlarmDataService.getListByStationIds(stationIdList); |
| | | for (DevalarmData data : deviceAlarmList) { |
| | | data.setAlarmName(AlarmDaoFactory.getAllAlarmName(data.getAlmType())); |
| | | } |
| | | //电源 |
| | | List<PwrdevAlarm> powerAlarmList = powerAlarmService.getListByStationIds(stationIdList); |
| | | for (PwrdevAlarm data : powerAlarmList) { |
| | | data.setAlarmName(AlarmDaoFactory.getAllAlarmName(data.getAlmType())); |
| | | } |
| | | //遍历每个告警列表,如果与站点相符,则加入到站点里面 |
| | | for (BattalarmData alarm : battAlarmList) { |
| | | for (StationInf stationInf : stationInfList) { |