예제 #1
0
        protected EJiaKuai jiakuaiType;                       //加快类型


        public TrainShouRu1(
            int yunXinLiCheng,
            bool kongTiaoFlag,
            EJiaKuai jiakuaiType)
        {
            this.yunXinLiCheng = yunXinLiCheng;
            this.kongTiaoFlag  = kongTiaoFlag;
            this.jiakuaiType   = jiakuaiType;

            //设置区段里程和基本的客票价
            this.quDuanLiCheng = GetQuDuanLiCheng(this.yunXinLiCheng);
            this.baseFarePrice = GetKePiaoFee(this.quDuanLiCheng);
            this.baoxianFee    = Math.Round(this.baseFarePrice * TrainProfile.BaoXianFee, 1);
        }
예제 #2
0
        public TrainShouRu1(
            int yunXinLiCheng,
            bool kongTiaoFlag,
            EJiaKuai jiakuaiType)
        {
            this.yunXinLiCheng = yunXinLiCheng;
            this.kongTiaoFlag  = kongTiaoFlag;
            this.jiakuaiType   = jiakuaiType;

            //设置区段里程和基本的客票价
            this.quDuanLiCheng = GetQuDuanLiCheng(this.yunXinLiCheng);
            this.baseFarePrice = GetKePiaoFee(this.quDuanLiCheng);
            this.baoxianFee    = Math.Round(this.baseFarePrice * TrainProfile.BaoXianFee, 1);

            //得到新的票价计算方法
            this.ticket1 = new TicketPrice();
            if (this.GetType() == typeof(BusinessRule.TrainShouRu1))
            {
                this.hasdata = ticket1.GetPriceInfo(this.yunXinLiCheng, 1);
            }
            else if (this.GetType() == typeof(BusinessRule.TrainShouRu2))
            {
                this.hasdata = ticket1.GetPriceInfo(this.yunXinLiCheng, 2);
            }

            //设置票价的基本参数
            if (this.hasdata)
            {
                if (this.kongTiaoFlag)
                {
                    // this.KtFee = ticket1.KDPrice;
                }
                this.KtFee = ticket1.KDPrice;

                if (this.jiakuaiType == EJiaKuai.加快)
                {
                    this.JkFee = ticket1.PTJKPrice;
                }
                else if (this.jiakuaiType == EJiaKuai.特快)
                {
                    this.JkFee = ticket1.KSJKPrice;
                }
            }
        }
예제 #3
0
        private const double ShangFuRate = 0.5;      //上浮系数

        public TrainShouRu2(int yunXinLiChenge, EJiaKuai jiakuai)
            : base(yunXinLiChenge, true, jiakuai)
        {
            ;
        }