| | |
| | | |
| | | /** |
| | | * 统计在线灯杆数量 |
| | | * |
| | | * @return |
| | | */ |
| | | public Map<String,Integer> poleCount() { |
| | | Map<String,Integer> result = new HashMap<>(); |
| | | public Map<String, Integer> poleCount() { |
| | | Map<String, Integer> result = new HashMap<>(); |
| | | List<Pole> list = new ArrayList<>(); |
| | | LambdaQueryWrapper<Pole> wrapper = new LambdaQueryWrapper<>(); |
| | | if (SecurityUtils.getClientId() == null) { |
| | |
| | | } |
| | | list = list(wrapper); |
| | | List<Pole> poles = isOnLine(list); |
| | | result.put("poleOnlineCount",poles.size()); |
| | | result.put("poleTotalCount",list.size()); |
| | | result.put("poleOnlineCount", poles.size()); |
| | | result.put("poleTotalCount", list.size()); |
| | | return result; |
| | | } |
| | | |
| | |
| | | w.eq(Pole::getUserId, SecurityUtils.getUserId()); |
| | | }); |
| | | } |
| | | if (!param.getKeyword().isEmpty()) { |
| | | if (param.getKeyword() != null && !param.getKeyword().isEmpty()) { |
| | | wrapper.like(Pole::getPoleCode, param.getKeyword()).or( |
| | | wrappers -> { |
| | | wrappers.like(Pole::getPoleName, param.getKeyword()); |