| | |
| | | @ApiOperation(value = "海康设备-海康播放url查询(ws)", notes = "海康设备-海康播放url查询(ws)") |
| | | @GetMapping(value = "/queryHkPreviewUrl") |
| | | public R queryHkPreviewUrl(HkVO hk) { |
| | | String expand = ""; |
| | | if (null!=hk.getExpand() && !hk.getExpand().equals("")){ |
| | | expand = hk.getExpand(); |
| | | } |
| | | String url = ""; |
| | | // 获取海康播放url |
| | | String result = GetCameraPreviewURL(null==hk.getType()?1:hk.getType(),HkConstant.previewURLs, hk.getCameraIndexCode(), ProtocolConstant.WS); |
| | | String result = GetCameraPreviewURL(null==hk.getType()?1:hk.getType(), |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | ProtocolConstant.WS, |
| | | expand); |
| | | if (null!=result) { |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Map map = (Map) jsonObject.get("data"); |
| | |
| | | @GetMapping(value = "/queryHkPreviewUrlCommon") |
| | | public R queryHkPreviewUrlCommon(HkVO hk) { |
| | | String url = ""; |
| | | String expand = ""; |
| | | if (null!=hk.getExpand() && !hk.getExpand().equals("")){ |
| | | expand = hk.getExpand(); |
| | | } |
| | | // 获取海康播放url |
| | | String result = GetCameraPreviewURL(null==hk.getType()?1:hk.getType(),HkConstant.previewURLs, hk.getCameraIndexCode(), hk.getProtocol()); |
| | | String result = GetCameraPreviewURL(null==hk.getType()?1:hk.getType(), |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | hk.getProtocol(), |
| | | expand); |
| | | if (null!=result) { |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Map map = (Map) jsonObject.get("data"); |
| | |
| | | @GetMapping(value = "/queryHkPreviewUrlByHls") |
| | | public R queryHkPreviewUrlByHls(HkVO hk) { |
| | | String url = ""; |
| | | String expand = ""; |
| | | if (null!=hk.getExpand() && !hk.getExpand().equals("")){ |
| | | expand = hk.getExpand(); |
| | | } |
| | | // 获取海康播放url |
| | | String result = GetCameraPreviewURL(null==hk.getType()?1:hk.getType(),HkConstant.previewURLs, hk.getCameraIndexCode(), ProtocolConstant.HLS); |
| | | String result = GetCameraPreviewURL(null==hk.getType()?1:hk.getType(), |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | ProtocolConstant.HLS, |
| | | expand); |
| | | if (null!=result) { |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Map map = (Map) jsonObject.get("data"); |
| | |
| | | return R.data(common(null==hk.getType()?1:hk.getType(),HkConstant.talkURLs, body)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置监控点的预置点信息 |
| | | * @param hk 查询参数 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "海康设备-获取海康摄像头语音对讲url", notes = "海康设备-获取海康摄像头语音对讲url") |
| | | @GetMapping(value = "/presetsAddition") |
| | | public R presetsAddition(HkVO hk) { |
| | | /** |
| | | * 组装请求参数 |
| | | */ |
| | | JSONObject jsonBody = new JSONObject(); |
| | | jsonBody.put("cameraIndexCode", hk.getCameraIndexCode()); |
| | | jsonBody.put("presetName", hk.getPresetName()); |
| | | jsonBody.put("presetIndex", hk.getPresetIndex()); |
| | | String body = jsonBody.toJSONString(); |
| | | |
| | | /** |
| | | * 调用接口并返回数据 |
| | | * post请求application/json类型参数; |
| | | */ |
| | | return R.data(common(null==hk.getType()?1:hk.getType(),HkConstant.presetsAdditionURLs, body)); |
| | | } |
| | | |
| | | } |