|
@@ -1,6 +1,5 @@
|
|
|
//using Hotline.CallCenter.Calls;
|
|
|
//using Hotline.Repository.SqlSugar;
|
|
|
-//using Microsoft.AspNetCore.Http;
|
|
|
//using Microsoft.Extensions.DependencyInjection;
|
|
|
//using Microsoft.Extensions.Hosting;
|
|
|
//using Microsoft.Extensions.Logging;
|
|
@@ -12,7 +11,7 @@
|
|
|
// {
|
|
|
// private readonly IServiceScopeFactory _serviceScopeFactory;
|
|
|
|
|
|
-// public CallRecordManager(IServiceScopeFactory serviceScopeFactory,ISugarUnitOfWork<WexDbContext> uowWex)
|
|
|
+// public CallRecordManager(IServiceScopeFactory serviceScopeFactory, ISugarUnitOfWork<WexDbContext> uowWex)
|
|
|
// {
|
|
|
// _serviceScopeFactory = serviceScopeFactory;
|
|
|
// }
|
|
@@ -30,7 +29,7 @@
|
|
|
// using var scope = _serviceScopeFactory.CreateScope();
|
|
|
// var _wexCallRecordRepository = scope.ServiceProvider.GetService<IWexCallRecordRepository>();
|
|
|
// var _uowWex = scope.ServiceProvider.GetService<ISugarUnitOfWork<WexDbContext>>();
|
|
|
-// var wexRes = _uowWex?.Db.Ado.SqlQuery<WexRecord>("select * from view_telinfo_full where IsSynch=@IsSynch and IsOk = @IsOk ", new { IsSynch = 0, IsOk = 1 });
|
|
|
+// var wexRes = _uowWex?.Db.Ado.SqlQuery<WexRecord>("select * from view_telinfo_full where IsSynch=@IsSynch and IsOk = @IsOk and CallType<>'会议' ", new { IsSynch = 0, IsOk = 1 });
|
|
|
// if (wexRes != null)
|
|
|
// {
|
|
|
// foreach (var item in wexRes)
|
|
@@ -58,6 +57,7 @@
|
|
|
// default:
|
|
|
// break;
|
|
|
// }
|
|
|
+// //TODO 分机号取出有误差(可能存在工号的问题)
|
|
|
// if (wexCallRecord.Direction == Share.Enums.CallCenter.ECallDirection.Out)
|
|
|
// {
|
|
|
// wexCallRecord.CPN = item.TelPhone;
|
|
@@ -77,10 +77,10 @@
|
|
|
// wexCallRecord.BeginTime = item.CallTime;
|
|
|
// wexCallRecord.BeginRingTime = item.BeginRingTime;
|
|
|
// wexCallRecord.EndRingTime = item.EndRingTime;
|
|
|
-// wexCallRecord.RingTimes = item.RingTimes;
|
|
|
+// wexCallRecord.RingTimes = int.Parse(item.RingTimes);
|
|
|
// wexCallRecord.AnsweredTime = item.BeginTalking;
|
|
|
// wexCallRecord.ByeTime = item.EndTalking;
|
|
|
-// wexCallRecord.TalkTime = item.TalkLength;
|
|
|
+// wexCallRecord.TalkTime = int.Parse(item.TalkLength);
|
|
|
// wexCallRecord.RecordUrl = item.RecordUrl;
|
|
|
// wexCallRecord.RecordName = item.RecordName;
|
|
|
// wexCallRecord.SourceRecord = item.SourceRecord;
|
|
@@ -88,14 +88,7 @@
|
|
|
// switch (item.NoAnswerResult)
|
|
|
// {
|
|
|
// case "客户先挂机":
|
|
|
-// if(wexCallRecord.Direction == Share.Enums.CallCenter.ECallDirection.In)
|
|
|
-// {
|
|
|
-// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
-// }
|
|
|
-// else
|
|
|
-// {
|
|
|
-// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.To;
|
|
|
-// }
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// case "外呼挂机":
|
|
|
// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
@@ -111,43 +104,54 @@
|
|
|
// }
|
|
|
// break;
|
|
|
// case "坐席振铃挂机":
|
|
|
-// if (wexCallRecord.Direction == Share.Enums.CallCenter.ECallDirection.In)
|
|
|
-// {
|
|
|
-// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.To;
|
|
|
-// }
|
|
|
-// else
|
|
|
-// {
|
|
|
-// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
-// }
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.To;
|
|
|
// break;
|
|
|
// case "对端振铃挂机":
|
|
|
-
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// case "自助语音挂机":
|
|
|
-
|
|
|
+// //TODO 确定不了是自动挂机 还是来电挂机
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// case "排队挂机":
|
|
|
-
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// case "中继转接挂机":
|
|
|
-
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// case "来电挂机":
|
|
|
-
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// case "开始转人工挂机":
|
|
|
-
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// case "电话广播":
|
|
|
-
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// case "播放工号":
|
|
|
-
|
|
|
+// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// default:
|
|
|
// wexCallRecord.EndBy = Share.Enums.CallCenter.EEndBy.From;
|
|
|
// break;
|
|
|
// }
|
|
|
+// switch (item.Result)
|
|
|
+// {
|
|
|
+// case "成功":
|
|
|
+// wexCallRecord.OnState = Share.Enums.CallCenter.EOnState.On;
|
|
|
+// break;
|
|
|
+// case "失败":
|
|
|
+// wexCallRecord.OnState = Share.Enums.CallCenter.EOnState.NoOn;
|
|
|
+// break;
|
|
|
+// case "接听":
|
|
|
+// wexCallRecord.OnState = Share.Enums.CallCenter.EOnState.On;
|
|
|
+// break;
|
|
|
+// case "未接":
|
|
|
+// wexCallRecord.OnState = Share.Enums.CallCenter.EOnState.NoOn;
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// break;
|
|
|
+// }
|
|
|
// wexCallRecord.Result = item.Result;
|
|
|
// wexCallRecord.EvaluateResult = item.AssessName;
|
|
|
|
|
@@ -200,13 +204,13 @@
|
|
|
// public DateTime? EndQueueTime { get; set; }
|
|
|
|
|
|
// [SugarColumn(ColumnName = "BeginRingTime")]
|
|
|
-// public DateTime? BeginRingTime{ get; set; }
|
|
|
+// public DateTime? BeginRingTime { get; set; }
|
|
|
|
|
|
// [SugarColumn(ColumnName = "EndRingTime")]
|
|
|
// public DateTime? EndRingTime { get; set; }
|
|
|
|
|
|
// [SugarColumn(ColumnName = "RingTimes")]
|
|
|
-// public int RingTimes { get; set; }
|
|
|
+// public string RingTimes { get; set; }
|
|
|
|
|
|
// [SugarColumn(ColumnName = "CallTime")]
|
|
|
// public DateTime? CallTime { get; set; }
|
|
@@ -221,7 +225,7 @@
|
|
|
// /// 通话时长
|
|
|
// /// </summary>
|
|
|
// [SugarColumn(ColumnName = "TalkLenth")]
|
|
|
-// public int TalkLength { get; set; }
|
|
|
+// public string TalkLength { get; set; }
|
|
|
|
|
|
// [SugarColumn(ColumnName = "RecordUrl")]
|
|
|
// public string RecordUrl { get; set; }
|