| | |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseRequst; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.BaseListPageRequest; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | | import com.doumee.core.haikang.model.param.respose.*; |
| | | import com.doumee.core.utils.Constants; |
| | |
| | | }else if(Constants.equalsInteger(type,Constants.THREE)){ |
| | | menuId = HKConstants.MenuPageId.jsc; |
| | | }else if(Constants.equalsInteger(type,Constants.FOUR)){ |
| | | menuId = HKConstants.MenuPageId.kqgl; |
| | | menuId = HKConstants.MenuPageId.kqgzt; |
| | | } |
| | | log.info("【海康获取工作台菜单免密登陆调整地址】================开始====menuId:"+menuId+"==token:"+token); |
| | | try { |
| | |
| | | return null; |
| | | } |
| | | /** |
| | | *增量车辆查询(分页) |
| | | *人脸评分 |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> facePictureCheck(TimeRangeListRequest param){ |
| | | log.info("【海康增量人员查询】================开始===="+JSONObject.toJSONString(param)); |
| | | public static BaseResponse<FacePictureCheckResponse> facePictureCheck(FacePictureCheckRequest param){ |
| | | log.info("【人脸评分】================开始===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.facePictureCheck(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康增量人员查询"); |
| | | new TypeReference<BaseResponse<FacePictureCheckResponse>>(){}; |
| | | BaseResponse<FacePictureCheckResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"人脸评分"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("【海康增量人员查询】================失败====:\n"+ e.getMessage()); |
| | | log.error("【人脸评分】================失败====:\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | *获取月台组件配置的LED设备清单 |
| | | * @return |
| | |
| | | return null; |
| | | } |
| | | /** |
| | | *分页获取区域列表(分页) |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<PageRegionInfoResponse>> pageRegions(BaseListPageRequest param){ |
| | | log.info("【海康分页获取区域列表】================开始===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | Map<String ,String> header = new HashMap<>(); |
| | | // header.put("userId",param.getUserId()); |
| | | String res = HKTools.pageRegions(header,JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<PageRegionInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<PageRegionInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康分页获取区域列表"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("【海康分页获取区域列表】================失败====:\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *获取监控点预览取流URL |
| | | * @return |
| | | */ |
| | | public static BaseResponse<CamerasPreviewURLsResponse> cameraPreviewURLs(CameraPreviewURLsRequest param){ |
| | | log.info("【海康获取监控点预览取流URL】================开始===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | Map<String ,String> header = new HashMap<>(); |
| | | // header.put("userId",param.getUserId()); |
| | | // header.put("domainId ",param.getDomainId()); |
| | | String res = HKTools.cameraPreviewURLs(header,JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<CamerasPreviewURLsResponse> >(){}; |
| | | BaseResponse<CamerasPreviewURLsResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康获取监控点预览取流URL"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("【海康获取监控点预览取流URL】================失败====:\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *分页获取监控点资源(分页) |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<PageCameraInfoResponse>> pageCameras(BaseListPageRequest param){ |
| | | log.info("【海康分页获取监控点资源】================开始===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | Map<String ,String> header = new HashMap<>(); |
| | | header.put("userId",param.getUserId()); |
| | | String res = HKTools.pageCameras(header,JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<PageCameraInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<PageCameraInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康分页获取监控点资源"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("【海康分页获取监控点资源】================失败====:\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *获取消防传感器列表(分页) |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<PageFireChannelInfoResponse>> pageFireChannel(BaseListPageRequest param){ |
| | | log.info("【海康分页获取消防传感器列表】================开始===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.pageFireChannel(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<PageFireChannelInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<PageFireChannelInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康分页获取消防传感器列表"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("【海康分页获取消防传感器列表】================失败====:\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *查询消防传感器部件状态v2(分页) |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<PageSensorStatusResponse>> pageSensorStatus(SensorStatusListRequest param){ |
| | | log.info("【海康分页查询消防传感器部件状态v2】================开始===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.pageSensorStatus(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<PageSensorStatusResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<PageSensorStatusResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康分页查询消防传感器部件状态v2"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("【海康分页查询消防传感器部件状态v2】================失败====:\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *根据用户标识获取客户端TGC接口 |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public static BaseResponse<MenuDataResponse> getMenuConfig(Map<String,String> param){ |
| | | log.info("【获取菜单功能配置项】================开始===="+ JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.getHkMenu(param); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<MenuDataResponse>>(){}; |
| | | BaseResponse<MenuDataResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"获取菜单功能配置项"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("【获取菜单功能配置项】================失败====:\n"+ e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static BaseResponse sendSms(Map<String,Object> param){ |
| | | log.info("【发送短信信息】================开始===="+ JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.sendSms(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse>(){}; |
| | | BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"发送短信信息"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("【发送短信信息】================失败====:\n"+ e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | private static void logResult(BaseResponse res,String name) { |
| | | if(StringUtils.equals(res.getCode(),HKConstants.RESPONSE_SUCCEE)){ |
| | | log.info("【"+name+"】================成功====\n"+res); |