Exemple #1
0
        /// <summary>
        /// 团款收入
        /// </summary>
        /// <param name="tourId">团队编号</param>
        private void TourOrderInit(string tourId)
        {
            MOrderSum          sumModel = new MOrderSum();
            IList <MTourOrder> sl       = new BTourOrder().GetTourOrderListById(ref sumModel, tourId);

            if (sl != null && sl.Count > 0)
            {
                rpt_tourMoneyIn.DataSource = sl;
                rpt_tourMoneyIn.DataBind();
                //合同金额
                lbl_sumPrice.Text = UtilsCommons.GetMoneyString(TourIncome.Value = sumModel.ConfirmMoney.ToString(), ProviderToMoney);
                //团队收入
                lbl_tourMoneyIn.Text = (sumModel.ConfirmSettlementMoney).ToString();
                //结算金额
                lbl_confirmSettlementMoney.Text = UtilsCommons.GetMoneyString(TourSettlement.Value = (confirmSettlementMoney = sumModel.ConfirmSettlementMoney).ToString(), ProviderToMoney);
                //导游实收
                lbl_guideRealIncome.Text = UtilsCommons.GetMoneyString(sumModel.GuideRealIncome, ProviderToMoney);
                //财务实收
                lbl_checkMoney.Text = UtilsCommons.GetMoneyString(sumModel.ConfirmMoney - sumModel.GuideRealIncome, ProviderToMoney);
                //订单利润
                lbl_profit.Text = UtilsCommons.GetMoneyString(sumModel.Profit, ProviderToMoney);
                //已收金额
                ltrYiShouJinEHeJi.Text = UtilsCommons.GetMoneyString(sumModel.CheckMoney, ProviderToMoney);
                //待审金额
                ltrDaiShenJinE.Text = UtilsCommons.GetMoneyString(sumModel.DengJiJinE - sumModel.CheckMoney, ProviderToMoney);
                //未收金额
                ltrWeiShouJinE.Text = UtilsCommons.GetMoneyString(sumModel.ConfirmMoney - sumModel.CheckMoney, ProviderToMoney);
            }
            pan_tourMoneyInMsg.Visible = !(pan_tourMoneyInSum.Visible = sl != null && sl.Count > 0);//
        }
Exemple #2
0
        /// <summary>
        ///  根据团队编号获取计划下的有效订单 OrderStatus.已成交
        /// </summary>
        /// <param name="orderSum"></param>
        /// <param name="tourId"></param>
        /// <returns></returns>
        public IList <MTourOrder> GetTourOrderListById(ref MOrderSum orderSum, string tourId)
        {
            if (string.IsNullOrEmpty(tourId))
            {
                throw new System.Exception("bll error:查询id为null或string.IsNullOrEmpty(id)==true。");
            }
            IList <MTourOrder> list = this.GetTourOrderListById(tourId, ref orderSum).Where(c => c.OrderStatus == OrderStatus.已成交).ToList();

            if (list != null && list.Count != 0)
            {
                orderSum = new MOrderSum();
                foreach (var order in list)
                {
                    orderSum.Adults                 += order.Adults;
                    orderSum.Childs                 += order.Childs;
                    orderSum.Others                 += order.Others;
                    orderSum.SalerIncome            += order.SalerIncome;
                    orderSum.GuideIncome            += order.GuideIncome;
                    orderSum.GuideRealIncome        += order.GuideRealIncome;
                    orderSum.SumPrice               += order.SumPrice;
                    orderSum.ConfirmMoney           += order.ConfirmMoney;
                    orderSum.ConfirmSettlementMoney += order.ConfirmSettlementMoney;
                    orderSum.CheckMoney             += order.CheckMoney;
                    orderSum.Profit                 += order.Profit;
                    orderSum.DengJiJinE             += order.ReceivedMoney;
                }
            }


            return(list);
        }
Exemple #3
0
        /// <summary>
        /// 根据团队编号获取订单列表(散拼订单查看多个订单、组团查询单个组团订单)
        /// </summary>
        /// <param name="tourId">团队编号</param>
        ///<param name="orderSum">订单统计实体</param>
        /// <returns></returns>
        public IList <MTourOrder> GetTourOrderListById(string tourId, ref MOrderSum orderSum)
        {
            if (string.IsNullOrEmpty(tourId))
            {
                return(null);
            }

            var items = dal.GetTourOrderListById(tourId, ref orderSum);

            if (items != null && items.Count > 0)
            {
                var bllDengJi   = new EyouSoft.BLL.ComStructure.BComLev();
                var bllBiaoZhun = new EyouSoft.BLL.ComStructure.BComStand();

                foreach (var item in items)
                {
                    if (item.LevId > 0)
                    {
                        item.KeHuLevName = bllDengJi.GetName(item.LevId, item.CompanyId);
                    }
                    if (item.PriceStandId > 0)
                    {
                        item.BaoJiaBiaoZhunName = bllBiaoZhun.GetName(item.PriceStandId, item.CompanyId);
                    }
                }
            }

            return(items);
        }
