package com.doumee.core.haikang.service; 
 | 
  
 | 
import com.alibaba.fastjson.JSONObject; 
 | 
import com.alibaba.fastjson.TypeReference; 
 | 
import com.doumee.core.haikang.model.HKConstants; 
 | 
import com.doumee.core.haikang.model.HKTools; 
 | 
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; 
 | 
import com.hikvision.artemis.sdk.config.ArtemisConfig; 
 | 
import lombok.extern.slf4j.Slf4j; 
 | 
import org.apache.commons.lang3.StringUtils; 
 | 
import org.slf4j.Logger; 
 | 
import org.slf4j.LoggerFactory; 
 | 
  
 | 
import java.io.InputStream; 
 | 
import java.lang.reflect.Field; 
 | 
import java.util.HashMap; 
 | 
import java.util.List; 
 | 
import java.util.Map; 
 | 
  
 | 
@Slf4j 
 | 
public class HKService { 
 | 
    private Logger logger = LoggerFactory.getLogger(HKService.class); 
 | 
    /** 
 | 
     * 获取根组织数据 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<OrgInfoResponse>  getRootOrg(BaseRequst param){ 
 | 
        log.info("【海康获取根组织】================开始===="); 
 | 
        try { 
 | 
            String res = HKTools.getRootOrg (); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<OrgInfoResponse>>(){}; 
 | 
            BaseResponse<OrgInfoResponse> result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康获取根组织"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康获取根组织】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     * 修改组织数据 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse editOrg(OrgEditRequest param){ 
 | 
        log.info("【海康修改组织】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
  
 | 
            String res = HKTools.editOrg(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()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *批量新增组织数据 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<OrgOrUserAddResponse>  addBatchOrg(List<OrgAddRequest> param){ 
 | 
        log.info("【海康新增组织】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.addBatchOrg(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<OrgOrUserAddResponse>>(){}; 
 | 
            BaseResponse<OrgOrUserAddResponse> result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康新增组织"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康新增组织】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *批量删除组织数据 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<OrgUpdateFailureResponse>>   delBatchOrg(OrgDelRequest param){ 
 | 
        log.info("【海康删除组织】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
  
 | 
            String res = HKTools.delOrg(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse >(){}; 
 | 
            BaseResponse<List<OrgUpdateFailureResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康删除组织"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康删除组织】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *新增人员信息(支持人脸数据) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<UserAddResponse>  addUser(UserAddRequest param){ 
 | 
        log.info("【海康新增人员】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.addUser(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<UserAddResponse>>(){}; 
 | 
            BaseResponse<UserAddResponse> result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康新增人员"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康新增人员】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *修改人员信息(不支持人脸数据) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse editUser(UserAddRequest param){ 
 | 
        log.info("【海康修改人员】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.editUser(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<UserAddResponse>>(){}; 
 | 
            BaseResponse<UserAddResponse> result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康修改人员"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康修改人员】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *批量新增人员信息(无人脸) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<OrgOrUserAddResponse>  addBatchUser(List<UserAddRequest> param){ 
 | 
        log.info("【海康批量新增人员】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.addBatchUser(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<OrgOrUserAddResponse>>(){}; 
 | 
            BaseResponse<OrgOrUserAddResponse> result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康批量新增人员"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康批量新增人员】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *批量删除人员信息 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<UserDelResponse>>  delBatchUser(UserDelRequest param){ 
 | 
        log.info("【海康批量删除人员】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.delBatchUser(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<List<UserDelResponse>>>(){}; 
 | 
            BaseResponse<List<UserDelResponse >> result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康批量删除人员"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康批量删除人员】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *添加人脸信息 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<FaceAddOrEditesponse>  addFace( FaceAddRequest  param){ 
 | 
        log.info("【海康添加人脸信息】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.addFace(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<FaceAddOrEditesponse>>(){}; 
 | 
            BaseResponse<FaceAddOrEditesponse> result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康添加人脸信息"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康添加人脸信息】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *编辑人脸信息 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<FaceAddOrEditesponse>  editFace( FaceEditRequest  param){ 
 | 
        log.info("【海康编辑人脸信息】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.editFace(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<FaceAddOrEditesponse>>(){}; 
 | 
            BaseResponse<FaceAddOrEditesponse> result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康编辑人脸信息"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康编辑人脸信息】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *删除人脸信息 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse   delFace(List<FaceEditRequest> param){ 
 | 
        log.info("【海康删除人脸信息】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.delFace(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()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     * 获取海康人脸访问地址 
 | 
     * @return 
 | 
     */ 
 | 
    public static InputStream getFaceInputStream(FacePictureRequest param) { 
 | 
        log.info("【海康人脸访问图片流】================开始===="+JSONObject.toJSONString(param)); 
 | 
        log.error("********************ArtemisConfig.host***********************************"+ ArtemisConfig.host); 
 | 
        log.error("********************ArtemisConfig.key********************************"+ArtemisConfig.appKey); 
 | 
        try { 
 | 
            InputStream res = HKTools.getFaceInputStream(JSONObject.toJSONString(param)); 
 | 
            log.error("【海康人脸访问图片流】================成功====\n"); 
 | 
            return  res; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康人脸访问图片流】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     * 获取访客记录中的图片 
 | 
     * @return 
 | 
     */ 
 | 
    public static InputStream getVisitPicture(VisitPictureRequest param) { 
 | 
        log.info("【海康访客图片流】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            InputStream res = HKTools.getVisitPicture(JSONObject.toJSONString(param)); 
 | 
            log.error("【海康访客图片流】================成功====\n"); 
 | 
            return  res; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康访客图片流】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     * 获取门禁事件的图片 
 | 
     * @return 
 | 
     */ 
 | 
    public static InputStream getDevicePicture(DevicePictureRequest param) { 
 | 
        log.info("【海康门禁事件图片流】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            InputStream res = HKTools.getDevicePicture(JSONObject.toJSONString(param)); 
 | 
            log.error("【海康门禁事件图片流】================成功====\n"); 
 | 
            return  res; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康门禁事件图片流】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     * 查询车辆抓拍图片 
 | 
     * @return 
 | 
     */ 
 | 
    public static InputStream getCarPicture(CarPictureRequest param) { 
 | 
        log.info("【海康车辆抓拍图片图片流】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            InputStream res = HKTools.getCarPicture(JSONObject.toJSONString(param)); 
 | 
            log.error("【海康车辆抓拍图片图片流】================成功====\n"); 
 | 
            return  res; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康车辆抓拍图片图片流】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     *获取车库列表数据(全量) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<ParkListResponse>>   parkList(ParkListRequest param){ 
 | 
        log.info("【海康获取车库列表数据】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.parkList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<List<ParkListResponse>>>(){}; 
 | 
            BaseResponse  result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康获取车库列表数据"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康获取车库列表数据】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *获取车库列表数据(全量) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<EntranceListResponse>>   entranceList(EntranceListRequest param){ 
 | 
        log.info("【海获取车库列表数据】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.entranceList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<List<EntranceListResponse>>>(){}; 
 | 
            BaseResponse  result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康获取车库列表数据"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康获取车库列表数据】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *固定车辆充值(包期) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse   carChargeAddtion(CarChargeAddRequest param){ 
 | 
        log.info("【海康固定车辆充值】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.carChargeAddtion(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()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *固定车辆取消包期 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse   carChargeDeletion(CarChargeDelRequest param){ 
 | 
        log.info("【海康固定车辆取消包期】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.carChargeDeletion(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()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *车位预约 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<ParkReservationAddResponse>   parkReservationAddition(ParkReservationAddRequest param){ 
 | 
        log.info("【海康车位预约】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.parkAddition(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<ParkReservationAddResponse>>(){}; 
 | 
            BaseResponse<ParkReservationAddResponse>  result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康车位预约"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康车位预约】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *车位取消预约 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse   parkReservationDeletion(ParkReservationDelRequest param){ 
 | 
        log.info("【海康车位取消预约】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.parkDeletion(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()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *访客预约 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<VisitAppointmentResponse>   visitAppiontment(VisitAppointmentRequest param){ 
 | 
        log.info("【海康访客预约】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.visitAppiontment(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<VisitAppointmentResponse>>(){}; 
 | 
            BaseResponse<VisitAppointmentResponse>  result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
           logResult(result,"海康访客预约"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康访客预约】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *访客预约 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<IccmAppointmentResponse>   iccmAppointment(IccmAppointmentRequest param){ 
 | 
        log.info("【海康访客预约】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.iccmAppointment(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<IccmAppointmentResponse>>(){}; 
 | 
            BaseResponse<IccmAppointmentResponse>  result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
           logResult(result,"海康访客预约"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康访客预约】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *访客预约取消 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse   cancelVisitAppiontment(VisitAppointmentCancelRequest param){ 
 | 
        log.info("【海康访客预约取消】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.visitCancel(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()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *访客预约签离 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse  outVisitAppiontment(VisitAppointmentOutRequest param){ 
 | 
        log.info("【海康访客预约签离】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.visitOut(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()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *访客免登记预约 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<VisitAppointmentMDJResponse>   visitAppiontmentMDJ(VisitAppointmentMDJRequest param){ 
 | 
        log.info("【海康访客免登记预约】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.visitAppiontmentMDJ(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<VisitAppointmentMDJResponse> >(){}; 
 | 
            BaseResponse<VisitAppointmentMDJResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康访客免登记预约"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康访客免登记预约】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *访客免登记预约 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<IccmAppointmentMDJResponse>   iccmAppiontmentMDJ(IccmAppointmentMDJRequest param){ 
 | 
        log.info("【海康访客免登记预约】================iccm开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.iccmAppointmentMDJ(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<IccmAppointmentMDJResponse> >(){}; 
 | 
            BaseResponse<IccmAppointmentMDJResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康访客免登记预约"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康访客免登记预约】================iccm失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *访客权限组列表查询(分页) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<PrivilegeGroupListResponse>   privilegeGroup(PrivilegeGroupRequest param){ 
 | 
        log.info("【海康访客权限组列表查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.privilegeGroup(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 
 | 
     */ 
 | 
    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 
 | 
     */ 
 | 
    public  static  BaseResponse<DoorsListResponse>   doorSearch(DoorsListRequest param){ 
 | 
        log.info("【海康门禁点查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.doorSearch(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<DoorsListResponse> >(){}; 
 | 
            BaseResponse<DoorsListResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康门禁点查询"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康门禁点查询】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *门禁设备查询(分页) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<AcsDeviceListResponse>   acsDeviceList(AcsDeviceListRequest param){ 
 | 
        log.info("【海康门禁设备查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.acsDeviceList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<AcsDeviceListResponse> >(){}; 
 | 
            BaseResponse<AcsDeviceListResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康门禁设备查询"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康门禁设备查询】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *事件订阅 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse   eventSub(EventSubRequest param){ 
 | 
        log.info("【海康事件订阅】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.eventSub(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()); 
 | 
        }finally { 
 | 
           // saveInterfaceLog(param,res); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *事件订阅 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse   cancelEventSub(EventSubRequest param){ 
 | 
        log.info("【海康取消事件订阅】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.cancelEventSub(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()); 
 | 
        }finally { 
 | 
           // saveInterfaceLog(param,res); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康创建一卡通下载任务 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<TaskAdditionResponse>   taskAddition(TaskAdditionRequest param){ 
 | 
        log.info("【海康创建一卡通下载任务】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.taskAddition(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<TaskAdditionResponse>>(){}; 
 | 
            BaseResponse<TaskAdditionResponse>      result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康创建一卡通下载任务"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康创建一卡通下载任务】================失败====:\n"+ e.getMessage()); 
 | 
        }finally { 
 | 
           // saveInterfaceLog(param,res); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康一卡通任务添加数据 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse    taskDataAddition(TaskDataAdditionRequest param){ 
 | 
        log.info("【海康一卡通任务添加数据】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.taskDataAddition(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()); 
 | 
        }finally { 
 | 
           // saveInterfaceLog(param,res); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康一卡通任务进度查询 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<TaskProgressNumResponse>    taskProgressNum(TaskProgressRequest param){ 
 | 
        log.info("【海康一卡通任务进度查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.taskProgressNum(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<TaskProgressNumResponse> >(){}; 
 | 
            BaseResponse<TaskProgressNumResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康一卡通任务进度查询"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康一卡通任务进度查询】================失败====:\n"+ e.getMessage()); 
 | 
        }finally { 
 | 
           // saveInterfaceLog(param,res); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康一卡通设备通道的人员权限下载详情总数v2 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<TaskProgressResponse>    taskProgress(TaskProgressRequest param){ 
 | 
        log.info("【海康一卡通设备通道的人员权限下载详情总数】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.taskProgress(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<TaskProgressResponse> >(){}; 
 | 
            BaseResponse<TaskProgressResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康一卡通设备通道的人员权限下载详情总数"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康一卡通设备通道的人员权限下载详情总数】================失败====:\n"+ e.getMessage()); 
 | 
        }finally { 
 | 
           // saveInterfaceLog(param,res); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康查询权限条目列表 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<AuthItemListResponse>    authItemList(AuthItemListRequest param){ 
 | 
        log.info("【海康查询权限条目列表】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.authItemList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<AuthItemListResponse> >(){}; 
 | 
            BaseResponse<AuthItemListResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康查询权限条目列表"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康查询权限条目列表】================失败====:\n"+ e.getMessage()); 
 | 
        }finally { 
 | 
           // saveInterfaceLog(param,res); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康一卡通任务开始执行 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse     taskStart(TaskProgressRequest param){ 
 | 
        log.info("【海康一卡通任务开始执行】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.taskStart(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()); 
 | 
        }finally { 
 | 
           // saveInterfaceLog(param,res); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康批量开卡 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<CardInfoResponse>>     cardBingding(CardBingdingRequest param){ 
 | 
        log.info("【海康批量开卡】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.cardBingding(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse <List<CardInfoResponse>>  >(){}; 
 | 
            BaseResponse<List<CardInfoResponse>>    result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康批量开卡"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康批量开卡】================失败====:\n"+ e.getMessage()); 
 | 
        }finally { 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康退卡 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse    cardDeletion(CardDeletionRequest param){ 
 | 
        log.info("【海康退卡】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.cardDeletion(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()); 
 | 
        }finally { 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康批量挂失 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse    cardLoss(CardLossRequest param){ 
 | 
        log.info("【海康批量挂失】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.cardLoss(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()); 
 | 
        }finally { 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康批量解挂 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse    cardUnLoss(CardLossRequest param){ 
 | 
        log.info("【海康批量解挂】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.cardUnloss(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()); 
 | 
        }finally { 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *海康查询设备通道的人员权限下载详情 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<TaskPersonDetailListResponse>  taskPersoDetail(TaskPersonDetailRequest param){ 
 | 
        log.info("【海康查询设备通道的人员权限下载详情】================开始===="+JSONObject.toJSONString(param)); 
 | 
        String res = null; 
 | 
        try { 
 | 
            res = HKTools.taskPersoDetail(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse <TaskPersonDetailListResponse>>(){}; 
 | 
            BaseResponse<TaskPersonDetailListResponse>    result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康查询设备通道的人员权限下载详情"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康查询设备通道的人员权限下载详情】================失败====:\n"+ e.getMessage()); 
 | 
        }finally { 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *查询访客预约记录(分页) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<BaseListPageResponse<AppointmentInfoResponse>>   appointmentRecords(AppointmentListRequest param){ 
 | 
        log.info("【海康访客预约记录查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.appointmentRecords(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<AppointmentInfoResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<AppointmentInfoResponse>>   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<IccmAppointmentListResponse>>   iccmAppointmentRecords(IccmAppointmentListRequest param){ 
 | 
        log.info("【海康访客预约记录查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.iccmAppointmentRecords(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<IccmAppointmentListResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<IccmAppointmentListResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康访客预约记录查询"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康访客预约记录查询】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *1.9.1根据微信公众号信息获取AccessToken(分页) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<String>   wxAccessToken(String configId,String tagId){ 
 | 
        log.info("【海康根据微信公众号信息获取AccessToken】================开始====configId:"+configId+" && tagId:"+tagId); 
 | 
        try { 
 | 
            String res = HKTools.wxAccessToken(configId,tagId); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<String>>(){}; 
 | 
            BaseResponse<String>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康根据微信公众号信息获取AccessToken"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康根据微信公众号信息获取AccessToken】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *根据配置微信公众号编号查询微信公众号信息 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse< WxConfigInfoResponse>  getWxConfig(WxConfigInfoRequest param){ 
 | 
        log.info("【海康根据配置微信公众号编号查询微信公众号信息】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.getWxConfig(toMap(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<WxConfigInfoResponse>>(){}; 
 | 
            BaseResponse<WxConfigInfoResponse>   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<GetTodoListResponse>>   getTodoListPage(GetTodoListRequest param){ 
 | 
        log.info("【海康分页获取待办列表】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.getTodoListPage(toMap(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<GetTodoListResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<GetTodoListResponse>>   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<FireDeviceStatusListResponse>>   fireDeviceStatusSearch(FireDeviceStatuslListRequest param){ 
 | 
        log.info("【海康查询消防设备部件状态】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.fireDeviceStatusSearch(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<FireDeviceStatusListResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<FireDeviceStatusListResponse>>   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<SensorStatusListResponse>>   sensorStatusSearch(SensorStatusListRequest param){ 
 | 
        log.info("【海康分页查询消防传感器部件状态】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.sensorStatusSearch(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<SensorStatusListResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<SensorStatusListResponse>>   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<FireChannelListResponse>>   fireChannelSearch(FireChannelListRequest param){ 
 | 
        log.info("【海康查询消防传感器列表】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.fireChannelSearch(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<FireChannelListResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<FireChannelListResponse>>   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<FindDeviceAlarmListResponse>>   findDeviceAlarmPage(FindDeviceAlarmListRequest param){ 
 | 
        log.info("【海康分页查询设备下的所有报警记录】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.findDeviceAlarmPage(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<FindDeviceAlarmListResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<FindDeviceAlarmListResponse>>   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<FireDeviceListResponse>>   fireDeviceSearch(FireDeviceListRequest param){ 
 | 
        log.info("【海康询消防设备列表】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.fireDeviceSearch(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<FireDeviceListResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<FireDeviceListResponse>>   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<NhEventPageListResponse>>   nhEventPageList(NhEventPageListRequest param){ 
 | 
        log.info("【海康分页获取告警事件】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.nhEventPageList(toMap(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<NhEventPageListResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<NhEventPageListResponse>>   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<VisitingInfoResponse>>   visitingRecords(VisitingInfoRequest param){ 
 | 
        log.info("【海康访客来访记录查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.visitingRecords(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<VisitingInfoResponse>>>(){}; 
 | 
            BaseResponse<BaseListPageResponse<VisitingInfoResponse>>   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<OrgInfoResponse>>   orgAllList(TimeRangeListRequest param){ 
 | 
        log.info("【海康全量组织查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.orgAllList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<OrgInfoResponse>>> (){}; 
 | 
            BaseResponse<BaseListPageResponse<OrgInfoResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康全量组织查询"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康全量组织查询】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *获取工作台菜单免密登陆调整地址 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  String   getMenuUrl(Integer type,String token){ 
 | 
        String menuId = HKConstants.MenuPageId.afzx; 
 | 
        if(Constants.equalsInteger(type,Constants.ONE)){ 
 | 
            menuId = HKConstants.MenuPageId.xkzx; 
 | 
        }else  if(Constants.equalsInteger(type,Constants.TWO)){ 
 | 
            menuId = HKConstants.MenuPageId.ngzx; 
 | 
        }else  if(Constants.equalsInteger(type,Constants.THREE)){ 
 | 
            menuId = HKConstants.MenuPageId.jsc; 
 | 
        }else  if(Constants.equalsInteger(type,Constants.FOUR)){ 
 | 
            menuId = HKConstants.MenuPageId.kqgzt; 
 | 
        } 
 | 
        log.info("【海康获取工作台菜单免密登陆调整地址】================开始====menuId:"+menuId+"==token:"+token); 
 | 
        try { 
 | 
            String res = HKTools.getMenuUrl(menuId,token); 
 | 
            return  res; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康获取工作台菜单免密登陆调整地址】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *增量组织查询(分页) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<BaseListPageResponse<OrgTimeRangeInfoResponse>>   orgTimeRangeList(TimeRangeListRequest param){ 
 | 
        log.info("【海康增量组织查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.orgTimeRangeList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<OrgTimeRangeInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<OrgTimeRangeInfoResponse>>   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<UserInfoResponse>>   userAllList(TimeRangeListRequest param){ 
 | 
        log.info("【海康全量人员查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.userAllList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<UserInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<UserInfoResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康全量人员查询"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康全量人员查询】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *全量人员查询2(根据条件查询分页) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<BaseListPageResponse<UserInfoResponse>>   personList(UserByParamListRequest param){ 
 | 
        log.info("【海康根据条件查询人员列表】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.personList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<UserInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<UserInfoResponse>>   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<UserTimeRangeInfoResponse>>   userTimeRangeList(TimeRangeListRequest param){ 
 | 
        log.info("【海康增量人员查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.userTimeRangeList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<UserTimeRangeInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<UserTimeRangeInfoResponse>>   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<VehicleInfoResponse>>   vehicleList(TimeRangeListRequest param){ 
 | 
        log.info("【海康全量人员查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.vehicleList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<VehicleInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<VehicleInfoResponse>>   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<ParkCrossRecordInfoResponse>>   parkCrossRecords(ParkCrossRecordListRequest param){ 
 | 
        log.info("【海康过车记录查询查询】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.parkCrossRecords(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<ParkCrossRecordInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<ParkCrossRecordInfoResponse>>   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<VehicleTimeRangeInfoResponse>>   vehicleTimeRangeList(TimeRangeListRequest 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,"海康增量车辆查询"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康增量车辆查询】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *人脸评分 
 | 
     * @return 
 | 
     */ 
 | 
    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<FacePictureCheckResponse>>(){}; 
 | 
            BaseResponse<FacePictureCheckResponse>   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<AscDeviceStatusInfoResponse>>   acsDeviceStatus(AcsDeviceStatusListRequest param){ 
 | 
        log.info("【海康获取门禁设备在线状态】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.acsDeviceStatus(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<AscDeviceStatusInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<AscDeviceStatusInfoResponse>>   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<FetchAudioChannelInfoResponse>>   fetchAudioChannel(FetchAudioChannelRequest param){ 
 | 
        log.info("【海康获取分页获取广播点】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.fetchAudioChannel(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<FetchAudioChannelInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<FetchAudioChannelInfoResponse>>   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<FetchAudioChannelInfoResponse>>   fetchAudioDevice(FetchAudioChannelRequest param){ 
 | 
        log.info("【海康获取分页获取广播点】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.fetchAudioDevice(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<FetchAudioChannelInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<FetchAudioChannelInfoResponse>>   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<PlatformListInfoResponse>>   platformsList(PlatformsListRequest param){ 
 | 
        log.info("【海康获取全部月台信息】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.platformsList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<PlatformListInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<PlatformListInfoResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康获取全部月台信息"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康获取全部月台信息】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
  
 | 
  
 | 
  
 | 
  
 | 
    /** 
 | 
     *获取月台组件配置的LED设备清单 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<BaseListPageResponse<LedRecordsInfoResponse>>   ledRecords(LedRecordsRequest param){ 
 | 
        log.info("【海康获取月台组件配置的LED设备清单】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.ledRecords(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<LedRecordsInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<LedRecordsInfoResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康获取月台组件配置的LED设备清单"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康获取月台组件配置的LED设备清单】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *用于设置广播的自定播放和停止 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse    customBroadcast(CustomBroadcastRequest param){ 
 | 
        log.info("【海康用于设置广播的自定播放和停止】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.customBroadcast(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()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *获取全部月台信息 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<BaseListPageResponse<PlatformStatusInfoResponse>>   platformStatus(PlatformStatusRequest param) { 
 | 
        log.info("【海康获取全部月台信息】================开始====" + JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.platformStatus(param.getPlatformIds()); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse<BaseListPageResponse<PlatformStatusInfoResponse>>>() { 
 | 
                    }; 
 | 
            BaseResponse<BaseListPageResponse<PlatformStatusInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result, "海康获取全部月台信息"); 
 | 
            return result; 
 | 
        } catch (Exception e) { 
 | 
            log.error("【海康获取全部月台信息】================失败====:\n" + e.getMessage()); 
 | 
        } 
 | 
        return null; 
 | 
    } 
 | 
    /** 
 | 
     *发送消息给LED 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse   transparentchannel(TransparentChannelHeadRequest head,TransparentChannelBodyRequest param){ 
 | 
        log.info("【海康发送消息给LED】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            Map<String,String> header = toMap(head); 
 | 
            String res = HKTools.transparentchannel(header,JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference<BaseResponse>(){}; 
 | 
            BaseResponse  result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康发送消息给LED"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康发送消息给LED】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    public static Map<String, String> toMap(Object obj) throws IllegalAccessException { 
 | 
        Map<String, String> map = new HashMap<>(); 
 | 
        Class<?> clazz = obj.getClass(); 
 | 
        for (Field field : clazz.getDeclaredFields()) { 
 | 
            field.setAccessible(true); // 使得私有字段也可以访问 
 | 
            map.put(field.getName(), (String) field.get(obj)); 
 | 
        } 
 | 
        return map; 
 | 
    } 
 | 
    /** 
 | 
     *查询场内车停车信息(分页) 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<BaseListPageResponse<TempCarInRecordInfoResponse>>   tempCarInRecords(TempCarInRecordListRequest param){ 
 | 
        log.info("【海康查询场内车停车信息】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.tempCarInRecords(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<TempCarInRecordInfoResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<TempCarInRecordInfoResponse>>   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<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; 
 | 
    } 
 | 
    /** 
 | 
     *安防看板-今日告警事件-根据eventType字段3 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<BaseListPageResponse<RuleEventSearchDataResponse>>   ruleEventSearch(RuleEventSearchRequest param){ 
 | 
        log.info("【海康安防看板-今日告警事件-根据eventType字段3】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.ruleEventSearch(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<RuleEventSearchDataResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<RuleEventSearchDataResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康安防看板-今日告警事件-根据eventType字段3"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康安防看板-今日告警事件-根据eventType字段3】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *安防看板-- 分页查询未处理报警信息6 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<BaseListPageResponse<FindHomeAlarmInfoPageResponse>>   findHomeAlarmInfoPage(FindHomeAlarmInfoPageRequest param){ 
 | 
        log.info("【海康安防看板-- 分页查询未处理报警信息6】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.findHomeAlarmInfoPage(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<FindHomeAlarmInfoPageResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<FindHomeAlarmInfoPageResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康安防看板-- 分页查询未处理报警信息6"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康安防看板-- 分页查询未处理报警信息6】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *分页查询设备监测历史数据 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<BaseListPageResponse<MonitorDataSearchResponse>>   minitorDataSearch(MinitorDataSearchRequest param){ 
 | 
        log.info("【海康分页查询设备监测历史数据】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.minitorDataSearch(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<BaseListPageResponse<MonitorDataSearchResponse>> >(){}; 
 | 
            BaseResponse<BaseListPageResponse<MonitorDataSearchResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康分页查询设备监测历史数据"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康分页查询设备监测历史数据】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *统计统安防看板--园区实时车数量4 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<ParkingStatisticResponse>   getParkingStatistics(){ 
 | 
        log.info("【海康安防看板--园区实时车数量4】================开始===="); 
 | 
        try { 
 | 
            String res = HKTools.getParkingStatistics(); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<ParkingStatisticResponse>>(){}; 
 | 
            BaseResponse<ParkingStatisticResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康安防看板--园区实时车数量4"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康安防看板--园区实时车数量4】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
  
 | 
    /** 
 | 
     * 能耗看板-3.获取各区域用能及总能耗 
 | 
     * @param powerType 能源类型 电-1 水-2 气-3 热-4 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<RegionEnergyListResponse>   regionEnergyList(String  powerType){ 
 | 
        log.info("【海康能耗看板-3.获取各区域用能及总能耗】================开始===="); 
 | 
        try { 
 | 
            Map<String,String>   map = new HashMap<>(); 
 | 
            map.put("powerType",powerType); 
 | 
            String res = HKTools.regionEnergyList(map); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<RegionEnergyListResponse>>(){}; 
 | 
            BaseResponse<RegionEnergyListResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"【海康能耗看板-3.获取各区域用能及总能耗】"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康能耗看板-3.获取各区域用能及总能耗】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     * 能耗看板-4.获取上月用能费用,一天刷新,凌晨某个点刷 
 | 
     * @param powerType 能源类型 电-1 水-2 气-3 热-4 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<LastMonthFeeByMeterTypeResponse>   lastMonthFeeByMeterType(String  powerType){ 
 | 
        log.info("【海康能耗看板-4.获取上月用能费用,一天刷新,凌晨某个点刷】================开始===="); 
 | 
        try { 
 | 
            Map<String,String>   map = new HashMap<>(); 
 | 
            map.put("powerType",powerType); 
 | 
            String res = HKTools.lastMonthFeeByMeterType(map); 
 | 
            TypeReference typeReference =  new TypeReference< BaseResponse<LastMonthFeeByMeterTypeResponse>>(){}; 
 | 
            BaseResponse<LastMonthFeeByMeterTypeResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"【海康能耗看板-4.获取上月用能费用,一天刷新,凌晨某个点刷】"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康能耗看板-4.获取上月用能费用,一天刷新,凌晨某个点刷】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     * 海康能耗看板-5.园区实时负荷曲线 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<EnergyTodayLoadDataResponse>>   energyTodayLoadData(){ 
 | 
        log.info("【海康能耗看板-5.园区实时负荷曲线】================开始===="); 
 | 
        try { 
 | 
            String res = HKTools.energyTodayLoadData(); 
 | 
            TypeReference typeReference =  new TypeReference< BaseResponse<List<EnergyTodayLoadDataResponse>>>(){}; 
 | 
            BaseResponse<List<EnergyTodayLoadDataResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"【海康能耗看板-5.园区实时负荷曲线】"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康能耗看板-5.园区实时负荷曲线】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     * 能耗看板-2.获取区域用能前N位 
 | 
     * @param param 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<RegionTopPowerResponse>>   regionTopPower(RegionTopPowerRequest   param){ 
 | 
        log.info("【海康能耗看板-2.获取区域用能前N位】================开始===="); 
 | 
        try { 
 | 
            String res = HKTools.regionTopPower(toMap(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<List<RegionTopPowerResponse>>>(){}; 
 | 
            BaseResponse<List<RegionTopPowerResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康能耗看板-2.获取区域用能前N位"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康能耗看板-2.获取区域用能前N位】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     * 能耗看板-1.获取本月用能总量-自然月 
 | 
     * @param powerType 能源类型 电-1 水-2 气-3 热-4 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<MonthDataByMeterTypeResponse>   getCurrentMonthDataByMeterType(String  powerType){ 
 | 
        log.info("【能耗看板-1.获取本月用能总量-自然月】================开始===="); 
 | 
        try { 
 | 
            Map<String,String>   map = new HashMap<>(); 
 | 
            map.put("powerType",powerType); 
 | 
            String res = HKTools.getCurrentMonthDataByMeterType(map); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<MonthDataByMeterTypeResponse>>(){}; 
 | 
            BaseResponse<MonthDataByMeterTypeResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"能耗看板-1.获取本月用能总量-自然月"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【能耗看板-1.获取本月用能总量-自然月】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *统计园区总体的安防设备数量,在线数、在线率、离线数、离线率 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<SecureDevStatusTotalResponse>>   getSecureDevStatusTotal(SecureDevStatusTotalRequest param){ 
 | 
        log.info("【海康统计园区总体的安防设备数量,在线数、在线率、离线数、离线率】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.getSecureDevStatusTotal(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<List<SecureDevStatusTotalResponse>> >(){}; 
 | 
            BaseResponse<List<SecureDevStatusTotalResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康统计园区总体的安防设备数量,在线数、在线率、离线数、离线率"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康统计园区总体的安防设备数量,在线数、在线率、离线数、离线率】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *安防看板-园区安防设备-各类型设备状态数据列表 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<SecureDevStatusListResponse>>   getSecureDevStatusList(SecureDevStatusTotalRequest param){ 
 | 
        log.info("【海康安防看板-园区安防设备-各类型设备状态数据列表】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.getSecureDevStatusList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<List<SecureDevStatusListResponse>> >(){}; 
 | 
            BaseResponse<List<SecureDevStatusListResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康安防看板-园区安防设备-各类型设备状态数据列表"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康安防看板-园区安防设备-各类型设备状态数据列表】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *能耗看板-6按月查询近12个月的用电总量数据 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<EnergyTrendResponse>   energyTrend(EnergyTrendRequest param){ 
 | 
        log.info("【海康能耗看板-6按月查询近12个月的用电总量数据】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.energyTrend(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<EnergyTrendResponse>>(){}; 
 | 
            BaseResponse<EnergyTrendResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康能耗看板-6按月查询近12个月的用电总量数据"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康能耗看板-6按月查询近12个月的用电总量数据】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *消防维保统计 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<FireStatisticResponse>   fireStatistic(FireStatisticRequest param){ 
 | 
        log.info("【海康消防维保统计】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.fireStatistic(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<FireStatisticResponse>>(){}; 
 | 
            BaseResponse<FireStatisticResponse>   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康消防维保统计"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康消防维保统计】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *消防看板-消防设备在离线1 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<SecureDevStatusTotalResponse> >  getFireDevStatusTotal(FireDevStatusTotalRequest param){ 
 | 
        log.info("【海康消防看板-消防设备在离线1】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.getFireDevStatusTotal(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<List<SecureDevStatusTotalResponse> >>(){}; 
 | 
            BaseResponse<List<SecureDevStatusTotalResponse> >   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康消防看板-消防设备在离线1"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康消防看板-消防设备在离线1】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *消防看板-各类型设备在线率2 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<List<FireDevStatusListResponse> >  getFireDevStatusList(FireDevStatusTotalRequest param){ 
 | 
        log.info("【海康消防看板-各类型设备在线率2】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.getFireDevStatusList(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<List<FireDevStatusListResponse> >>(){}; 
 | 
            BaseResponse<List<FireDevStatusListResponse> >   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康消防看板-各类型设备在线率2"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康消防看板-各类型设备在线率2】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        return  null; 
 | 
    } 
 | 
    /** 
 | 
     *消防看板-4报警信息统计 
 | 
     * @return 
 | 
     */ 
 | 
    public  static  BaseResponse<FindAlarmBaseDataStatisticResponse>  findAlarmBaseDataStatistic(FindAlarmBaseDataStatisticRequest param){ 
 | 
        log.info("【海康消防看板-4报警信息统计】================开始===="+JSONObject.toJSONString(param)); 
 | 
        try { 
 | 
            String res = HKTools.findAlarmBaseDataStatistic(JSONObject.toJSONString(param)); 
 | 
            TypeReference typeReference = 
 | 
                    new TypeReference< BaseResponse<FindAlarmBaseDataStatisticResponse >>(){}; 
 | 
            BaseResponse<FindAlarmBaseDataStatisticResponse >   result = JSONObject.parseObject(res, typeReference.getType()); 
 | 
            logResult(result,"海康消防看板-4报警信息统计"); 
 | 
            return  result; 
 | 
        }catch (Exception e){ 
 | 
            log.error("【海康消防看板-4报警信息统计】================失败====:\n"+ e.getMessage()); 
 | 
        } 
 | 
        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; 
 | 
    } 
 | 
  
 | 
  
 | 
  
 | 
  
 | 
    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); 
 | 
        }else{ 
 | 
            log.error("【"+name+"】================失败====:\n"+ res); 
 | 
        } 
 | 
    } 
 | 
  
 | 
} 
 |