Exemplo n.º 1
0
        //人员其他的费用--OK
        internal override double GetFee13()
        {
            double fee = 0;

            if (this.CunZengMoShi == ECunZengMoShi.新人新车 ||
                this.CunZengMoShi == ECunZengMoShi.新人有车)
            {
                #region 以前的算法
                DataRow[] drs = PersonGZProfile.Data.Select("kind='0'");
                foreach (DataRow dr in drs)
                {
                    String gw   = dr["gw"].ToString();
                    double qtfy = 0;
                    if (dr["QTFY"].ToString().Trim() != String.Empty)
                    {
                        qtfy = double.Parse(dr["QTFY"].ToString());
                    }
                    double t1 = qtfy;

                    if (gw == "司机")
                    {
                        fee = fee + 2 * t1;  //2个司机
                    }
                    else if (gw == "列车长")
                    {
                        fee = fee + t1;  //1个列车长
                    }
                    else if (gw == "乘务员")
                    {
                        double rs = (this.YinZuo + this.RuanZuo
                                     + this.OpenYinWo + this.RuanWo
                                     + this.AdvanceRuanWo);
                        if (this.ServerPerson == EServerPerson.一人2车)
                        {
                            rs = Math.Ceiling(rs / 2.0);
                        }
                        else if (this.ServerPerson == EServerPerson.二人3车)
                        {
                            rs = Math.Ceiling(rs * 2 / 3.0);
                        }
                        fee = fee + rs * t1;
                    }
                    else if (gw == "车检")
                    {
                        fee = fee + 2 * t1;
                        if (this.GongDianType == EGongDianType.非直供电)
                        {
                            fee = fee + 2 * t1;    //非直供电,增加2人维修发电车
                        }
                    }
                }
                #endregion

                bool hasDianChe = false;
                if (this.FaDianChe > 0)
                {
                    hasDianChe = true;
                }
                ETrainType type1 = (ETrainType)((int)this.trainType);

                int yz = this.yinZuo + this.RuanZuo;
                int yw = this.openYinWo + this.CloseYinWo + this.ShuYinChe;
                int rw = this.ruanWo + this.AdvanceRuanWo;
                fee = TrainPersonBU.GetPersonQtFee(type1, hasDianChe, yz, yw, rw);

                //计算班次
                //double banci = 1;
                double hour1 = this.GetRunHour();
                if (hour1 > 0)
                {
                    /*
                     * if (this.IsYearFlag)
                     * {
                     *  fee = fee * Math.Ceiling(hour1 * 365 / 2000) * 2;
                     * }
                     * else
                     * {
                     *  fee = Math.Ceiling(fee / 2000) * Math.Ceiling(hour1) * 2;
                     * }*/

                    //直接使用车底数
                    fee = fee * this.CheDiShu * 2;
                    if (this.IsYearFlag == false)
                    {
                        fee = fee * hour1 * 2 / 2000;
                    }

                    /*
                     * if (this.IsYearFlag)
                     * {
                     *  banci = Math.Ceiling(hour1 * 365 * 2 / 2000);
                     * }
                     * else
                     * {
                     *  banci = hour1 * 2 / 2000;
                     * }*/
                }

                //增加系数(不考虑空调车和单趟)
                double PRate = 1;
                if (this.trainType != ECommTrainType.空调车25T &&
                    this.IsYearFlag)
                {
                    if (hour1 > 12 && hour1 <= 18)
                    {
                        PRate = 1.5;
                    }

                    if (hour1 > 18)
                    {
                        PRate = 2.0;
                    }
                }
                fee = fee * PRate;

                //费率计算
                fee = fee / UnitRate;
                return(JMath.Round1(fee, this.XiaoShou));
            }
            else
            {
                fee = fee / UnitRate;
                return(JMath.Round1(fee, this.XiaoShou));
            }
        }
Exemplo n.º 2
0
        //人员其他费用
        internal override double GetFee13()
        {
            if (this.CunZengMoShi == ECunZengMoShi.新人新车 ||
                this.CunZengMoShi == ECunZengMoShi.新人有车)
            {
                double fee = 0;

                #region 以前的算法
                double sjcount = 0;     //司机数量
                double czcount = 0;     //列车长数量
                double cwcount = 0;     //乘务员数量
                double jxcount = 0;     //机械师数量

                if (this.bianzhu == EHighTrainBianZhu.单组)
                {
                    cwcount = 2;
                    czcount = 1;
                    jxcount = 1;
                    sjcount = 2;
                }
                else
                {
                    if (this.isDongWu == false)
                    {
                        cwcount = 4;
                        czcount = 2;
                        jxcount = 2;
                        sjcount = 2;
                    }
                    else
                    {
                        cwcount = 8;
                        czcount = 1;
                        jxcount = 2;
                        sjcount = 2;
                    }
                }

                DataRow[] drs = PersonGZProfile.Data.Select("kind='1'");
                foreach (DataRow dr in drs)
                {
                    String gw = dr["gw"].ToString();
                    double t1 = 0;
                    if (dr["qtfy"].ToString().Trim() != String.Empty)
                    {
                        t1 = double.Parse(dr["qtfy"].ToString());
                    }

                    if (gw == "司机")
                    {
                        fee = fee + sjcount * t1; //2个司机
                    }
                    else if (gw == "列车长")
                    {
                        fee = fee + czcount * t1; //1个列车长
                    }
                    else if (gw == "乘务员")
                    {
                        fee = fee + cwcount * t1;
                    }
                    else if (gw == "车检")
                    {
                        fee = fee + jxcount * t1;
                    }
                }
                #endregion

                ETrainType type1 = (ETrainType)((int)this.trainType);
                fee = TrainPersonBU.GetPersonQtFee(type1, false, 0, 0, 0);

                //计算班次
                double banci = 1;
                double hour1 = this.GetRunHour();
                if (hour1 > 0)
                {
                    /*
                     * if (this.IsYearFlag)
                     * {
                     *  banci = hour1 * 365 * 2 / 2000;
                     * }
                     * else
                     * {
                     *  banci = hour1 * 2 / 2000;
                     * }*/

                    /*
                     * if (this.IsYearFlag)
                     * {
                     *  fee = fee * Math.Ceiling(hour1 * 365 / 2000) * 2;
                     * }
                     * else
                     * {
                     *  fee = Math.Ceiling(fee / 2000) * Math.Ceiling(hour1) * 2;
                     * }*/

                    double cds1 = this.CheDiShu;
                    if (cds1 < 1)
                    {
                        // cds1 = 1.0;     //7月5日修改,汉宜线过大。
                    }


                    //班次的算法
                    fee = fee * cds1 * 2;
                    if (this.IsYearFlag == false)
                    {
                        fee = fee * hour1 * 2 / 2000;
                    }
                }

                fee = fee / UnitRate;
                return(JMath.Round1(fee * banci, this.XiaoShou));
            }
            else
            {
                return(0);
            }
        }
