| | |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | CommonPage commonPage = poleService.queryAllStatesAndList(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), param); |
| | | List<Pole> listCommonPage = (List<Pole>) commonPage.getList(); |
| | | |
| | | List<PoleBindVO> listResult = new ArrayList<>(); |
| | | for (Pole pole : (List<Pole>) commonPage.getList()) { |
| | | for (Pole pole : listCommonPage) { |
| | | PoleBindVO bindByPoleId = poleService.getBindByPoleId(pole.getId()); |
| | | bindByPoleId.setPole(pole); |
| | | listResult.add(bindByPoleId); |
| | | } |
| | | commonPage.setList(listResult); |
| | | return ResponseUtil.success(commonPage); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 首页灯杆绑定信息 |
| | | */ |
| | | //TODO |
| | | public EquipmentInfomation getBySnAndPlayerSnInfo(String sn) { |
| | | EquipmentInfomation equipmentInfo = new EquipmentInfomation(); |
| | | equipmentInfo.setEquipmentType("诺瓦LED"); |
| | |
| | | } |
| | | |
| | | LedPlayerEntity one = getOne(Wrappers.lambdaQuery(LedPlayerEntity.class).eq(LedPlayerEntity::getSn, sn)); |
| | | if (one == null) { |
| | | return equipmentInfo; |
| | | } |
| | | List<LedPlayerEntity> list = new ArrayList<>(); |
| | | list.add(one); |
| | | List<LedPlayerEntity> ledPlayerEntities = vnnoxAPIUtil.syncCurrentInfo(list); |
| | |
| | | } |
| | | |
| | | List<Pole> PoleResult = isOnLine(poleList, param); |
| | | setCount(PoleResult); |
| | | |
| | | CommonPage commonPage = ListPagingUtils.pages(PoleResult, pageNo, pageSize); |
| | | |
| | |
| | | |
| | | try { |
| | | String s = HttpUtil.get(WATER_QUALITY_DATA_URL + waterQualityEquipmentCode + ".json"); |
| | | System.out.println(s); |
| | | |
| | | System.out.println(waterQualityEquipmentCode+"-------------------------------"+s); |
| | | if(!s.startsWith("{")){ |
| | | equipmentInfo.setEquipmentState("未知"); |
| | | return equipmentInfo; |
| | | } |
| | | WaterQualityDataDto waterQualityDataDto = JSON.parseObject(s, WaterQualityDataDto.class); |
| | | //设置水质设备状态 |
| | | if (waterQualityDataDto != null) { |
| | |
| | | |
| | | /** |
| | | * 获取播放器列表 |
| | | * |
| | | * @param count 每次读取数量,默认20,取值范围:1~100 |
| | | * @param start 从第几条记录开始读取,默认0 |
| | | * @return |
| | |
| | | */ |
| | | public List<LedPlayerEntity> syncCurrentInfo(List<LedPlayerEntity> list) { |
| | | List<String> playerIds = new ArrayList<>(); |
| | | if (list.isEmpty()) { |
| | | return list; |
| | | } |
| | | |
| | | for (LedPlayerEntity playerEntity : list) { |
| | | playerIds.add(playerEntity.getPlayerId()); |
| | |
| | | |
| | | /** |
| | | * 同步播放 |
| | | * |
| | | */ |
| | | public VnnoxResult syncPlay(List<String> playerId, Integer option) { |
| | | VnnoxBaseRequest request = new VnnoxBaseRequest(); |