duhongyu 4 yıl önce
ebeveyn
işleme
4d220ebaab

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

206
         {
206
         {
207
             return dal.UpdateCallInPathTelRecord(model);
207
             return dal.UpdateCallInPathTelRecord(model);
208
         }
208
         }
209
-
209
+        /// <summary>
210
+        /// 更新来电录音记录信息
211
+        /// </summary>
212
+        public bool UpdateWorkorder(Model.T_Call_CallRecords model)
213
+        {
214
+            return dal.UpdateWorkorder(model);
215
+        }
210
         #endregion
216
         #endregion
211
 
217
 
212
         #region 根据来电号码获取电话记录
218
         #region 根据来电号码获取电话记录

+ 36 - 4
codegit/CallCenterApi/CallCenterApi.DAL/T_Call_CallRecords.cs

228
             strSql.Append("F_QCAdvise=@F_QCAdvise,");
228
             strSql.Append("F_QCAdvise=@F_QCAdvise,");
229
             strSql.Append("TaskType=@TaskType,");
229
             strSql.Append("TaskType=@TaskType,");
230
             strSql.Append("TaskPhoneID=@TaskPhoneID,");
230
             strSql.Append("TaskPhoneID=@TaskPhoneID,");
231
-            strSql.Append("TaskID=@TaskID");
231
+            strSql.Append("WorkOrder=@WorkOrder,");
232
+             strSql.Append("TaskID=@TaskID");
232
             strSql.Append(" where CallRecordsId=@CallRecordsId");
233
             strSql.Append(" where CallRecordsId=@CallRecordsId");
233
             SqlParameter[] parameters = {
234
             SqlParameter[] parameters = {
234
                     new SqlParameter("@CallId", SqlDbType.VarChar,50),
235
                     new SqlParameter("@CallId", SqlDbType.VarChar,50),
282
                     new SqlParameter("@F_QCAdvise", SqlDbType.NText),
283
                     new SqlParameter("@F_QCAdvise", SqlDbType.NText),
283
                     new SqlParameter("@TaskType", SqlDbType.NVarChar,10),
284
                     new SqlParameter("@TaskType", SqlDbType.NVarChar,10),
284
                     new SqlParameter("@TaskPhoneID", SqlDbType.NVarChar,10),
285
                     new SqlParameter("@TaskPhoneID", SqlDbType.NVarChar,10),
286
+                    new SqlParameter("@WorkOrder", SqlDbType.NVarChar,-1),
287
+                    
285
                     new SqlParameter("@TaskID", SqlDbType.NVarChar,32),
288
                     new SqlParameter("@TaskID", SqlDbType.NVarChar,32),
286
                     new SqlParameter("@CallRecordsId", SqlDbType.Int,4)};
289
                     new SqlParameter("@CallRecordsId", SqlDbType.Int,4)};
287
             parameters[0].Value = model.CallId;
290
             parameters[0].Value = model.CallId;
335
             parameters[48].Value = model.F_QCAdvise;
338
             parameters[48].Value = model.F_QCAdvise;
336
             parameters[49].Value = model.TaskType;
339
             parameters[49].Value = model.TaskType;
337
             parameters[50].Value = model.TaskPhoneID;
340
             parameters[50].Value = model.TaskPhoneID;
338
-            parameters[51].Value = model.TaskID;
339
-            parameters[52].Value = model.CallRecordsId;
341
+            parameters[51].Value = model.WorkOrder;
342
+            parameters[52].Value = model.TaskID;
343
+            parameters[53].Value = model.CallRecordsId;
340
 
344
 
341
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
345
             int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
342
             if (rows > 0)
346
             if (rows > 0)
671
                 {
675
                 {
672
                     model.TaskID = row["TaskID"].ToString();
676
                     model.TaskID = row["TaskID"].ToString();
673
                 }
677
                 }
678
+                if (row["WorkOrder"] != null)
679
+                {
680
+                    model.WorkOrder = row["WorkOrder"].ToString();
681
+                }
682
+                
674
             }
683
             }
675
             return model;
684
             return model;
676
         }
685
         }
893
         }
902
         }
894
 
903
 
895
         #endregion
904
         #endregion
