jiangping
2024-05-31 bf8d85d5f83c2036fb4239d764d33e99c1b62bd3
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -480,6 +480,24 @@
        return  null;
    }
    /**
     *访客权限组列表查询(分页)
     * @return
     */
    public  static  BaseResponse<PrivilegeGroupListResponse>   privilegIccmeGroup(PrivilegeGroupRequest param){
        log.info("【海康访客权限组列表查询】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.privilegIccmeGroup(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<PrivilegeGroupListResponse> >(){};
            BaseResponse<PrivilegeGroupListResponse>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康访客权限组列表查询");
            return  result;
        }catch (Exception e){
            log.error("【海康访客权限组列表查询】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
    /**
     *海康门禁点查询(分页)
     * @return
     */
@@ -950,16 +968,16 @@
     * @return
     */
    public  static  BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>>   vehicleTimeRangeList(TimeRangeListRequest param){
        log.info("【海康增量人员查询】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康增量车辆查询】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.vehicleTimeRangeList(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> >(){};
            BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康增量人员查询");
            logResult(result,"海康增量车辆查询");
            return  result;
        }catch (Exception e){
            log.error("【海康增量人员查询】================失败====:\n"+ e.getMessage());
            log.error("【海康增量车辆查询】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
@@ -1017,6 +1035,42 @@
        }
        return  null;
    }
    /**
     *根据用户标识获取客户端TGC接口
     * @return
     */
    public  static  BaseResponse<ApplyCTGTResponse>   applyCTGT(ApplyCTGTRequest param){
        log.info("【海康根据用户标识获取客户端TGC接口】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.applyCTGT(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<ApplyCTGTResponse>>(){};
            BaseResponse<ApplyCTGTResponse>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康根据用户标识获取客户端TGC接口");
            return  result;
        }catch (Exception e){
            log.error("【海康根据用户标识获取客户端TGC接口息】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
    /**
     *根据登录标识TGC申请登录凭证ST接口
     * @return
     */
    public  static  BaseResponse<ApplySTResponse>   applyST(ApplySTequest param){
        log.info("【海康根据登录标识TGC申请登录凭证ST接口】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.applyST(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<ApplySTResponse>>(){};
            BaseResponse<ApplySTResponse>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康根据登录标识TGC申请登录凭证ST接口口");
            return  result;
        }catch (Exception e){
            log.error("【海康根据登录标识TGC申请登录凭证ST接口息】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
    private static void logResult(BaseResponse res,String name) {
        if(StringUtils.equals(res.getCode(),HKConstants.RESPONSE_SUCCEE)){
            log.info("【"+name+"】================成功====\n"+res);