jiangping
2023-12-08 1140f80aefef30b543c99aaed47bcbca731b24e2
server/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -34,7 +34,7 @@
     * @return
     */
    public  static  BaseResponse<OrgListResponse>  getRootOrg(BaseRequst param){
        log.error("【海康获取根组织】================开始====");
        log.info("【海康获取根组织】================开始====");
        try {
            String res = HKTools.getRootOrg ();
            TypeReference typeReference =
@@ -52,7 +52,7 @@
     * @return
     */
    public  static  BaseResponse editOrg(OrgEditRequest param){
        log.error("【海康修改组织】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康修改组织】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.editOrg(JSONObject.toJSONString(param));
@@ -71,7 +71,7 @@
     * @return
     */
    public  static  BaseResponse<OrgOrUserAddResponse>  addBatchOrg(List<OrgAddRequest> param){
        log.error("【海康新增组织】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康新增组织】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.addBatchOrg(JSONObject.toJSONString(param));
@@ -90,7 +90,7 @@
     * @return
     */
    public  static  BaseResponse   delBatchOrg(OrgDelRequest param){
        log.error("【海康删除组织】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康删除组织】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.delOrg(JSONObject.toJSONString(param));
@@ -109,7 +109,7 @@
     * @return
     */
    public  static  BaseResponse<UserAddResponse>  addUser(UserAddRequest param){
        log.error("【海康新增人员】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康新增人员】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.addUser(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -127,7 +127,7 @@
     * @return
     */
    public  static  BaseResponse editUser(UserAddRequest param){
        log.error("【海康修改人员】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康修改人员】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.editUser(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -145,7 +145,7 @@
     * @return
     */
    public  static  BaseResponse<OrgOrUserAddResponse>  addBatchUser(List<UserAddRequest> param){
        log.error("【海康批量新增人员】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康批量新增人员】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.addBatchUser(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -163,7 +163,7 @@
     * @return
     */
    public  static  BaseResponse<OrgOrUserAddFailureResponse>  delBatchUser(List<UserAddRequest> param){
        log.error("【海康批量新增人员】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康批量新增人员】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.delBatchUser(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -181,7 +181,7 @@
     * @return
     */
    public  static  BaseResponse<FaceAddOrEditesponse>  addFace(List<FaceAddRequest> param){
        log.error("【海康添加人脸信息】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康添加人脸信息】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.addFace(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -199,7 +199,7 @@
     * @return
     */
    public  static  BaseResponse<FaceAddOrEditesponse>  editFace(List<FaceEditRequest> param){
        log.error("【海康编辑人脸信息】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康编辑人脸信息】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.editFace(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -217,7 +217,7 @@
     * @return
     */
    public  static  BaseResponse   delFace(List<FaceEditRequest> param){
        log.error("【海康删除人脸信息】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康删除人脸信息】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.editFace(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -235,7 +235,7 @@
     * @return
     */
    public static InputStream getFaceInputStream(FacePictureRequest param) {
        log.error("【海康人脸访问图片流】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康人脸访问图片流】================开始===="+JSONObject.toJSONString(param));
        try {
            InputStream res = HKTools.getFaceInputStream(JSONObject.toJSONString(param));
            log.error("【海康人脸访问图片流】================成功====\n");
@@ -251,7 +251,7 @@
     * @return
     */
    public  static  BaseResponse<List<ParkListResponse>>   parkList(ParkListRequest param){
        log.error("【海获取车库列表数据】================开始===="+JSONObject.toJSONString(param));
        log.info("【海获取车库列表数据】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.parkList(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -269,7 +269,7 @@
     * @return
     */
    public  static  BaseResponse<List<EntranceListResponse>>   entranceList(EntranceListRequest param){
        log.error("【海获取车库列表数据】================开始===="+JSONObject.toJSONString(param));
        log.info("【海获取车库列表数据】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.entranceList(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -287,7 +287,7 @@
     * @return
     */
    public  static  BaseResponse   carChargeAddtion(CarChargeAddRequest param){
        log.error("【海康固定车辆充值】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康固定车辆充值】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.carChargeAddtion(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -305,7 +305,7 @@
     * @return
     */
    public  static  BaseResponse   carChargeDeletion(CarChargeDelRequest param){
        log.error("【海康固定车辆取消包期】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康固定车辆取消包期】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.carChargeDeletion(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -323,7 +323,7 @@
     * @return
     */
    public  static  BaseResponse<ParkReservationAddResponse>   parkReservationAddition(ParkReservationAddRequest param){
        log.error("【海康车位预约】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康车位预约】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.parkAddition(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -341,7 +341,7 @@
     * @return
     */
    public  static  BaseResponse   parkReservationDeletion(ParkReservationDelRequest param){
        log.error("【海康车位取消预约】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康车位取消预约】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.carChargeDeletion(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -359,7 +359,7 @@
     * @return
     */
    public  static  BaseResponse<VisitAppointmentResponse>   visitAppiontment(VisitAppointmentRequest param){
        log.error("【海康访客预约】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康访客预约】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.visitAppiontment(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -377,7 +377,7 @@
     * @return
     */
    public  static  BaseResponse   cancelVisitAppiontment(VisitAppointmentCancelRequest param){
        log.error("【海康访客预约取消】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康访客预约取消】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.visitCancel(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -395,7 +395,7 @@
     * @return
     */
    public  static  BaseResponse  outVisitAppiontment(VisitAppointmentOutRequest param){
        log.error("【海康访客预约签离】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康访客预约签离】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.visitOut(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -413,7 +413,7 @@
     * @return
     */
    public  static  BaseResponse<VisitAppointmentVistorResponse>   visitAppiontmentMDJ(VisitAppointmentMDJRequest param){
        log.error("【海康访客免登记预约】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康访客免登记预约】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.visitAppiontmentMDJ(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -431,7 +431,7 @@
     * @return
     */
    public  static  BaseResponse<PrivilegeGroupListResponse>   privilegeGroup(PrivilegeGroupRequest param){
        log.error("【海康访客权限组列表查询】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康访客权限组列表查询】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.privilegeGroup(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -445,11 +445,29 @@
        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.error("【海康门禁设备查询】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康门禁设备查询】================开始===="+JSONObject.toJSONString(param));
        try {
            String res = HKTools.acsDeviceList(JSONObject.toJSONString(param));
            TypeReference typeReference =
@@ -467,7 +485,7 @@
     * @return
     */
    public  static  BaseResponse   eventSub(EventSubRequest param){
        log.error("【海康事件订阅】================开始===="+JSONObject.toJSONString(param));
        log.info("【海康事件订阅】================开始===="+JSONObject.toJSONString(param));
        String res = null;
        try {
            res = HKTools.eventSub(JSONObject.toJSONString(param));