Parcourir la source

QueryTelOperationsFixed

xfe il y a 9 mois
Parent
commit
d25b22cec6

+ 8 - 4
src/Hotline.Api/Controllers/CallController.cs

@@ -1,6 +1,7 @@
 using Hotline.Application.CallCenter;
 using Hotline.CallCenter.BlackLists;
 using Hotline.CallCenter.Calls;
+using Hotline.CallCenter.Tels;
 using Hotline.Share.Dtos.CallCenter;
 using Hotline.Share.Dtos.TrCallCenter;
 using Hotline.Share.Enums.CallCenter;
@@ -87,10 +88,8 @@ namespace Hotline.Api.Controllers
         {
             return new
             {
-                OnState = EnumExts.GetDescriptions<EOnState>(),
-                CallDirection = EnumExts.GetDescriptions<ECallDirection>(),
-                EndBy = EnumExts.GetDescriptions<EEndBy>(),
-                PhoneTypes = EnumExts.GetDescriptions<EPhoneTypes>()
+                Direction = EnumExts.GetDescriptions<ECallDirection>(),
+                EndBy = EnumExts.GetDescriptions<EHangupBy>(),
             };
         }
 
@@ -101,5 +100,10 @@ namespace Hotline.Api.Controllers
         [HttpPost("relate-call-to-order")]
         public Task RelateCallToOrder([FromBody] LinkCallRecordDto dto) =>
             _callApplication.RelateCallToOrderAsync(dto, HttpContext.RequestAborted);
+
+        public Task<IReadOnlyList<TelOperation>> QueryTelOperationsFixed([FromQuery] QueryTelOperationsFixedDto dto)
+        {
+
+        }
     }
 }

+ 16 - 0
src/Hotline.Application/CallCenter/TianRunCallApplication.cs

@@ -91,6 +91,22 @@ namespace Hotline.Application.CallCenter
         public Task<TrOnDutyResponseDto> GetTelStateAsync(CancellationToken cancellationToken) =>
             _trApplication.TelState(_sessionContext.RequiredUserId, cancellationToken);
 
+        /// <summary>
+        /// 定量查询通话记录
+        /// </summary>
+        Task<IReadOnlyList<CallNativeDto>> ICallApplication.QueryCallsFixedAsync(QueryCallsFixedDto dto, CancellationToken cancellationToken)
+        {
+            throw new NotImplementedException();
+        }
+
+        /// <summary>
+        /// 关联通话记录与工单或回访
+        /// </summary>
+        public Task RelateCallToOrderAsync(LinkCallRecordDto dto, CancellationToken cancellationToken)
+        {
+            throw new NotImplementedException();
+        }
+
         /// <summary>
         /// 定量查询通话记录
         /// </summary>

+ 1 - 13
src/Hotline/CallCenter/Tels/TelOperation.cs

@@ -34,19 +34,7 @@ namespace Hotline.CallCenter.Tels
         /// </summary>
         public int? OperateState { get; set; }
 
-        public string? OperateStateText => OperateState.HasValue
-            ? OperateState switch
-            {
-                0 => "签入",
-                1 => "接听",
-                2 => "置忙",
-                3 => "置闲",
-                16 => "签出",
-                17 => "呼出",
-                30 => "挂机",
-                _ => "未知"
-            }
-            : string.Empty;
+        public string? OperateStateText { get; set; }
 
         public DateTime? OperateTime { get; set; }
         public int? Channel { get; set; }

+ 14 - 0
src/XingTang.Sdk/SeatOperation.cs

@@ -32,6 +32,20 @@ namespace XingTang.Sdk
         /// </summary>
         public int? ExecutionState { get; set; }
 
+        public string? ExtutionStateText => ExecutionState.HasValue
+            ? ExecutionState switch
+            {
+                0 => "签入",
+                1 => "接听",
+                2 => "置忙",
+                3 => "置闲",
+                16 => "签出",
+                17 => "呼出",
+                30 => "挂机",
+                _ => "未知"
+            }
+            : string.Empty;
+
         /// <summary>
         /// 操作时间
         /// </summary>