using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace WebSocketToolsConsole { public class Entity { public enum Factory { 杭州锐颖 = 0, 深圳实义德 = 1, 深圳嘉禾兴 = 2 } public class UiImg { public string name; public string image; public int x; public int y; public int w; public int h; } /// /// 实义德人脸机传输数据类型 /// /// public class Rootinfo { public int pmsid { get; set; } public msgx msgx { get; set; } } public class cmdinfo { public string msgid { get; set; } public string sn { get; set; } public string cmd { get; set; } public msgxinfo msg { get; set; } } public class msgxinfo { /// /// 消息ID /// public string status { get; set; } /// /// 终端序列号 /// public string sn { get; set; } /// /// 消息类型: setPerson/removePerson、open/reboot(开门重启) /// public string msg { get; set; } /// /// pmsid /// /// /// 消息主体:Content-Type: application/x-www-formurlencoded /// public msginfo data { get; set; } } public class msginfo { public string cameraDetectType { get; set; } public string faceFeaturePairNumber { get; set; } public string faceFeaturePairSuccessOrFailWaitTime { get; set; } public string openDoorType { get; set; } public string openDoorContinueTime { get; set; } public string doorType { get; set; } public string APKVersion { get; set; } public string sn { get; set; } public string idCardFaceFeaturePairNumber { get; set; } public string appWelcomeMsg { get; set; } public string deviceSoundSize { get; set; } public string deviceDefendTime { get; set; } public string deviceName { get; set; } public string tipsPairFail { get; set; } public string picQualityRate { get; set; } public string beginRecoDistance { get; set; } public string pairSuccessOpenDoor { get; set; } public string fillLightTimes { get; set; } public string lowPowerTimes { get; set; } public string recognitionSwitch { get; set; } } public class pmsinterface { public int pmsId { get; set; } public DateTime DateTime { get; set; } public string pmsContent { get; set; } public int hotelid { get; set; } public int room { get; set; } public string faceSN { get; set; } public int issueresult { get; set; } public int pmstype { get; set; } public string messageid { get; set; } public string APKVersion { get; set; } } public class msgx { /// /// 消息ID /// public string msgid { get; set; } /// /// 终端序列号 /// public string sn { get; set; } /// /// 消息类型: setPerson/removePerson、open/reboot(开门重启) /// public string cmd { get; set; } /// /// pmsid /// /// /// 消息主体:Content-Type: application/x-www-formurlencoded /// public string msg { get; set; } } public class msgxs { /// /// 消息ID /// public string msgid { get; set; } public int pmsid { get; set; } /// /// 终端序列号 /// public string sn { get; set; } /// /// 消息类型: setPerson/removePerson、open/reboot(开门重启) /// public string cmd { get; set; } /// /// pmsid /// /// /// 消息主体:Content-Type: application/x-www-formurlencoded /// public Msg msg { get; set; } } public class Msg { /// /// /// public int status { get; set; } /// /// /// public string msg { get; set; } } /// /// pmsid /// /// /// 实义德人脸机返回结果 /// public class msgx_response_msg { /// /// 状态码:0-成功,其他状态见状态码表 /// public int status { get; set; } /// /// 状态描述:状态码的详细描述,比如:成功 /// public string msg { get; set; } /// /// 返回数据:返回请求的数据,比如:请求人员列表,则data即为人员列表的json字符串 /// public string data { get; set; } } /// /// 实义德人脸机过闸人员结构 /// public class msgx_person { /// /// 秘钥:终端设备的秘钥 /// public string key { get; set; } /// /// 人员ID:ID,验证人员唯一性的字段,必填 /// public string id { get; set; } /// /// 人员的名字 /// public string name { get; set; } /// /// 卡号:作为维根号发送到闸机 /// public string IC_NO { get; set; } /// /// 身份证号 /// public string ID_NO { get; set; } /// /// 照片:JPG头像照片要求宽高640x480像素,转为Base64字符串传输,JPG 分辨率最大支持1080x1080 /// public string photo { get; set; } /// /// 最大过闸次数:一共可以过闸的最大次数[0,10000);当此值设置等于10000时,代表可以无限次过闸,默认:10000 /// public long passCount { get; set; } /// /// 起始时间:此时间之后拥有过闸权限,单位:秒(传-1表示无限制),默认无限制 /// public double startTs { get; set; } /// /// 截止时间:此时间之后无过闸权限,单位:秒(传-1表示无限制),默认无限制 /// public double endTs { get; set; } /// /// 访客:true-是访客,false-非访客,默认false /// public bool visitor { get; set; } /// /// 以周为单位设置每 天不同的时间段:有权限过闸多个时间段,可以周为单位设置每 天不同的时间段,也可以设置每天相同的时间 段,不支持进行缺省设置(时间段格式: “09:00-12:35”,不同时间段间用“;”分割) /// public string weekly { get; set; } } /// /// 人员添加 /// public class SavePersonRequest { /// /// ID编号:回复id编号;成对出现,用来关联平台的发送和设备的回复 /// public int id { get; set; } /// /// 方法:personnelData.savePersons /// public string method { get; set; } /// /// 人员信息列表 /// public List @params { get; set; } } /// /// 人员信息列表 /// public class Params { /// /// 人员信息 /// public Person Person { get; set; } } /// /// 人员信息 /// public class Person { /// /// 人员类型,1-内部员工,2-访客, 3-黑名单;必填 /// public int Type { get; set; } /// /// 证件号,与CertificateType组合构成全局唯一人员标识,不允许更新,避免前端和平台端不一致。必填 /// public string Code { get; set; } /// /// 默认权限组。必填 /// public string GroupName { get; set; } /// /// 姓名必填 /// public string Name { get; set; } /// /// 性别必填 /// public string Sex { get; set; } /// /// 出生日期必填 /// public string Birthday { get; set; } /// /// 访客信息,人员类型是访客时有效(非访客不填) /// public GuestInfo GuestInfo { get; set; } /// /// 通过HTTP协议下载图片的地址;只支持JPG格式; /// public string URL { get; set; } /// /// Base64编码的图片数据,与URL字段互斥; base64数据不用带上格式信息如【data:image/jpg;base64,】 /// public string Images { get; set; } /// /// 卡信息 /// public Cards Cards { get; set; } } /// /// 访客信息,人员类型是访客时有效(非访客不填) /// public class GuestInfo { /// /// 单位 /// public string Corp { get; set; } /// /// 电话 /// public string Phone { get; set; } /// /// 车牌号码 /// public string CarLicense { get; set; } /// /// 随行人数 /// public int Partner { get; set; } /// /// 被访人 /// public string Host { get; set; } /// /// 准入时间 /// public AccessTime AccessTime { get; set; } } /// /// 准入时间 /// public class AccessTime { /// /// 开始时间 /// public string from { get; set; } /// /// 结束时间 /// public string to { get; set; } } /// /// 卡信息 /// public class Cards { /// /// 卡号 /// public string ID { get; set; } /// /// 卡类型:1普通卡,2胁迫卡 /// public int Type { get; set; } /// /// 有效期日期:开始日期yyyy-MM-dd,结束日期yyyy-MM-dd /// public string[] Validity { get; set; } /// /// 有效期时间(默认:00:00:00,23:59:59):开始时间HH:mm:ss,结束时间HH:mm:ss /// public string[] ValidityTime { get; set; } public Memo Memo { get; set; } } /// /// optional其他信息 /// public class Memo { /// /// 门禁位置 /// public string Entrance { get; set; } } /// /// 人员添加设备回应 /// public class Response { /// /// ID编号:回复id编号;成对出现,用来关联平台的发送和设备的回复 /// public int id { get; set; } /// /// 方法:personnelData.savePersons,removePersons /// public string method { get; set; } /// /// 返回结果 /// public bool result { get; set; } /// /// 人员信息列表 /// public List @params { get; set; } } /// /// 响应人员信息 /// public class ParamsResponse { /// /// 人员类型,1-内部员工,2-访客, 3-黑名单 /// //public string CertificateType { get; set; } /// /// 证件号,与CertificateType组合构成全局唯一人员标识,不允许更新,避免前端和平台端不一致 /// public string Code { get; set; } /// /// 当前人员是否添加成功,失败有错误码和错误信息 /// public bool Result { get; set; } /// /// 错误码 /// public int ErrorCode { get; set; } /// /// /// //public string[] ErrorCodePic { get; set; } /// /// 错误信息 /// //public string ErrorMessage { get; set; } } /// /// 人员删除 /// public class RemovePersonRequest { /// /// ID编号:回复id编号;成对出现,用来关联平台的发送和设备的回复 /// public int id { get; set; } /// /// 方法:personnelData.removePersons /// public string method { get; set; } /// /// 人员信息列表 /// public List @params { get; set; } } /// /// 人员信息列表 /// public class RemoveParams { public string Code { get; set; } } /// /// 人员删除设备回应 /// //public class RemovePersonResponse //{ // /// // /// ID编号:回复id编号;成对出现,用来关联平台的发送和设备的回复 // /// // public int id { get; set; } // /// // /// 方法:personnelData.removePersons // /// // public string method { get; set; } // /// // /// 返回结果 // /// // public bool result { get; set; } // /// // /// 人员信息列表 // /// // public List @params { get; set; } //} /// /// 响应人员信息 /// //public class RemoveParamsResponse //{ // /// // /// 证件号,与CertificateType组合构成全局唯一人员标识,不允许更新,避免前端和平台端不一致 // /// // public string Code { get; set; } // /// // /// 当前人员是否添加成功,失败有错误码和错误信息 // /// // public bool Result { get; set; } // /// // /// 错误码 // /// // public int ErrorCode { get; set; } //} public class Json { public int status { get; set; } public string msg { get; set; } public Data data { get; set; } = new Data(); } public class Data { public int total_number { get; set; } public int offset { get; set; } public int person_number { get; set; } public List person { get; set; } = new List(); } public class User { public string id { get; set; } public int passCount { get; set; } public string startTs { get; set; } public string endTs { get; set; } public string name { get; set; } public string ID_NO { get; set; } public string IC_NO { get; set; } } } }