瀏覽代碼

callrecord

Dun.Jason 1 年之前
父節點
當前提交
16b47a5299

+ 1 - 0
src/Hotline.Api/Controllers/AiController.cs

@@ -209,6 +209,7 @@ namespace Hotline.Api.Controllers
         {
             var (total, items) = await _aiOrderVisitDetailRepository.Queryable()
                 .Includes(x=>x.OrderVisit,x=>x.OrderVisitDetails)
+                .Includes(x=>x.Order)
                 .Where(x => x.AiOrderVisitId == dto.Id)
                 .OrderByDescending(x => x.CreationTime)
                 .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);

+ 1 - 0
src/Hotline.Api/Controllers/IPPbxController.cs

@@ -222,6 +222,7 @@ namespace Hotline.Api.Controllers
             {
                 model.UserId = work.UserId;
                 model.UserName = work.UserName;
+                model.StaffNo = work.StaffNo;
             }
             await _trCallRecordRepository.AddAsync(model, HttpContext.RequestAborted);
             return OpenResponse.Ok("success");

+ 1 - 1
src/Hotline.Application/CallCenter/Calls/TrApplication.cs

@@ -56,7 +56,7 @@ namespace Hotline.Application.CallCenter.Calls
             var telModel = await _trClient.QueryTelsAsync(new Tr.Sdk.Tels.QueryTelRequest() { TelNo = telNo }, cancellationToken);
             if (telModel !=null && telModel.Count>0)
             {
-                work = new Work(_sessionContext.UserId, _sessionContext.UserName, telModel[0].Id, telNo, telModel[0].Password, telModel[0].Description, telModel[0].QueueId);
+                work = new Work(_sessionContext.UserId, _sessionContext.UserName, telModel[0].Id, telNo, telModel[0].Password, telModel[0].Description, telModel[0].QueueId,_sessionContext.StaffNo);
                 await _workRepository.AddAsync(work, cancellationToken);
                 bool IsTelNeedVerify = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.IsTelNeedVerify).SettingValue[0]);
                 if (IsTelNeedVerify)

+ 6 - 4
src/Hotline/CallCenter/Calls/TrCallRecord.cs

@@ -119,6 +119,11 @@ namespace Hotline.CallCenter.Calls
         /// </summary>
         public string? DtmfType { get; set; }
 
+        /// <summary>
+        /// 通话状态
+        /// </summary>
+        public EOnState OnState { get; set; }
+
         #region 自定义字段
         /// <summary>
         /// 通话时长(挂机时间-接通时间)
@@ -138,10 +143,7 @@ namespace Hotline.CallCenter.Calls
         [SugarColumn(DefaultValue = "0")]
         public int QueueTims { get; set; }
 
-        /// <summary>
-        /// 通话状态
-        /// </summary>
-        public EOnState OnState { get; set; }
+        
         #endregion
     }
 }

+ 5 - 1
src/Hotline/Users/Work.cs

@@ -46,6 +46,9 @@ public class Work : CreationModificationEntity
     public string? Description { get; set; }
 
     public string? QueueId { get; set; }
+
+    public string? StaffNo { get; set; }
+
     ///// <summary>
     ///// SignalR.ConnectionId
     ///// </summary>
@@ -57,7 +60,7 @@ public class Work : CreationModificationEntity
 
     }
 
-    public Work(string userId, string name, string telId, string telNo, string? telPwd, string? description, string? queueId)
+    public Work(string userId, string name, string telId, string telNo, string? telPwd, string? description, string? queueId,string? staffNo)
     {
         StartTime = DateTime.Now;
         UserId = userId;
@@ -67,6 +70,7 @@ public class Work : CreationModificationEntity
         TelPwd = telPwd;
         Description = description;
         QueueId = queueId;
+        StaffNo = staffNo;
     }
 
     public Work(string userId, string name, string telId, string telNo)