| | |
| | | LedSFile file = xiXunFileService.getById(fileId); |
| | | String fileUrl = file.getFileUrl(); |
| | | String[] split = fileUrl.split("/"); |
| | | sourcePro.setId(split[split.length-1]); |
| | | sourcePro.setId(split[split.length - 1]); |
| | | sourcePro.setMd5(file.getMd5()); |
| | | } |
| | | ); |
| | |
| | | * @param programId |
| | | * @param lightemitIds |
| | | */ |
| | | public void videoXixunPlayer(long programId, List<Long> lightemitIds) { |
| | | public List<Map> videoXixunPlayer(long programId, List<Long> lightemitIds) { |
| | | //记录操作结果 |
| | | List<Map> mapList = new ArrayList<>(); |
| | | |
| | | ProgramPro pro = new ProgramPro(); |
| | | ItemPro items = new ItemPro(); |
| | |
| | | Collection<PoleLightemitEntity> poleLightemitEntities = poleLightemitService.listByIds(lightemitIds); |
| | | |
| | | if (poleLightemitEntities != null) { |
| | | Map map; |
| | | for (PoleLightemitEntity entity : poleLightemitEntities) { |
| | | lightemitUtils.clear(entity.getLightemitControlCode()); |
| | | poleLightemitService.updateRequestBody(entity.getLightemitControlCode(), jsondata); |
| | | String post = lightemitUtils.post(realtimeServerBean.getCommand() + entity.getLightemitControlCode(), jsondata); |
| | | LogUtils.error("结果:" + post); |
| | | map = new LinkedHashMap(); |
| | | String clearResult = lightemitUtils.clear(entity.getLightemitControlCode()); |
| | | if (clearResult.contains("does not exist")) { |
| | | map.put("LightemitId", entity.getLightemitId()); |
| | | map.put("Result", "失败"); |
| | | mapList.add(map); |
| | | } else { |
| | | poleLightemitService.updateRequestBody(entity.getLightemitControlCode(), jsondata); |
| | | String post = lightemitUtils.post(realtimeServerBean.getCommand() + entity.getLightemitControlCode(), jsondata); |
| | | //{"_type":"success","_id":"ce8dc3ff-dc88-43b7-8f55-60abd8700f1a","timestamp":1653555160535} |
| | | if (post.startsWith("{") && post.endsWith("}") && post.contains("_type\":\"success")) { |
| | | map.put("LightemitId", entity.getLightemitId()); |
| | | map.put("Result", "成功"); |
| | | mapList.add(map); |
| | | } else { |
| | | map.put("LightemitId", entity.getLightemitId()); |
| | | map.put("Result", "失败"); |
| | | mapList.add(map); |
| | | } |
| | | LogUtils.error("结果:" + post); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * 熙汛节目推送日志记录结束 |
| | | */ |
| | | |
| | | return mapList; |
| | | } |
| | | |
| | | |