| | |
| | | import com.sandu.ximon.admin.dto.nova.PlayerPage; |
| | | import com.sandu.ximon.admin.dto.nova.PlayerWidget; |
| | | import com.sandu.ximon.admin.manager.iot.frame.inner.report.A5AtmosphereHeartbeatReportInnerFrame; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.utils.RedisUtils; |
| | | import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils; |
| | | import com.sandu.ximon.admin.utils.VnnoxAPIUtil; |
| | |
| | | if (byId == null) { |
| | | throw new BusinessException("未找到该设备"); |
| | | } |
| | | boolean belong = SpringContextHolder.getBean(PoleBindingService.class).isBelong(byId.getSn(), PoleBindingEnums.VONNOX); |
| | | if (!belong) { |
| | | throw new BusinessException("该设备不属于您,不能修改设备信息"); |
| | | if (SecurityUtils.getClientId() != null) { |
| | | boolean belong = SpringContextHolder.getBean(PoleBindingService.class).isBelong(byId.getSn(), PoleBindingEnums.VONNOX); |
| | | if (!belong) { |
| | | throw new BusinessException("该设备不属于您,不能修改设备信息"); |
| | | } |
| | | } |
| | | LedPlayerEntity led = new LedPlayerEntity(); |
| | | led.setId(id); |
| | |
| | | |
| | | // 设置缩略图访问路径 |
| | | result = redisUtils.get(VnnoxConstant.REDIS_SCREEN_SHOT + playerId); |
| | | System.out.println(playerId + "的路径结果:-----------------------------" + result); |
| | | if (null != result) { |
| | | playerEntity.setScreenShotUrl(result); |
| | | } else { |
| | |
| | | list.add(playerPage); |
| | | playerProgram.setPages(list); |
| | | playerProgram.setNoticeUrl(VnnoxConstant.NOTIFY_URL); |
| | | |
| | | |
| | | /** |
| | | * 诺瓦推送大气数据 日志记录开始 |
| | | //// */ |
| | |
| | | |
| | | |
| | | private List<PlayerWidget> generateWaterAndSensorWidget(A5AtmosphereHeartbeatReportInnerFrame.HeartBeatDataPackage poleSensorEntity) { |
| | | //TODO |
| | | List widgetList = new ArrayList<>(); |
| | | List<String> list = new ArrayList<>(); |
| | | // if (Objects.nonNull(waterDataEntity)) { |
| | | // list.add("水质环境监测实时数据:"); |
| | | // list.add("ph:"+waterDataEntity.getPh()); |
| | | // list.add("溶解氧:"+waterDataEntity.getDoData() + "(mg/L)"); |
| | | // list.add("电导率:"+waterDataEntity.getEc() + "(10^(-6)S)"); |
| | | // list.add("浊度:"+waterDataEntity.getNtu() + "NTU"); |
| | | // } |
| | | if (Objects.nonNull(poleSensorEntity)) { |
| | | // list.add("环境监测:"); |
| | | list.add("环境监测:"); |
| | | list.add("温度:" + poleSensorEntity.getTemperature() + "°"); |
| | | list.add("湿度:" + poleSensorEntity.getHumidity() + "%"); |
| | | list.add("pm25:" + poleSensorEntity.getPm25() + "μg/m³"); |