Example #1
0
        /// <summary>
        /// 获取配置
        /// </summary>
        /// <returns></returns>
        public static ParkOutDoorLedManager Get(int parkID)
        {
            SysParaSettingsBll    bll = new SysParaSettingsBll(AppSettings.CurrentSetting.ParkConnect);
            ParkOutDoorLedManager man = bll.GetSetting <ParkOutDoorLedManager>("OutdoorLed_Park" + parkID.ToString());

            return(man);
        }
Example #2
0
        public ServiceHelper()
        {
            SysParaSettingsBll ssb = new SysParaSettingsBll(AppSettings.CurrentSetting.ParkConnect);

            AccessSetting.Current         = ssb.GetOrCreateSetting <AccessSetting>();
            TariffSetting.Current         = ssb.GetOrCreateSetting <TariffSetting>();
            UserSetting.Current           = ssb.GetOrCreateSetting <UserSetting>();
            HolidaySetting.Current        = ssb.GetOrCreateSetting <HolidaySetting>();
            CarTypeSetting.Current        = ssb.GetOrCreateSetting <CarTypeSetting>();
            CustomCardTypeSetting.Current = ssb.GetSetting <CustomCardTypeSetting>();
            ParkBuffer.Current            = new ParkBuffer(AppSettings.CurrentSetting.ParkConnect);
            ParkBuffer.Current.InValid();
        }
Example #3
0
        private void InitOpenCardServices(object obj)
        {
            OpenCardMessageHandler handler = new OpenCardMessageHandler();

            GlobalSettings.Current.Set <OpenCardMessageHandler>(handler);
            GlobalSettings.Current.Set <Dictionary <int, CardEventReport> >(new Dictionary <int, CardEventReport>());
            handler.Debug       = this.chkDebug.Checked;
            handler.OnReadCard += new EventHandler <OpenCardEventArgs>(handler_OnReadCard);
            handler.OnPaying   += new EventHandler <OpenCardEventArgs>(handler_OnPaying);
            handler.OnPaidOk   += new EventHandler <OpenCardEventArgs>(handler_OnPaidOk);
            handler.OnPaidFail += new EventHandler <OpenCardEventArgs>(handler_OnPaidFail);
            handler.OnError    += new EventHandler <OpenCardEventArgs>(handler_OnError);

            SysParaSettingsBll ssb  = new SysParaSettingsBll(AppSettings.CurrentSetting.AvailableParkConnect);
            string             temp = AppSettings.CurrentSetting.GetConfigContent("EnableZST");
            bool enabled            = false;

            if (!string.IsNullOrEmpty(temp) && bool.TryParse(temp, out enabled) && enabled)
            {
                ZSTSettings zst = ssb.GetSetting <ZSTSettings>();
                if (zst != null)
                {
                    handler.InitService(zst);
                }
            }

            temp = AppSettings.CurrentSetting.GetConfigContent("EnableYiTingShanFu");
            if (!string.IsNullOrEmpty(temp) && bool.TryParse(temp, out enabled) && enabled)
            {
                YiTingShanFuSetting yt = ssb.GetSetting <YiTingShanFuSetting>();
                if (yt != null)
                {
                    AppSettings.CurrentSetting.GetYiTingConfig(yt);
                    handler.InitService(yt);
                }
            }

            temp = AppSettings.CurrentSetting.GetConfigContent("EnableYCT");
            if (!string.IsNullOrEmpty(temp) && bool.TryParse(temp, out enabled) && enabled)
            {
                YCTSetting yct = ssb.GetSetting <YCTSetting>();
                if (yct != null)
                {
                    handler.InitService(yct);
                }
            }

            temp = AppSettings.CurrentSetting.GetConfigContent("EnableETC");
            if (!string.IsNullOrEmpty(temp) && bool.TryParse(temp, out enabled) && enabled)
            {
                ETCSetting etc = ETCSetting.GetSetting();
                if (etc != null)
                {
                    handler.InitService(etc);
                }
            }

            temp = AppSettings.CurrentSetting.GetConfigContent("EnableLR280");
            if (!string.IsNullOrEmpty(temp) && bool.TryParse(temp, out enabled) && enabled)
            {
                Ralid.OpenCard.OpenCardService.LR280.LR280Setting lr280 = ssb.GetSetting <OpenCardService.LR280.LR280Setting>();
                if (lr280 != null)
                {
                    handler.InitService(lr280);
                }
            }
            this.Invoke((Action)(() => { ShowServiceState(); }));
        }
