Exemple #1
0
        public Entities.CallRecord_ORIG GetCallDataByCallID(string Verifycode, long callid, ref string msg)
        {
            BLL.Loger.Log4Net.Info("[CCDataInterfaceService.asmx]GetCallDataByCallID...CallID:" + callid);
            //验证授权码
            string sVerify = "";

            sVerify = ConfigurationUtil.GetAppSettingValue("CallRecordAuthorizeCode");
            if (sVerify == Verifycode)
            {
            }
            else
            {
                msg = "授权码错误!!";
                return(null);
            }


            Entities.CallRecord_ORIG model = null;

            try
            {
                model = BLL.CallRecord_ORIG.Instance.GetCallRecord_ORIGByCallID(callid);
            }
            catch (Exception ex)
            {
                BLL.Loger.Log4Net.Info("[CCDataInterfaceService.asmx]GetCallDataByCallID...获取数据操作出错!errorStackTrace:" + ex.StackTrace);
            }


            BLL.Loger.Log4Net.Info("[CCDataInterfaceService.asmx]GetCallDataByCallID...获取数据操作结束!");
            return(model);
        }
        public bool InsertCallRecordWB(string Verifycode, Entities.CallRecord_ORIG model, ref string msg)
        {
            if (BLL.CallRecord_ORIG_Authorizer.Instance.Verify(Verifycode, 0, ref msg, "存储话务数据,授权失败。"))
            {
                CallRecord_ORIG model_ORIG = null;
                model_ORIG = (model != null && model.CallID != null ? BLL.CallRecord_ORIG.Instance.GetCallRecord_ORIGByCallID(Int64.Parse(model.CallID.ToString())) : null);

                if ((model == null || (model != null && model.CallID == null)) &&
                    model_ORIG == null)
                {
                    msg = "参数CallRecord_ORIG的Model为空"; return(false);
                }
                /*根据model.CallID,插入记录到表CallIDMapping中,若CallID和CurrentTime内容存在,则不做插入操作*/
                if (model != null && model_ORIG == null)
                {
                    InsertCallRecord_ORIGWB(model);
                    //if (model.CallStatus == 2)
                    //    InsertCallRecord_ORIG_Business(model);
                }
                else if (model != null && model_ORIG != null)
                {
                    UpdateCallRecord_ORIG(model);
                }
                return(true);
            }
            return(false);
        }
 public Entities.CallRecord_ORIG GetCallRecord_ORIGByCallID(string Verifycode, Int64 callid, ref string msg)
 {
     if (BLL.CallRecord_ORIG_Authorizer.Instance.Verify(Verifycode, 0, ref msg, "根据CALLID返回话务实体,授权失败。"))
     {
         Entities.CallRecord_ORIG model = BLL.CallRecord_ORIG.Instance.GetCallRecord_ORIGByCallID(callid);
         return(model);
     }
     return(null);
 }
Exemple #4
0
        /// 其他系统-接口
        /// <summary>
        /// 其他系统-接口
        /// </summary>
        /// <param name="model"></param>
        /// <param name="model_ORIG"></param>
        /// <param name="recID"></param>
        /// <returns></returns>
        public bool InsertCallRecordInfoToHuiMaiChe(CallRecordInfoInfo model, Entities.CallRecord_ORIG model_ORIG, out long recID)
        {
            recID = 0;
            string logDesc = string.Empty;

            if (model_ORIG.EstablishedTime == null)
            {
                logDesc = "该通电话未接通";
                BLL.Loger.Log4Net.Info("【其他系统接口话务调用】【来电去电表插入成功】【失败】" + logDesc);
                return(false);
            }

            CallRecordInfoInfo model_RecordInfo = BLL.CallRecordInfo.Instance.GetCallRecordInfoInfo(model.CallID.Value);

            if (model_RecordInfo != null)
            {
                recID   = model_RecordInfo.RecID_Value;
                logDesc = " 该CallID:" + model.CallID + "记录在CallRecordInfo表中已存在,不能再次插入CallRecordInfo表,返回主键:" + model_RecordInfo.RecID + "!";
                BLL.Loger.Log4Net.Info("【其他系统接口话务调用】【来电去电表插入成功】" + logDesc);
                return(true);
            }
            try
            {
                model.SessionID    = model_ORIG.SessionID;
                model.ExtensionNum = model_ORIG.ExtensionNum;
                model.PhoneNum     = BLL.Util.HaoMaProcess(model_ORIG.ANI);
                model.ANI          = model_ORIG.PhoneNum;
                model.CallStatus   = model_ORIG.CallStatus;
                model.BeginTime    = model_ORIG.EstablishedTime;
                model.EndTime      = model_ORIG.CustomerReleaseTime == null ? model_ORIG.AgentReleaseTime : model_ORIG.CustomerReleaseTime;
                model.TallTime     = model_ORIG.TallTime;
                model.AudioURL     = model_ORIG.AudioURL;
                model.SkillGroup   = model_ORIG.SkillGroup;
                //recordInfo.CallID = long.Parse(info.CallID);// 外面赋值
                //recordInfo.SCID = int.Parse(info.SCID);// 外面赋值
                //recordInfo.TaskID = info.BusinessID;// 外面赋值
                //recordInfo.TaskTypeID = (int)ProjectSource.None;// 外面赋值
                //recordInfo.BGID = int.Parse(info.BGID);// 外面赋值
                //recordInfo.CustID = custId;// 外面赋值
                //recordInfo.CustName = info.CustName;// 外面赋值
                //recordInfo.Contact = info.CustName;// 外面赋值
                model.CreateTime   = DateTime.Now;
                model.CreateUserID = model_ORIG.CreateUserID;
                CommonBll.Instance.InsertComAdoInfo(model);
                recID = model.RecID_Value;
                BLL.Loger.Log4Net.Info("【其他系统接口话务调用】【来电去电表插入成功】返回主键:" + recID);
                return(true);
            }
            catch (Exception ex)
            {
                BLL.Loger.Log4Net.Error("【其他系统接口话务调用】【来电去电表插入成功】", ex);
                return(false);
            }
        }
