コード例 #1
0
 //添加跟踪日志
 /// <summary>
 /// 添加跟踪日志
 /// </summary>
 /// <param name="info">请求实体</param>
 public virtual void AddSOInternalMemoInfo(SOInternalMemoInfo info, string companyCode)
 {
     //如果状态为需要跟进,则允许选择提醒时间
     if (info.Status == SOInternalMemoStatus.FollowUp)
     {
         //如果没有输入时间,则给一个默认时间
         if (!info.RemindTime_Date.HasValue || !info.RemainTime_Time.HasValue)
         {
             info.RemindTime = DateTime.Now.AddDays(1);
         }
         else
         {
             //当前日期加上选择的时间点
             DateTime remindTime = info.RemindTime_Date.Value
                                   .AddHours(info.RemainTime_Time.Value.Hour)
                                   .AddMinutes(info.RemainTime_Time.Value.Minute);
             if (DateTime.Compare(remindTime, DateTime.Now.AddHours(1)) > 0)
             {
                 info.RemindTime = remindTime;
             }
             else
             {
                 BizExceptionHelper.Throw("SO_InternalMemo_RemainMoreOneHour");
                 return;
             }
         }
     }
     else
     {
         info.Importance = null;
     }
     m_da.AddSOInternalMemoInfo(info, companyCode);
 }
コード例 #2
0
        /// <summary>
        ///派发 取消派发 订单更近日志
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public void Update_AssignInfo(SOInternalMemoInfo info)
        {
            DataCommand command = DataCommandManager.GetDataCommand("Update_InternalMemoAssignInfo");

            command.SetParameterValue("@SysNo", info.SysNo);
            command.SetParameterValue("@UpdateUserSysNo", info.OperatorSysNo);//处理人
            command.ExecuteNonQuery();
        }
コード例 #3
0
        /// <summary>
        ///关闭 订单更近日志
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public void Update_StatusInfo(SOInternalMemoInfo info)
        {
            DataCommand command = DataCommandManager.GetDataCommand("Update_InternalMemoStatusInfo");

            command.SetParameterValue("@SysNo", info.SysNo);
            command.SetParameterValue("@Status", info.Status);//处理人
            command.SetParameterValue("@Note", info.Note);
            command.SetParameterValue("@UpdateTime", DateTime.Now);
            command.SetParameterValue("@UpdateUserSysNo", ServiceContext.Current.UserSysNo);
            command.SetParameterValue("@RemindTime", info.RemindTime);
            command.ExecuteNonQuery();
        }
コード例 #4
0
        /// <summary>
        /// 添加订单跟进日志
        /// </summary>
        /// <param name="info"></param>
        /// <param name="companyCode"></param>
        public void AddSOInternalMemoInfo(SOInternalMemoInfo info, string companyCode)
        {
            DataCommand command = DataCommandManager.GetDataCommand("CreateSO_InternalMemo");

            command.SetParameterValue("@SOSysNo", info.SOSysNo);
            command.SetParameterValue("@CreateUserSysNo", ServiceContext.Current.UserSysNo);
            command.SetParameterValue("@CreateTime", DateTime.Now);
            command.SetParameterValue("@SourceSysNo", info.SourceSysNo);
            command.SetParameterValue("@ReasonCodeSysNo", info.ReasonCodeSysNo);
            command.SetParameterValue("@Content", info.Content);
            command.SetParameterValue("@UpdateUserSysNo", DBNull.Value);
            command.SetParameterValue("@UpdateTime", DBNull.Value);
            command.SetParameterValue("@Status", info.Status);
            command.SetParameterValue("@RemindTime", info.RemindTime);
            command.SetParameterValue("@Note", info.Note);
            command.SetParameterValue("@CallType", DBNull.Value);
            command.SetParameterValue("@ResponsibleDepCode", DBNull.Value);
            command.SetParameterValue("@Importance", info.Importance);
            command.SetParameterValue("@CompanyCode", companyCode);
            command.ExecuteNonQuery();
        }