Example #4
0
        /// <summary>
        /// 同步系统设置
        /// </summary>
        private bool SyncSystemOptions()
        {
            NotifyMsg(Resources.Resource1.FrmSyncDataToStandby_SynchronizingOptions);
            NotifyProgress(8, 0);

            bool          success = true;
            CommandResult result  = null;

            SysParaSettingsBll masterssb  = new SysParaSettingsBll(AppSettings.CurrentSetting.CurrentMasterConnect);
            SysParaSettingsBll standbyssb = new SysParaSettingsBll(AppSettings.CurrentSetting.CurrentStandbyConnect);

            UserSetting us = masterssb.GetSetting <UserSetting>();

            success = us != null ? success : false;
            if (us != null)
            {
                result  = standbyssb.SaveSetting <UserSetting>(us);
                success = result.Result == ResultCode.Successful;
                NotifyProgress(null, null);
            }
            if (us != null && result.Result == ResultCode.Successful)
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_UserSetting, Resources.Resource1.Form_Success));
            }
            else
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_UserSetting, Resources.Resource1.Form_Fail), Color.Red);
            }

            HolidaySetting hs = masterssb.GetSetting <HolidaySetting>();

            success = hs != null ? success : false;
            if (hs != null)
            {
                result  = standbyssb.SaveSetting <HolidaySetting>(hs);
                success = result.Result == ResultCode.Successful;
                NotifyProgress(null, null);
            }
            if (hs != null && result.Result == ResultCode.Successful)
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_HolidaySetting, Resources.Resource1.Form_Success));
            }
            else
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_HolidaySetting, Resources.Resource1.Form_Fail), Color.Red);
            }

            AccessSetting acs = masterssb.GetSetting <AccessSetting>();

            success = acs != null ? success : false;
            if (acs != null)
            {
                result  = standbyssb.SaveSetting <AccessSetting>(acs);
                success = result.Result == ResultCode.Successful;
                NotifyProgress(null, null);
            }
            if (acs != null && result.Result == ResultCode.Successful)
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_AccessSetting, Resources.Resource1.Form_Success));
            }
            else
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_AccessSetting, Resources.Resource1.Form_Fail), Color.Red);
            }

            TariffSetting ts = masterssb.GetSetting <TariffSetting>();

            success = ts != null ? success : false;
            if (ts != null)
            {
                result  = standbyssb.SaveSetting <TariffSetting>(ts);
                success = result.Result == ResultCode.Successful;
                NotifyProgress(null, null);
            }
            if (ts != null && result.Result == ResultCode.Successful)
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_TariffSetting, Resources.Resource1.Form_Success));
            }
            else
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_TariffSetting, Resources.Resource1.Form_Fail), Color.Red);
            }

            CarTypeSetting cts = masterssb.GetSetting <CarTypeSetting>();

            success = cts != null ? success : false;
            if (cts != null)
            {
                result  = standbyssb.SaveSetting <CarTypeSetting>(cts);
                success = result.Result == ResultCode.Successful;
                NotifyProgress(null, null);
            }
            if (cts != null && result.Result == ResultCode.Successful)
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_CarTypeSetting, Resources.Resource1.Form_Success));
            }
            else
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_CarTypeSetting, Resources.Resource1.Form_Fail), Color.Red);
            }

            CustomCardTypeSetting ccts = masterssb.GetSetting <CustomCardTypeSetting>();

            success = ccts != null ? success : false;
            if (ccts != null)
            {
                result  = standbyssb.SaveSetting <CustomCardTypeSetting>(ccts);
                success = result.Result == ResultCode.Successful;
                NotifyProgress(null, null);
            }
            if (ccts != null && result.Result == ResultCode.Successful)
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_CustomCardTypeSetting, Resources.Resource1.Form_Success));
            }
            else
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_CustomCardTypeSetting, Resources.Resource1.Form_Fail), Color.Red);
            }

            BaseCardTypeSetting bcts = masterssb.GetSetting <BaseCardTypeSetting>();

            success = bcts != null ? success : false;
            if (bcts != null)
            {
                result  = standbyssb.SaveSetting <BaseCardTypeSetting>(bcts);
                success = result.Result == ResultCode.Successful;
                NotifyProgress(null, null);
            }
            if (bcts != null && result.Result == ResultCode.Successful)
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_BaseCardTypeSetting, Resources.Resource1.Form_Success));
            }
            else
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_BaseCardTypeSetting, Resources.Resource1.Form_Fail), Color.Red);
            }

            KeySetting ks = masterssb.GetSetting <KeySetting>();

            success = ks != null ? success : false;
            if (ks != null)
            {
                result  = standbyssb.SaveSetting <KeySetting>(ks);
                success = result.Result == ResultCode.Successful;
                NotifyProgress(null, null);
            }
            if (ks != null && result.Result == ResultCode.Successful)
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_KeySetting, Resources.Resource1.Form_Success));
            }
            else
            {
                NotifyInfo(string.Format("{0}{1}", Resources.Resource1.FrmSyncDataToStandby_KeySetting, Resources.Resource1.Form_Fail), Color.Red);
            }

            NotifyMsg(Resources.Resource1.FrmSyncDataToStandby_OptionsFinish);

            return(success);
        }
