jiangping
2024-07-30 eea92f23bf8ead897f346ae6ccc8603ac039e566
server/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -171,13 +171,12 @@
     * @return
     */
    public  static  BaseResponse<FaceAddOrEditesponse>  addFace( FaceAddRequest  param){
        log.info("【海康添加人脸信息】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康添加人脸信息】================开始====" );
        try {
            String res = HKTools.addFace(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<FaceAddOrEditesponse>>(){};
            TypeReference typeReference = new TypeReference< BaseResponse<FaceAddOrEditesponse>>(){};
            BaseResponse<FaceAddOrEditesponse> result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康添加人脸信息");
            logResult(res,"海康添加人脸信息");
            return  result;
        }catch (Exception e){
            log.error("【海康添加人脸信息】================失败====:\n"+ e.getMessage());
@@ -189,13 +188,14 @@
     * @return
     */
    public  static  BaseResponse<FaceAddOrEditesponse>  editFace( FaceEditRequest  param){
        log.info("【海康编辑人脸信息】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康编辑人脸信息】================开始====" );
        String res =null;
        try {
            String res = HKTools.editFace(JSONObject.toJSONString(param));
             res = HKTools.editFace(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<FaceAddOrEditesponse>>(){};
            BaseResponse<FaceAddOrEditesponse> result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康编辑人脸信息");
            logResult(res,"海康编辑人脸信息");
            return  result;
        }catch (Exception e){
            log.error("【海康编辑人脸信息】================失败====:\n"+ e.getMessage());
@@ -802,6 +802,42 @@
        return  null;
    }
    /**
     *海康访客预约记录查询ICCM版本(分页)
     * @return
     */
    public  static  BaseResponse<BaseListPageResponse<AppointmentIccmInfoResponse>>   appointmentRecordsIccm(AppointmentListRequest param){
        log.info("【海康访客预约记录查询ICCM版本】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.appointmentRecordsIccm(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference<BaseResponse<BaseListPageResponse<AppointmentIccmInfoResponse>>>(){};
            BaseResponse<BaseListPageResponse<AppointmentIccmInfoResponse>>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康访客预约记录查询ICCM版本");
            return  result;
        }catch (Exception e){
            log.error("【海康访客预约记录查询ICCM版本】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
    /**
     *海康访客事件份额查询ICCM版本(分页)
     * @return
     */
    public  static  BaseResponse<BaseListPageResponse<AppointmentEventInfoResponse>>   appointmentEventQuery(AppointmentEventListRequest param){
        log.info("【海康访客事件份额查询ICCM版本】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.appointmentEventQuery(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference<BaseResponse<BaseListPageResponse<AppointmentEventInfoResponse>>>(){};
            BaseResponse<BaseListPageResponse<AppointmentEventInfoResponse>>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康访客事件份额查询ICCM版本");
            return  result;
        }catch (Exception e){
            log.error("【海康访客事件份额查询ICCM版本】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
    /**
     *查询访客来访记录(已登记)(分页)
     * @return
     */
@@ -874,6 +910,24 @@
        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
     */
@@ -932,16 +986,16 @@
     * @return
     */
    public  static  BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>>   vehicleTimeRangeList(TimeRangeListRequest param){
        log.info("【海康增量人员查询】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康增量车辆查询】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.vehicleTimeRangeList(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> >(){};
            BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>>   result = JSONObject.parseObject(res, typeReference.getType());
            logResult(result,"海康增量人员查询");
            logResult(result,"海康增量车辆查询");
            return  result;
        }catch (Exception e){
            log.error("【海康增量人员查询】================失败====:\n"+ e.getMessage());
            log.error("【海康增量车辆查询】================失败====:\n"+ e.getMessage());
        }
        return  null;
    }
@@ -1006,6 +1060,9 @@
            log.error("【"+name+"】================失败====:\n"+ res);
        }
    }
    private static void logResult(String res,String name) {
            log.info("【"+name+"】================结果====\n"+res);
    }
}