|
@@ -16,6 +16,8 @@ using XF.Domain.Dependency;
|
|
|
using XF.Domain.Exceptions;
|
|
|
using XF.Domain.Repository;
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
+using Hotline.Share.Dtos;
|
|
|
+using MapsterMapper;
|
|
|
|
|
|
namespace Hotline.Application.StatisticalReport.CallReport;
|
|
|
|
|
@@ -23,6 +25,7 @@ namespace Hotline.Application.StatisticalReport.CallReport;
|
|
|
public class YiBinCallReportApplication : CallReportApplicationBase, ICallReportApplication, IScopeDependency
|
|
|
{
|
|
|
private readonly IRepository<TrCallRecord> _trCallRecordRepository;
|
|
|
+ private readonly IMapper _mapper;
|
|
|
private readonly ITrCallRecordRepository _trCallRecordRepositoryEx;
|
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
|
private readonly IRepository<User> _userRepository;
|
|
@@ -37,7 +40,8 @@ public class YiBinCallReportApplication : CallReportApplicationBase, ICallReport
|
|
|
IRepository<Work> workRepository,
|
|
|
IRepository<TelRest> telRestRepository,
|
|
|
ICallNativeRepository callNativeRepository,
|
|
|
- ITrCallRecordRepository trCallRecordRepositoryEx) : base(systemSettingCacheManager, callNativeRepository, userRepository, workRepository, telRestRepository)
|
|
|
+ ITrCallRecordRepository trCallRecordRepositoryEx,
|
|
|
+ IMapper mapper) : base(systemSettingCacheManager, callNativeRepository, userRepository, workRepository, telRestRepository)
|
|
|
{
|
|
|
_trCallRecordRepository = trCallRecordRepository;
|
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
@@ -46,6 +50,7 @@ public class YiBinCallReportApplication : CallReportApplicationBase, ICallReport
|
|
|
_telRestRepository = telRestRepository;
|
|
|
_callNativeRepository = callNativeRepository;
|
|
|
_trCallRecordRepositoryEx = trCallRecordRepositoryEx;
|
|
|
+ _mapper = mapper;
|
|
|
}
|
|
|
|
|
|
public override async Task<List<BiCallDto>> QueryCallsAsync(BiQueryCallsDto dto, CancellationToken cancellationToken)
|
|
@@ -243,4 +248,43 @@ public class YiBinCallReportApplication : CallReportApplicationBase, ICallReport
|
|
|
var list = await _trCallRecordRepositoryEx.GetCallList(dto, noConnectByeTimes, effectiveTimes, connectByeTimes);
|
|
|
return list;
|
|
|
}
|
|
|
+
|
|
|
+ //public override async Task<PagedDto<TrCallDto>> GetCallDetailListAsync(GetCallListDto dto, CancellationToken cancellationToken)
|
|
|
+ //{
|
|
|
+ // var (total, items) = await _trCallRecordRepository.Queryable()
|
|
|
+ // .Includes(x => x.Order)
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.CPN), x => x.CPN.Contains(dto.CPN))
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.CDPN), x => x.CDPN.Contains(dto.CDPN))
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.TelNo), x => x.TelNo.Contains(dto.TelNo))
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.UserName), x => x.UserName.Contains(dto.UserName))
|
|
|
+ // .WhereIF(dto.CallDirection != null, x => x.CallDirection == dto.CallDirection)
|
|
|
+ // .WhereIF(dto.OnState != null, x => x.OnState == dto.OnState)
|
|
|
+ // .WhereIF(dto.EndBy != null, x => x.EndBy == dto.EndBy)
|
|
|
+ // .WhereIF(dto.BeginIvrTimeStart.HasValue, x => x.BeginIvrTime >= dto.BeginIvrTimeStart)
|
|
|
+ // .WhereIF(dto.BeginIvrTimeEnd.HasValue, x => x.BeginIvrTime <= dto.BeginIvrTimeEnd)
|
|
|
+ // .WhereIF(dto.EndIvrTimeStart.HasValue, x => x.EndIvrTime >= dto.EndIvrTimeStart)
|
|
|
+ // .WhereIF(dto.EndIvrTimeEnd.HasValue, x => x.EndIvrTime <= dto.EndIvrTimeEnd)
|
|
|
+ // .WhereIF(dto.BeginQueueTimeStart.HasValue, x => x.BeginQueueTime >= dto.BeginQueueTimeEnd)
|
|
|
+ // .WhereIF(dto.BeginQueueTimeEnd.HasValue, x => x.BeginQueueTime <= dto.BeginQueueTimeEnd)
|
|
|
+ // .WhereIF(dto.EndQueueTimeStart.HasValue, x => x.EndQueueTime >= dto.EndQueueTimeStart)
|
|
|
+ // .WhereIF(dto.EndQueueTimeEnd.HasValue, x => x.EndQueueTime <= dto.EndQueueTimeEnd)
|
|
|
+ // .WhereIF(dto.AnsweredTimeStart.HasValue, x => x.AnsweredTime >= dto.AnsweredTimeStart)
|
|
|
+ // .WhereIF(dto.AnsweredTimeEnd.HasValue, x => x.AnsweredTime <= dto.AnsweredTimeEnd)
|
|
|
+ // .WhereIF(dto.OverTimeStart.HasValue, x => x.OverTime >= dto.OverTimeStart)
|
|
|
+ // .WhereIF(dto.OverTimeEnd.HasValue, x => x.OverTime <= dto.OverTimeEnd)
|
|
|
+ // .WhereIF(dto.BeginRingTimeStart.HasValue, x => x.BeginRingTime >= dto.BeginRingTimeStart)
|
|
|
+ // .WhereIF(dto.BeginRingTimeEnd.HasValue, x => x.BeginRingTime <= dto.BeginRingTimeEnd)
|
|
|
+ // .WhereIF(dto.EndRingTimeStart.HasValue, x => x.EndRingTimg >= dto.EndRingTimeStart)
|
|
|
+ // .WhereIF(dto.EndRingTimeEnd.HasValue, x => x.EndRingTimg <= dto.EndRingTimeEnd)
|
|
|
+ // .WhereIF(dto.CallTimeStart.HasValue, x => x.CreatedTime >= dto.CallTimeStart)
|
|
|
+ // .WhereIF(dto.CallTimeEnd.HasValue, x => x.CreatedTime <= dto.CallTimeEnd)
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.OrderNo), x => x.Order.No.Contains(dto.OrderNo))
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.Title), x => x.Order.Title.Contains(dto.Title))
|
|
|
+ // .WhereIF(!string.IsNullOrEmpty(dto.Gateway), x => x.Gateway.Contains(dto.Gateway))
|
|
|
+ // .WhereIF(dto.IsAiAnswered == true, x => string.IsNullOrEmpty(x.UserId) == true && x.BeginIvrTime.HasValue && x.EndIvrTime.HasValue)
|
|
|
+ // .WhereIF(dto.PhoneTypes != null, x => x.PhoneTypes == dto.PhoneTypes)
|
|
|
+ // .OrderByDescending(x => x.CreatedTime)
|
|
|
+ // .ToPagedListAsync(dto.PageIndex, dto.PageSize);
|
|
|
+ // return new PagedDto<TrCallDto>(total, _mapper.Map<IReadOnlyList<TrCallDto>>(items));
|
|
|
+ //}
|
|
|
}
|