|
@@ -39,6 +39,7 @@ using Hotline.FlowEngine.Notifications;
|
|
|
using Hotline.Quality.Notifications;
|
|
|
using Hotline.Share.Dtos.Quality;
|
|
|
using MongoDB.Driver;
|
|
|
+using Hotline.Repository.SqlSugar.CallCenter;
|
|
|
|
|
|
namespace Hotline.Api.Controllers
|
|
|
{
|
|
@@ -66,6 +67,7 @@ namespace Hotline.Api.Controllers
|
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
|
private readonly IRepository<TelActionRecord> _telActionRecordRepository;
|
|
|
private readonly ISystemMobilAreaApplication _systemMobilAreaApplication;
|
|
|
+ private readonly IRepository<Work> _workRepository;
|
|
|
private readonly Publisher _publisher;
|
|
|
|
|
|
public IPPbxController(ITrClient trClient, IMapper mapper, IUserDomainService userDomainService,
|
|
@@ -78,7 +80,7 @@ namespace Hotline.Api.Controllers
|
|
|
ITelApplication telApplication, IRepository<Quality.Quality> qualiteyRepository,
|
|
|
IAiQualityService aiQualityService, IRepository<QualityTemplate> qualityTemplate,
|
|
|
ISystemSettingCacheManager systemSettingCacheManager,IRepository<TelActionRecord> telActionRecordRepository,
|
|
|
- ISystemMobilAreaApplication systemMobilAreaApplication, Publisher publisher)
|
|
|
+ ISystemMobilAreaApplication systemMobilAreaApplication,IRepository<Work> workRepository ,Publisher publisher)
|
|
|
{
|
|
|
_trClient = trClient;
|
|
|
_mapper = mapper;
|
|
@@ -102,6 +104,7 @@ namespace Hotline.Api.Controllers
|
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
|
_telActionRecordRepository = telActionRecordRepository;
|
|
|
_systemMobilAreaApplication = systemMobilAreaApplication;
|
|
|
+ _workRepository = workRepository;
|
|
|
_publisher = publisher;
|
|
|
|
|
|
}
|
|
@@ -136,7 +139,8 @@ namespace Hotline.Api.Controllers
|
|
|
public async Task<IReadOnlyList<TrTelStateDto>> TrQueryTelState([FromQuery] string? state)
|
|
|
{
|
|
|
var tels = await _trClient.QueryTelStateAsync(new QueryTelStateRequest() { State = state }, HttpContext.RequestAborted);
|
|
|
- var workList = _userCacheManager.GetWorks();
|
|
|
+ //var workList = _userCacheManager.GetWorks();
|
|
|
+ var workList = await _workRepository.Queryable().Where(d=> 1 == 1 && !d.EndTime.HasValue).ToListAsync();
|
|
|
var query = from tel in tels.AgentList
|
|
|
join works in workList on tel.TelNo equals works.TelNo into workD
|
|
|
from work in workD.DefaultIfEmpty()
|