Example #5
0
        /// <summary>
        /// 停车收费接口
        /// </summary>
        /// <param name="cardID">卡号</param>
        /// <param name="chargeDateTime">计费时间(格式:yyyy-MM-dd HH:mm:ss.fff)</param>
        /// <param name="paid">实付金额</param>
        /// <param name="payMode">支付方式[0代表现金,1代表微信,…]</param>
        /// <param name="memo">费用说明</param>
        /// <param name="reserve1">预留1</param>
        /// <param name="reserve2">预留2</param>
        /// <returns>Result 0:成功,其他:失败</returns>
        public CommandResult CardFeePay(string cardID, string chargeDateTime, string paid, string payMode, string memo, string reserve1, string reserve2)
        {
            try
            {
                #region 先验证输入参数
                if (string.IsNullOrEmpty(cardID.Trim()))
                {
                    return(new CommandResult(ResultCode.ParameterError, "参数卡号错误"));
                }
                DateTime chargeTime = new DateTime(2011, 1, 1);
                if (!DateTime.TryParse(chargeDateTime, out chargeTime))
                {
                    return(new CommandResult(ResultCode.ParameterError, "参数计费时间错误"));
                }
                if (chargeTime > DateTime.Now)
                {
                    return(new CommandResult(ResultCode.ParameterError, "计费时间大于系统当前时间"));
                }
                decimal paidD = 0;
                if (!decimal.TryParse(paid, out paidD))
                {
                    return(new CommandResult(ResultCode.ParameterError, "参数实付金额错误"));
                }
                int payModeI = 0;
                if (!int.TryParse(payMode, out payModeI))
                {
                    return(new CommandResult(ResultCode.ParameterError, "参数支付方式错误"));
                }
                #endregion

                #region 接口日志记录
                if (AppConifg.Current.Log)
                {
                    try
                    {
                        string log = string.Format("卡号:{0} 计费时间:{1} 实付金额:{2} 支付方式:{3} 费用说明:{4} 预留1:{5} 预留2:{6}"
                                                   , cardID
                                                   , chargeDateTime
                                                   , paid
                                                   , payMode
                                                   , memo
                                                   , reserve1
                                                   , reserve2);
                        Ralid.GeneralLibrary.LOG.FileLog.Log(AppConifg.Current.LogPath, "CardFeePay", log);
                    }
                    catch (Exception ex)
                    {
                        Ralid.GeneralLibrary.ExceptionHandling.ExceptionPolicy.HandleException(ex);
                    }
                }
                #endregion

                #region 验证卡片信息
                //查找该卡号的卡片
                CardBll cardBll = new CardBll(AppConifg.Current.ParkingConnection);
                QueryResult <CardInfo> cResult = cardBll.GetCardByID(cardID);
                if (cResult.Result != ResultCode.Successful)
                {
                    return(new CommandResult(cResult.Result, "获取卡片信息失败"));
                }
                CardInfo card = cResult.QueryObject;
                if (card == null)
                {
                    return(new CommandResult(ResultCode.NoRecord, "此卡未登记"));
                }
                if (!card.IsInPark)
                {
                    return(new CommandResult(ResultCode.Fail, "此卡已出场"));
                }
                string msg = string.Empty;
                if (!ValidateCard(card, out msg))
                {
                    return(new CommandResult(ResultCode.Fail, msg));
                }
                if (card.LastDateTime > chargeTime)
                {
                    return(new CommandResult(ResultCode.ParameterError, "入场时间晚于计费时间"));
                }
                //获取卡片所在停车场信息
                EntranceBll  entranceBll = new EntranceBll(AppConifg.Current.ParkingConnection);
                EntranceInfo entrance    = entranceBll.GetEntranceInfo(card.LastEntrance).QueryObject;
                if (entrance == null)
                {
                    return(new CommandResult(ResultCode.NoRecord, "没有找到入场通道信息"));
                }
                ParkBll  parkBll = new ParkBll(AppConifg.Current.ParkingConnection);
                ParkInfo park    = parkBll.GetParkInfoByID(entrance.ParkID).QueryObject;
                if (park == null)
                {
                    return(new CommandResult(ResultCode.NoRecord, "没有找到停车场信息"));
                }
                //判断卡片合法性
                if (card.IsCardList && park.IsWriteCardMode && !card.OnlineHandleWhenOfflineMode)
                {
                    //写卡模式时,脱机处理的卡片名单不能缴费
                    return(new CommandResult(ResultCode.Fail, "该卡片为写卡处理卡片,不能进行在线收费"));
                }
                #endregion

                #region 获取费率和节假日
                SysParaSettingsBll ssb    = new SysParaSettingsBll(AppConifg.Current.ParkingConnection);
                TariffSetting      tariff = ssb.GetSetting <TariffSetting>();
                if (tariff == null)
                {
                    return(new CommandResult(ResultCode.Fail, "获取费率失败"));
                }
                TariffSetting.Current = tariff;
                HolidaySetting holiday = ssb.GetSetting <HolidaySetting>();
                if (holiday == null)
                {
                    return(new CommandResult(ResultCode.Fail, "获取节假日失败"));
                }
                HolidaySetting.Current = holiday;
                #endregion

                #region 判断是否已缴过费
                if (card.IsCompletedPaid && tariff.IsInFreeTime(card.PaidDateTime.Value, chargeTime))
                {
                    //已缴费,并且未过免费时间,不允许缴费
                    msg = string.Format("已缴费,请在{0}分钟内离场!", tariff.FreeTimeRemaining(card.PaidDateTime.Value, chargeTime));
                    return(new CommandResult(ResultCode.Fail, msg));
                }
                #endregion

                //生成卡片缴费记录
                CardPaymentInfo chargeRecord = CardPaymentInfoFactory.CreateCardPaymentRecord(park.ParkID, card, tariff, card.CarType, chargeTime);
                //将收费信息重新赋值
                chargeRecord.Paid     = paidD;
                chargeRecord.Discount = chargeRecord.Accounts - paidD;
                if (chargeRecord.Discount < 0)
                {
                    chargeRecord.Discount = 0;
                }
                chargeRecord.PaymentCode    = PaymentCode.Internet;
                chargeRecord.PaymentMode    = payModeI == 1 ? PaymentMode.WeChat : PaymentMode.Cash;
                chargeRecord.IsCenterCharge = true;
                chargeRecord.StationID      = string.Empty;
                chargeRecord.OperatorID     = string.Empty;
                if (!string.IsNullOrEmpty(memo))
                {
                    chargeRecord.Memo = memo;
                }
                if (chargeRecord.Memo == null)
                {
                    chargeRecord.Memo = string.Empty;
                }

                CommandResult result = cardBll.PayParkFee(chargeRecord);
                if (result.Result == ResultCode.Successful)
                {
                    //缴费成功,返回缴费后离场提示信息
                    msg = string.Format("缴费成功,请在{0}分钟内离场!", tariff.FreeTimeRemaining(chargeTime, DateTime.Now));
                }

                return(result);
            }
            catch (Exception ex)
            {
                Ralid.GeneralLibrary.ExceptionHandling.ExceptionPolicy.HandleException(ex);
                string msg = string.Format("接口发生异常,异常信息:{0}", ex.Message);
                return(new CommandResult(ResultCode.InterfaceException, msg));
            }
        }
