Пример #1
0
        /// <summary>
        /// 运营前台 单团订单 组团修改
        /// </summary>
        /// <param name="model">修改实体</param>
        /// <returns></returns>
        public bool OrderModifyZT(EyouSoft.Model.NewTourStructure.MTourList model)
        {
            bool result = false;

            if (model != null)
            {
                result = dal.OrderModifyZT(model);
                if (result)
                {
                    var userInfo = EyouSoft.Security.Membership.UserProvider.GetUser();

                    EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().AddOrderHandleLog(new EyouSoft.Model.NewTourStructure.MOrderHandleLog()
                    {
                        LogId        = Guid.NewGuid().ToString(),
                        OrderId      = model.TourId,
                        OperatorName = userInfo.ContactInfo.ContactName,
                        OperatorId   = userInfo.ID,
                        OrderType    = EyouSoft.Model.NewTourStructure.OrderSource.线路团队订单,
                        IssueTime    = DateTime.Now,
                        OrderNo      = model.OrderNo,
                        CompanyId    = model.Travel,
                        Remark       = "订单修改",
                    });
                }
            }
            return(result);
        }
Пример #2
0
        /// <summary>
        /// 添加团队订单(单团预订)
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public bool AddTourList(EyouSoft.Model.NewTourStructure.MTourList item)
        {
            bool result = false;

            if (item != null)
            {
                item.TourId = System.Guid.NewGuid().ToString();
                //item.OrderNo = EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().CreateOrderNo("X");
                if (item.StartDate == DateTime.MinValue || item.StartDate == DateTime.MaxValue)
                {
                    return(false);
                }
                item.IssueTime = DateTime.Now;

                result = dal.AddTourList(item);
                if (result)
                {
                    var userInfo = EyouSoft.Security.Membership.UserProvider.GetUser();
                    EyouSoft.BLL.NewTourStructure.BTourOrder.CreateInstance().AddOrderHandleLog(
                        new EyouSoft.Model.NewTourStructure.MOrderHandleLog()
                    {
                        CompanyId    = item.Travel,
                        IssueTime    = item.IssueTime,
                        LogId        = System.Guid.NewGuid().ToString(),
                        OperatorId   = item.OperatorId,
                        OperatorName = userInfo.ContactInfo.ContactName,
                        OrderId      = item.TourId,
                        OrderNo      = item.OrderNo,
                        OrderType    = EyouSoft.Model.NewTourStructure.OrderSource.线路团队订单,
                        Remark       = "订单接受预订"
                    }
                        );
                }
                if (result)
                {
                    //发MQ发送消息
                    EyouSoft.BLL.MQStructure.IMMessage.CreateInstance().AddMessageToWholesalersByNewOrder(item.TourId, 2);
                }
            }
            return(result);
        }