Exemplo n.º 3
0
        //Fee7:人员和工资附加费--OK
        internal override double GetFee7()
        {
            double fee = 0;

            if (this.CunZengMoShi == ECunZengMoShi.新人新车 ||
                this.CunZengMoShi == ECunZengMoShi.新人有车)
            {
                #region 以前的算法

                /*
                 * DataRow[] drs = PersonGZProfile.Data.Select("kind='0'");
                 * foreach (DataRow dr in drs)
                 * {
                 *  String gw = dr["gw"].ToString();
                 *  double fj = 0;
                 *  if (dr["FJ"].ToString().Trim() != String.Empty)
                 *  {
                 *      fj = double.Parse(dr["FJ"].ToString());
                 *  }
                 *
                 *  double gz1 = 0;
                 *  if (dr["FJ"].ToString().Trim() != String.Empty)
                 *  {
                 *      gz1 = double.Parse(dr["FJ"].ToString());
                 *  }
                 *
                 *
                 *  double t1 = gz1 * (1 + fj / 100d);
                 *
                 *  if (gw == "司机")
                 *  {
                 *      fee = fee + 2 * t1;  //2个司机
                 *  }
                 *  else if (gw == "列车长")
                 *  {
                 *      fee = fee + t1;  //1个列车长
                 *  }
                 *  else if (gw == "乘务员")
                 *  {
                 *      double rs = (this.YinZuo + this.RuanZuo +
                 *          this.OpenYinWo + this.RuanWo + this.AdvanceRuanWo);
                 *
                 *      if (this.ServerPerson == EServerPerson.一人2车)
                 *      {
                 *          rs = Math.Ceiling(rs / 2.0);
                 *      }
                 *      else if (this.ServerPerson == EServerPerson.二人3车)
                 *      {
                 *          rs = Math.Ceiling(rs * 2 / 3.0);
                 *      }
                 *
                 *      fee = fee + rs * t1;
                 *  }
                 *  else if (gw == "车检")
                 *  {
                 *      fee = fee + 2 * t1;
                 *
                 *      if (this.GongDianType == EGongDianType.非直供电)
                 *      {
                 *          fee = fee + 2*t1;    //非直供电,增加2人维修发电车
                 *      }
                 *  }
                 * }*/
                #endregion

                bool hasDianChe = false;
                if (this.FaDianChe > 0)
                {
                    hasDianChe = true;
                }

                ETrainType type1 = (ETrainType)((int)this.trainType);

                //设置不同车厢的数量
                int yz = this.yinZuo + this.RuanZuo;
                int yw = this.openYinWo + this.CloseYinWo + this.ShuYinChe;
                int rw = this.ruanWo + this.AdvanceRuanWo;

                fee = TrainPersonBU.GetPersonGzAndFjFee(type1, hasDianChe, yz, yw, rw);

                //计算班次

                //double banci = 1;
                //调整为按车底数计算
                double hour1 = this.GetRunHour();

                /*
                 * if (hour1 > 0)
                 * {
                 *  if (this.IsYearFlag)
                 *  {
                 *      fee = fee * Math.Ceiling( hour1 * 365 / 2000) * 2;
                 *  }
                 *  else
                 *  {
                 *      fee =Math.Ceiling(fee /2000) * Math.Ceiling(hour1) * 2 ;
                 *  }
                 * }*/

                fee = fee * this.CheDiShu * 2;
                if (this.IsYearFlag == false)
                {
                    fee = fee * hour1 * 2 / 2000;
                }

                //增加系数(空调车和单趟不考虑)
                double PRate = 1;
                if (this.trainType != ECommTrainType.空调车25T &&
                    this.IsYearFlag)
                {
                    if (hour1 > 12 && hour1 <= 18)
                    {
                        PRate = 1.5;
                    }

                    if (hour1 > 18)
                    {
                        PRate = 2.0;
                    }
                }
                fee = fee * PRate;


                //计算
                fee = fee / UnitRate;
                return(JMath.Round1(fee, this.XiaoShou));
            }
            else
            {
                fee = fee * UnitRate;
                return(JMath.Round1(fee, this.XiaoShou));
            }
        }