duhongyu 3 gadi atpakaļ
vecāks
revīzija
57b25af7ac

+ 7 - 1
CallCenterApi/CallCenterApi.BLL/T_Call_CallRecords.cs

@@ -167,7 +167,13 @@ namespace CallCenterApi.BLL
167 167
         {
168 168
             return dal.UpdateCallInAnswerTelRecord(model);
169 169
         }
170
-
170
+        /// <summary>
171
+        /// 更新来电摘机电话记录信息
172
+        /// </summary>
173
+        public bool TransferCall(string CallId, string city)
174
+        {
175
+            return dal.TransferCall(CallId, city);
176
+        }
171 177
         #endregion
172 178
 
173 179
         #region 更新来电挂断电话记录信息

+ 38 - 0
CallCenterApi/CallCenterApi.DAL/T_Call_CallRecords.cs

@@ -723,6 +723,12 @@ namespace CallCenterApi.DAL
723 723
                 {
724 724
                     model.ActionType = int.Parse(row["ActionType"].ToString());
725 725
                 }
726
+                if (row["City"] != null && row["City"].ToString() != "")
727
+                {
728
+                    model.City = row["City"].ToString();
729
+                }
730
+
731
+                
726 732
             }
727 733
             return model;
728 734
         }
@@ -902,6 +908,38 @@ namespace CallCenterApi.DAL
902 908
             }
903 909
         }
904 910
 
911
+
912
+        /// <summary>
913
+        /// 更新来电接通信息
914
+        /// </summary>
915
+        public bool TransferCall(string  CallId, string city)
916
+        {
917
+            lock (DAL.T_Call_CallRecords.Global_Lock)
918
+            {
919
+                StringBuilder strSql = new StringBuilder();
920
+                strSql.Append("update T_Call_CallRecords set ");
921
+                strSql.Append("ActionType=@ActionType,");
922
+                strSql.Append("City=@City");
923
+                strSql.Append(" where CallId=@CallId");
924
+                SqlParameter[] parameters = {
925
+                    new SqlParameter("@CallId", SqlDbType.Int,4),
926
+                    new SqlParameter("@ActionType", SqlDbType.Int,4),
927
+                      new SqlParameter("@City", SqlDbType.VarChar ,50)};
928
+                parameters[0].Value = CallId;
929
+                parameters[1].Value =4;
930
+                parameters[2].Value = city;
931
+                int rows = DbHelperSQL.ExecuteSql1(strSql.ToString(), parameters);
932
+                if (rows > 0)
933
+                {
934
+                    return true;
935
+                }
936
+                else
937
+                {
938
+                    return false;
939
+                }
940
+            }
941
+        }
942
+
905 943
         #endregion
906 944
 
907 945
         #region 更新来电挂断电话记录信息

+ 7 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SMSController.cs

@@ -120,6 +120,8 @@ namespace CallCenterApi.Interface.Controllers
120 120
             string strstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
121 121
             string strendtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
122 122
 
123
+            string userid = HttpUtility.UrlDecode(RequestString.GetQueryString("userid"));
124
+
123 125
             string strpageindex = RequestString.GetQueryString("page");
124 126
             int pageindex = 1;
125 127
             string strpagesize = RequestString.GetQueryString("pagesize");
@@ -133,6 +135,11 @@ namespace CallCenterApi.Interface.Controllers
133 135
             {
134 136
                 sql += " and RecvTime >= '" + Convert.ToDateTime(strstarttime.Trim()) + "' ";
135 137
             }
138
+            if (userid.Trim() != "" && userid != "undefined")
139
+            {
140
+                sql += " and F_UserID in  (" + userid.TrimEnd (',')+ ") ";
141
+            }
142
+
136 143
             if (strendtime.Trim() != "" && strendtime != "undefined")
137 144
             {
138 145
                 sql += " and RecvTime <= '" + Convert.ToDateTime(strendtime.Trim()) + "' ";

+ 30 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -27,6 +27,9 @@ namespace CallCenterApi.Interface.Controllers.tel
27 27
             string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
28 28
             string tasktype = HttpUtility.UrlDecode(RequestString.GetQueryString("tasktype"));
29 29
             string extnumber = HttpUtility.UrlDecode(RequestString.GetQueryString("extnumber"));
30
+            string city = HttpUtility.UrlDecode(RequestString.GetQueryString("city"));
31
+
32
+            
30 33
             int type = RequestString.GetInt("type", 0);
31 34
 
32 35
             string strpageindex = RequestString.GetQueryString("page");
@@ -54,6 +57,11 @@ namespace CallCenterApi.Interface.Controllers.tel
54 57
             {
55 58
                 sql += " and CallNumber like '%" + phone + "%'";
56 59
             }
60
+            if (city != null && city.Trim() != "")
61
+            {
62
+                sql += " and City='" + city + "'";
63
+            }
64
+            
57 65
             if (callstate.Trim() != "")
58 66
             {
59 67
                 if (callstate.Trim() == "0")
@@ -124,7 +132,7 @@ namespace CallCenterApi.Interface.Controllers.tel
124 132
                 true,
125 133
                 out recordCount);
126 134
 
127
-            var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
135
+            var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath'").FirstOrDefault();
128 136
             //var users = new BLL.T_Sys_UserAccount().GetModelList("");
129 137
             //dt.Columns.Add("TypeName",typeof( string));
130 138
             //dt.Columns.Add("WorkOrderId", typeof(string));
@@ -335,7 +343,28 @@ namespace CallCenterApi.Interface.Controllers.tel
335 343
             return Content(obj.ToJson());
336 344
 
337 345
         }
346
+        /// <summary>
347
+        /// 更新转接记录
348
+        /// </summary>
349
+        /// <returns></returns>
350
+        public ActionResult TransferCall(string CallId, string city)
351
+        {
338 352
 
353
+           
354
+           
355
+            bool bl = new BLL.T_Call_CallRecords().TransferCall(CallId, city);
356
+            if (bl)
357
+            {
358
+                return Success("更新转接记录成功");
359
+            }
360
+            else
361
+            {
362
+                return Success("更新转接记录失败");
363
+            }
364
+
365
+
366
+
367
+        }
339 368
         //删除通话记录
340 369
         public ActionResult DelCallRecord(string[] ids)
341 370
         {

+ 3 - 1
CallCenterApi/CallCenterApi.Model/T_Call_CallRecords.cs

@@ -543,13 +543,15 @@ namespace CallCenterApi.Model
543 543
             get { return _actionid; }
544 544
         }
545 545
         /// <summary>
546
-        /// 1正常呼入呼出、2转移、3三方通话
546
+        /// 1正常呼入呼出、2转移、3三方通话、4转接
547 547
         /// </summary>
548 548
         public int? ActionType
549 549
         {
550 550
             set { _actiontype = value; }
551 551
             get { return _actiontype; }
552 552
         }
553
+
554
+        public string City { set; get; }
553 555
         #endregion Model
554 556
 
555 557
     }