/// <summary>
        /// 预测
        /// </summary>
        /// <param name="para"></param>
        /// <returns></returns>
        public CustomResult ForecastData(QueryParameters para)
        {
            CustomResult pReturnValue = new CustomResult();
            //浮动范围
            double pFloating = 1 + para.FloatingRange * 0.01;
            List<RP_AADTSta> pForeList = new List<RP_AADTSta>();
            //预测数据集合
            List<IReportViewModel> pInList = new List<IReportViewModel>();
            try
            {
                using (DataSubmittedEntities db = new DataSubmittedEntities())
                {
                    //判断报表浮动百分比配置是否存在
                    OT_HDayConfig pds = HolidayConfig.GetInstance().GetById(para.ReportType);
                    if (pds == null)
                    {
                        pReturnValue.ResultKey = (byte)EResult.Fail;
                        pReturnValue.ResultValue = TipInfo.ForecastFaileNoConfig;
                        return pReturnValue;
                    }
                    //判断报表预测浮动百分比配置是否正确
                    if (Math.Abs(para.FloatingRange) > (double)pds.ForeFloat.Value)
                    {
                        pReturnValue.ResultKey = (byte)EResult.Fail;
                        pReturnValue.ResultValue = TipInfo.ErrorInfo + "范围应在负" + pds.ForeFloat.Value + "%-正" + pds.ForeFloat.Value + "%之间";
                        return pReturnValue;
                    }
                    //获取参考日期符合的数据
                    List<RP_AADTSta> pRefInfoList = db.RP_AADTSta.Where(s => s.CalculTime == para.StartTime).ToList();
                    //如果参考日期数据为0 则返回失败
                    if (pRefInfoList.Count == 0)
                    {
                        pReturnValue.ResultKey = (byte)EResult.Fail;
                        pReturnValue.ResultValue = TipInfo.ForecastFaileFaileRefNoData;
                        return pReturnValue;
                    }

                    //预测数据
                    HDayTraInfoViewModel pInfo = new HDayTraInfoViewModel();
                    //预测数据集合
                    List<IReportViewModel> plist = new List<IReportViewModel>();
                    //参考数据
                    RP_AADTSta pRefInfo = pRefInfoList.First();

                    //出京总交通量(路线)
                    pInfo.LineExSum = Math.Round(pRefInfo.LineExSum.Value * pFloating);
                    //进京总交通量(路线)
                    pInfo.LineEnSum = Math.Round(pRefInfo.LineEnSum.Value * pFloating);
                    //总交通量(路线)
                    pInfo.LineSum = pInfo.LineExSum + pInfo.LineEnSum;
                    //免、收费总金额
                    pInfo.FeeSum = Math.Round(pRefInfo.FeeSum.Value * (decimal)pFloating, 2);
                    //出京小型客车免费通行交通量
                    pInfo.ExSmaCarFee = Math.Round(pRefInfo.ExSmaCarFee.Value * pFloating);
                    //进京小型客车免费通行交通量
                    pInfo.EnSmaCarFee = Math.Round(pRefInfo.EnSmaCarFee.Value * pFloating);
                    //小型客车免费通行交通量(合计)
                    pInfo.SmaCarFeeNum = pRefInfo.ExSmaCarFee.Value + pRefInfo.EnSmaCarFee.Value;
                    //小型客车免费金额
                    pInfo.SmaCarFee = Math.Round(pRefInfo.SmaCarFee.Value * (decimal)pFloating, 2);
                    //收费车辆(合计)
                    pInfo.ChagSumNum = Math.Round(pRefInfo.ChagSumNum.Value * pFloating);
                    //出京收费车辆
                    pInfo.ExChagNum = Math.Round(pRefInfo.ExChagNum.Value * pFloating);
                    //进京收费车辆
                    pInfo.EnChagNum = Math.Round(pRefInfo.EnChagNum.Value * pFloating);
                    //收费额度
                    pInfo.ChagAmount = Math.Round(pRefInfo.ChagAmount.Value * (decimal)pFloating, 2);
                    //绿色通道车辆数
                    pInfo.GreNum = Math.Round(pRefInfo.GreNum.Value * pFloating);
                    //绿色通道免收费金额
                    pInfo.GreFee = Math.Round(pRefInfo.GreFee.Value * (decimal)pFloating, 2);
                    //出京总交通量(站)
                    pInfo.StaExSum = Math.Round(pRefInfo.StaExSum.Value * pFloating);
                    //进京总交通量(站)
                    pInfo.StaEnSum = Math.Round(pRefInfo.StaEnSum.Value * pFloating);
                    plist.Add(pInfo);
                    string path = Export(para, plist);
                    pReturnValue.ResultKey = (byte)EResult.Succeed;
                    pReturnValue.ResultValue = path;
                }

            }
            catch (Exception e)
            {
                pReturnValue.ResultKey = (byte)EResult.Fail;
                pReturnValue.ResultValue = TipInfo.ForecastFail + e.Message.ToString();
                SystemLog.GetInstance().Error(TipInfo.ForecastFail, e);
                return pReturnValue;
            }
            return pReturnValue;
        }
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="para"></param>
        /// <returns></returns>
        public IReportViewModel GetListByPra(QueryParameters para)
        {
            using (DataSubmittedEntities db = new DataSubmittedEntities())
            {
                if (db.RP_AADTSta.Count(s => s.CalculTime == para.StartTime.Value) <= 0)
                {
                    InsertNull(para.StartTime.Value);
                }

                QueryHDayTraInfoViewModel pReturnData = new QueryHDayTraInfoViewModel();
                List<HDayTraInfoViewModel> pAADTStaList = db.RP_AADTSta.Where(s => s.CalculTime == para.StartTime.Value).ToList().Select(s => new HDayTraInfoViewModel()
                {
                    Num = 14,
                    LineSum = s.LineSum,
                    LineExSum = s.LineExSum,
                    LineEnSum = s.LineEnSum,
                    FeeSum = s.FeeSum,
                    SmaCarFeeNum = s.SmaCarFeeNum,
                    ExSmaCarFee = s.ExSmaCarFee,
                    EnSmaCarFee = s.EnSmaCarFee,
                    SmaCarFee = s.SmaCarFee,
                    ChagSumNum = s.ChagSumNum,
                    ExChagNum = s.ExChagNum,
                    EnChagNum = s.EnChagNum,
                    ChagAmount = s.ChagAmount,
                    TollStaName = SystemConst.TollStaName,
                    GreNum = s.GreNum,
                    GreFee = s.GreFee,
                    StaExSum = s.StaExSum,
                    StaEnSum = s.StaEnSum,
                    StaSum = s.StaEnSum + s.StaExSum,
                    WorkPeoNum = s.WorkPeoNum,
                    InfoNum = s.InfoNum,
                    SitState = s.SitState,
                    RoadName = SystemConst.RoadName2
                }).ToList();
                //添加合计
                List<HDayTraInfoViewModel> pAADTStaListSum = db.RP_AADTSta.Where(s => s.CalculTime == para.StartTime.Value).ToList().Select(s => new HDayTraInfoViewModel()
                {
                    LineSum = s.LineSum,
                    LineExSum = s.LineExSum,
                    LineEnSum = s.LineEnSum,
                    FeeSum = s.FeeSum,
                    SmaCarFeeNum = s.SmaCarFeeNum,
                    ExSmaCarFee = s.ExSmaCarFee,
                    EnSmaCarFee = s.EnSmaCarFee,
                    SmaCarFee = s.SmaCarFee,
                    ChagSumNum = s.ChagSumNum,
                    ExChagNum = s.ExChagNum,
                    EnChagNum = s.EnChagNum,
                    ChagAmount = s.ChagAmount,
                    GreNum = s.GreNum,
                    GreFee = s.GreFee,
                    StaExSum = s.StaExSum,
                    StaEnSum = s.StaEnSum,
                    StaSum = s.StaEnSum + s.StaExSum,
                    RoadName = SystemConst.ReportCount
                }).ToList();
                pAADTStaList.AddRange(pAADTStaListSum);
                if (pAADTStaList.Count == 0)//如果没有数据,进行添加
                {
                    for (int i = 0; i < 2; i++)
                    {
                        HDayTraInfoViewModel info = new HDayTraInfoViewModel();
                        info.RoadName = SystemConst.ReportCount;
                        if (i == 0)
                        {
                            info.RoadName = SystemConst.RoadName2;
                            info.TollStaName = SystemConst.TollStaName;
                            info.Num = 14;
                        }
                        pAADTStaList.Add(info);
                    }
                }
                else if (pAADTStaList.Count > 2)//如果大于两条,则进行删除
                {
                    pAADTStaList.RemoveRange(2, pAADTStaList.Count - 2);
                }
                //判断当前统计站类型,数据是否完整
                if (GetNoDataList(para).Count() > 0)
                    pReturnData.IsFull = 0;//不完整
                else
                    pReturnData.IsFull = 1;//完整 
                pReturnData.ReportData = pAADTStaList.OrderByDescending(s => s.Num).ToList();
                return pReturnData;
            }
        }