コード例 #5
0
        /// <summary>
        /// 更新 订单更近日志
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public void UpdateSOInternalMemoInfo(SOInternalMemoInfo info)
        {
            DataCommand command = DataCommandManager.GetDataCommand("UpdateSO_InternalMemo");

            command.SetParameterValue("@SysNo", info.SysNo);
            command.SetParameterValue("@SOSysNo", info.SOSysNo);
            command.SetParameterValue("@Content", info.Content);
            command.SetParameterValue("@UpdateUserSysNo", info.OperatorSysNo);//处理人
            command.SetParameterValue("@Status", info.Status);
            command.SetParameterValue("@UpdateTime", DateTime.Now);
            command.SetParameterValue("@RemindTime", info.RemindTime);
            if (info.Status == SOInternalMemoStatus.Complete)
            {
                command.SetParameterValue("@RemindTime", DBNull.Value);
                command.SetParameterValue("@UpdateTime", DBNull.Value);
            }
            command.SetParameterValue("@Note", info.Note);
            command.SetParameterValue("@CallType", info.CallType);
            command.SetParameterValue("@ResponsibleDepCode", info.DepartmentCode);
            command.SetParameterValue("@Importance", info.Importance);
            command.ExecuteNonQuery();
        }
コード例 #6
0
 public virtual void CloseSOInternalMemo(SOInternalMemoInfo info)
 {
     ObjectFactory <SOInternalMemoAppService> .Instance.CloseSOInternalMemo(info);
 }
コード例 #7
0
 public virtual void AddSOInternalMemoInfo(SOInternalMemoInfo info)
 {
     ObjectFactory <SOInternalMemoAppService> .Instance.AddSOInternalMemoInfo(info, info.CompanyCode);
 }
コード例 #8
0
 /// <summary>
 /// 关闭跟踪
 /// </summary>
 /// <param name="info"></param>
 public virtual void CloseSOInternalMemo(SOInternalMemoInfo info)
 {
     ObjectFactory <SOInternalMemoProcessor> .Instance.CloseSOInternalMemo(info);
 }
コード例 #9
0
 /// <summary>
 /// 添加跟踪
 /// </summary>
 /// <param name="info"></param>
 public virtual void AddSOInternalMemoInfo(SOInternalMemoInfo info, string companyCode)
 {
     ObjectFactory <SOInternalMemoProcessor> .Instance.AddSOInternalMemoInfo(info, companyCode);
 }
コード例 #10
0
 public void Close(SOInternalMemoInfo req, EventHandler <RestClientEventArgs <dynamic> > callback)
 {
     restClient.Update("/SOService/SO/CloseSOInternalMemo", req, callback);
 }
コード例 #11
0
 /// <summary>
 /// 创建日志
 /// </summary>
 /// <param name="req"></param>
 /// <param name="callback"></param>
 public void Create(SOInternalMemoInfo req, EventHandler <RestClientEventArgs <dynamic> > callback)
 {
     req.CompanyCode = CPApplication.Current.CompanyCode;
     restClient.Create("/SOService/SO/AddSOInternalMemoInfo", req, callback);
 }