896
-
905
+        /// <summary>
906
+        /// 
907
+        /// </summary>
908
+        public bool UpdateWorkorder(Model.T_Call_CallRecords model)
909
+        {
910
+            StringBuilder strSql = new StringBuilder();
911
+            strSql.Append("update T_Call_CallRecords set ");
912
+            strSql.Append("WorkOrder=@WorkOrder");
913
+            strSql.Append(" where CallId=@CallId");
914
+            SqlParameter[] parameters = {
915
+                    new SqlParameter("@CallId", SqlDbType.VarChar,50),
916
+                      new SqlParameter("@WorkOrder", SqlDbType.VarChar,-1)};
917
+            parameters[0].Value = model.CallId;
918
+            parameters[1].Value = model.WorkOrder ;
919
+            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
920
+            if (rows > 0)
921
+            {
922
+                return true;
923
+            }
924
+            else
925
+            {
926
+                return false;
927
+            }
928
+        }
897
         #region 更新来电录音开始信息
929
         #region 更新来电录音开始信息
898
 
930
 
899
         /// <summary>
931
         /// <summary>

+ 4 - 16
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/CallOutOptController.cs

15
         public ActionResult GetCallOutprefix(string phone)
15
         public ActionResult GetCallOutprefix(string phone)
16
         {
16
         {
17
 
17
 
18
-            if (Request.IsAuthenticated)
19
-            {
18
+          
20
                 string phone1 = RequestString.ToDBC(RequestString.RemoveNotNumber(WebHelper.NoHtml(phone)));
19
                 string phone1 = RequestString.ToDBC(RequestString.RemoveNotNumber(WebHelper.NoHtml(phone)));
21
                 string tophone = phone1;
20
                 string tophone = phone1;
22
-                string zipcode = ""; string bfix = ""; string wfix = ""; string fix = "";
23
-                string userseatgroupid = CurrentUser.UserData.F_SeartGroupID.ToString();
24
-                if (userseatgroupid != "" && userseatgroupid != "0")
25
-                {
26
-                    Model.T_Sys_SeatGroup smodel = new BLL.T_Sys_SeatGroup().GetModel(int.Parse(userseatgroupid));
27
-                    if (smodel != null)
28
-                    {
29
-                        zipcode = smodel.F_ZXAtt.Trim();
30
-                        bfix = smodel.F_WHBDKey.Trim();
31
-                        wfix = smodel.F_WHWDKey.Trim();
32
-                    }
33
-                }
21
+                string zipcode = "0371"; string bfix = "9"; string wfix = "90        "; string fix = "";
22
+
34
                 int zip = GetZipCodeByPhone(phone1, zipcode);
23
                 int zip = GetZipCodeByPhone(phone1, zipcode);
35
                 #region 
24
                 #region 
36
                 if (zip == 1)
25
                 if (zip == 1)
62
               
51
               
63
               
52
               
64
                 return Success("外呼号码加前缀"+ phone, obj);
53
                 return Success("外呼号码加前缀"+ phone, obj);
65
-            }
66
-            return NoToken("未知错误,请重新登录");
54
+            
67
         }
55
         }
68
 
56
 
69
         /// <summary>
57
         /// <summary>

+ 2 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

390
         /// <returns></returns>
390
         /// <returns></returns>
391
         public ActionResult UpdateGJ()
391
         public ActionResult UpdateGJ()
