| | |
| | | |
| | | @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"; |
| | | public static String https ; |
| | | /** |
| | | * 能力开放平台的网站路径 路径不用修改,就是/artemis |
| | |
| | | * 接口地址集合 |
| | | */ |
| | | public interface InterfacePath{ |
| | | String doorEvents = "/api/acs/v2/door/events";//门禁事件查询 |
| | | // String doorEvents = "/api/acs/v2/door/events";//门禁事件查询 |
| | | // String visitEvents = "/api/visitor/v1/event/turnover/search";//访客事件查询 |
| | | // String parkEvents = "/api/pms/v1/crossRecords/page";//停车场事件查询 |
| | | String rootOrg = "/api/resource/v1/org/rootOrg";//获取跟组织 |
| | | String addBatchOrg = "/api/resource/v1/org/batch/add";//批量新增组织 |
| | | String delBatchOrg = "/api/resource/v1/org/batch/delete";//批量删除组织 |
| | |
| | | String visitAppiontment= "/api/visitor/v2/appointment";//访客预约v2 |
| | | String visitAppiontmentMDJ= "/api/visitor/v1/appointment/registration";//访客预约免登记v2 |
| | | 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";//查询门禁点列表v2 |
| | | 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";//查询车辆抓拍图片 |
| | | String taskAddition= "/api/acps/v1/authDownload/task/addition";//创建下载任务_根据人员与设备通道指定下载 |
| | | String taskDataAddition= "/api/acps/v1/authDownload/data/addition";//下载任务中添加数据_根据人员与设备通道指定下载 |
| | | String taskStart= "/api/acps/v1/authDownload/task/start";//开始下载任务 |
| | | String taskProgress= "/api/acps/v1/authDownload/task/progress";//查詢下载任务进度 |
| | | } |
| | | |
| | | /** |
| | | * 顔色枚举 |
| | | */ |
| | | public enum EventTypes { |
| | | |
| | | PARK_LINE_IN(771760130, "入场压线事件" ), |
| | | PARK_PASS_IN(771760131, "入场放行事件" ), |
| | | PARK_LINE_OUT(771760133, "出场压线事件" ), |
| | | PARK_PASS_OUT(771760134, "出场放行事件" ), |
| | | VISIT_SIGN_IN(1392513025, "访客登记" ), |
| | | VISIT_SIGN_OUT(1392513026, "访客签离" ), |
| | | DOOR_FACE_AUTH_FAIL(197163, "人脸认证失败" ), |
| | | DOOR_FACE_AUTH_SUCCESS(196893, "人脸认证通过" ) |
| | | ; |
| | | // 成员变量 |
| | | private String name; |
| | | private int key; |
| | | |
| | | // 构造方法 |
| | | EventTypes(int 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 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; |
| | | } |
| | | |
| | | |
| | | // 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 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; |
| | | } |
| | | |
| | | } |
| | | /** |
| | | * 顔色枚举 |
| | | */ |
| | |
| | | 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 方法 |