| | |
| | | RedisCache redisCache = SpringUtils.getBean(RedisCache.class); |
| | | IHikClientService hikClientService = SpringUtils.getBean(IHikClientService.class); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | ArdCameras ardCameras = new ArdCameras(); |
| | | ardCameras.setGdtype("1"); |
| | | List<Object> Objects = redisCache.getListKey(CacheConstants.CAMERA_LIST_KEY); |
| | | if (Objects.size() > 0) { |
| | | for (Object obj : Objects) { |
| | | ArdCameras camera = (ArdCameras) obj; |
| | | if(!"1".equals(camera.getGdtype())) |
| | | { |
| | | continue; |
| | | } |
| | | CameraCmd cmd = new CameraCmd(); |
| | | cmd.setCameraId(camera.getId()); |
| | | cmd.setChannelNum(1); |
| | |
| | | { |
| | | continue; |
| | | } |
| | | Map<String, Object> ptz = hikClientService.getPtz(cmd); |
| | | Map<String, Object> ptz = hikClientService.getGisInfo(cmd); |
| | | if (StringUtils.isNull(ptz)) { |
| | | continue; |
| | | } |
| | |
| | | ptz.put("usernameZh", cmd.getOperatorZh()); |
| | | ptz.put("operatorId", cmd.getOperator());//上锁用户id |
| | | ptz.put("expirationRemainingSecond", secDatePoor); |
| | | ptz.put("longitude",camera.getLongitude()); |
| | | ptz.put("latitude",camera.getLatitude()); |
| | | ptz.put("altitude",camera.getAltitude()); |
| | | list.add(ptz); |
| | | } |
| | | } |