| | |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | ProtocolConstant.WS, |
| | | null==hk.getTransmode()?1:hk.getTransmode(), |
| | | expand, |
| | | null==hk.getStreamType()?1:hk.getStreamType()); |
| | | if (null!=result) { |
| | |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | hk.getProtocol(), |
| | | null==hk.getTransmode()?1:hk.getTransmode(), |
| | | expand, |
| | | null==hk.getStreamType()?1:hk.getStreamType()); |
| | | if (null!=result) { |
| | |
| | | HkConstant.previewURLs, |
| | | hk.getCameraIndexCode(), |
| | | ProtocolConstant.HLS, |
| | | null==hk.getTransmode()?1:hk.getTransmode(), |
| | | expand, |
| | | null==hk.getStreamType()?1:hk.getStreamType()); |
| | | if (null!=result) { |
| | |
| | | jsonBody.put("cameraIndexCode", hk.getCameraIndexCode()); |
| | | jsonBody.put("protocol", hk.getProtocol()); |
| | | jsonBody.put("recordLocation", "1"); |
| | | jsonBody.put("transmode", null==hk.getTransmode()?1:hk.getTransmode()); |
| | | jsonBody.put("beginTime", hk.getBeginTime()); |
| | | jsonBody.put("endTime", hk.getEndTime()); |
| | | String body = jsonBody.toJSONString(); |
| | |
| | | jsonBody.put("cameraIndexCode", hk.getCameraIndexCode()); |
| | | jsonBody.put("streamType",null==hk.getStreamType()?1:hk.getStreamType()); |
| | | jsonBody.put("protocol", hk.getProtocol()); |
| | | jsonBody.put("transmode", null==hk.getTransmode()?1:hk.getTransmode()); |
| | | String body = jsonBody.toJSONString(); |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping(value = "/eventSubscriptionByEventTypes") |
| | | public R eventSubscriptionByEventTypes(EventVO eventVO) { |
| | | eventVO.setType(3); |
| | | eventVO.setType(null==eventVO.getType()?1:eventVO.getType()); |
| | | String result = addEventSubscriptionByEventTypes(eventVO, HkConstant.eventSubscriptionByEventTypesURLs); |
| | | log.info("事件订阅返回信息:" + result); |
| | | // log.info("事件订阅返回信息:" + result); |
| | | JSONObject jsonObject1 = JSONObject.parseObject(result); |
| | | // 查询海康设备列表并返回 |
| | | return R.data(jsonObject1); |
| | |
| | | */ |
| | | @GetMapping(value = "/eventUnSubscriptionByEventTypes") |
| | | public R eventUnSubscriptionByEventTypes(EventVO eventVO) { |
| | | eventVO.setType(3); |
| | | eventVO.setType(null==eventVO.getType()?1:eventVO.getType()); |
| | | String result = removeEventSubscriptionByEventTypes(eventVO, HkConstant.eventUnSubscriptionByEventTypesURLs); |
| | | JSONObject jsonObject1 = JSONObject.parseObject(result); |
| | | // 查询海康设备列表并返回 |
| | |
| | | */ |
| | | @GetMapping(value = "/eventSubscriptionView") |
| | | public R eventSubscriptionView(EventVO eventVO) { |
| | | eventVO.setType(3); |
| | | eventVO.setType(null==eventVO.getType()?1:eventVO.getType()); |
| | | String result = getEventSubscriptionView(eventVO, HkConstant.eventSubscriptionViewURLs); |
| | | JSONObject jsonObject1 = JSONObject.parseObject(result); |
| | | // 查询海康设备列表并返回 |
| | |
| | | JSONObject jsonObject = JSON.parseObject(data); |
| | | String prettyData = JSON.toJSONString(jsonObject, SerializerFeature.PrettyFormat, |
| | | SerializerFeature.WriteMapNullValue); |
| | | log.info("收到事件:" + jsonObject); |
| | | // log.info("收到事件:" + jsonObject); |
| | | // 异步保存数据 |
| | | asyncHkEventService.saveHkEventInfo(prettyData); |
| | | // 立即返回 |
| | |
| | | * @param url 视频预览url |
| | | * @param cameraIndexCode 监控点唯一标识 |
| | | * @param protocol |
| | | * @param transmode |
| | | * @param expand |
| | | * @return |
| | | */ |
| | | public static String GetCameraPreviewURL(Integer type,String url, String cameraIndexCode, String protocol,String expand,Integer streamType) { |
| | | public static String GetCameraPreviewURL(Integer type, |
| | | String url, |
| | | String cameraIndexCode, |
| | | String protocol, |
| | | Integer transmode, |
| | | String expand, |
| | | Integer streamType) { |
| | | /** |
| | | * 组装请求参数 |
| | | */ |
| | |
| | | jsonBody.put("cameraIndexCode", cameraIndexCode); |
| | | jsonBody.put("streamType",streamType); |
| | | jsonBody.put("protocol", protocol); |
| | | jsonBody.put("transmode", 1); |
| | | jsonBody.put("transmode", transmode); |
| | | if (null!= expand && !expand.equals("")) { |
| | | jsonBody.put("expand", expand); |
| | | } |