|  |  | 
 |  |  | package com.doumee.core.haikang.service; | 
 |  |  |  | 
 |  |  | import cn.hutool.core.bean.BeanUtil; | 
 |  |  | import com.alibaba.fastjson.JSONObject; | 
 |  |  | import com.alibaba.fastjson.TypeReference; | 
 |  |  | import com.doumee.core.haikang.model.HKConstants; | 
 |  |  | 
 |  |  | 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.ObjectUtils; | 
 |  |  | import org.apache.commons.lang3.StringUtils; | 
 |  |  | import org.slf4j.Logger; | 
 |  |  | import org.slf4j.LoggerFactory; | 
 |  |  | import org.springframework.beans.BeanUtils; | 
 |  |  | import oshi.hardware.Sensors; | 
 |  |  | import sun.management.Sensor; | 
 |  |  |  | 
 |  |  | import java.io.InputStream; | 
 |  |  | import java.lang.reflect.Field; | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     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 | 
 |  |  |      */ | 
 |  |  |     public  static  BaseResponse<BaseListPageResponse<WxConfigInfoResponse>>   getWxConfig(WxConfigInfoRequest param){ | 
 |  |  |     public  static  BaseResponse< WxConfigInfoResponse>  getWxConfig(WxConfigInfoRequest param){ | 
 |  |  |         log.info("【海康根据配置微信公众号编号查询微信公众号信息】================开始===="+JSONObject.toJSONString(param)); | 
 |  |  |         try { | 
 |  |  |             String res = HKTools.getWxConfig(toMap(param)); | 
 |  |  |             TypeReference typeReference = | 
 |  |  |                     new TypeReference<BaseResponse<BaseListPageResponse<WxConfigInfoResponse>>>(){}; | 
 |  |  |             BaseResponse<BaseListPageResponse<WxConfigInfoResponse>>   result = JSONObject.parseObject(res, typeReference.getType()); | 
 |  |  |                     new TypeReference<BaseResponse<WxConfigInfoResponse>>(){}; | 
 |  |  |             BaseResponse<WxConfigInfoResponse>   result = JSONObject.parseObject(res, typeReference.getType()); | 
 |  |  |             logResult(result,"海康根据配置微信公众号编号查询微信公众号信息"); | 
 |  |  |             return  result; | 
 |  |  |         }catch (Exception e){ | 
 |  |  | 
 |  |  |         } | 
 |  |  |         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; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      *分页查询消防设备部件状态 |