| | |
| | | @Autowired(required = false) |
| | | private BaoJiGroupBattGroupMapper bjBattMapper; |
| | | |
| | | @Autowired(required = false) |
| | | private DevalarmDataMapper devAlmMapper; |
| | | |
| | | public int searchMaxBattgroupId_zj() { |
| | | Integer id = battInfMapper.getMaxBattGroupId_zj(); |
| | | if (id == null) { |
| | |
| | | int devNum=0; |
| | | int battNum=0; |
| | | try { |
| | | //查询battinf表中所有机房信息 |
| | | //查询battinf表中所有电池组信息 |
| | | List<Battinf> list=battInfMapper.getAllInfInSz2(userId); |
| | | Map<String, List<Battinf>> ListMap = list.stream().collect(Collectors.groupingBy(Battinf::getStationName9)); |
| | | for (String stationName9 : ListMap.keySet()) { |
| | |
| | | } |
| | | |
| | | } |
| | | //4.中间地图 |
| | | public Response getAllStationInSz2(Integer userId) { |
| | | Map<String,Object> map=new HashMap<>(); |
| | | try { |
| | | //查询battinf表中所有机房信息 |
| | | List<Battinf> list=battInfMapper.getAllStationInSz2(userId); |
| | | Map<String, List<Battinf>> ListMap = list.stream().collect(Collectors.groupingBy(Battinf::getStationName9)); |
| | | for (String stationName9 : ListMap.keySet()) { |
| | | List<Battinf> name9List=ListMap.get(stationName9); |
| | | for (Battinf binf:name9List) { |
| | | //判断机房下的设备告警是否都存在通讯告警 119020 |
| | | int flag=devAlmMapper.judgeCommErr(binf.getStationId(),119020); |
| | | if(flag>0){ |
| | | binf.setNote("0"); |
| | | }else{ |
| | | binf.setNote("1"); |
| | | } |
| | | } |
| | | map.put(stationName9,name9List); |
| | | } |
| | | return new Response<>().setII(1,true,map,""); |
| | | } catch (Exception e) { |
| | | return new Response<>().set(1,false,""); |
| | | } |
| | | } |
| | | } |