duhongyu vor 5 Jahren
Ursprung
Commit
9cc80056b1

+ 11 - 8
代码/TVShoppingCallCenter_ZLJ/Controllers/CallCenter/CallFunctionController.cs

288
                     modelRecord.ActionID =1;
288
                     modelRecord.ActionID =1;
289
                     modelRecord.TalkStartTime = modelcdr.answer_time;
289
                     modelRecord.TalkStartTime = modelcdr.answer_time;
290
                     modelRecord.Callee = modelcdr.callee;
290
                     modelRecord.Callee = modelcdr.callee;
291
-                     modelRecord.UserCode = modelcdr.agent ;
291
+                     modelRecord.UserCode = modelcdr.agent;
292
                     modelRecord.Caller = modelcdr.caller;
292
                     modelRecord.Caller = modelcdr.caller;
293
-                    modelRecord.CallType = 1;
293
+                    modelRecord.CallType =1;
294
                     modelRecord.BeginTime = modelcdr.create_time;
294
                     modelRecord.BeginTime = modelcdr.create_time;
295
                     modelRecord.EndTime = modelcdr.end_time;
295
                     modelRecord.EndTime = modelcdr.end_time;
296
-                    //  modelcdr.hangup_cause;挂机原因不赋值  HangUpReason
297
-                    //  modelcdr.leave_path 留言 赋值给了FilePath
296
+                  //  modelRecord.CallState = modelcdr.is_answer;
297
+                
298
+                   
299
+                    modelRecord.Id =(int ) modelcdr.id;
300
+                   
298
                     modelRecord.FilePath = url + modelcdr.record_path;
301
                     modelRecord.FilePath = url + modelcdr.record_path;
299
-                    if (string.IsNullOrEmpty(modelcdr.record_path))
302
+                    if (string.IsNullOrEmpty(modelcdr.record_path) && !string.IsNullOrEmpty(modelcdr.record_path ))
300
                     {
303
                     {
301
                         modelRecord.FilePath = url + modelcdr.record_path;
304
                         modelRecord.FilePath = url + modelcdr.record_path;
302
                     }
305
                     }
303
                     modelRecord.RingStartTime = modelcdr.ring_time;
306
                     modelRecord.RingStartTime = modelcdr.ring_time;
304
                     modelRecord.CallId = modelcdr.uuid;
307
                     modelRecord.CallId = modelcdr.uuid;
305
-                    if (!string .IsNullOrEmpty (modelcdr.callee))
306
-                    modelRecord.Location = await GetLocationFunc(modelcdr.callee, 1);
308
+                    modelRecord.CdrId = (int)modelcdr.id;
309
+                    modelRecord.Location = await GetLocationFunc(modelcdr.caller, 1);
307
                     #region 计算时长
310
                     #region 计算时长
308
                     modelRecord.LongTime = (int)DateTimeConvert.DateDiff(DateInterval.Second, modelcdr.create_time.GetValueOrDefault(), modelcdr.end_time.GetValueOrDefault());
311
                     modelRecord.LongTime = (int)DateTimeConvert.DateDiff(DateInterval.Second, modelcdr.create_time.GetValueOrDefault(), modelcdr.end_time.GetValueOrDefault());
309
 
312
 
364
                     }
367
                     }
365
                     if (n1 >=2000)
368
                     if (n1 >=2000)
366
                     {
369
                     {
367
-                        await taskRepository.AddAndUpdateList(taskList);
370
+                        await taskRepository.UpdateList(taskList);
368
                         taskList.Clear();
371
                         taskList.Clear();
369
                         n1 = 0;
372
                         n1 = 0;
370
                     }
373
                     }