コード例 #12
0
        /// <summary>
        /// 创建客户加积分申请单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddPoint_Click(object sender, RoutedEventArgs e)
        {
            DateTime startTime = CurrentSOVM.BaseInfoVM.OrderTime.Value;

            if (string.IsNullOrEmpty(dpReceiveDate.Text))
            {
                Window.Alert(ResSO.Info_SOProcesser_ChangePrice_ReceiveDate_Error, MessageType.Error);
                return;
            }
            CPApplication.Current.CurrentPage.Context.Window.Confirm(ResSO.Info_Confirm_CreateAddPointRequest, (objConfirm, argsConfirm) =>
            {
                if (argsConfirm.DialogResult == DialogResultType.OK)
                {
                    DateTime endTime     = DateTime.Parse(dpReceiveDate.Text);
                    List <int> sysnoList = new List <int>();
                    foreach (var item in CurrentSOVM.ItemsVM)
                    {
                        sysnoList.Add(item.ProductSysNo.Value);
                    }
                    SOQueryFacade.GetPriceChangeLogs(sysnoList, startTime, endTime, (obj, args) =>
                    {
                        if (args.FaultsHandle())
                        {
                            return;
                        }
                        if (args.Result == null || args.Result.Count == 0)
                        {
                            Window.Alert(ResSO.ErrorInfo_CreateChangePriceRequest, MessageType.Error);
                        }
                        else
                        {
                            List <PriceChangeLogInfo> logList = args.Result;

                            int totalPoint = 0;
                            foreach (var item in CurrentSOVM.ItemsVM)
                            {
                                foreach (var loiitem in logList)
                                {
                                    if (item.ProductSysNo == loiitem.ProductSysNo)
                                    {
                                        item.CompensationPoint = Convert.ToInt32(((item.OriginalPrice - loiitem.NewPrice) * item.Quantity) * 10);
                                        totalPoint            += item.CompensationPoint.Value;
                                    }
                                }
                            }
                            if (totalPoint < 0)
                            {
                                Window.Alert(ResSO.Info_SOProcesser_ChangePrice_Error, MessageType.Error);
                            }
                            else
                            {
                                //生成积分申请备注
                                string note = this.BuildAddPointRequestNote(logList, CurrentSOVM.ItemsVM, endTime.ToString());
                                SOFacade.CreateCustomerPointsAddRequest(CurrentSOVM, totalPoint, note, logList, (innerObj, innerArgs) =>
                                {
                                    if (innerArgs.FaultsHandle())
                                    {
                                        return;
                                    }
                                    if (innerArgs.Result != null && innerArgs.Result.SysNo.HasValue && innerArgs.Result.SysNo != 0)
                                    {
                                        AddPointInfo.Visibility                   = Visibility.Visible;
                                        txtCustomerAddPointRequestInfo.Text       = ResSO.Info_SOProcesser_AddPoint_Request_Sucess;
                                        hlbtnCustomerAddPointRequestSysNo.Content = innerArgs.Result.SysNo;

                                        #region 创建固定信息的更新日志

                                        SOInternalMemoInfo publicMemo = new SOInternalMemoInfo();
                                        publicMemo.CallType           = 14;//价格保护
                                        publicMemo.Content            = note;
                                        publicMemo.SOSysNo            = CurrentSOVM.BaseInfoVM.SysNo.Value;
                                        publicMemo.Note            = txtAddPointNote.Text;
                                        publicMemo.ReasonCodeSysNo = 291;
                                        publicMemo.SourceSysNo     = 5;
                                        SOInternalMemoFacade.Create(publicMemo, (publicMemoObj, publicMemoArgs) =>
                                        {
                                            if (publicMemoArgs.FaultsHandle())
                                            {
                                                return;
                                            }
                                        });
                                        #endregion
                                    }
                                });
                            }
                        }
                    });
                }
            });
        }
コード例 #13
0
 //修改跟踪信息
 /// <summary>
 /// 修改跟踪信息
 /// </summary>
 /// <param name="info">请求实体</param>
 public void UpdateSOInternalMemoInfo(SOInternalMemoInfo info)
 {
     m_da.UpdateSOInternalMemoInfo(info);
 }
コード例 #14
0
 //关闭跟进日志(更新 Status 和 Note)
 /// <summary>
 /// 关闭跟进日志(更新 Status 和 Note)
 /// </summary>
 /// <param name="info">请求实体</param>
 public void CloseSOInternalMemo(SOInternalMemoInfo info)
 {
     info.Status     = SOInternalMemoStatus.Complete;
     info.RemindTime = null;
     m_da.Update_StatusInfo(info);
 }