Exemple #5
0
        public bool InsertIVRSatisfactionByHYUC(string NewCallID, string CallID, int score, ref string msg)
        {
            BLL.Loger.Log4Net.Info("[InsertIVRSatisfactionByHYUC]:IVR满意度数据插入开始,CallID:" + CallID + ",Score:" + score + ",NewCallID:" + NewCallID);
            bool flag = false;

            try
            {
                if (string.IsNullOrEmpty(NewCallID) || string.IsNullOrEmpty(CallID))
                {
                    msg = "参数NewCallID或CallID为空";
                }
                //根据青牛传过来的SessionID查话务总表拿到CallID
                Entities.IVRSatisfaction model = new Entities.IVRSatisfaction();
                Entities.CallRecord_ORIG orig  = new Entities.CallRecord_ORIG();
                orig = BLL.CallRecord_ORIG.Instance.GetCallRecord_ORIGBySessionID(NewCallID);
                if (orig == null)
                {
                    msg = "没有找到话务记录";
                    BLL.Loger.Log4Net.Info("[InsertIVRSatisfactionByHYUC]:没有找到话务记录,SessionID:" + NewCallID + ",Score:" + score);
                    return(flag);
                }

                Int64 _callid = 0;
                model.CallRecordID = Convert.ToInt64(orig.CallID);
                if (Int64.TryParse(CallID, out _callid))
                {
                    model.CallID     = _callid;
                    model.Score      = score;
                    model.CreateTime = DateTime.Now;
                    flag             = InsertIVRSatisfactionRecord(model) > 0 ? true : false;
                }
                else
                {
                    msg = "参数CallID,格式不正确,必须是Long类型的";
                }
            }
            catch (Exception ex)
            {
                BLL.Loger.Log4Net.Error("[InsertIVRSatisfactionByHYUC]新增满意度数据出错", ex); return(false);
            }
            if (!string.IsNullOrEmpty(msg))
            {
                BLL.Loger.Log4Net.Info("[InsertIVRSatisfactionByHYUC]新增满意度数据出错:" + msg);
            }

            BLL.Loger.Log4Net.Info("[InsertIVRSatisfactionByHYUC]:IVR满意度数据插入结束,CallID:" + CallID + ",Score:" + score);
            return(flag);
        }
        public bool InsertCallRecord(string Verifycode, Entities.CallRecord_ORIG model, ref string msg)
        {
            if (BLL.CallRecord_ORIG_Authorizer.Instance.Verify(Verifycode, 0, ref msg, "存储话务数据,授权失败。"))
            {
                CallRecord_ORIG model_ORIG = null;
                model_ORIG = (model != null && model.CallID != null ? BLL.CallRecord_ORIG.Instance.GetCallRecord_ORIGByCallID(Int64.Parse(model.CallID.ToString())) : null);

                if ((model == null || (model != null && model.CallID == null)) && model_ORIG == null)
                {
                    msg = "参数CallRecord_ORIG的Model为空";
                    BLL.Loger.Log4Net.Info(msg);
                    return(false);
                }

                if (model != null && string.IsNullOrEmpty(model.SwitchINNum) && !string.IsNullOrEmpty(model.SkillGroup))
                {
                    //落地号码不存在,技能组存在,反查落地号码
                    DataTable dt = BitAuto.ISDC.CC2012.BLL.CallDisplay.Instance.GetCallDisplayByManufacturerSGID(model.SkillGroup);
                    if (dt.Rows.Count > 0)
                    {
                        model.SwitchINNum = CommonFunction.ObjectToString(dt.Rows[0]["AreaCode"]) + CommonFunction.ObjectToString(dt.Rows[0]["TelMainNum"]);
                    }
                }

                /*根据model.CallID,插入记录到表CallIDMapping中,若CallID和CurrentTime内容存在,则不做插入操作*/
                if (model != null && model_ORIG == null)
                {
                    BLL.Loger.Log4Net.Info("[CallRecordService.asmx]InsertCallRecord ...InsertCallRecord_ORIG...CallID:" + model.CallID);
                    InsertCallRecord_ORIG(model);
                }
                else if (model != null && model_ORIG != null)
                {
                    BLL.Loger.Log4Net.Info("[CallRecordService.asmx]InsertCallRecord ...UpdateCallRecord_ORIG...CallID:" + model.CallID);
                    UpdateCallRecord_ORIG(model);
                }
                else
                {
                    BLL.Loger.Log4Net.Info("条件不满足,无法入库!");
                }
                return(true);
            }
            else
            {
                BLL.Loger.Log4Net.Info("存储话务数据,授权失败:" + msg);
            }
            return(false);
        }
        private void BindData()
        {
            #region 成绩结果
            if (QS_RID != 0)
            {
                Entities.QS_Result model = BLL.QS_Result.Instance.GetQS_Result(QS_RID);
                if (model != null)
                {
                    if (model.ScoreType == 1 || model.ScoreType == 3)
                    {
                        tdScore.InnerText = model.Score.ToString().Replace(".0", "") + "分";
                    }
                    else
                    {
                        tdScore.InnerText = model.IsQualified == 1 ? "合格" : "不合格";
                    }

                    if (model.Status != (int)QSResultStatus.WaitScore)
                    {
                        this.tdScore.Visible = true;
                    }
                }
            }


            #endregion

            #region 录音
            Entities.CallRecord_ORIG          origM     = BLL.CallRecord_ORIG.Instance.GetCallRecord_ORIGByCallID(CallID, tableEndName);
            Entities.CallRecord_ORIG_Business businessM = BLL.CallRecord_ORIG_Business.Instance.GetByCallID(CallID, tableEndName);
            if (origM != null && businessM != null)
            {
                this.spCallID.InnerText    = origM.CallID.ToString();
                this.spLiuShui.InnerHtml   = string.Format("<a href='/KnowledgeLib/Personalization/DownLoadFilePage.aspx?theAction=1&theUrl={1}'>{0}</a>", origM.SessionID, HttpUtility.UrlEncode(origM.AudioURL));
                this.spUserName.InnerText  = BitAuto.YanFa.SysRightManager.Common.UserInfo.GerTrueName((int)businessM.CreateUserID);
                this.spBeginTime.InnerText = origM.EstablishedTime.ToString();
                this.spTimeLong.InnerText  = origM.TallTime.ToString();
                this.spCallType.InnerText  = BitAuto.ISDC.CC2012.BLL.Util.GetCallStatus(origM.CallStatus.Value.ToString());
                FileUrl = origM.AudioURL;

                this.spTaskID.InnerText = businessM.BusinessID;

                //分类名称
                Entities.SurveyCategory ScMode = BLL.SurveyCategory.Instance.GetSurveyCategory((int)businessM.SCID);
                if (ScMode != null)
                {
                    this.spSCName.InnerText = ScMode.Name;
                }
                //链接
                string url = BLL.CallRecord_ORIG_Business.Instance.GetTaskUrl(businessM.BusinessID, businessM.BGID.ToString(), businessM.SCID.ToString());
                url = BLL.CallRecord_ORIG_Business.Instance.GetViewUrl(businessM.BusinessID, url);
                this.spTaskID.InnerHtml = BLL.Util.GenBusinessURLByBGIDAndSCID(businessM.BGID.ToString(), businessM.SCID.ToString(), url, businessM.BusinessID, YPFanXianHBuyCarURL, EPEmbedCCHBuyCar_APPID);
            }

            //满意度加载
            int    ivrscore = BLL.IVRSatisfaction.Instance.GetIVRScoreBYCallID(CallID, tableEndName);
            string strScore = "";
            switch (ivrscore)
            {
            case 0:
                strScore = "未评价";
                break;

            case 1:
                strScore = "满意";
                break;

            case 2:
                strScore = "对问题处理结果不满意";
                break;

            case 3:
                strScore = "对客服代表服务不满意";
                break;

            case 10:
                strScore = "已解决,未评价";
                break;

            case 11:
                strScore = "已解决,满意";
                break;

            case 12:
                strScore = "已解决,对处理结果不满意";
                break;

            case 13:
                strScore = "已解决,对客服代表服务不满意";
                break;

            case 20:
                strScore = "未解决,未评价";
                break;

            case 21:
                strScore = "未解决,满意";
                break;

            case 22:
                strScore = "未解决,对处理结果不满意";
                break;

            case 23:
                strScore = "未解决,对客服代表服务不满意";
                break;

            default:
                break;
            }
            spIVRScore.InnerText = strScore;
            #endregion
        }
        private EnumResult VefiyCustData(CustBussiness info, out Entities.CallRecord_ORIG orig, out BitAuto.YanFa.Crm2009.Entities.DMSMember member)
        {
            orig   = null;
            member = null;

            if (string.IsNullOrEmpty(info.CustName))
            {
                return(EnumResult.CustNameEmpty);
            }
            int sex = 0;

            if (info.Sex != string.Empty && !int.TryParse(info.Sex, out sex))
            {
                return(EnumResult.SexPatternError);
            }
            else if (info.Sex == string.Empty)
            {
                info.Sex = "1";
            }
            else if (sex > 2 || sex < 1)
            {
                return(EnumResult.SexPatternError);
            }
            if (info.Tels == null)
            {
                return(EnumResult.CustTelEmpty);
            }
            else if (info.Tels.Length == 0)
            {
                return(EnumResult.CustTelEmpty);
            }
            else if (info.Tels.Length > 2)
            {
                return(EnumResult.CustTelPatternError);
            }
            //Regex reTel = new Regex(@"(^0[0-9]{2,3}[0-9]{7,8}$)|(^13[0-9]{9}$)|(^15[0-9]{9}$)|(^18[0-9]{9}$)|(^19[0-9]{9}$)|(^14[0-9]{9}$)|(^400\d{7}$)");
            foreach (string str in info.Tels)
            {
                if (!BLL.Util.IsTelephoneAnd400Tel(str))
                {
                    return(EnumResult.CustTelPatternError);
                }
            }

            int  temp     = 0;
            long templong = 0;

            if (string.IsNullOrEmpty(info.CallID))
            {
                return(EnumResult.CallIDEmpty);
            }
            else if (!long.TryParse(info.CallID, out templong))
            {
                return(EnumResult.CallIDPatternError);
            }
            else
            {
                orig = BLL.CallRecord_ORIG.Instance.GetCallRecord_ORIGByCallID(long.Parse(info.CallID));
                if (orig == null)
                {
                    return(EnumResult.CallIDNotExist);
                }
                else
                {
                    info.CreateUserID = orig.CreateUserID.ToString();
                }
            }
            if (string.IsNullOrEmpty(info.BusinessID))
            {
                return(EnumResult.BusinessIDEmpty);
            }
            if (string.IsNullOrEmpty(info.BGID))
            {
                return(EnumResult.BGIDEmpty);
            }
            if (!int.TryParse(info.BGID, out temp))
            {
                return(EnumResult.BGIDPatternError);
            }
            if (string.IsNullOrEmpty(info.SCID))
            {
                return(EnumResult.SCIDEmpty);
            }
            if (!int.TryParse(info.SCID, out temp))
            {
                return(EnumResult.SCIDPatternError);
            }
            if (!string.IsNullOrEmpty(info.MemberCode))
            {
                member = BitAuto.YanFa.Crm2009.BLL.DMSMember.Instance.GetDMSMemberByMemberCode(info.MemberCode);
                if (member == null)
                {
                    return(EnumResult.MemberCodeError);
                }
            }
            return(EnumResult.Success);
        }
Exemple #9
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public int Update(Entities.CallRecord_ORIG model)
 {
     return(Dal.CallRecord_ORIG.Instance.Update(model));
 }
Exemple #10
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Insert(Entities.CallRecord_ORIG model)
 {
     return(Dal.CallRecord_ORIG.Instance.Insert(model));
 }