From 98e52a2d1a05276e11d2e5c99ec05e670228fbd6 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期一, 18 十二月 2023 18:21:20 +0800 Subject: [PATCH] 海康接口对接开发 --- server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java | 101 ++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 84 insertions(+), 17 deletions(-) diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java index 9187b3c..a0065b2 100644 --- a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java +++ b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java @@ -7,6 +7,10 @@ @Data public class HKConstants { + public static final String IMG_INDEX ="HKIMG=" ; + public static final String IMG_INDEX_ERROR ="HKIMG_ERROR=" ; + public static final String RES_ORG_INDEX = "DMO"; + public static final String RES_USER_INDEX = "DMU"; private Logger logger = LoggerFactory.getLogger(HKConstants.class); //娴峰悍骞冲彴鏍规嵁鐜板満鐜閰嶇疆http杩樻槸https public static final String RESPONSE_SUCCEE = "0"; @@ -45,9 +49,15 @@ String visitAppiontment= "/api/visitor/v2/appointment";//璁垮棰勭害v2 String visitAppiontmentMDJ= "/api/visitor/v1/appointment/registration";//璁垮棰勭害鍏嶇櫥璁皏2 String visitCancel= "/api/visitor/v1/appointment/cancel";//鍙栨秷璁垮棰勭害 + String visitOut= "/api/visitor/v1/visitor/out";//绛剧璁垮棰勭害 String facePicture= "/api/resource/v1/person/picture";//鎻愬彇鐢ㄦ埛浜鸿劯鐓х墖 String privilegeGroup= "/api/visitor/v1/privilege/group";//鏌ヨ璁垮鏉冮檺缁� String eventSub= "/api/eventService/v1/eventSubscriptionByEventTypes";//浜嬩欢璁㈤槄 + String doorSearch= "/api/resource/v2/door/search";//鏌ヨ闂ㄧ鐐瑰垪琛╲2 + String cancelEventSub= "/api/eventService/v1/eventUnSubscriptionByEventTypes";//鍙栨秷浜嬩欢璁㈤槄 + String visitPicture= "/api/visitor/v1/record/pictures";//鑾峰彇璁垮璁板綍涓殑鍥剧墖 + String devicePicture= "/api/acs/v1/event/pictures";//鑾峰彇闂ㄧ浜嬩欢鐨勫浘鐗� + String carPicture= "/api/pms/v1/image";//鏌ヨ杞﹁締鎶撴媿鍥剧墖 } /** @@ -74,14 +84,47 @@ this.key = key; } - // 鏅�氭柟娉� - public static String getName(int index) { - for (Constants.UserType c : Constants.UserType.values()) { - if (c.getKey() == index) { - return c.getName(); - } - } - return null; + + // get set 鏂规硶 + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getKey() { + return key; + } + + public void setKey(int key) { + this.key = key; + } + + } + + /** + * 璇佷欢绫诲瀷 + */ + public enum CertificateType { + + SHENFENZHENG(111, "韬唤璇�" ), + HUZHAO(414, "鎶ょ収" ), + HUKOUBEN(113, "鎴峰彛绨�" ), + JIASHIZHENG(335, "椹鹃┒璇�" ), + GONGXUOZHENG(131, "宸ヤ綔璇�" ), + XUESHENGZHENG(133, "瀛︾敓璇�" ), + QITA(990, "鍏朵粬" ) + ; + // 鎴愬憳鍙橀噺 + private String name; + private int key; + + // 鏋勯�犳柟娉� + CertificateType(int key, String name ) { + this.name = name; + this.key = key; } @@ -103,6 +146,39 @@ } } + public enum ReturnCode { + + PARK_LINE_IN("0x00072001", "璧勬簮淇℃伅涓嶅瓨鍦�" ) + ; + // 鎴愬憳鍙橀噺 + private String name; + private String key; + + // 鏋勯�犳柟娉� + ReturnCode(String key, String name ) { + this.name = name; + this.key = key; + } + + + // get set 鏂规硶 + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + } /** * 椤旇壊鏋氫妇 */ @@ -120,15 +196,6 @@ this.key = key; } - // 鏅�氭柟娉� - public static String getName(int index) { - for (Constants.UserType c : Constants.UserType.values()) { - if (c.getKey() == index) { - return c.getName(); - } - } - return null; - } // get set 鏂规硶 -- Gitblit v1.9.3