public static CardEventReport CreateExitEvent(CardInfo card, int parkID, int entranceID, string entranceName, ParkWorkMode workMode, Byte carType, TariffSetting ts, DateTime eventDateTime) { CardEventReport report = new CardEventReport(); report.ID = Guid.NewGuid(); report.ParkID = parkID; report.EventDateTime = eventDateTime; report.EntranceID = entranceID; report.SourceName = entranceName; report.IsExitEvent = true; report.CardID = card.CardID; report.OwnerName = card.OwnerName; report.CardCarPlate = card.CarPlate; report.CarPlate = card.RegCarPlate; report.CardCertificate = card.CardCertificate; report.CardType = card.CardType; report.CarType = carType; report.EventStatus = CardEventStatus.Pending; report.LastDateTime = card.LastDateTime; report.LastCarPlate = card.LastCarPlate; report.CardPaymentInfo = CardPaymentInfoFactory.CreateCardPaymentRecord(card, ts, carType, eventDateTime); report.Balance = card.Balance; report.ValidDate = card.ValidDate; report.OnlineHandleWhenOfflineMode = card.OnlineHandleWhenOfflineMode; report.ParkingStatus = ParkingStatus.Out; report.UpdateFlag = true; report.WorkMode = workMode; return(report); }
public static CardEventReport CreateEnterEvent(CardInfo card, int parkID, int entranceID, string entranceName, ParkWorkMode workMode, DateTime eventDatetime) { CardEventReport report = new CardEventReport(); report.ID = Guid.NewGuid(); report.ParkID = parkID; report.EntranceID = entranceID; report.IsExitEvent = false; report.SourceName = entranceName; report.CardType = card.CardType; report.CarType = card.CarType; report.CardID = card.CardID; report.OwnerName = card.OwnerName; report.CardCarPlate = card.CarPlate; report.CarPlate = card.RegCarPlate; report.CardCertificate = card.CardCertificate; report.EventDateTime = eventDatetime; report.EventStatus = 0; report.LastDateTime = card.LastDateTime; report.ValidDate = card.ValidDate; report.Balance = card.Balance; report.OnlineHandleWhenOfflineMode = card.OnlineHandleWhenOfflineMode; report.ParkingStatus = ParkingStatus.In; report.UpdateFlag = true; report.WorkMode = workMode; return(report); }
public static CardEventReport CreateEnterEvent(CardInfo card, int parkID, int entranceID, string entranceName, ParkWorkMode workMode, DateTime eventDatetime) { CardEventReport report = new CardEventReport(); report.ID = Guid.NewGuid(); report.ParkID = parkID; report.EntranceID = entranceID; report.IsExitEvent = false; report.SourceName = entranceName; report.ListType = card.ListType; report.CardType = card.CardType; report.CarType = card.CarType; report.CardID = card.CardID; report.OwnerName = card.OwnerName; report.Department = card.Department; report.CardCarPlate = card.CarPlate; report.CarPlate = card.RegCarPlate; report.CardCertificate = card.CardCertificate; report.EventDateTime = eventDatetime; report.EventStatus = 0; report.LastDateTime = card.LastDateTime; report.ValidDate = card.ValidDate; report.Balance = card.Balance; report.OnlineHandleWhenOfflineMode = (card.OnlineHandleWhenOfflineMode || card.IsCarPlateList);//车牌名单时固定按在线处理 report.ParkingStatus = ParkingStatus.In; report.UpdateFlag = true; report.WorkMode = workMode; report.FreeDateTime = card.FreeDateTime; report.EnableHotelApp = card.EnableHotelApp; report.HotelCheckOut = card.HotelCheckOut; report.CardOptions = card.Options; return(report); }
public CardEventReport Clone() { CardEventReport report = this.MemberwiseClone() as CardEventReport; if (this.CardPaymentInfo != null) { report.CardPaymentInfo = this.CardPaymentInfo.Clone(); } return(report); }
public static CardEventReport CreateExitEvent(CardInfo card, int parkID, int entranceID, string entranceName, Byte carType, TariffSetting ts, DateTime eventDateTime) { CardEventReport report = new CardEventReport(); report.ID = Guid.NewGuid(); report.ParkID = parkID; report.EventDateTime = eventDateTime; report.EntranceID = entranceID; report.SourceName = entranceName; report.IsExitEvent = true; report.CardID = card.CardID; report.OwnerName = card.OwnerName; report.CarPlate = card.CarPlate; report.CardCertificate = card.CardCertificate; report.CardType = card.CardType; report.CarType = carType; report.EventStatus = CardEventStatus.Pending; report.LastDateTime = card.LastDateTime; report.LastCarPlate = card.LastCarPlate; report.CardPaymentInfo = CardPaymentInfoFactory.CreateCardPaymentRecord(card, ts, carType, eventDateTime); report.Balance = card.Balance; report.ValidDate = card.ValidDate; report.OnlineHandleWhenOfflineMode = card.OnlineHandleWhenOfflineMode; report.ParkingStatus = ParkingStatus.Out; if (card.EnableLimitation && UserSetting.Current != null && UserSetting.Current.LimitationPerMonth > 0) { DateTime s = new DateTime(report.EventDateTime.Year, report.EventDateTime.Month, 1); if (report.LastDateTime > s) { s = report.LastDateTime.Value; } decimal hour = UserSetting.Current.CalculateLimitation(s, report.EventDateTime); //只计算本月分的限时停车时长 report.Limitation = hour; if (!card.LimitationTimestamp.HasValue || card.LimitationTimestamp.Value.Date.Year != report.EventDateTime.Year || card.LimitationTimestamp.Value.Month != report.EventDateTime.Month) //卡片累计的剩余时长非本月的,重新计算 { report.LimitationRemain = UserSetting.Current.LimitationPerMonth - report.Limitation; } else { report.LimitationRemain = card.LimitationRemain.Value - report.Limitation; } } return(report); }
public static CardEventReport CreateExitEvent(CardInfo card, int parkID, int entranceID, string entranceName, ParkWorkMode workMode, Byte carType, TariffSetting ts, DateTime eventDateTime) { CardEventReport report = new CardEventReport(); report.ID = Guid.NewGuid(); report.ParkID = parkID; report.EventDateTime = eventDateTime; report.EntranceID = entranceID; report.SourceName = entranceName; report.IsExitEvent = true; report.CardID = card.CardID; report.OwnerName = card.OwnerName; report.Department = card.Department; report.CardCarPlate = card.CarPlate; report.CarPlate = card.RegCarPlate; report.CardCertificate = card.CardCertificate; report.ListType = card.ListType; report.CardType = card.CardType; report.CarType = carType; report.EventStatus = CardEventStatus.Pending; report.LastDateTime = card.LastDateTime; report.LastCarPlate = card.LastCarPlate; report.LastEntrance = card.LastEntrance; //report.CardPaymentInfo = CardPaymentInfoFactory.CreateCardPaymentRecord(card, ts, carType, eventDateTime); report.CardPaymentInfo = CardPaymentInfoFactory.CreateCardPaymentRecord(report.ParkID, card, ts, carType, eventDateTime); report.Balance = card.Balance; report.ValidDate = card.ValidDate; report.OnlineHandleWhenOfflineMode = (card.OnlineHandleWhenOfflineMode || card.IsCarPlateList);//车牌名单时固定按在线处理 report.ParkingStatus = ParkingStatus.Out; report.UpdateFlag = true; report.WorkMode = workMode; report.FreeDateTime = card.FreeDateTime; if (card.EnableHotelApp && !card.HotelCheckOut && card.IsInFreeTime(eventDateTime)) { //如果启用了酒店应用,并且未退房,并且未过免费时间的,需要保留以下状态 report.EnableHotelApp = card.EnableHotelApp; report.HotelCheckOut = card.HotelCheckOut; } report.CardOptions = card.Options; return(report); }
public static CardEventReport CreateEnterEvent(CardInfo card, int parkID, int entranceID, string entranceName, DateTime eventDatetime) { CardEventReport report = new CardEventReport(); report.ID = Guid.NewGuid(); report.ParkID = parkID; report.EntranceID = entranceID; report.IsExitEvent = false; report.SourceName = entranceName; report.CardType = card.CardType; report.CarType = card.CarType; report.CardID = card.CardID; report.OwnerName = card.OwnerName; report.CarPlate = card.CarPlate; report.CardCertificate = card.CardCertificate; report.EventDateTime = eventDatetime; report.EventStatus = 0; report.LastDateTime = card.LastDateTime; report.ValidDate = card.ValidDate; report.Balance = card.Balance; report.OnlineHandleWhenOfflineMode = card.OnlineHandleWhenOfflineMode; report.ParkingStatus = ParkingStatus.In; if (card.EnableLimitation && UserSetting.Current != null && UserSetting.Current.LimitationPerMonth > 0) { report.Limitation = 0; if (!card.LimitationTimestamp.HasValue || card.LimitationTimestamp.Value.Date.Year != report.EventDateTime.Year || card.LimitationTimestamp.Value.Month != report.EventDateTime.Month) //卡片累计的剩余时长非本月的,重新计算 { report.LimitationRemain = UserSetting.Current.LimitationPerMonth - report.Limitation; } else { report.LimitationRemain = card.LimitationRemain.Value - report.Limitation; } } return(report); }
public void CardRealTimeEventSink(Ralid.Park.BusinessModel.Report.CardEventReport report) { EnQueue(report); }