Exemple #4
0
        /// <summary>
        /// to xls
        /// </summary>
        void ToXls()
        {
            int toXlsRecordCount = UtilsCommons.GetToXlsRecordCount();

            if (toXlsRecordCount < 1)
            {
                ResponseToXls(string.Empty);
            }

            MOrderSum orderSum = new MOrderSum();
            IList <EyouSoft.Model.TourStructure.MTourOrder> items = null;

            if (!string.IsNullOrEmpty(Utils.GetQueryStringValue("plan")))//计调订单查询的订单为已成交订单
            {
                items = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref orderSum, TourId);
            }
            else
            {
                items = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(TourId, ref orderSum);
            }

            if (items == null || items.Count == 0)
            {
                ResponseToXls(string.Empty);
            }


            StringBuilder s = new StringBuilder();

            s.Append("订单号\t下单人\t销售员\t客源单位\t人数\t合计金额\t状态\t下单时间\t订单备注\n");

            foreach (var item in items)
            {
                s.Append(item.OrderCode + "\t");
                s.Append(item.Operator + "\t");
                s.Append(item.SellerName + "\t");
                s.Append(item.BuyCompanyName + "\t");
                s.Append(item.Adults + "+" + item.Childs + "\t");
                s.Append(item.ConfirmMoney.ToString("F2") + "\t");
                s.Append(item.OrderStatus + "\t");
                s.Append(item.IssueTime.Value.ToString("yyyy-MM-dd HH:mm") + "\t");
                s.Append(item.OrderRemark.Replace("\t", "    ").Replace("\r\n", "    ") + "\n");
            }

            ResponseToXls(s.ToString());
        }
Exemple #5
0
        /// <summary>
        /// init rpt
        /// </summary>
        void InitRpt()
        {
            MOrderSum orderSum = new MOrderSum();
            IList <EyouSoft.Model.TourStructure.MTourOrder> list = null;

            var model = new EyouSoft.BLL.TourStructure.BTour().GetTourInfo(Convert.ToString(TourId));

            if (model != null)
            {
                tourtype = model.TourType == TourType.组团散拼短线 ? "短线" : "";
            }

            if (!string.IsNullOrEmpty(Utils.GetQueryStringValue("plan")))//计调订单查询的订单为已成交订单
            {
                list = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref orderSum, TourId);
            }
            else
            {
                list = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(TourId, ref orderSum);
            }

            if (list != null && list.Count > 0)
            {
                RecordCount             = list.Count;
                this.rptList.DataSource = list;
                this.rptList.DataBind();
                this.litMsg.Visible = false;
            }
            else
            {
                this.litMsg.Visible = true;
                if (tourtype == "短线")
                {
                    this.litMsg.Text = "<tr><td align='center' colspan='11'>没有订单!</td></tr>";
                }
                else
                {
                    this.litMsg.Text     = "<tr><td align='center' colspan='10'>没有订单!</td></tr>";
                    this.phUnset.Visible = false;
                }
            }

            list     = null;
            orderSum = null;
        }
Exemple #6
0
 /// <summary>
 /// 根据团队编号获取订单集合的分页列表
 /// </summary>
 /// <param name="pageSize">每页显示的条数</param>
 /// <param name="pageIndex">当前页</param>
 /// <param name="tourId">团队编号</param>
 /// <param name="recordCount">总记录数</param>
 /// <param name="orderSum">统计的实体</param>
 /// <returns></returns>
 public IList <MTourOrder> GetTourOrderListById(int pageSize, int pageIndex, string tourId, ref int recordCount, ref MOrderSum orderSum)
 {
     if (string.IsNullOrEmpty(tourId))
     {
         throw new System.Exception("bll error:查询id为null或string.IsNullOrEmpty(id)==true。");
     }
     return(dal.GetTourOrderListById(pageSize, pageIndex, tourId, ref recordCount, ref orderSum));
 }