/// <summary>
 /// 处理刷卡事件
 /// </summary>
 /// <param name="events"></param>
 public void HandleCardEvent(CardEvent item)
 {
     if (EnterDoors == null || EnterDoors.Count == 0 || ExitDoors == null || ExitDoors.Count == 0)
     {
         return;
     }
     if (item.Permitted && item.UserID != item.UserName && !string.IsNullOrEmpty(item.Department) && !string.IsNullOrEmpty(item.UserName)) //有效刷卡,并且是已经登记的人员
     {
         if (EnterDoors.Contains(item.DoorID))                                                                                             //说明门是入场门,刷卡即入场
         {
             EnterRegion(item);                                                                                                            //换成相对于区域的出入状态
             return;
         }
         else if (ExitDoors.Contains(item.DoorID)) //门是出场门,刷卡即出场
         {
             ExitRegion(item);
             return;
         }
     }
 }
 /// <summary>
 /// 是否是区域内的门
 /// </summary>
 /// <param name="doorID"></param>
 /// <returns></returns>
 public bool IsMyDoor(string doorID)
 {
     return(EnterDoors.Contains(doorID) || ExitDoors.Contains(doorID));
 }