public List <PassengerInfoModel> GetPassenger(int cid, bool isTemporary, string searchArgs = "", int isOnline = 0) { CustomerInfoEntity customer = _customerDal.Find <CustomerInfoEntity>(cid); BaseCustomerBll customerBll = null; if (!string.IsNullOrEmpty(customer.CorpID)) { CorporationEntity corporationEntity = _corporationDal.Find <CorporationEntity>(customer.CorpID); if (corporationEntity.IsAmplitudeCorp == "T" && !isTemporary) //是差旅公司,并且不是查询临客 { if (customer.IsMaster == "T") //预订员 { CustomerUnionInfoEntity customerUnionInfoEntity = _customerUnionDal.Query <CustomerUnionInfoEntity>(n => n.Cid == cid, true).FirstOrDefault(); string corpDepartIdList = customerUnionInfoEntity?.CorpDepartIDList; if (!customer.CorpDepartID.HasValue) { throw new Exception("当前预定员部门信息异常"); } if (string.IsNullOrEmpty(corpDepartIdList)) { corpDepartIdList = customer.CorpDepartID.Value.ToString(); } customerBll = new TripDepartBookingCustomerBll(customer, corporationEntity.CorpId, corpDepartIdList); } else { customerBll = new TripNotBookingCustomerBll(customer); //非预订员,普通差旅客户 } } else { customerBll = new CommonCustomerBll(customer); //临客 } } else { customerBll = new CommonCustomerBll(customer); //临客 } ICustomerVisitor customerVisitor = new CustomerVisitor(_contactDal, _contactIdentificationDal, _customerDal, _corpDepartmentDal, searchArgs, base.Context, isOnline); List <PassengerInfoModel> passengerInfoModels = customerBll.GetPassenger(customerVisitor); return(passengerInfoModels); }
/// <summary> /// 非差旅客户获取乘客信息 /// </summary> /// <param name="customerBll"></param> /// <returns></returns> public List <PassengerInfoModel> GetPassenger(CommonCustomerBll customerBll) { var customer = customerBll.Customer; IQueryable <ContactInfoEntity> contactInfoEntitieses = _contactDal.Query <ContactInfoEntity>( n => n.Cid == customer.Cid && n.IsPassenger == "T" && (n.IsDel ?? "F") == "F" && !n.PCid.HasValue, true); contactInfoEntitieses = SearchContact(contactInfoEntitieses); if (_isOnline == 1)//如果是线上查询临客,则只显示线上新增的临客;线下查询不做限制 { contactInfoEntitieses = contactInfoEntitieses.Where(n => n.IsOnline == 1); } List <ContactInfoEntity> contactList = contactInfoEntitieses.ToList(); return(ConvertContactToPassenger(contactList, null)); }