Example #6
0
        /// <summary>
        /// 获取某卡号的停车收费信息接口
        /// </summary>
        /// <param name="cardID">卡号</param>
        /// <param name="discountHour">优惠时长</param>
        /// <param name="discountAmount">优惠金额</param>
        /// <param name="reserve1">预留1</param>
        /// <param name="reserve2">预留2</param>
        /// <returns>Result 0:成功,其他:失败;QueryObject:返回收费信息对象</returns>
        public QueryResult <WSCardPaymentInfo> GetCardPayment(string cardID, string discountHour, string discountAmount, string reserve1, string reserve2)
        {
            try
            {
                #region 先验证输入参数
                if (string.IsNullOrEmpty(cardID.Trim()))
                {
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.ParameterError, "参数卡号错误", null));
                }
                int discountHourInt = 0;
                if (!string.IsNullOrEmpty(discountHour.Trim()))
                {
                    if (!int.TryParse(discountHour, out discountHourInt))
                    {
                        return(new QueryResult <WSCardPaymentInfo>(ResultCode.ParameterError, "参数优惠时长错误", null));
                    }
                }
                decimal discountAmountD = 0;
                if (!string.IsNullOrEmpty(discountAmount.Trim()))
                {
                    if (!decimal.TryParse(discountAmount, out discountAmountD))
                    {
                        return(new QueryResult <WSCardPaymentInfo>(ResultCode.ParameterError, "参数优惠金额错误", null));
                    }
                }
                #endregion

                #region 接口日志记录
                if (AppConifg.Current.Log)
                {
                    try
                    {
                        string log = string.Format("卡号:{0} 优惠时长:{1} 优惠金额:{2} 预留1:{3} 预留2:{4}"
                                                   , cardID
                                                   , discountHour
                                                   , discountAmount
                                                   , reserve1
                                                   , reserve2);
                        Ralid.GeneralLibrary.LOG.FileLog.Log(AppConifg.Current.LogPath, "GetCardPayment", log);
                    }
                    catch (Exception ex)
                    {
                        Ralid.GeneralLibrary.ExceptionHandling.ExceptionPolicy.HandleException(ex);
                    }
                }
                #endregion

                #region 验证卡片信息
                //查找该卡号的卡片
                CardBll cardBll = new CardBll(AppConifg.Current.ParkingConnection);
                QueryResult <CardInfo> cResult = cardBll.GetCardByID(cardID);
                if (cResult.Result != ResultCode.Successful)
                {
                    return(new QueryResult <WSCardPaymentInfo>(cResult.Result, "获取卡片信息失败", null));
                }
                CardInfo card = cResult.QueryObject;
                if (card == null)
                {
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.NoRecord, "此卡未登记", null));
                }
                if (!card.IsInPark)
                {
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.Fail, "此卡已出场", null));
                }
                string msg = string.Empty;
                if (!ValidateCard(card, out msg))
                {
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.Fail, msg, null));
                }
                DateTime chargeDateTime = DateTime.Now;
                if (card.LastDateTime > chargeDateTime)
                {
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.Fail, "入场时间晚于计费时间", null));
                }

                //获取卡片所在停车场信息
                EntranceBll  entranceBll = new EntranceBll(AppConifg.Current.ParkingConnection);
                EntranceInfo entrance    = entranceBll.GetEntranceInfo(card.LastEntrance).QueryObject;
                if (entrance == null)
                {
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.NoRecord, "没有找到入场通道信息", null));
                }
                ParkBll  parkBll = new ParkBll(AppConifg.Current.ParkingConnection);
                ParkInfo park    = parkBll.GetParkInfoByID(entrance.ParkID).QueryObject;
                if (park == null)
                {
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.NoRecord, "没有找到停车场信息", null));
                }
                //判断卡片合法性
                if (card.IsCardList && park.IsWriteCardMode && !card.OnlineHandleWhenOfflineMode)
                {
                    //写卡模式时,脱机处理的卡片名单不能缴费
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.Fail, "该卡片为写卡处理卡片,不能进行在线缴费", null));
                }
                #endregion

                #region 获取费率和节假日
                SysParaSettingsBll ssb    = new SysParaSettingsBll(AppConifg.Current.ParkingConnection);
                TariffSetting      tariff = ssb.GetSetting <TariffSetting>();
                if (tariff == null)
                {
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.Fail, "获取费率失败", null));
                }
                TariffSetting.Current = tariff;
                HolidaySetting holiday = ssb.GetSetting <HolidaySetting>();
                if (holiday == null)
                {
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.Fail, "获取节假日失败", null));
                }
                HolidaySetting.Current = holiday;
                #endregion

                #region 判断是否已缴过费
                if (card.IsCompletedPaid && tariff.IsInFreeTime(card.PaidDateTime.Value, chargeDateTime))
                {
                    //已缴费,并且未过免费时间,不允许缴费
                    msg = string.Format("已缴费,请在{0}分钟内离场!", tariff.FreeTimeRemaining(card.PaidDateTime.Value, chargeDateTime));
                    return(new QueryResult <WSCardPaymentInfo>(ResultCode.Fail, msg, null));
                }
                #endregion

                //重设卡片优惠时长
                card.DiscountHour += discountHourInt;
                if (card.DiscountHour > 0xFF)
                {
                    card.DiscountHour = 0xFF;
                }

                //生成卡片缴费记录
                CardPaymentInfo chargeRecord = CardPaymentInfoFactory.CreateCardPaymentRecord(park.ParkID, card, tariff, card.CarType, chargeDateTime);
                //计算优惠后的缴费费用
                chargeRecord.Discount += discountAmountD;
                if (chargeRecord.Discount > chargeRecord.Accounts)
                {
                    //如果优惠金额比应收费用多,优惠金额为应收费用,这是为了防止实际支付费用为负数的情况出现
                    chargeRecord.Discount = chargeRecord.Accounts;
                }

                WSCardPaymentInfo wsRecord = new WSCardPaymentInfo();
                wsRecord.SetWSCardPaymentInfo(chargeRecord);
                wsRecord.EntranceName = entrance.EntranceName;

                return(new QueryResult <WSCardPaymentInfo>(ResultCode.Successful, wsRecord));
            }
            catch (Exception ex)
            {
                Ralid.GeneralLibrary.ExceptionHandling.ExceptionPolicy.HandleException(ex);
                string msg = string.Format("接口发生异常,异常信息:{0}", ex.Message);
                return(new QueryResult <WSCardPaymentInfo>(ResultCode.InterfaceException, msg, null));
            }
        }