|
@@ -1,10 +1,12 @@
|
|
|
using Hotline.Ai.Quality;
|
|
|
+using Hotline.Caching.Interfaces;
|
|
|
using Hotline.CallCenter.Calls;
|
|
|
using Hotline.Orders;
|
|
|
using Hotline.Share.Dtos.Quality;
|
|
|
using Hotline.Share.Enums.Quality;
|
|
|
using MapsterMapper;
|
|
|
using XF.Domain.Authentications;
|
|
|
+using XF.Domain.Constants;
|
|
|
using XF.Domain.Dependency;
|
|
|
using XF.Domain.Exceptions;
|
|
|
using XF.Domain.Repository;
|
|
@@ -21,8 +23,9 @@ namespace Hotline.Quality
|
|
|
private readonly IOrderRepository _orderRepository;
|
|
|
private readonly IRepository<TrCallRecord> _trCallRecordRepository;
|
|
|
private readonly IRepository<QualityTemplate> _qualityTemplate;
|
|
|
+ private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
|
|
|
|
- public QualityDomainService(
|
|
|
+ public QualityDomainService(
|
|
|
ISessionContext sessionContext,
|
|
|
IMapper mapper,
|
|
|
IRepository<QualityDetail> qualiteyDetail,
|
|
@@ -30,8 +33,9 @@ namespace Hotline.Quality
|
|
|
IAiQualityService aiQualityService,
|
|
|
IRepository<TrCallRecord> trCallRecordRepository,
|
|
|
IRepository<QualityTemplate> qualityTemplate,
|
|
|
- IOrderRepository orderRepository
|
|
|
- )
|
|
|
+ IOrderRepository orderRepository,
|
|
|
+ ISystemSettingCacheManager systemSettingCacheManager
|
|
|
+ )
|
|
|
{
|
|
|
_sessionContext = sessionContext;
|
|
|
_mapper = mapper;
|
|
@@ -41,7 +45,9 @@ namespace Hotline.Quality
|
|
|
_trCallRecordRepository = trCallRecordRepository;
|
|
|
_qualityTemplate = qualityTemplate;
|
|
|
_orderRepository = orderRepository;
|
|
|
- }
|
|
|
+ _systemSettingCacheManager = systemSettingCacheManager;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
public async Task AddQualityAsync(EQualitySource Source, string OrderId, string VisitId, CancellationToken cancellationToken)
|
|
|
{
|
|
@@ -98,7 +104,8 @@ namespace Hotline.Quality
|
|
|
quality.Mode = "智能质检";
|
|
|
//var call = await _trCallRecordRepository.GetAsync(x => x.CallAccept == order.CallId); //由CallAccept改成OtherAccept
|
|
|
var call = await _trCallRecordRepository.GetAsync(x => x.OtherAccept == order.CallId);
|
|
|
- await _aiQualityService.CreateAiOrderQualityTask(quality, call, order, cancellationToken);
|
|
|
+ var setting = _systemSettingCacheManager.GetSetting(SettingConstants.ViteRecordPrefix);
|
|
|
+ await _aiQualityService.CreateAiOrderQualityTask(quality, call, order, setting?.SettingValue[0],cancellationToken);
|
|
|
}
|
|
|
}
|
|
|
}
|