Ejemplo n.º 1
0
        private _BaiTuoAccountInfo GetInfo(PlatSystem platSystem, string areaCity)
        {
            _BaiTuoAccountInfo _BaiTuoAccount = new _BaiTuoAccountInfo();

            if (platSystem == null)
            {
                throw new CreateInterfaceOrderException("平台开关没有设置!");
            }
            string defaultCity = platSystem.SystemBigArea.DefaultCity;
            //获取区域参数
            SystemArea systemArea = platSystem.SystemBigArea.SystemAreas.Where(p => p.City == areaCity).FirstOrDefault();

            if (systemArea == null)
            {
                systemArea = platSystem.SystemBigArea.SystemAreas.Where(p => p.City == defaultCity).FirstOrDefault();
            }
            if (systemArea == null)
            {
                throw new CreateInterfaceOrderException(string.Format("没有找到区域为:{0}或默认区域{1}的接口配置项", areaCity, defaultCity));
            }
            //参数集合
            List <AreaParameter> areaParameterList = systemArea.Parameters;

            _BaiTuoAccount._baiTuoAccout   = areaParameterList.Where(p => string.Equals(p.Name, "_baiTuoAccout", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _BaiTuoAccount._baiTuoPassword = areaParameterList.Where(p => string.Equals(p.Name, "_baiTuoPassword", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _BaiTuoAccount._baiTuoAg       = areaParameterList.Where(p => string.Equals(p.Name, "_baiTuoAg", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _BaiTuoAccount._PayWay         = areaParameterList.Where(p => string.Equals(p.Name, "_PayWay", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _BaiTuoAccount._NotifyUrl      = areaParameterList.Where(p => string.Equals(p.Name, "_NotifyUrl", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _BaiTuoAccount._IsChangePNRCP  = areaParameterList.Where(p => string.Equals(p.Name, "_IsChangePNRCP", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _BaiTuoAccount._LinkMan        = areaParameterList.Where(p => string.Equals(p.Name, "_LinkMan", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _BaiTuoAccount._LinkManPhone   = areaParameterList.Where(p => string.Equals(p.Name, "_LinkManPhone", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            return(_BaiTuoAccount);
        }
Ejemplo n.º 2
0
        public void CancelOrder(string areaCity, string outOrderId, string pnr, string cancelRemark, string passengerName)
        {
            string              FailMessage   = string.Empty;
            PlatSystem          platSystem    = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _51BookAccountInfo  accountInfo   = GetInfo(platSystem, areaCity);
            PTServiceSoapClient m_PTService   = new PTServiceSoapClient();
            DataSet             dsCancelOrder = m_PTService.PT_51bookCancelOrder(accountInfo._51bookAccout, accountInfo._51bookAg, outOrderId);

            if (dsCancelOrder != null && dsCancelOrder.Tables.Contains("QueryOrderStatus") &&
                dsCancelOrder.Tables["QueryOrderStatus"].Rows.Count > 0
                )
            {
                if (dsCancelOrder.Tables["QueryOrderStatus"].Rows[0]["CancelStatus"].ToString().ToUpper().Trim() == "T")
                {
                    //成功
                }
                else
                {
                    FailMessage = dsCancelOrder.Tables["QueryOrderStatus"].Rows[0]["Err"].ToString();
                }
            }
            else
            {
                FailMessage = "取消订单失败!";
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new OrderCommException(ErrToMessage(FailMessage));
            }
        }
Ejemplo n.º 3
0
        public void CancelOrder(string areaCity, string outOrderId, string pnr, string CancelRemark, string passengerName)
        {
            string              FailMessage   = string.Empty;
            PlatSystem          platSystem    = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _YeeXingAccountInfo accountInfo   = GetInfo(platSystem, areaCity);
            PTServiceSoapClient m_PTService   = new PTServiceSoapClient();
            DataSet             dsCancelOrder = m_PTService.PT_YeeXingCancelOrder(accountInfo._yeeXingAccout2, outOrderId, passengerName, accountInfo._cancel_notify_url);

            if (dsCancelOrder != null && dsCancelOrder.Tables.Contains("result") &&
                dsCancelOrder.Tables["result"].Rows.Count > 0 &&
                dsCancelOrder.Tables["result"].Columns.Contains("is_success") &&
                dsCancelOrder.Tables["result"].Rows[0]["is_success"].ToString().ToUpper() == "T"
                )
            {
                //成功
            }
            else
            {
                FailMessage = "取消订单失败!";
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new PayInterfaceOrderException(ErrToMessage(FailMessage));
            }
        }
Ejemplo n.º 4
0
        public string GetOrderStatus(string areaCity, string orderId, string outOrderId, string pnr)
        {
            PlatSystem          platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _8000YIAccountInfo  accountInfo = GetInfo(platSystem, areaCity);
            string              FailMessage = string.Empty;
            string              result      = string.Empty;
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            DataSet             dsOrderInfo = m_PTService.PT_8000YIGetOrderStatusInfo(accountInfo._8000yiAccout, accountInfo._8000yiPassword, outOrderId);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Count > 0 &&
                dsOrderInfo.Tables[0].Rows.Count > 0)
            {
                //成功
                result = dsOrderInfo.Tables[0].Rows[0]["a9"].ToString();
            }
            else
            {
                //失败
                FailMessage = "获取订单状态失败";
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new OrderCommException(ErrToMessage(FailMessage));
            }
            return(result);
        }
Ejemplo n.º 5
0
        public void CancelOrder(string areaCity, string outOrderId, string pnr, string CancelRemark, string passengerName)
        {
            string              FailMessage   = string.Empty;
            PlatSystem          platSystem    = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _517AccountInfo     accountInfo   = GetInfo(platSystem, areaCity);
            PTServiceSoapClient m_PTService   = new PTServiceSoapClient();
            DataSet             dsCancelOrder = m_PTService.PT_517CancelOrder(accountInfo._517Accout, accountInfo._517Password, accountInfo._517Ag, outOrderId);

            if (dsCancelOrder != null && dsCancelOrder.Tables.Contains("Result") &&
                dsCancelOrder.Tables["Result"].Rows.Count > 0 &&
                dsCancelOrder.Tables["Result"].Rows[0]["Success"].ToString().ToUpper() == "TRUE" &&
                dsCancelOrder.Tables["Result"].Rows[0]["OrderID"].ToString().Trim() == outOrderId.Trim()
                )
            {
                //取消成功
            }
            else
            {
                FailMessage = "取消订单失败!";
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new OrderCommException(ErrToMessage(FailMessage));
            }
        }
Ejemplo n.º 6
0
        public Dictionary <string, string> AutoCompositeTicket(string areaCity, string orderId, string outOrderId, string pnr)
        {
            PlatSystem                  platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _517AccountInfo             accountInfo = GetInfo(platSystem, areaCity);
            Dictionary <string, string> resultDic   = new Dictionary <string, string>();
            PTServiceSoapClient         m_PTService = new PTServiceSoapClient();
            DataSet dsOrderInfo = m_PTService.PT_517GetOrderInfo(accountInfo._517Accout, accountInfo._517Password, accountInfo._517Ag, outOrderId, pnr);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Count > 0 &&
                dsOrderInfo.Tables.Contains("Passenger") &&
                dsOrderInfo.Tables["Passenger"].Columns.Contains("Name") &&
                dsOrderInfo.Tables["Passenger"].Rows.Count > 0 &&
                dsOrderInfo.Tables["OrderInfo"].Rows.Count > 0
                )
            {
                DataRowCollection drs      = dsOrderInfo.Tables["Passenger"].Rows;
                string            ticketNo = "";
                foreach (DataRow dr in drs)
                {
                    ticketNo = dr["TicketNo"].ToString().Trim().Replace("--", "-");
                    if (ticketNo != "")
                    {
                        if (ticketNo.Contains("-") && ticketNo.Split('-').Length == 2 && ticketNo.Split('-')[1].Trim() == "")
                        {
                            continue;
                        }
                        if (!resultDic.ContainsKey(dr["Name"].ToString().ToUpper()))
                        {
                            resultDic.Add(dr["Name"].ToString().ToUpper(), ticketNo);
                        }
                    }
                }
            }
            return(resultDic);
        }
Ejemplo n.º 7
0
        public bool IsPaid(string areaCity, string orderId, string outOrderId, string pnr)
        {
            bool                isPaid      = false;
            PlatSystem          platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _TodayAccountInfo   accountInfo = GetInfo(platSystem, areaCity);
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            DataSet             dsPayStatus = m_PTService.PT_TodayGetPayStatus(accountInfo._todayAccout2, outOrderId);

            if (dsPayStatus != null && dsPayStatus.Tables.Count > 0 &&
                dsPayStatus.Tables.Contains("Result") &&
                dsPayStatus.Tables["Result"].Columns.Contains("Status") &&
                dsPayStatus.Tables["Result"].Rows.Count > 0
                )
            {
                if (dsPayStatus.Tables["Result"].Rows[0]["Status"].ToString() == "T")
                {
                    isPaid = true;
                }
            }
            else
            {
                throw new OrderCommException("未获取到" + this.Code + "订单代付状态");
            }
            return(isPaid);
        }
Ejemplo n.º 8
0
        public string GetOrderStatus(string areaCity, string orderId, string outOrderId, string pnr)
        {
            PlatSystem          platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _TodayAccountInfo   accountInfo = GetInfo(platSystem, areaCity);
            string              FailMessage = string.Empty;
            string              result      = string.Empty;
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            DataSet             dsOrderInfo = m_PTService.PT_TodayGetOrderInfo(accountInfo._todayAccout2, outOrderId);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Contains("Response") &&
                dsOrderInfo.Tables["Response"].Rows.Count > 0 &&
                dsOrderInfo.Tables["Response"].Columns.Contains("Status")
                )
            {
                //成功
                result = getOrderStatus(dsOrderInfo.Tables["Response"].Rows[0]["Status"].ToString());
            }
            else
            {
                FailMessage = "获取订单状态失败!";
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new PayInterfaceOrderException(ErrToMessage(FailMessage));
            }
            return(result);
        }
Ejemplo n.º 9
0
        private _YeeXingAccountInfo GetInfo(PlatSystem platSystem, string areaCity)
        {
            _YeeXingAccountInfo _YeeXingAccount = new _YeeXingAccountInfo();

            if (platSystem == null)
            {
                throw new CreateInterfaceOrderException("平台开关没有设置!");
            }
            string defaultCity = platSystem.SystemBigArea.DefaultCity;
            //获取区域参数
            SystemArea systemArea = platSystem.SystemBigArea.SystemAreas.Where(p => p.City == areaCity).FirstOrDefault();

            if (systemArea == null)
            {
                systemArea = platSystem.SystemBigArea.SystemAreas.Where(p => p.City == defaultCity).FirstOrDefault();
            }
            if (systemArea == null)
            {
                throw new CreateInterfaceOrderException(string.Format("没有找到区域为:{0}或默认区域{1}的接口配置项", areaCity, defaultCity));
            }
            //参数集合
            List <AreaParameter> areaParameterList = systemArea.Parameters;

            _YeeXingAccount._yeeXingAccout     = areaParameterList.Where(p => string.Equals(p.Name, "_yeeXingAccout", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _YeeXingAccount._yeeXingAccout2    = areaParameterList.Where(p => string.Equals(p.Name, "_yeeXingAccout2", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _YeeXingAccount._yeeXingNotifyUrl  = areaParameterList.Where(p => string.Equals(p.Name, "_yeeXingNotifyUrl", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _YeeXingAccount._IsChangePNRCP     = areaParameterList.Where(p => string.Equals(p.Name, "_IsChangePNRCP", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _YeeXingAccount._PayWay            = areaParameterList.Where(p => string.Equals(p.Name, "_PayWay", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _YeeXingAccount._privateKey        = areaParameterList.Where(p => string.Equals(p.Name, "_privateKey", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _YeeXingAccount._cancel_notify_url = areaParameterList.Where(p => string.Equals(p.Name, "_cancel_notify_url", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            return(_YeeXingAccount);
        }
Ejemplo n.º 10
0
        public string GetOrderStatus(string areaCity, string orderId, string outOrderId, string pnr)
        {
            string              result      = string.Empty;
            string              FailMessage = string.Empty;
            PlatSystem          platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _YeeXingAccountInfo accountInfo = GetInfo(platSystem, areaCity);
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            DataSet             dsOrderInfo = m_PTService.PT_YeeXingQueryOrderStatus(accountInfo._yeeXingAccout2, orderId, outOrderId);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Contains("result") &&
                dsOrderInfo.Tables["result"].Rows.Count > 0 &&
                dsOrderInfo.Tables["result"].Columns.Contains("ordstate")
                )
            {
                if (dsOrderInfo.Tables["result"].Rows[0]["is_success"].ToString().ToUpper() == "T")
                {
                    //成功
                    result = dsOrderInfo.Tables["result"].Rows[0]["ordstate"].ToString();
                }
                else
                {
                    result = "获取订单状态失败:" + dsOrderInfo.Tables["result"].Rows[0]["error"].ToString();
                }
            }
            else
            {
                FailMessage = "获取订单状态失败!";
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new PayInterfaceOrderException(ErrToMessage(FailMessage));
            }
            return(result);
        }
Ejemplo n.º 11
0
        private _TodayAccountInfo GetInfo(PlatSystem platSystem, string areaCity)
        {
            _TodayAccountInfo _TodayAccount = new _TodayAccountInfo();

            if (platSystem == null)
            {
                throw new CreateInterfaceOrderException("平台开关没有设置!");
            }
            string defaultCity = platSystem.SystemBigArea.DefaultCity;
            //获取区域参数
            SystemArea systemArea = platSystem.SystemBigArea.SystemAreas.Where(p => p.City == areaCity).FirstOrDefault();

            if (systemArea == null)
            {
                systemArea = platSystem.SystemBigArea.SystemAreas.Where(p => p.City == defaultCity).FirstOrDefault();
            }
            if (systemArea == null)
            {
                throw new CreateInterfaceOrderException(string.Format("没有找到区域为:{0}或默认区域{1}的接口配置项", areaCity, defaultCity));
            }
            //参数集合
            List <AreaParameter> areaParameterList = systemArea.Parameters;

            _TodayAccount._todayAccout  = areaParameterList.Where(p => string.Equals(p.Name, "_todayAccout", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _TodayAccount._todayAccout2 = areaParameterList.Where(p => string.Equals(p.Name, "_todayAccout2", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _TodayAccount._PayWay       = areaParameterList.Where(p => string.Equals(p.Name, "_PayWay", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            //_TodayAccount._JinriGYCode = areaParameterList.Where(p => string.Equals(p.Name, "_JinriGYCode", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            _TodayAccount._privateKey = areaParameterList.Where(p => string.Equals(p.Name, "_privateKey", StringComparison.OrdinalIgnoreCase)).FirstOrDefault().Value;
            return(_TodayAccount);
        }
Ejemplo n.º 12
0
        public string GetOrderStatus(string areaCity, string orderId, string outOrderId, string pnr)
        {
            string              result      = string.Empty;
            PlatSystem          platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _51BookAccountInfo  accountInfo = GetInfo(platSystem, areaCity);
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            string              FailMessage = string.Empty;
            DataSet             dsOrderInfo = m_PTService.PT_51BookGetOrderInfo(accountInfo._51bookAccout, outOrderId, accountInfo._statusType, accountInfo._51bookAg);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Count > 0 &&
                dsOrderInfo.Tables[0].Rows.Count > 0)
            {
                if (dsOrderInfo.Tables[0].Columns.Contains("orderStatus"))
                {
                    result = dsOrderInfo.Tables[0].Rows[0]["orderStatus"].ToString();
                }
                else if (dsOrderInfo.Tables[0].Columns.Contains("ErorrMessage"))
                {
                    FailMessage = dsOrderInfo.Tables[0].Rows[0]["ErorrMessage"].ToString();
                }
            }
            else
            {
                FailMessage = "获取订单状态失败!";
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new OrderCommException(ErrToMessage(FailMessage));
            }
            return(result);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 获取退废票详情
        /// </summary>
        /// <param name="areaCity"></param>
        /// <param name="outOrderId">今日订单号</param>
        /// <returns></returns>
        public DataSet Today_GetTuiFeiOrderInfo(string areaCity, string outOrderId)
        {
            PlatSystem        platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _TodayAccountInfo accountInfo = GetInfo(platSystem, areaCity);
            //调用
            PTMange ptMange = new PTMange();
            DataSet result  = ptMange.Today_GetTuiFeiOrderInfo(accountInfo._todayAccout2, outOrderId);

            return(result);
        }
Ejemplo n.º 14
0
 /// <summary>
 /// 初始化平台接口信息
 /// </summary>
 public static void InitPlatSystem()
 {
     try
     {
         string _path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config", "platform.config");
         if (SystemConsoSwitch.PlatSystems == null)
         {
             SystemConsoSwitch.PlatSystems = new List <PlatSystem>();
         }
         SystemConsoSwitch.PlatSystems.Clear();
         if (File.Exists(_path))
         {
             var platFormService = StructureMap.ObjectFactory.GetInstance <PlatformCfgService>();
             platFormService.GetPlatformConfigurationSection().Platforms.ForEach(p =>
             {
                 PlatSystem platSystem       = new PlatSystem();
                 platSystem.B2B              = p.b2bClose;
                 platSystem.BSP              = p.bspClose;
                 platSystem.GetPolicyCount   = p.ShowCount;
                 platSystem.IssueTicketSpeed = p.IssueSpeed;
                 platSystem.PlatfromCode     = p.Name;
                 platSystem.State            = !p.IsClosed;
                 if (platSystem.SystemBigArea == null)
                 {
                     platSystem.SystemBigArea = new SystemBigArea();
                 }
                 platSystem.SystemBigArea.DefaultCity = p.Areas.DefaultCity;
                 if (platSystem.SystemBigArea.SystemAreas == null)
                 {
                     platSystem.SystemBigArea.SystemAreas = new List <SystemArea>();
                 }
                 p.Areas.Areas.ForEach(m =>
                 {
                     SystemArea systemArea = new SystemArea();
                     systemArea.City       = m.City;
                     if (systemArea.Parameters == null)
                     {
                         systemArea.Parameters = new List <AreaParameter>();
                     }
                     systemArea.Parameters.AddRange(m.Parameters.Select(n =>
                                                                        new AreaParameter {
                         Name = n.Name, Value = n.Value
                     })
                                                    );
                     platSystem.SystemBigArea.SystemAreas.Add(systemArea);
                 });
                 SystemConsoSwitch.PlatSystems.Add(platSystem);
             });
         }
     }
     catch (Exception e)
     {
         Logger.WriteLog(LogType.ERROR, "初始化平台接口信息失败", e);
     }
 }
Ejemplo n.º 15
0
        /// <summary>
        /// 今日申请机票升舱
        /// </summary>
        /// <returns></returns>
        public void Today_RiseCabin(string areaCity, string orderId, TodayRiseCabinRequest request)
        {
            PlatSystem        platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _TodayAccountInfo accountInfo = GetInfo(platSystem, areaCity);
            //调用
            PTMange ptMange = new PTMange();
            string  result  = ptMange.Today_RiseCabin(orderId, accountInfo._todayAccout2, request);

            if (!result.ToUpper().Contains("<RESULT>T</RESULT>"))
            {
                throw new PayInterfaceOrderException(result);
            }
        }
Ejemplo n.º 16
0
        public PlatformOrder CreateOrder(string pnrContent, bool IsLowPrice, string areaCity, string policyId, string RateId, string localOrderId, decimal policyPoint, decimal ReturnMoney, BPiaoBao.Common.PnrData pnrData)
        {
            PlatformOrder      platformOrder = null;
            string             FailMessage   = string.Empty;
            PlatSystem         platSystem    = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _BaiTuoAccountInfo accountInfo   = GetInfo(platSystem, areaCity);
            string             _SsrCardType  = "1";
            string             _IsLowerPrice = IsLowPrice ? "1" : "0";

            pnrContent = System.Web.HttpUtility.UrlEncode(pnrContent);
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            DataSet             dsOrder     = m_PTService.PT_BaiTuoCreateOrder(accountInfo._baiTuoAccout, accountInfo._baiTuoPassword, accountInfo._baiTuoAg, _IsLowerPrice, policyId, localOrderId, _SsrCardType, policyPoint.ToString(), accountInfo._LinkMan, accountInfo._LinkManPhone, pnrContent);

            //BPiaoBao.DomesticTicket.Platforms._PTService.PnrData PTPnrData = Mapper.DynamicMap<BPiaoBao.Common.PnrData, BPiaoBao.DomesticTicket.Platforms._PTService.PnrData>(pnrData);
            //DataSet dsOrder = m_PTService.PT_NewBaiTuoCreateOrder(_baiTuoAccout, _baiTuoPassword, _baiTuoAg, _IsLowerPrice, policyId, localOrderId, _SsrCardType, policyPoint.ToString(), _LinkMan, _LinkManPhone, pnrContent, PTPnrData);
            if (dsOrder != null && dsOrder.Tables.Count > 0 && dsOrder.Tables.Contains(Code))
            {
                DataRow dr = dsOrder.Tables[Code].Rows[0];
                if (dsOrder.Tables[Code].Rows[0]["Status"].ToString() == "T")
                {
                    //成功 获取数据
                    platformOrder = new PlatformOrder();
                    decimal TotlePaidPirce = 0m, TotaSeatlPrice = 0m;
                    decimal.TryParse(dr["PaidTotlePirce"].ToString(), out TotlePaidPirce);
                    decimal.TryParse(dr["SeatTotalPrice"].ToString(), out TotaSeatlPrice);

                    platformOrder.OrderId        = localOrderId;
                    platformOrder.TotlePaidPirce = TotlePaidPirce;
                    platformOrder.TotaSeatlPrice = TotaSeatlPrice;
                    platformOrder.OutOrderId     = dr["OutOrderId"].ToString();
                    platformOrder.PnrCode        = dr["Pnr"].ToString();
                    platformOrder.AreaCity       = areaCity;
                }
                else
                {
                    //失败
                    FailMessage = dr["Message"].ToString() + " 失败";
                    //FailMessage = "生成订单失败!";
                }
            }
            else
            {
                //异常 或超时
                FailMessage = "调用接口超时";
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new CreateInterfaceOrderException(ErrToMessage(FailMessage));
            }
            return(platformOrder);
        }
Ejemplo n.º 17
0
        public Dictionary <string, string> AutoCompositeTicket(string areaCity, string orderId, string outOrderId, string pnr)
        {
            PlatSystem                  platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _YeeXingAccountInfo         accountInfo = GetInfo(platSystem, areaCity);
            Dictionary <string, string> resultDic   = new Dictionary <string, string>();
            PTServiceSoapClient         m_PTService = new PTServiceSoapClient();
            DataSet dsOrderInfo = m_PTService.PT_YeeXingOrderQueryInfo(accountInfo._yeeXingAccout, accountInfo._yeeXingAccout2, outOrderId, orderId);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Contains("result") &&
                dsOrderInfo.Tables["result"].Rows.Count > 0 &&
                dsOrderInfo.Tables["result"].Columns.Contains("ordstate")
                )
            {
                //暂时未完成
            }
            return(resultDic);
        }
Ejemplo n.º 18
0
        public void Pay(string areaCity, PlatformOrder order)
        {
            PlatSystem        platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _TodayAccountInfo accountInfo = GetInfo(platSystem, areaCity);

            if (accountInfo._PayWay == "0")
            {
                order.PaidMethod = EnumPaidMethod.支付宝;
            }
            else if (accountInfo._PayWay == "1")
            {
                order.PaidMethod = EnumPaidMethod.快钱;
            }
            else if (accountInfo._PayWay == "2")
            {
                order.PaidMethod = EnumPaidMethod.财付通;
            }
            string OutOrderId = order.OutOrderId;
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            DataSet             dsPayOrder  = m_PTService.PT_JinRiOrderPay(accountInfo._todayAccout, accountInfo._todayAccout2, OutOrderId);
            string FailMessage = string.Empty;

            if (dsPayOrder != null && dsPayOrder.Tables.Count > 0 && dsPayOrder.Tables.Contains(Code))
            {
                DataRow dr = dsPayOrder.Tables[Code].Rows[0];
                if (dsPayOrder.Tables[Code].Rows[0]["Status"].ToString() == "T")
                {
                    //成功 获取数据
                    Logger.WriteLog(LogType.INFO, this.Code + "接口订单(" + order.OutOrderId + ")代付成功,订单号:" + order.OrderId);
                }
                else
                {
                    //失败
                    FailMessage = dr["Message"].ToString() + " 失败";
                }
            }
            else
            {
                //异常 或超时
                FailMessage = "调用支付接口超时";
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new PayInterfaceOrderException(ErrToMessage(FailMessage));
            }
        }
Ejemplo n.º 19
0
        /// <summary>
        /// 今日退废票申请
        /// </summary>
        /// <param name="refundArgs"></param>
        /// <returns></returns>
        public RefundTicketResult BounceOrAnnulTicket(RefundArgs refundArgs)
        {
            PlatSystem        platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _TodayAccountInfo accountInfo = GetInfo(platSystem, refundArgs.areaCity);
            //设置请求参数
            TodayTuiFeiOrderRequest request = new TodayTuiFeiOrderRequest();

            request._Type    = refundArgs.RefundType == 0 ? "B" : "A";
            request._OrderNo = refundArgs.OutOrderId;
            List <int>    _RepealList   = new List <int>();
            List <string> _PNameList    = new List <string>();
            List <string> _TicketNoList = new List <string>();

            refundArgs.Passengers.ForEach(p =>
            {
                //默认
                p.Repeal = refundArgs.RefundType == 0 ? 2 : 1;
                _RepealList.Add(p.Repeal);
                _PNameList.Add(p.PassengerName);
                _TicketNoList.Add(p.TicketNo);
            });
            request._Repeal     = string.Join("|", _RepealList.ToArray());
            request._PersonName = string.Join("|", _PNameList.ToArray());
            request._TicketNo   = string.Join("|", _TicketNoList.ToArray());
            //是否取消座位
            request._IsCancelSeat = "是";                                // refundArgs.IsCancelSeat ? "是" : "否";
            string[] strArray = refundArgs.Guid.Split('|');
            request._Cause   = strArray.Length > 1 ? strArray[1] : "B"; //理由 待定
            request._Remarks = refundArgs.Remark;
            request._Rnum    = refundArgs.Passengers.Count();
            request._Ramount = refundArgs.Passengers.Sum(p => p.Amount);
            //调用
            PTMange            ptMange            = new PTMange();
            string             result             = ptMange.Today_TuiFeiOrder(refundArgs.OrderId, accountInfo._todayAccout2, request);
            RefundTicketResult refundTicketResult = new RefundTicketResult();

            refundTicketResult.Descript = result;
            if (result.ToUpper().Contains("<RESULT>T</RESULT>"))
            {
                refundTicketResult.Result = true;
            }
            return(refundTicketResult);
        }
Ejemplo n.º 20
0
        public Dictionary <string, string> AutoCompositeTicket(string areaCity, string orderId, string outOrderId, string pnr)
        {
            PlatSystem                  platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _TodayAccountInfo           accountInfo = GetInfo(platSystem, areaCity);
            Dictionary <string, string> resultDic   = new Dictionary <string, string>();
            string FailMessage = string.Empty;
            string result      = string.Empty;
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            DataSet             dsOrderInfo = m_PTService.PT_TodayGetOrderInfo(accountInfo._todayAccout2, outOrderId);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Contains("Response") &&
                dsOrderInfo.Tables["Response"].Rows.Count > 0 &&
                dsOrderInfo.Tables["Response"].Columns.Contains("PName") &&
                dsOrderInfo.Tables["Response"].Columns.Contains("TicketNo")
                )
            {
                string[] passengers = dsOrderInfo.Tables["Response"].Rows[0]["PName"].ToString().Split('|');
                string[] ticketNos  = dsOrderInfo.Tables["Response"].Rows[0]["TicketNo"].ToString().Split('|');
                string   ticketNo   = "";
                if (passengers.Length == ticketNos.Length)
                {
                    for (int i = 0; i < passengers.Length; i++)
                    {
                        if (passengers[i].Trim() != "" && ticketNos[i].Trim() != "")
                        {
                            ticketNo = ticketNos[i].ToString().Replace("--", "-");
                            if (ticketNo.Contains("-") && ticketNo.Split('-').Length == 2 && ticketNo.Split('-')[1].Trim() == "")
                            {
                                continue;
                            }
                            if (!resultDic.ContainsKey(passengers[i].Trim().ToUpper()))
                            {
                                resultDic.Add(passengers[i].Trim().ToUpper(), ticketNo);
                            }
                        }
                    }
                }
            }
            return(resultDic);
        }
Ejemplo n.º 21
0
        public string GetOrderStatus(string areaCity, string orderId, string outOrderId, string pnr)
        {
            string               result      = string.Empty;
            PlatSystem           platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _PiaoMengAccountInfo accountInfo = GetInfo(platSystem, areaCity);
            PTServiceSoapClient  m_PTService = new PTServiceSoapClient();
            DataSet              dsOrderInfo = m_PTService.PT_PMOrderQuery(outOrderId, accountInfo._pmAccout, accountInfo._pmAg);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Count > 0 &&
                dsOrderInfo.Tables.Contains("resp") &&
                dsOrderInfo.Tables["resp"].Columns.Contains("status") &&
                dsOrderInfo.Tables["resp"].Rows.Count > 0
                )
            {
                result = getOrderStatus(dsOrderInfo.Tables["resp"].Rows[0]["status"].ToString());
            }
            else
            {
                throw new OrderCommException("获取订单状态失败!");
            }
            return(result);
        }
Ejemplo n.º 22
0
        public void CancelOrder(string areaCity, string outOrderId, string pnr, string CancelRemark, string passengerName)
        {
            string              FailMessage = string.Empty;
            PlatSystem          platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _8000YIAccountInfo  accountInfo = GetInfo(platSystem, areaCity);
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            string              result      = m_PTService.PT_8000YICancelOrderNew(accountInfo._8000yiAccout, accountInfo._8000yiPassword, outOrderId);

            if (result.Trim().ToLower().StartsWith("true"))
            {
                //成功
            }
            else
            {
                //失败
                FailMessage = result;
            }
            if (!string.IsNullOrEmpty(FailMessage))
            {
                throw new OrderCommException(ErrToMessage(FailMessage));
            }
        }
Ejemplo n.º 23
0
        public string GetOrderStatus(string areaCity, string orderId, string outOrderId, string pnr)
        {
            PlatSystem          platSystem  = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            _517AccountInfo     accountInfo = GetInfo(platSystem, areaCity);
            string              result      = string.Empty;
            PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            DataSet             dsOrderInfo = m_PTService.PT_517GetOrderInfo(accountInfo._517Accout, accountInfo._517Password, accountInfo._517Ag, outOrderId, pnr);

            if (dsOrderInfo != null && dsOrderInfo.Tables.Count > 0 &&
                dsOrderInfo.Tables.Contains("OrderInfo") &&
                dsOrderInfo.Tables["OrderInfo"].Columns.Contains("OrderStatus") &&
                dsOrderInfo.Tables["OrderInfo"].Rows.Count > 0
                )
            {
                result = dsOrderInfo.Tables["OrderInfo"].Rows[0]["OrderStatus"].ToString();
            }
            else
            {
                throw new OrderCommException("获取订单状态失败!");
            }
            return(result);
        }
Ejemplo n.º 24
0
        public List <PlatformPolicy> GetPoliciesByPnrContent(string pnrContent, bool IsLowPrice, BPiaoBao.Common.PnrData pnrData)
        {
            PnrAnalysis.PnrModel  pnrModel   = pnrData.PnrMode;
            PlatSystem            platSystem = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == EnumPlatform._YeeXing.ToString().Replace("_", "")).FirstOrDefault();
            List <PlatformPolicy> PolicyList = new List <PlatformPolicy>();

            if (pnrModel == null || pnrModel._LegList.Count == 0 || !platSystem.State)
            {
                return(PolicyList);
            }
            string area = PnrHelper.GetArea(pnrContent);
            _YeeXingAccountInfo accountInfo = GetInfo(platSystem, area);
            //是否换编码出票 1:是
            string _IsChangePNRCP = accountInfo._IsChangePNRCP;
            string _IsLowerPrice  = IsLowPrice ? "1" : "0";

            if (pnrModel._LegList.Count > 0)
            {
                DayOfWeek dayOfWeek = System.DateTime.Now.DayOfWeek; //DateTime.Parse(pnrModel._LegList[0].FlyDate1).DayOfWeek;
                DataSet   dsPolicy  = new DataSet();
                PTMange   ptMange   = new PTMange();

                Logger.WriteLog(LogType.DEBUG, "易行获取政策开始时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");
                //PTServiceSoapClient m_PTService = new PTServiceSoapClient();
                //System.Data.DataSet dsPolicy = m_PTService.PT_YeeXingGetPolicy(_yeeXingAccout, _yeeXingAccout2, _IsLowerPrice, pnrContent);
                //BPiaoBao.DomesticTicket.Platforms._PTService.PnrData PTPnrData = Mapper.DynamicMap<BPiaoBao.Common.PnrData, BPiaoBao.DomesticTicket.Platforms._PTService.PnrData>(pnrData);
                //System.Data.DataSet dsPolicy = m_PTService.PT_NewYeeXingGetPolicy(_yeeXingAccout, _yeeXingAccout2, _IsLowerPrice, pnrContent, PTPnrData);
                dsPolicy = ptMange._YeeXingGetPolicy(accountInfo._yeeXingAccout, accountInfo._yeeXingAccout2, _IsLowerPrice, pnrContent, pnrData);
                Logger.WriteLog(LogType.DEBUG, "易行获取政策结束时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");

                //转化
                if (dsPolicy != null && dsPolicy.Tables.Count > 0)
                {
                    if (dsPolicy.Tables.Contains(this.Code) && dsPolicy.Tables.Contains("Policy") && dsPolicy.Tables[this.Code].Rows.Count > 0)
                    {
                        DataRow dr_Price = dsPolicy.Tables[this.Code].Rows[0];
                        if (dr_Price["Status"].ToString() == "T")
                        {
                            decimal SeatPrice = 0m, TaxFare = 0m, RQFare = 0m;
                            decimal.TryParse(dr_Price["SeatPrice"].ToString(), out SeatPrice);
                            decimal.TryParse(dr_Price["ABFare"].ToString(), out TaxFare);
                            decimal.TryParse(dr_Price["RQFare"].ToString(), out RQFare);
                            bool IsLow = _IsLowerPrice == "1" ? true : false;

                            string            StartTime = "00:00", EndTime = "00:00";
                            decimal           PolicyPoint = 0m, ReturnMoney = 0m;
                            DataRowCollection drs = dsPolicy.Tables[0].Rows;
                            foreach (DataRow dr in drs)
                            {
                                PlatformPolicy policy = new PlatformPolicy();
                                //outTime  出票速度
                                StartTime           = "00:00";
                                EndTime             = "00:00";
                                policy.Id           = dr["plcid"] != DBNull.Value ? dr["plcid"].ToString() : "";
                                policy.PlatformCode = this.Code;
                                policy.AreaCity     = area;
                                if (!string.IsNullOrEmpty(policy.Id))
                                {
                                    policy.IsChangePNRCP = dr["changePnr"].ToString().Trim() == "1" ? true : false;
                                    policy.IsSp          = dr["isSphigh"].ToString().Trim() == "1" ? true : false;
                                    policy.PolicyType    = dr["tickType"].ToString().Trim() == "1" ? "2" : "1";
                                    policy.PolicyType    = policy.PolicyType == "1" ? "BSP" : "B2B";
                                    policy.CarryCode     = dr["airComp"].ToString().Trim();
                                    if (dayOfWeek != DayOfWeek.Saturday && dayOfWeek != DayOfWeek.Sunday)
                                    {
                                        //周一到周五
                                        if (dr["workTime"].ToString().Split('-').Length == 2)
                                        {
                                            StartTime = dr["workTime"].ToString().Split('-')[0];
                                            EndTime   = dr["workTime"].ToString().Split('-')[1];
                                        }
                                        policy.WorkTime = new StartAndEndTime()
                                        {
                                            StartTime = StartTime, EndTime = EndTime
                                        };
                                        if (dr["workReturnTime"].ToString().Split('-').Length == 2)
                                        {
                                            StartTime = dr["workReturnTime"].ToString().Split('-')[0];
                                            EndTime   = dr["workReturnTime"].ToString().Split('-')[1];
                                        }
                                        policy.ReturnTicketTime = new StartAndEndTime()
                                        {
                                            StartTime = StartTime, EndTime = EndTime
                                        };
                                        policy.AnnulTicketTime = new StartAndEndTime()
                                        {
                                            StartTime = StartTime, EndTime = EndTime
                                        };
                                    }
                                    else
                                    {
                                        //周末
                                        if (dr["restWorkTime"].ToString().Split('-').Length == 2)
                                        {
                                            StartTime = dr["restWorkTime"].ToString().Split('-')[0];
                                            EndTime   = dr["restWorkTime"].ToString().Split('-')[1];
                                        }
                                        policy.WorkTime = new StartAndEndTime()
                                        {
                                            StartTime = StartTime, EndTime = EndTime
                                        };
                                        if (dr["restReturnTime"].ToString().Split('-').Length == 2)
                                        {
                                            StartTime = dr["restReturnTime"].ToString().Split('-')[0];
                                            EndTime   = dr["restReturnTime"].ToString().Split('-')[1];
                                        }
                                        policy.ReturnTicketTime = new StartAndEndTime()
                                        {
                                            StartTime = StartTime, EndTime = EndTime
                                        };
                                        policy.AnnulTicketTime = new StartAndEndTime()
                                        {
                                            StartTime = StartTime, EndTime = EndTime
                                        };
                                    }
                                    decimal.TryParse(dr["extReward"].ToString(), out ReturnMoney);
                                    policy.ReturnMoney = ReturnMoney;
                                    policy.CPOffice    = "";//易行适用航空公司大配置自动授权
                                    policy.Remark      = dr["memo"].ToString();
                                    decimal.TryParse(dr["disc"].ToString(), out PolicyPoint);
                                    policy.PolicyPoint = PolicyPoint;
                                    policy.IssueSpeed  = platSystem != null ? platSystem.IssueTicketSpeed : "";
                                    if (_IsChangePNRCP != "1" && policy.IsChangePNRCP)
                                    {
                                        continue;
                                    }
                                    policy.IsLow     = IsLow;
                                    policy.SeatPrice = SeatPrice;
                                    policy.ABFee     = TaxFare;
                                    policy.RQFee     = RQFare;
                                    //过滤不符合的政策点数
                                    if (PolicyPoint > 0 && PolicyPoint < 100)
                                    {
                                        PolicyList.Add(policy);
                                    }
                                }
                            }//foreach
                            //取前几条政策
                            if (platSystem != null)
                            {
                                PolicyList = PolicyList.OrderByDescending(pp => pp.PolicyPoint).Take(platSystem.GetPolicyCount).ToList();
                            }
                        }
                        else
                        {
                            //失败信息
                            string Message = dr_Price["Message"].ToString();
                        }
                    }
                }
                else
                {
                    throw new PnrAnalysisFailException(string.Format("PNR内容解析航段失败:{0}", pnrContent));
                }
            }
            return(PolicyList);
        }
Ejemplo n.º 25
0
        public List <PlatformPolicy> GetPoliciesByPnrContent(string pnrContent, bool IsLowPrice, BPiaoBao.Common.PnrData pnrData)
        {
            PnrAnalysis.PnrModel  pnrModel   = pnrData.PnrMode;
            PlatSystem            platSystem = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == EnumPlatform._517.ToString().Replace("_", "")).FirstOrDefault();
            List <PlatformPolicy> PolicyList = new List <PlatformPolicy>();

            if (pnrModel == null || pnrModel._LegList.Count == 0 || platSystem == null || !platSystem.State)
            {
                return(PolicyList);
            }
            string          area        = pnrModel._LegList[0].FromCode;
            _517AccountInfo accountInfo = GetInfo(platSystem, area);
            //是否换编码出票 1:是
            string  _IsChangePNRCP = accountInfo._IsChangePNRCP;
            string  _IsLowerPrice  = IsLowPrice ? "1" : "0";
            PTMange ptMange        = new PTMange();
            DataSet dsPolicy       = new DataSet();

            Logger.WriteLog(LogType.DEBUG, "517开始时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");
            //PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            //System.Data.DataSet dsPolicy = m_PTService.PT_517GetPolicy(_517Accout, _517Password, _517Ag, _IsLowerPrice, pnrContent);
            //BPiaoBao.DomesticTicket.Platforms._PTService.PnrData PTPnrData = Mapper.DynamicMap<BPiaoBao.Common.PnrData, BPiaoBao.DomesticTicket.Platforms._PTService.PnrData>(pnrData);
            //dsPolicy= m_PTService.PT_New517GetPolicy(_517Accout, _517Password, _517Ag, _IsLowerPrice, pnrContent, PTPnrData);
            dsPolicy = ptMange._517GetPolicy(accountInfo._517Accout, accountInfo._517Password, accountInfo._517Ag, _IsLowerPrice, pnrContent, pnrData);
            Logger.WriteLog(LogType.DEBUG, "517结束时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");
            if (dsPolicy != null && dsPolicy.Tables.Count > 0)
            {
                if (dsPolicy.Tables.Contains(this.Code) && dsPolicy.Tables.Contains("Policy") && dsPolicy.Tables[this.Code].Rows.Count > 0)
                {
                    DataRow dr_Price = dsPolicy.Tables[this.Code].Rows[0];
                    if (dr_Price["Status"].ToString() == "T")
                    {
                        decimal SeatPrice = 0m, TaxFare = 0m, RQFare = 0m;
                        decimal.TryParse(dr_Price["SeatPrice"].ToString(), out SeatPrice);
                        decimal.TryParse(dr_Price["ABFare"].ToString(), out TaxFare);
                        decimal.TryParse(dr_Price["RQFare"].ToString(), out RQFare);
                        bool IsLow = _IsLowerPrice == "1" ? true : false;
                        DataRowCollection drs = dsPolicy.Tables[0].Rows;
                        string            StartTime = "00:00", EndTime = "00:00";
                        decimal           PolicyPoint = 0m;
                        foreach (DataRow dr in drs)
                        {
                            PlatformPolicy policy = new PlatformPolicy();
                            policy.AreaCity     = area;
                            StartTime           = "00:00";
                            EndTime             = "00:00";
                            policy.PlatformCode = this.Code;
                            policy.Id           = dr["PolicyID"].ToString() + "~" + dr["PolicyChildID"].ToString();
                            if (policy.Id != "~")
                            {
                                //IsChangePNRCP         //是否换编码出票
                                //IsSp                  //是否是特殊政策
                                //CarryCode             //航空格式二字码
                                //TravelType            //1单程  2单程/往返  3往返 4联程
                                //PolicyType            //政策类型1.BSP 2.B2B
                                //FromCity              //出发城市二字码
                                //ToCity                //到达城市二字码
                                //FlightType            //航班适用类型 0.适用全部 1.适用航班 2.不适用航班
                                //ScheduleConstraints   //班期限制
                                //Space                 //舱位
                                //EffectDate            //政策开始生效期
                                //ExpirationDate         //政策结束生效期
                                //Remark                //政策备注
                                //Policy                //政策点数
                                //GYOnlineTime          //供应工作时间
                                //GYFPTime              //退废票时间
                                //Office                //Office号
                                bool IsChangePNRCP = false;
                                policy.CarryCode = dr["CarryCode"].ToString();
                                bool.TryParse(dr["IsChangePNRCP"].ToString(), out IsChangePNRCP);
                                policy.IsChangePNRCP = IsChangePNRCP;
                                policy.IsSp          = dr["IsSp"].ToString() == "1" ? true : false;
                                policy.PolicyType    = dr["PolicyType"].ToString() == "1" ? "BSP" : "B2B";
                                if (dr["GYOnlineTime"].ToString().Split('-').Length == 2)
                                {
                                    StartTime = dr["GYOnlineTime"].ToString().Split('-')[0];
                                    EndTime   = dr["GYOnlineTime"].ToString().Split('-')[1];
                                }
                                policy.WorkTime = new StartAndEndTime()
                                {
                                    StartTime = StartTime, EndTime = EndTime
                                };

                                var    now      = DateTime.Now;
                                string GYFPTime = "";
                                if (now.DayOfWeek == DayOfWeek.Sunday || now.DayOfWeek == DayOfWeek.Saturday)
                                {
                                    GYFPTime = dr["GYFPTimeNew"].ToString();
                                }
                                else
                                {
                                    GYFPTime = dr["GYFPTime"].ToString();
                                }
                                if (GYFPTime.Split('-').Length == 2)
                                {
                                    StartTime = GYFPTime.ToString().Split('-')[0];
                                    EndTime   = GYFPTime.ToString().Split('-')[1];
                                }
                                policy.ReturnTicketTime = new StartAndEndTime()
                                {
                                    StartTime = StartTime, EndTime = EndTime
                                };
                                policy.AnnulTicketTime = new StartAndEndTime()
                                {
                                    StartTime = StartTime, EndTime = EndTime
                                };
                                policy.ReturnMoney = 0m;
                                policy.CPOffice    = dr["Office"].ToString();
                                policy.Remark      = dr["Remark"].ToString().Contains("改期收回代理费") ? dr["Remark"].ToString() : dr["Remark"].ToString() + ",改期收回代理费";
                                decimal.TryParse(dr["Policy"].ToString(), out PolicyPoint);
                                policy.PolicyPoint = PolicyPoint;
                                if (_IsChangePNRCP != "1" && policy.IsChangePNRCP)
                                {
                                    continue;
                                }
                                string IssueSpeed  = dr["ChupPiaoXiaolu"] == DBNull.Value ? "" : dr["ChupPiaoXiaolu"].ToString();
                                int    _IssueSpeed = 0;
                                if (!string.IsNullOrEmpty(IssueSpeed) && int.TryParse(IssueSpeed, out _IssueSpeed))
                                {
                                    policy.IssueSpeed = _IssueSpeed <= 20 ? "极速" : _IssueSpeed + "秒";
                                }
                                else
                                {
                                    policy.IssueSpeed = platSystem != null ? platSystem.IssueTicketSpeed : "";
                                }
                                policy.IsLow     = IsLow;
                                policy.SeatPrice = SeatPrice;
                                policy.ABFee     = TaxFare;
                                policy.RQFee     = RQFare;
                                //过滤不符合的政策点数
                                if (PolicyPoint > 0 && PolicyPoint < 100)
                                {
                                    PolicyList.Add(policy);
                                }
                            }
                        }//foreach
                        //取前几条政策
                        if (platSystem != null)
                        {
                            PolicyList = PolicyList.OrderByDescending(pp => pp.PolicyPoint).Take(platSystem.GetPolicyCount).ToList();
                        }
                    }
                    else
                    {
                        //失败信息
                        string Message = dr_Price["Message"].ToString();
                    }
                }
            }
            return(PolicyList);
        }
Ejemplo n.º 26
0
        public List <PlatformPolicy> GetPoliciesByPnrContent(string pnrContent, bool IsLowPrice, BPiaoBao.Common.PnrData pnrData)
        {
            PnrAnalysis.PnrModel  pnrModel   = pnrData.PnrMode;
            PlatSystem            platSystem = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();
            List <PlatformPolicy> PolicyList = new List <PlatformPolicy>();

            if (pnrModel == null || pnrModel._LegList.Count == 0 || !platSystem.State)
            {
                return(PolicyList);
            }
            string             areaCity    = pnrModel._LegList[0].FromCode;
            _8000YIAccountInfo accountInfo = GetInfo(platSystem, areaCity);
            //是否换编码出票 1:是
            string  _IsChangePNRCP = accountInfo._IsChangePNRCP;
            string  _IsLowerPrice  = IsLowPrice ? "1" : "0";
            DataSet dsPolicy       = new DataSet();
            PTMange ptMange        = new PTMange();

            Logger.WriteLog(LogType.DEBUG, "8000YI开始时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");
            //PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            //BPiaoBao.DomesticTicket.Platforms._PTService.PnrData PTPnrData = Mapper.DynamicMap<BPiaoBao.Common.PnrData, BPiaoBao.DomesticTicket.Platforms._PTService.PnrData>(pnrData);
            //System.Data.DataSet dsPolicy = m_PTService.PT_8000YIGetPolicy(_8000yiAccout, _8000yiPassword, _IsLowerPrice, pnrContent);
            //System.Data.DataSet dsPolicy = m_PTService.PT_New8000YIGetPolicy(_8000yiAccout, _8000yiPassword, _IsLowerPrice, pnrContent, PTPnrData);
            dsPolicy = ptMange._8000YIGetPolicy(accountInfo._8000yiAccout, accountInfo._8000yiPassword, _IsLowerPrice, pnrContent, pnrData);
            Logger.WriteLog(LogType.DEBUG, "8000YI结束时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");
            if (dsPolicy != null && dsPolicy.Tables.Count > 0)
            {
                if (dsPolicy.Tables.Contains(this.Code) && dsPolicy.Tables.Contains("Policy") && dsPolicy.Tables[this.Code].Rows.Count > 0)
                {
                    DataRow dr_Price = dsPolicy.Tables[this.Code].Rows[0];
                    if (dr_Price["Status"].ToString() == "T")
                    {
                        decimal SeatPrice = 0m, TaxFare = 0m, RQFare = 0m;
                        decimal.TryParse(dr_Price["SeatPrice"].ToString(), out SeatPrice);
                        decimal.TryParse(dr_Price["ABFare"].ToString(), out TaxFare);
                        decimal.TryParse(dr_Price["RQFare"].ToString(), out RQFare);
                        bool IsLow = _IsLowerPrice == "1" ? true : false;

                        string            StartTime = "00:00", EndTime = "00:00";
                        decimal           PolicyPoint = 0m;
                        DataRowCollection drs         = dsPolicy.Tables[0].Rows;
                        foreach (DataRow dr in drs)
                        {
                            PlatformPolicy policy = new PlatformPolicy();
                            StartTime           = "00:00";
                            EndTime             = "00:00";
                            policy.Id           = dr["A1"] != DBNull.Value ? dr["A1"].ToString() : "";
                            policy.PlatformCode = this.Code;
                            policy.AreaCity     = areaCity;
                            if (!string.IsNullOrEmpty(policy.Id))
                            {
                                policy.IsChangePNRCP = dr["A17"].ToString().Contains("换编码出票") ? true : false;
                                policy.IsSp          = dr["A22"].ToString() == "1" ? true : false;
                                policy.PolicyType    = string.Compare(dr["A16"].ToString().Trim(), "BSP", true) == 0 ? "1" : "2";
                                policy.PolicyType    = policy.PolicyType == "1" ? "BSP" : "B2B";
                                policy.CarryCode     = dr["A4"].ToString();

                                if (dr["A12"].ToString().Split('|').Length == 2)
                                {
                                    StartTime = dr["A12"].ToString().Split('|')[0];
                                    EndTime   = dr["A12"].ToString().Split('|')[1];
                                }
                                policy.WorkTime = new StartAndEndTime()
                                {
                                    StartTime = StartTime, EndTime = EndTime
                                };
                                if (dr["A19"].ToString().Split('|').Length == 2)
                                {
                                    StartTime = dr["A19"].ToString().Split('|')[0];
                                    EndTime   = dr["A19"].ToString().Split('|')[1];
                                }
                                policy.ReturnTicketTime = new StartAndEndTime()
                                {
                                    StartTime = StartTime, EndTime = EndTime
                                };
                                if (dr["A20"].ToString().Split('|').Length == 2)
                                {
                                    StartTime = dr["A20"].ToString().Split('|')[0];
                                    EndTime   = dr["A20"].ToString().Split('|')[1];
                                }
                                policy.AnnulTicketTime = new StartAndEndTime()
                                {
                                    StartTime = StartTime, EndTime = EndTime
                                };
                                policy.ReturnMoney = 0m;
                                policy.CPOffice    = dr["A26"].ToString();
                                policy.Remark      = dr["A17"].ToString();
                                decimal.TryParse(dr["A8"].ToString(), out PolicyPoint);
                                policy.PolicyPoint = PolicyPoint;
                                policy.IssueSpeed  = platSystem != null ? platSystem.IssueTicketSpeed : "";
                                if (_IsChangePNRCP != "1" && policy.IsChangePNRCP)
                                {
                                    continue;
                                }
                                //dr["A30"].ToString() == "1" ? true : false;
                                policy.IsLow     = IsLow;
                                policy.SeatPrice = SeatPrice;
                                policy.ABFee     = TaxFare;
                                policy.RQFee     = RQFare;
                                //过滤不符合的政策点数
                                if (PolicyPoint > 0 && PolicyPoint < 100)
                                {
                                    PolicyList.Add(policy);
                                }
                            }
                        }//foreach
                        //取前几条政策
                        if (platSystem != null)
                        {
                            PolicyList = PolicyList.OrderByDescending(pp => pp.PolicyPoint).Take(platSystem.GetPolicyCount).ToList();
                        }
                    }
                    else
                    {
                        //失败信息
                        string Message = dr_Price["Message"].ToString();
                    }
                }
            }
            //转化
            return(PolicyList);
        }
Ejemplo n.º 27
0
        public _BaiTuoPlatform()
        {
            PlatSystem platSystem = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == EnumPlatform._BaiTuo.ToString().Replace("_", "")).FirstOrDefault();

            this.baiTuoInfo = GetInfo(platSystem, string.Empty);
        }
Ejemplo n.º 28
0
        public _517Platform()
        {
            PlatSystem platSystem = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == this.Code).FirstOrDefault();

            this._517param = GetInfo(platSystem, string.Empty);
        }
Ejemplo n.º 29
0
        public List <PlatformPolicy> GetPoliciesByPnrContent(string pnrContent, bool IsLowPrice, BPiaoBao.Common.PnrData pnrData)
        {
            PnrAnalysis.PnrModel  pnrModel   = pnrData.PnrMode;
            PlatSystem            platSystem = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == EnumPlatform._Today.ToString().Replace("_", "")).FirstOrDefault();
            List <PlatformPolicy> PolicyList = new List <PlatformPolicy>();

            if (pnrModel == null || pnrModel._LegList.Count == 0 || !platSystem.State)
            {
                return(PolicyList);
            }
            string            area          = pnrModel._LegList[0].FromCode;
            _TodayAccountInfo accountInfo   = GetInfo(platSystem, area);
            string            _IsLowerPrice = IsLowPrice ? "1" : "0";
            string            CarryCode     = pnrModel._CarryCode;

            DataSet dsPolicy = new DataSet();
            PTMange ptMange  = new PTMange();

            Logger.WriteLog(LogType.DEBUG, "今日获取政策开始时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");
            //PTServiceSoapClient m_PTService = new PTServiceSoapClient();
            //System.Data.DataSet dsPolicy = m_PTService.PT_JinRiGetPolicy(_todayAccout, _todayAccout2, _IsLowerPrice, pnrContent);
            //BPiaoBao.DomesticTicket.Platforms._PTService.PnrData PTPnrData = Mapper.DynamicMap<BPiaoBao.Common.PnrData, BPiaoBao.DomesticTicket.Platforms._PTService.PnrData>(pnrData);
            //System.Data.DataSet dsPolicy = m_PTService.PT_NewJinRiGetPolicy(_todayAccout, _todayAccout2, _IsLowerPrice, pnrContent, PTPnrData);
            dsPolicy = ptMange._JinRiGetPolicy(accountInfo._todayAccout, accountInfo._todayAccout2, _IsLowerPrice, pnrContent, pnrData);
            Logger.WriteLog(LogType.DEBUG, "今日获取政策结束时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");

            //转化
            if (dsPolicy != null && dsPolicy.Tables.Count > 0)
            {
                if (dsPolicy.Tables.Contains(this.Code) && dsPolicy.Tables.Contains("Policy") && dsPolicy.Tables[this.Code].Rows.Count > 0)
                {
                    DataRow dr_Price = dsPolicy.Tables[this.Code].Rows[0];
                    if (dr_Price["Status"].ToString() == "T")
                    {
                        decimal SeatPrice = 0m, TaxFare = 0m, RQFare = 0m;
                        decimal.TryParse(dr_Price["SeatPrice"].ToString(), out SeatPrice);
                        decimal.TryParse(dr_Price["ABFare"].ToString(), out TaxFare);
                        decimal.TryParse(dr_Price["RQFare"].ToString(), out RQFare);
                        bool IsLow = _IsLowerPrice == "1" ? true : false;

                        string            StartTime = "00:00", EndTime = "00:00";
                        decimal           PolicyPoint = 0m;
                        DataRowCollection drs         = dsPolicy.Tables[0].Rows;
                        foreach (DataRow dr in drs)
                        {
                            PlatformPolicy policy = new PlatformPolicy();
                            StartTime           = "00:00";
                            EndTime             = "00:00";
                            policy.Id           = dr["PolicyId"] != DBNull.Value ? dr["PolicyId"].ToString() : "";
                            policy.PlatformCode = this.Code;
                            policy.AreaCity     = area;
                            if (!string.IsNullOrEmpty(policy.Id))
                            {
                                policy.IsChangePNRCP = false;
                                policy.IsSp          = dr["RateType"].ToString() == "1" ? true : false;
                                policy.PolicyType    = string.Compare(dr["RateType"].ToString().Trim(), "B2P", true) == 0 ? "1" : "2";
                                policy.PolicyType    = policy.PolicyType == "1" ? "BSP" : "B2B";
                                policy.CarryCode     = CarryCode;
                                StartTime            = dr["WorkTimeBegin"].ToString();
                                EndTime         = dr["WorkTimeEnd"].ToString();
                                policy.WorkTime = new StartAndEndTime()
                                {
                                    StartTime = StartTime, EndTime = EndTime
                                };
                                StartTime = dr["RefundTimeBegin"].ToString();
                                EndTime   = dr["RefundTimeEnd"].ToString();
                                policy.ReturnTicketTime = new StartAndEndTime()
                                {
                                    StartTime = StartTime, EndTime = EndTime
                                };
                                policy.AnnulTicketTime = new StartAndEndTime()
                                {
                                    StartTime = StartTime, EndTime = EndTime
                                };
                                decimal.TryParse(dr["Discounts"].ToString(), out PolicyPoint);
                                policy.PolicyPoint = PolicyPoint;
                                policy.ReturnMoney = 0m;;
                                policy.CPOffice    = dr["OfficeNum"].ToString();
                                policy.Remark      = dr["Remark"].ToString();
                                policy.IssueSpeed  = platSystem != null ? platSystem.IssueTicketSpeed : "";
                                policy.TodayGYCode = dr["RateId"].ToString();
                                policy.IsLow       = IsLow;
                                policy.SeatPrice   = SeatPrice;
                                policy.ABFee       = TaxFare;
                                policy.RQFee       = RQFare;
                                //过滤不符合的政策点数
                                if (PolicyPoint > 0 && PolicyPoint < 100)
                                {
                                    PolicyList.Add(policy);
                                }
                            }
                        }//foreach
                        //取前几条政策
                        if (platSystem != null)
                        {
                            PolicyList = PolicyList.OrderByDescending(pp => pp.PolicyPoint).Take(platSystem.GetPolicyCount).ToList();
                        }
                    }
                    else
                    {
                        //失败信息
                        string Message = dr_Price["Message"].ToString();
                    }
                }
            }
            return(PolicyList);
        }
Ejemplo n.º 30
0
        public List <PlatformPolicy> GetPoliciesByPnrContent(string pnrContent, bool IsLowPrice, BPiaoBao.Common.PnrData pnrData)
        {
            PnrAnalysis.PnrModel  pnrModel   = pnrData.PnrMode;
            PlatSystem            platSystem = SystemConsoSwitch.PlatSystems.Where(p => p.PlatfromCode == EnumPlatform._BaiTuo.ToString().Replace("_", "")).FirstOrDefault();
            List <PlatformPolicy> PolicyList = new List <PlatformPolicy>();

            if (pnrModel == null || pnrModel._LegList.Count == 0 || !platSystem.State)
            {
                return(PolicyList);
            }
            PnrAnalysis.Model.LegInfo leg = pnrModel._LegList[0];
            //离起飞时间2小时内屏蔽获取政策接口
            DateTime t = DateTime.Parse(leg.FlyDate1 + " " + leg.FlyStartTime.Insert(2, ":") + ":00");

            t = t.AddHours(-2);
            if (DateTime.Compare(t, System.DateTime.Now) <= 0)
            {
                return(PolicyList);
            }
            string             area        = pnrModel._LegList[0].FromCode;
            _BaiTuoAccountInfo accountInfo = GetInfo(platSystem, area);
            //是否换编码出票 1:是
            string _IsChangePNRCP = accountInfo._IsChangePNRCP;
            string _IsLowerPrice  = IsLowPrice ? "1" : "0";
            string Message        = string.Empty;
            string CarryCode      = pnrModel._CarryCode;

            if (pnrModel._LegList.Count > 0)
            {
                int       Index     = 0;
                DayOfWeek dayOfWeek = System.DateTime.Now.DayOfWeek;
                switch (dayOfWeek)
                {
                case DayOfWeek.Monday:
                    Index = 0;
                    break;

                case DayOfWeek.Tuesday:
                    Index = 1;
                    break;

                case DayOfWeek.Wednesday:
                    Index = 2;
                    break;

                case DayOfWeek.Thursday:
                    Index = 3;
                    break;

                case DayOfWeek.Friday:
                    Index = 4;
                    break;

                case DayOfWeek.Saturday:
                    Index = 5;
                    break;

                case DayOfWeek.Sunday:
                    Index = 6;
                    break;

                default:
                    break;
                }
                DataSet dsPolicy = new DataSet();
                PTMange ptMange  = new PTMange();
                Logger.WriteLog(LogType.DEBUG, "百拓获取政策开始时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");
                //PTServiceSoapClient m_PTService = new PTServiceSoapClient();
                //BPiaoBao.DomesticTicket.Platforms._PTService.PnrData PTPnrData = Mapper.DynamicMap<BPiaoBao.Common.PnrData, BPiaoBao.DomesticTicket.Platforms._PTService.PnrData>(pnrData);
                //System.Data.DataSet dsPolicy = m_PTService.PT_BaiTuoGetPolicy(_baiTuoAccout, _baiTuoPassword, baiTuoAg, _IsLowerPrice, pnrContent);
                //System.Data.DataSet dsPolicy = m_PTService.PT_NewBaiTuoGetPolicy(_baiTuoAccout, _baiTuoPassword, baiTuoAg, _IsLowerPrice, pnrContent, PTPnrData);
                dsPolicy = ptMange._BaiTuoGetPolicy(accountInfo._baiTuoAccout, accountInfo._baiTuoPassword, accountInfo._baiTuoAg, _IsLowerPrice, pnrContent, pnrData);
                Logger.WriteLog(LogType.DEBUG, "百拓获取政策结束时间:" + System.DateTime.Now.ToString("yyy-MM-dd HH:mm:ss.fff") + "\r\n");
                //转化
                if (dsPolicy != null && dsPolicy.Tables.Count > 0)
                {
                    if (dsPolicy.Tables.Contains(this.Code) && dsPolicy.Tables.Contains("Policy") && dsPolicy.Tables[this.Code].Rows.Count > 0)
                    {
                        DataRow dr_Price = dsPolicy.Tables[this.Code].Rows[0];
                        if (dr_Price["Status"].ToString() == "T")
                        {
                            decimal SeatPrice = 0m, TaxFare = 0m, RQFare = 0m;
                            decimal.TryParse(dr_Price["SeatPrice"].ToString(), out SeatPrice);
                            decimal.TryParse(dr_Price["ABFare"].ToString(), out TaxFare);
                            decimal.TryParse(dr_Price["RQFare"].ToString(), out RQFare);
                            bool IsLow = _IsLowerPrice == "1" ? true : false;

                            string            StartTime = "00:00", EndTime = "00:00";
                            decimal           PolicyPoint = 0m;
                            string[]          strTimeArr  = null;
                            DataRowCollection drs         = dsPolicy.Tables[0].Rows;
                            foreach (DataRow dr in drs)
                            {
                                PlatformPolicy policy = new PlatformPolicy();
                                StartTime           = "00:00";
                                EndTime             = "00:00";
                                policy.Id           = dr["Id"] != DBNull.Value ? dr["Id"].ToString() : "";
                                policy.PlatformCode = this.Code;
                                policy.AreaCity     = area;
                                if (!string.IsNullOrEmpty(policy.Id))
                                {
                                    policy.IsChangePNRCP = dr["ChangePnr"].ToString() == "1" ? true : false;
                                    policy.IsSp          = false;
                                    policy.PolicyType    = dr["PolicyType"].ToString() == "2" ? "2" : "1";
                                    policy.PolicyType    = policy.PolicyType == "1" ? "BSP" : "B2B";
                                    policy.CarryCode     = CarryCode;
                                    if (dr["ProviderWorkTime"].ToString().Split(',').Length == 7 && Index > -1 && Index < 7)
                                    {
                                        strTimeArr = dr["ProviderWorkTime"].ToString().Split(',');
                                        if (strTimeArr[Index].Split('-').Length == 2)
                                        {
                                            StartTime = strTimeArr[Index].Split('-')[0];
                                            EndTime   = strTimeArr[Index].Split('-')[1];
                                        }
                                    }
                                    policy.WorkTime = new StartAndEndTime()
                                    {
                                        StartTime = StartTime, EndTime = EndTime
                                    };
                                    if (dr["VoidWorkTime"].ToString().Split(',').Length == 7 && Index > -1 && Index < 7)
                                    {
                                        strTimeArr = dr["VoidWorkTime"].ToString().Split(',');
                                        if (strTimeArr[Index].Split('-').Length == 2)
                                        {
                                            StartTime = strTimeArr[Index].Split('-')[0];
                                            EndTime   = strTimeArr[Index].Split('-')[1];
                                        }
                                    }
                                    policy.ReturnTicketTime = new StartAndEndTime()
                                    {
                                        StartTime = StartTime, EndTime = EndTime
                                    };
                                    policy.AnnulTicketTime = new StartAndEndTime()
                                    {
                                        StartTime = StartTime, EndTime = EndTime
                                    };
                                    policy.ReturnMoney = 0m;
                                    policy.CPOffice    = dr["Office"].ToString();
                                    policy.Remark      = dr["Remark"].ToString();
                                    decimal.TryParse(dr["Rate"].ToString(), out PolicyPoint);
                                    policy.PolicyPoint = PolicyPoint * 100;
                                    policy.IssueSpeed  = platSystem != null ? platSystem.IssueTicketSpeed : "";
                                    if (_IsChangePNRCP != "1" && policy.IsChangePNRCP)
                                    {
                                        continue;
                                    }

                                    policy.IsLow     = IsLow;
                                    policy.SeatPrice = SeatPrice;
                                    policy.ABFee     = TaxFare;
                                    policy.RQFee     = RQFare;
                                    //过滤不符合的政策点数
                                    if (PolicyPoint > 0 && PolicyPoint < 100)
                                    {
                                        PolicyList.Add(policy);
                                    }
                                }
                            }//foreach
                            //取前几条政策
                            if (platSystem != null)
                            {
                                PolicyList = PolicyList.OrderByDescending(pp => pp.PolicyPoint).Take(platSystem.GetPolicyCount).ToList();
                            }
                        }
                        else
                        {
                            //失败信息
                            Message = dr_Price["Message"].ToString();
                        }
                    }
                    else
                    {
                        if (dsPolicy.Tables.Contains("Error"))
                        {
                            //失败信息
                            Message = dsPolicy.Tables["Error"].Rows[0]["Error_Text"].ToString();
                        }
                    }
                }
            }
            else
            {
                Message = string.Format("PNR内容解析航段失败:{0}", pnrContent);
            }
            if (!string.IsNullOrEmpty(Message))
            {
                throw new PnrAnalysisFailException(Message);
            }
            return(PolicyList);
        }