392
         {
392
         {
393
-            if (!Request.IsAuthenticated)
394
-                return NoToken("未知错误,请重新登录");
393
+          //  if (!Request.IsAuthenticated)
394
+             //   return NoToken("未知错误,请重新登录");
395
 
395
 
396
             string strid = RequestString.GetFormString("callid");
396
             string strid = RequestString.GetFormString("callid");
397
             bool bl = new BLL.T_Call_CallRecords().UpdateCallInHookTelRecord(strid);
397
             bool bl = new BLL.T_Call_CallRecords().UpdateCallInHookTelRecord(strid);

+ 53 - 10
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

18
     {
18
     {
19
         BLL.T_Call_CallRecords bll = new BLL.T_Call_CallRecords();
19
         BLL.T_Call_CallRecords bll = new BLL.T_Call_CallRecords();
20
         //获取通话记录列表
20
         //获取通话记录列表
21
-        public ActionResult GetList(string phone, string usercode,string workordercode,string BusinessDockCode = "")
21
+        public ActionResult GetList(string phone, string usercode,string workordercode,string BusinessDockCode = "",string workorder="")
22
         {
22
         {
23
-            int userId = CurrentUser.UserData.F_UserId;
24
-            Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
23
+           // int userId = CurrentUser.UserData.F_UserId;
24
+          //  Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
25
 
25
 
26
             string sql = "";
26
             string sql = "";
27
             
27
             
31
             string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
31
             string endtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
32
             string dept = HttpUtility.UrlDecode(RequestString.GetQueryString("dept"));
32
             string dept = HttpUtility.UrlDecode(RequestString.GetQueryString("dept"));
33
             string dealtype = HttpUtility.UrlDecode(RequestString.GetQueryString("dealtype"));
33
             string dealtype = HttpUtility.UrlDecode(RequestString.GetQueryString("dealtype"));
34
-
34
+            string callid = HttpUtility.UrlDecode(RequestString.GetQueryString("callid"));
35
             string strpageindex = RequestString.GetQueryString("page");
35
             string strpageindex = RequestString.GetQueryString("page");
36
             int pageindex = 1;
36
             int pageindex = 1;
37
             string strpagesize = RequestString.GetQueryString("pagesize");
37
             string strpagesize = RequestString.GetQueryString("pagesize");
38
             int pagesize = 10;
38
             int pagesize = 10;
39
-          
40
-        
39
+
40
+            if (callid != null && callid.Trim() != "")
41
+            {
42
+                sql += " and CallId='" + callid + "'";
43
+            }
41
             if (usercode != null && usercode.Trim() != "")
44
             if (usercode != null && usercode.Trim() != "")
42
             {
45
             {
43
                 sql += " and UserCode='" + usercode + "'";
46
                 sql += " and UserCode='" + usercode + "'";
51
                 //处理方式
54
                 //处理方式
52
                 sql += " and DealType = " + dealtype + " ";
55
                 sql += " and DealType = " + dealtype + " ";
53
             }
56
             }
57
+            if (!string .IsNullOrEmpty (workorder))
58
+            {
59
+                sql += " and WorkOrder like '%" + workorder + "%'";
60
+            }
54
             if (phone != null && phone.Trim() != "")
61
             if (phone != null && phone.Trim() != "")
55
             {
62
             {
56
                 sql += " and CallNumber like '%" + phone + "%'";
63
                 sql += " and CallNumber like '%" + phone + "%'";
71
             {
78
             {
72
                 sql += " and datediff(day,BeginTime,'" + endtime + "')>=0 ";
79
                 sql += " and datediff(day,BeginTime,'" + endtime + "')>=0 ";
73
             }
80
             }
74
-            if (workordercode!="") {
75
-                sql += " and (select F_RecCode from T_Rec_RegRecords where T_Rec_RegRecords.F_CallId=T_Call_CallRecords.CallId) like '"+ workordercode + "'";
76
-            }
81
+            //if (workordercode!="") {
82
+            //    sql += " and (select F_RecCode from T_Rec_RegRecords where T_Rec_RegRecords.F_CallId=T_Call_CallRecords.CallId) like '"+ workordercode + "'";
83
+            //}
77
                 
84
                 
78
 
85
 
79
             if (strpageindex.Trim() != "")
86
             if (strpageindex.Trim() != "")
312
                 throw;
319
                 throw;
313
             }
320
             }
314
         }
321
         }
315
-
322
+        /// <summary>
323
+        /// 更新工单id
324
+        /// </summary>
325
+        /// <returns></returns>
326
+        public ActionResult UpdateOrder(string callid="",string WorkOrder="",
327
+            string callType="")
328
+        {
329
+            if (string.IsNullOrEmpty(callid))
330
+                return Error("请选择通话记录");
331
+            if (string.IsNullOrEmpty(WorkOrder))
332
+                return Error("请选择案件");
333
+            if (string.IsNullOrEmpty( callType))
334
+                return Error("请选择通话类别");
335
+            var model = new BLL.T_Call_CallRecords().GetModelList ("CallId='"+ callid + "' and " +
336
+                " CallType='"+ callType + "'");
337
+            if (model != null&& model.Count >0)
338
+            {
339
+                if (!string.IsNullOrEmpty(model[0].WorkOrder))
340
+                    model[0].WorkOrder = model[0].WorkOrder + "," + WorkOrder;
341
+                else
342
+                    model[0].WorkOrder = WorkOrder;
343
+            }
344
+            else
345
+            {
346
+                return Error("该通话记录不存在");
347
+            }
348
+                
349
+            bool bl = new BLL.T_Call_CallRecords().UpdateWorkorder(model[0]);
350
+            if (bl)
351
+            {
352
+                return Success("更新成功");
353
+            }
354
+            else
355
+            {
356
+                return Error("更新失败");
357
+            }
358
+        }
316
         /// <summary>
359
         /// <summary>
317
         /// 获取实体
360
         /// 获取实体
318
         /// </summary>
361
         /// </summary>

+ 39 - 37
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/WorkcalendarController.cs

16
         public ActionResult GetCalendarList(string strdate)
16
         public ActionResult GetCalendarList(string strdate)
17
         {
17
         {
18
             
18
             
19
-            if (Request.IsAuthenticated)
20
-            {
19
+           // if (Request.IsAuthenticated)
20
+           // {
21
                 string sql = "";
21
                 string sql = "";
22
                 try
22
                 try
23
                 {
23
                 {
44
                 {
44
                 {
45
                     return Error("获取日历失败,错误:" + ex.Message);
45
                     return Error("获取日历失败,错误:" + ex.Message);
46
                 }
46
                 }
47
-            }
48
-            return NoToken("未知错误,请重新登录");
47
+           // }
48
+          //  return NoToken("未知错误,请重新登录");
49
         }
49
         }
50
 
50
 
51
         //设置(非)工作日
51
         //设置(非)工作日
52
         public ActionResult Setworkingday(string date)
52
         public ActionResult Setworkingday(string date)
53
         {
53
         {
54
             
54
             
55
-            if (Request.IsAuthenticated)
56
-            {
55
+           // if (Request.IsAuthenticated)
56
+           // {
57
                 
57
                 
58
                     if (date != null && date != "")
58
                     if (date != null && date != "")
59
                     {
59
                     {
112
                         return Error("获取参数失败");
112
                         return Error("获取参数失败");
113
                     }
113
                     }
114
             
114
             
115
-            }
116
-            return NoToken("未知错误,请重新登录");
115
+           // }
116
+           // }
117
+          //  return NoToken("未知错误,请重新登录");
117
         }
118
         }
118
 
119
 
119
         //获取上班时间段
120
         //获取上班时间段
120
         public ActionResult GetTimesList()
121
         public ActionResult GetTimesList()
121
         {
122
         {
122
             
123
             
123
-            if (Request.IsAuthenticated)
124
-            {
125
-                int userId = CurrentUser.UserData.F_UserId;
126
-                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
124
+           // if (Request.IsAuthenticated)
125
+          //  {
126
+              //  int userId = CurrentUser.UserData.F_UserId;
127
+              //  Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
127
 
128
 
128
                 string sql = "";
129
                 string sql = "";
129
                 DataTable dt = new DataTable();
130
                 DataTable dt = new DataTable();
176
 
177
 
177
                 return Content(obj.ToJson());
178
                 return Content(obj.ToJson());
178
 
179
 
179
-            }
180
-            return NoToken("未知错误,请重新登录");
180
+           // }
181
+           // return NoToken("未知错误,请重新登录");
181
         }
182
         }
182
 
183
 
183
         //获取某一条时间段信息
184
         //获取某一条时间段信息
184
         public ActionResult GetTimes(string id)
185
         public ActionResult GetTimes(string id)
185
         {
186
         {
186
             
187
             
187
-            if (Request.IsAuthenticated)
188
-            {
188
+           // if (Request.IsAuthenticated)
189
+           // {
189
 
190
 
190
                 if (id != null && id.Trim() != "")
191
                 if (id != null && id.Trim() != "")
191
                 {
192
                 {
204
                 {
205
                 {
205
                     return Error("获取参数失败");
206
                     return Error("获取参数失败");
206
                 }
207
                 }
207
-            }
208
-            return NoToken("未知错误,请重新登录");
208
+          //  }
209
+          //  return NoToken("未知错误,请重新登录");
209
         }
210
         }
210
 
211
 
211
         //添加/修改上班时间段
212
         //添加/修改上班时间段
212
         public ActionResult AddTimes(string workid, string workstart, string workend, string timename, string remark)
213
         public ActionResult AddTimes(string workid, string workstart, string workend, string timename, string remark)
213
         {
214
         {
214
             
215
             
215
-            if (Request.IsAuthenticated)
216
-            {
216
+          //  if (Request.IsAuthenticated)
217
+          //  {
217
 
218
 
218
-                int userId = CurrentUser.UserData.F_UserId;
219
-                Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
220
-                if (userId != 0)
221
-                {
222
-                    Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
223
-                    if (ua != null)
224
-                    {
219
+              //  int userId = CurrentUser.UserData.F_UserId;
220
+             //   Model.T_Sys_UserAccount userModel = new BLL.T_Sys_UserAccount().GetModel(userId);
221
+              //  if (userId != 0)
222
+             //   {
223
+                  //  Model.T_Sys_UserAccount ua = new BLL.T_Sys_UserAccount().GetModel(userId);
224
+                   // if (ua != null)
225
+                   // {
225
                         if (workid != null && workid != "")
226
                         if (workid != null && workid != "")
226
                         {
227
                         {
227
                             int id = 0;
228
                             int id = 0;
255
                             _model.F_EndDate = workend;
256
                             _model.F_EndDate = workend;
256
                             _model.F_Name = timename.Trim();
257
                             _model.F_Name = timename.Trim();
257
                             _model.F_Remark = remark.Trim();
258
                             _model.F_Remark = remark.Trim();
258
-                            _model.F_GroupCode = ua.groupcode;
259
-                            _model.F_CreateUser = ua.F_UserCode;
259
+                         //   _model.F_GroupCode = ua.groupcode;
260
+                         //   _model.F_CreateUser = ua.F_UserCode;
260
                             _model.F_CreateTime = DateTime.Now;
261
                             _model.F_CreateTime = DateTime.Now;
261
 
262
 
262
                             int b = new BLL.T_Sys_WorkTimes().Add(_model);
263
                             int b = new BLL.T_Sys_WorkTimes().Add(_model);
269
                                 return Error("添加失败");
270
                                 return Error("添加失败");
270
                             }
271
                             }
271
                         }
272
                         }
272
-                    }
273
-                }
273
+            return Error("编辑失败");
274
+            // }
275
+            // }
274
 
276
 
275
-            }
276
-            return NoToken("未知错误,请重新登录");
277
+            //  }
278
+            //  return NoToken("未知错误,请重新登录");
277
         }
279
         }
278
 
280
 
279
         //删除上班时间段
281
         //删除上班时间段
280
         public ActionResult DelTimes(string[] ids)
282
         public ActionResult DelTimes(string[] ids)
281
         {
283
         {
282
             
284
             
283
-            if (Request.IsAuthenticated)
284
-            {
285
+         //   if (Request.IsAuthenticated)
286
+          //  {
285
                 
287
                 
286
                     if (ids != null && ids.Length > 0)
288
                     if (ids != null && ids.Length > 0)
287
                     {
289
                     {
302
                         return Error("请选择要删除的记录");
304
                         return Error("请选择要删除的记录");
303
                     }
305
                     }
304
             
306
             
305
-            }
306
-            return NoToken("未知错误,请重新登录");
307
+          //  }
308
+           // return NoToken("未知错误,请重新登录");
307
         }
309
         }
308
     }
310
     }
309
 }
311
 }

+ 6 - 0
codegit/CallCenterApi/CallCenterApi.Model/T_Call_CallRecords.cs

68
         private string _tasktype;
68
         private string _tasktype;
69
         private string _taskphoneid;
69
         private string _taskphoneid;
70
         private string _taskid;
70
         private string _taskid;
71
+        private string _workorder;
71
         /// <summary>
72
         /// <summary>
72
         /// 呼叫编号
73
         /// 呼叫编号
73
         /// </summary>
74
         /// </summary>
492
             set { _taskid = value; }
493
             set { _taskid = value; }
493
             get { return _taskid; }
494
             get { return _taskid; }
494
         }
495
         }
496
+        public string WorkOrder
497
+        {
498
+            set { _workorder = value; }
499
+            get { return _workorder; }
500
+        }
495
         #endregion Model
501
         #endregion Model
496
     }
502
     }
497
 }
503
 }