| | |
| | | } else { |
| | | poleLightemitEntityList = poleLightemitDao.listLed(keyword, SecurityUtils.getUserId()); |
| | | } |
| | | if (isOnLine) { |
| | | return ledOnline(poleLightemitEntityList); |
| | | } else { |
| | | ledOnlineCheck(poleLightemitEntityList); |
| | | return poleLightemitEntityList; |
| | | |
| | | List<PoleLightemitEntity> temp = new ArrayList<>(); |
| | | for (PoleLightemitEntity poleLightemitEntity : poleLightemitEntityList) { |
| | | //查询设备在线状态 |
| | | boolean onLine = lightemitUtils.getLedOnLine(poleLightemitEntity.getLightemitControlCode()); |
| | | //查询屏幕的开启状态 |
| | | String isOpen = lightemitUtils.getIsScreenOpen(poleLightemitEntity.getLightemitControlCode()); |
| | | poleLightemitEntity.setIsOpen(String.valueOf(isOpen)); |
| | | poleLightemitEntity.setOnLine(onLine); |
| | | if (!isOnLine || onLine) { |
| | | temp.add(poleLightemitEntity); |
| | | } |
| | | } |
| | | return temp; |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | boolean belong = SpringContextHolder.getBean(PoleBindingService.class).isBelong(byId.getLightemitControlCode(), PoleBindingEnums.XIXUN); |
| | | if (!belong) { |
| | | throw new RuntimeException("该设备不属于您,不能修改设备信息"); |
| | | throw new BusinessException("该设备不属于您,不能修改设备信息"); |
| | | } |
| | | poleLightemit.setLightemitId(ledId); |
| | | boolean b = this.updateById(poleLightemit); |