k94314517
2024-09-26 b82a5aa7d6167748cce7e94f53b6a3b1fbc201b3
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -17,6 +17,8 @@
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;
@@ -385,7 +387,7 @@
    public  static  BaseResponse   parkReservationDeletion(ParkReservationDelRequest param){
        log.info("【海康车位取消预约】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.carChargeDeletion(JSONObject.toJSONString(param));
            String res = HKTools.parkDeletion(JSONObject.toJSONString(param));
            TypeReference typeReference =
                    new TypeReference< BaseResponse>(){};
            BaseResponse  result = JSONObject.parseObject(res, typeReference.getType());
@@ -918,6 +920,97 @@
    }
    /**
     *分页查询消防设备部件状态
     * @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
     */
@@ -1263,7 +1356,6 @@
            log.error("【海康获取全部月台信息】================失败====:\n" + e.getMessage());
        }
        return null;
    }
    /**
     *发送消息给LED