|
@@ -55,6 +55,7 @@ public abstract class DefaultCallApplication : ICallApplication
|
|
|
private readonly IOrderVisitRepository _orderVisitRepository;
|
|
|
private readonly ISystemLogRepository _systemLogRepository;
|
|
|
private readonly IRepository<TelActionRecord> _telActionRecordRepository;
|
|
|
+ private readonly IRepository<User> _userRepository;
|
|
|
|
|
|
public DefaultCallApplication(
|
|
|
IRepository<Tel> telRepository,
|
|
@@ -76,7 +77,8 @@ public abstract class DefaultCallApplication : ICallApplication
|
|
|
ICapPublisher capPublisher,
|
|
|
IOrderRepository orderRepository,
|
|
|
ISystemLogRepository systemLogRepository,
|
|
|
- IRepository<TelActionRecord> telActionRecordRepository)
|
|
|
+ IRepository<TelActionRecord> telActionRecordRepository,
|
|
|
+ IRepository<User> userRepository)
|
|
|
{
|
|
|
_telRepository = telRepository;
|
|
|
_telGroupRepository = telGroupRepository;
|
|
@@ -98,6 +100,7 @@ public abstract class DefaultCallApplication : ICallApplication
|
|
|
_orderRepository = orderRepository;
|
|
|
_systemLogRepository = systemLogRepository;
|
|
|
_telActionRecordRepository = telActionRecordRepository;
|
|
|
+ _userRepository = userRepository;
|
|
|
}
|
|
|
|
|
|
public DefaultCallApplication()
|
|
@@ -196,6 +199,11 @@ public abstract class DefaultCallApplication : ICallApplication
|
|
|
throw UserFriendlyException.SameMessage("当前分机已被占用");
|
|
|
}
|
|
|
|
|
|
+ //查询当前用户的默认分机组
|
|
|
+ var user = await _userRepository.GetAsync(p => p.Id == _sessionContext.UserId);
|
|
|
+ if (user != null)
|
|
|
+ dto.GroupId = user.DefaultTelGroup;
|
|
|
+
|
|
|
work = new Work(_sessionContext.RequiredUserId, _sessionContext.UserName,
|
|
|
dto.TelNo, dto.TelNo, null, null,
|
|
|
dto.GroupId, _sessionContext.StaffNo, null);
|