jiangping
2024-06-21 b0ea50dd24a7ed5ada38dc6c8209f78fc09f0441
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());
@@ -874,6 +874,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
     */
@@ -1006,6 +1024,9 @@
            log.error("【"+name+"】================失败====:\n"+ res);
        }
    }
    private static void logResult(String res,String name) {
            log.info("【"+name+"】================结果====\n"+res);
    }
}