| | |
| | | public Map<String, List<PowerInf>> getStationList(int id) { |
| | | Map<String,List<PowerInf>> resultMap = new LinkedHashMap<>(); |
| | | //查询已添加的机房站点列表 |
| | | List<PowerInf> lockList = bjPowermapper.getPowerList(id); |
| | | List<PowerInf> allLockList = powerInfMapper.getPowerList(); |
| | | List<PowerInf> notRelatedLockList = allLockList.stream().filter(PowerInf -> !lockList.contains(PowerInf)).collect(Collectors.toList()); |
| | | List<PowerInf> powerList = bjPowermapper.getPowerList(id); |
| | | List<PowerInf> allPowerList = powerInfMapper.getPowerList(); |
| | | List<PowerInf> notRelatedLockList = allPowerList.stream().filter(PowerInf -> !powerList.contains(PowerInf)).collect(Collectors.toList()); |
| | | |
| | | resultMap.put("stationsAdded",lockList); |
| | | resultMap.put("stationsAdded",powerList); |
| | | resultMap.put("stationsNotAdded",notRelatedLockList); |
| | | |
| | | return resultMap; |
| | |
| | | Integer flag = bjUsrmapper.getGroupFlag(userId); |
| | | return flag != null && flag == 1; |
| | | } |
| | | //先校验当前用户是否存在包机组 |
| | | public int checkUserBaojiGroup(Integer id) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("uid",id); |
| | | List<BaojigroupUsr> list=bjUsrmapper.selectList(wrapper); |
| | | return list == null?0:1 ; |
| | | } |
| | | } |