| | |
| | | import com.sandu.ximon.admin.redis.LightKey; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.vo.PoleBindVO; |
| | | import com.sandu.ximon.dao.domain.LedPlayerEntity; |
| | | import com.sandu.ximon.dao.domain.Pole; |
| | | import com.sandu.ximon.dao.domain.PoleBinding; |
| | | import com.sandu.ximon.dao.domain.PoleGroupRelation; |
| | |
| | | |
| | | /** |
| | | * 统计在线灯杆数量 |
| | | * |
| | | * @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) { |
| | |
| | | w.eq(Pole::getUserId, SecurityUtils.getUserId()); |
| | | }); |
| | | } |
| | | //灯杆 |
| | | 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()); |
| | | //诺瓦 |
| | | // SpringContextHolder.getBean(LightService.class).listLight(SecurityUtils.getUserId(), SecurityUtils.getClientId()); |
| | | List<LedPlayerEntity> ledPlayerEntities = SpringContextHolder.getBean(LedPlayerEntityService.class).ledPlayerEntityList(null, null); |
| | | int munber = 0; |
| | | for (LedPlayerEntity bean : ledPlayerEntities) { |
| | | if (bean.getOnlineStatus() == 1) { |
| | | munber++; |
| | | } |
| | | } |
| | | result.put("novaOnlineCount", munber); |
| | | result.put("novaTotalCount", ledPlayerEntities.size()); |
| | | |
| | | SpringContextHolder.getBean(C3ChargingService.class).list(); |
| | | |
| | | |
| | | return result; |
| | | } |
| | | |
| | |
| | | ); |
| | | } |
| | | |
| | | PageHelper.startPage(pageNo, pageSize); |
| | | list = list(wrapper); |
| | | if (param.getGroupid() != null) { |
| | | // List<Long> poleIds = new ArrayList<>(); |