Dun.Jason 1 жил өмнө
parent
commit
6e41ee2f0c

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

@@ -39,7 +39,7 @@ namespace Hotline.Application.CallCenter.Calls
             {
                 if (work.TelNo == telNo)
                 {
-                    return new TrOnDutyResponseDto() { TelNo = work.TelNo, TelPwd = work.TelPwd, Description = work.Description };
+                    return new TrOnDutyResponseDto() { TelNo = work.TelNo, TelPwd = work.TelPwd, Description = work.Description, QueueId = work.QueueId };
                 }
                 else
                 {
@@ -56,16 +56,16 @@ 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);
+                work = new Work(_sessionContext.UserId, _sessionContext.UserName, telModel[0].Id, telNo, telModel[0].Password, telModel[0].Description, telModel[0].QueueId);
                 await _workRepository.AddAsync(work, cancellationToken);
                 bool IsTelNeedVerify = bool.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.IsTelNeedVerify).SettingValue[0]);
                 if (IsTelNeedVerify)
                 {
-                    return new TrOnDutyResponseDto() { TelNo = telNo, TelPwd = "", Description = telModel[0].Description };
+                    return new TrOnDutyResponseDto() { TelNo = telNo, TelPwd = "", Description = telModel[0].Description, QueueId = telModel[0].QueueId };
                 }
                 else
                 {
-                    return new TrOnDutyResponseDto() { TelNo = telNo, TelPwd = telModel[0].Password, Description = telModel[0].Description };
+                    return new TrOnDutyResponseDto() { TelNo = telNo, TelPwd = telModel[0].Password, Description = telModel[0].Description, QueueId = telModel[0].QueueId };
                 }
             }
             throw UserFriendlyException.SameMessage("签入异常,未查询到对应分机信息");

+ 1 - 0
src/Hotline.Share/Dtos/TrCallCenter/TrTelDao.cs

@@ -76,6 +76,7 @@ namespace Hotline.Share.Dtos.TrCallCenter
         public string? TelPwd { get; set; }
 
         public string? Description { get; set; }
+        public string? QueueId { get; set; }
     }
 
 

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

@@ -44,6 +44,8 @@ public class Work : CreationModificationEntity
     public string? TelPwd { get; set; }
 
     public string? Description { get; set; }
+
+    public string? QueueId { get; set; }
     ///// <summary>
     ///// SignalR.ConnectionId
     ///// </summary>
@@ -55,7 +57,7 @@ public class Work : CreationModificationEntity
 
     }
 
-    public Work(string userId, string name, string telId, string telNo, string? telPwd, string? description)
+    public Work(string userId, string name, string telId, string telNo, string? telPwd, string? description, string? queueId)
     {
         StartTime = DateTime.Now;
         UserId = userId;
@@ -64,6 +66,7 @@ public class Work : CreationModificationEntity
         TelNo = telNo;
         TelPwd = telPwd;
         Description = description;
+        QueueId = queueId;
     }
 
     public Work(string userId, string name, string telId, string telNo)