admin 1 жил өмнө
parent
commit
4537cd31a4

+ 2 - 5
src/Hotline/CallCenter/Tels/TelDomainService.cs

@@ -126,15 +126,12 @@ public class TelDomainService : ITelDomainService, IScopeDependency
             throw new UserFriendlyException($"无效分机休息编号, telRestId: {id}", "无效分机休息编号");
             throw new UserFriendlyException($"无效分机休息编号, telRestId: {id}", "无效分机休息编号");
 
 
         //await _deviceManager.TelRestAsync(telRest.TelNo, cancellationToken);
         //await _deviceManager.TelRestAsync(telRest.TelNo, cancellationToken);
-        
-
-        telRest.ApplyStatus = ETelRestApplyStatus.Resting;
-        
-        await _telRestRepository.UpdateAsync(telRest, cancellationToken);
 
 
         if (_options.Value.CallCenterType!= "WeiErXin")
         if (_options.Value.CallCenterType!= "WeiErXin")
         {
         {
             telRest.StartTime = DateTime.Now;
             telRest.StartTime = DateTime.Now;
+            telRest.ApplyStatus = ETelRestApplyStatus.Resting;
+            await _telRestRepository.UpdateAsync(telRest, cancellationToken);
             #region 处理设备
             #region 处理设备
             var tel = _telCacheManager.GetTel(telRest.TelNo);
             var tel = _telCacheManager.GetTel(telRest.TelNo);
             foreach (var group in tel.Groups)
             foreach (var group in tel.Groups)