|
@@ -33,11 +33,11 @@ public class BiCallController : BaseController
|
|
private readonly IRepository<User> _userRepository;
|
|
private readonly IRepository<User> _userRepository;
|
|
private readonly IRepository<TelRest> _telRestRepository;
|
|
private readonly IRepository<TelRest> _telRestRepository;
|
|
private readonly IMapper _mapper;
|
|
private readonly IMapper _mapper;
|
|
- private readonly ITrCallRecordRepository _trCallRecordRepositoryEx;
|
|
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
private readonly IRepository<Work> _workRepository;
|
|
private readonly IRepository<Work> _workRepository;
|
|
private readonly ISystemDicDataCacheManager _sysDicDataCacheManager;
|
|
private readonly ISystemDicDataCacheManager _sysDicDataCacheManager;
|
|
private readonly ICallReportApplication _callReportApplication;
|
|
private readonly ICallReportApplication _callReportApplication;
|
|
|
|
+ private readonly IExportApplication _exportApplication;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -46,22 +46,21 @@ public class BiCallController : BaseController
|
|
IRepository<User> userRepository,
|
|
IRepository<User> userRepository,
|
|
IRepository<TelRest> telRestRepository,
|
|
IRepository<TelRest> telRestRepository,
|
|
IMapper mapper,
|
|
IMapper mapper,
|
|
- ITrCallRecordRepository trCallRecordRepositoryEx,
|
|
|
|
ISystemSettingCacheManager systemSettingCacheManager,
|
|
ISystemSettingCacheManager systemSettingCacheManager,
|
|
ISystemDicDataCacheManager sysDicDataCacheManager,
|
|
ISystemDicDataCacheManager sysDicDataCacheManager,
|
|
IRepository<Work> workRepository,
|
|
IRepository<Work> workRepository,
|
|
- ICallReportApplication callReportApplication)
|
|
|
|
|
|
+ ICallReportApplication callReportApplication,
|
|
|
|
+ IExportApplication exportApplication)
|
|
{
|
|
{
|
|
_trCallRecordRepository = trCallRecordRepository;
|
|
_trCallRecordRepository = trCallRecordRepository;
|
|
_userRepository = userRepository;
|
|
_userRepository = userRepository;
|
|
_telRestRepository = telRestRepository;
|
|
_telRestRepository = telRestRepository;
|
|
_mapper = mapper;
|
|
_mapper = mapper;
|
|
- _trCallRecordRepositoryEx = trCallRecordRepositoryEx;
|
|
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
_workRepository = workRepository;
|
|
_workRepository = workRepository;
|
|
_sysDicDataCacheManager = sysDicDataCacheManager;
|
|
_sysDicDataCacheManager = sysDicDataCacheManager;
|
|
_callReportApplication = callReportApplication;
|
|
_callReportApplication = callReportApplication;
|
|
-
|
|
|
|
|
|
+ _exportApplication = exportApplication;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -72,56 +71,7 @@ public class BiCallController : BaseController
|
|
[HttpGet("calls")]
|
|
[HttpGet("calls")]
|
|
[AllowAnonymous]
|
|
[AllowAnonymous]
|
|
public async Task<List<BiCallDto>> QueryCallsAsync([FromQuery] BiQueryCallsDto dto)
|
|
public async Task<List<BiCallDto>> QueryCallsAsync([FromQuery] BiQueryCallsDto dto)
|
|
- {
|
|
|
|
- if (!dto.StartTime.HasValue || !dto.EndTime.HasValue) throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
- #region 注释
|
|
|
|
- //var items = await _trCallRecordRepository.Queryable()
|
|
|
|
- // .Where(d => d.CreatedTime >= dto.StartTime && d.CreatedTime <= dto.EndTime)
|
|
|
|
- // .Where(d => d.CallDirection == ECallDirection.In)
|
|
|
|
- // .WhereIF(!string.IsNullOrEmpty(dto.Line), d => d.Gateway == dto.Line)
|
|
|
|
- // .Select(d => new
|
|
|
|
- // {
|
|
|
|
- // d.CreatedTime.Year,
|
|
|
|
- // d.CreatedTime.Month,
|
|
|
|
- // d.CreatedTime.Day,
|
|
|
|
- // d.CreatedTime.Hour,
|
|
|
|
- // d.AnsweredTime,
|
|
|
|
- // d.EndBy
|
|
|
|
- // })
|
|
|
|
- // .MergeTable()
|
|
|
|
- // .GroupBy(d => new
|
|
|
|
- // {
|
|
|
|
- // d.Year,
|
|
|
|
- // d.Month,
|
|
|
|
- // d.Day,
|
|
|
|
- // d.Hour
|
|
|
|
- // })
|
|
|
|
- // .Select(d => new BiCallDto
|
|
|
|
- // {
|
|
|
|
- // Hour = d.Hour,
|
|
|
|
- // Total = SqlFunc.AggregateCount(d.Hour),
|
|
|
|
- // Answered = SqlFunc.AggregateSum(SqlFunc.IIF(d.AnsweredTime != null, 1, 0)),
|
|
|
|
- // Hanguped = SqlFunc.AggregateSum(SqlFunc.IIF(d.AnsweredTime == null && d.EndBy != null && d.EndBy.Value == EEndBy.To, 1, 0))
|
|
|
|
- // })
|
|
|
|
- // .OrderBy(d => d.Hour)
|
|
|
|
- // .ToListAsync(HttpContext.RequestAborted);
|
|
|
|
-
|
|
|
|
- //if (items.Count < 24)
|
|
|
|
- //{
|
|
|
|
- // for (var i = 0; i < 24; i++)
|
|
|
|
- // {
|
|
|
|
- // var item = items.FirstOrDefault(d => d.Hour == i);
|
|
|
|
- // if (item is null)
|
|
|
|
- // items.Add(new BiCallDto { Hour = i });
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // items = items.OrderBy(d => d.Hour).ToList();
|
|
|
|
- //}
|
|
|
|
- #endregion
|
|
|
|
-
|
|
|
|
- return await _trCallRecordRepositoryEx.GetQueryCalls(dto.StartTime.Value, dto.EndTime.Value, dto.Keyword);
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+ => await _callReportApplication.QueryCallsAsync(dto, HttpContext.RequestAborted);
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 话务统计分析---导出
|
|
/// 话务统计分析---导出
|
|
@@ -131,35 +81,22 @@ public class BiCallController : BaseController
|
|
[HttpPost("calls_export")]
|
|
[HttpPost("calls_export")]
|
|
[AllowAnonymous]
|
|
[AllowAnonymous]
|
|
public async Task<FileStreamResult> ExportQueryCallsAsync([FromBody] ExportExcelDto<BiQueryCallsDto> dto)
|
|
public async Task<FileStreamResult> ExportQueryCallsAsync([FromBody] ExportExcelDto<BiQueryCallsDto> dto)
|
|
- {
|
|
|
|
- if (!dto.QueryDto.StartTime.HasValue || !dto.QueryDto.EndTime.HasValue) throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
-
|
|
|
|
- var list = await _trCallRecordRepositoryEx.GetQueryCalls(dto.QueryDto.StartTime.Value, dto.QueryDto.EndTime.Value, dto.QueryDto.Keyword);
|
|
|
|
-
|
|
|
|
- if (list != null && list.Count > 0)
|
|
|
|
- {
|
|
|
|
- list.Add(new BiCallDto()
|
|
|
|
- {
|
|
|
|
- HourRange = "合计",
|
|
|
|
- Hour = 13,
|
|
|
|
- Total = list.Sum(p => p.Total),
|
|
|
|
- Answered = list.Sum(p => p.Answered),
|
|
|
|
- Hanguped = list.Sum(p => p.Hanguped)
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
|
-
|
|
|
|
- var dtos = list
|
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(BiCallDto), dynamicClass))
|
|
|
|
- .Cast<object>()
|
|
|
|
- .ToList();
|
|
|
|
-
|
|
|
|
- var stream = ExcelHelper.CreateStream(dtos);
|
|
|
|
-
|
|
|
|
- return ExcelStreamResult(stream, "话务统计分析");
|
|
|
|
- }
|
|
|
|
|
|
+ => ExcelStreamResult(
|
|
|
|
+ await _exportApplication.FittingAsync(
|
|
|
|
+ dto,
|
|
|
|
+ await _callReportApplication.QueryCallsAsync(dto.QueryDto, HttpContext.RequestAborted),
|
|
|
|
+ list =>
|
|
|
|
+ {
|
|
|
|
+ list.Add(new BiCallDto()
|
|
|
|
+ {
|
|
|
|
+ HourRange = "合计",
|
|
|
|
+ Hour = 13,
|
|
|
|
+ Total = list.Sum(p => p.Total),
|
|
|
|
+ Answered = list.Sum(p => p.Answered),
|
|
|
|
+ Hanguped = list.Sum(p => p.Hanguped)
|
|
|
|
+ });
|
|
|
|
+ }),
|
|
|
|
+ "话务统计分析");
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 话务日期明细
|
|
/// 话务日期明细
|
|
@@ -169,9 +106,6 @@ public class BiCallController : BaseController
|
|
[HttpGet("query_calls_detail")]
|
|
[HttpGet("query_calls_detail")]
|
|
public async Task<object> QueryCallsDetailAsync([FromQuery] BiQueryCallsDto dto)
|
|
public async Task<object> QueryCallsDetailAsync([FromQuery] BiQueryCallsDto dto)
|
|
{
|
|
{
|
|
- if (!dto.StartTime.HasValue || !dto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
-
|
|
|
|
var items = await _callReportApplication.QueryCallsDetailAsync(dto);
|
|
var items = await _callReportApplication.QueryCallsDetailAsync(dto);
|
|
|
|
|
|
var total = new QueryCallsDetailDto
|
|
var total = new QueryCallsDetailDto
|
|
@@ -204,40 +138,32 @@ public class BiCallController : BaseController
|
|
[HttpPost("query_calls_detail_export")]
|
|
[HttpPost("query_calls_detail_export")]
|
|
public async Task<FileStreamResult> QueryCallsDetailExportAsync([FromBody] ExportExcelDto<BiQueryCallsDto> dto)
|
|
public async Task<FileStreamResult> QueryCallsDetailExportAsync([FromBody] ExportExcelDto<BiQueryCallsDto> dto)
|
|
{
|
|
{
|
|
- if (!dto.QueryDto.StartTime.HasValue || !dto.QueryDto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
-
|
|
|
|
- var items = await _callReportApplication.QueryCallsDetailAsync(dto.QueryDto);
|
|
|
|
-
|
|
|
|
- var total = new QueryCallsDetailDto
|
|
|
|
- {
|
|
|
|
- Date = "合计",
|
|
|
|
- Hour = "",
|
|
|
|
- InTotal = items.Sum(p => p.InTotal),
|
|
|
|
- InConnectionQuantity = items.Sum(p => p.InConnectionQuantity),
|
|
|
|
- NotAcceptedHang = items.Sum(p => p.NotAcceptedHang),
|
|
|
|
- TotalDurationIncomingCalls = items.Sum(p => p.TotalDurationIncomingCalls),
|
|
|
|
- InAvailableAnswer = items.Sum(p => p.InAvailableAnswer),
|
|
|
|
- InHangupImmediateWhenAnswered = items.Sum(p => p.InHangupImmediateWhenAnswered),
|
|
|
|
- TimeoutConnection = items.Sum(p => p.TimeoutConnection),
|
|
|
|
- TimeoutSuspension = items.Sum(p => p.TimeoutSuspension),
|
|
|
|
- QueueByeCount = items.Sum(p => p.QueueByeCount),
|
|
|
|
- IvrByeCount = items.Sum(p => p.IvrByeCount),
|
|
|
|
- OutTotal = items.Sum(p => p.OutTotal),
|
|
|
|
- OutConnectionQuantity = items.Sum(p => p.OutConnectionQuantity)
|
|
|
|
- };
|
|
|
|
- items.Add(total);
|
|
|
|
-
|
|
|
|
- dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
|
-
|
|
|
|
- var dtos = items
|
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(QueryCallsDetailDto), dynamicClass))
|
|
|
|
- .Cast<object>()
|
|
|
|
- .ToList();
|
|
|
|
-
|
|
|
|
- var stream = ExcelHelper.CreateStream(dtos);
|
|
|
|
-
|
|
|
|
- return ExcelStreamResult(stream, "话务日期明细数据");
|
|
|
|
|
|
+ return ExcelStreamResult(
|
|
|
|
+ await _exportApplication.FittingAsync(
|
|
|
|
+ dto,
|
|
|
|
+ await _callReportApplication.QueryCallsDetailAsync(dto.QueryDto),
|
|
|
|
+ items => {
|
|
|
|
+ var total = new QueryCallsDetailDto
|
|
|
|
+ {
|
|
|
|
+ Date = "合计",
|
|
|
|
+ Hour = "",
|
|
|
|
+ InTotal = items.Sum(p => p.InTotal),
|
|
|
|
+ InConnectionQuantity = items.Sum(p => p.InConnectionQuantity),
|
|
|
|
+ NotAcceptedHang = items.Sum(p => p.NotAcceptedHang),
|
|
|
|
+ TotalDurationIncomingCalls = items.Sum(p => p.TotalDurationIncomingCalls),
|
|
|
|
+ InAvailableAnswer = items.Sum(p => p.InAvailableAnswer),
|
|
|
|
+ InHangupImmediateWhenAnswered = items.Sum(p => p.InHangupImmediateWhenAnswered),
|
|
|
|
+ TimeoutConnection = items.Sum(p => p.TimeoutConnection),
|
|
|
|
+ TimeoutSuspension = items.Sum(p => p.TimeoutSuspension),
|
|
|
|
+ QueueByeCount = items.Sum(p => p.QueueByeCount),
|
|
|
|
+ IvrByeCount = items.Sum(p => p.IvrByeCount),
|
|
|
|
+ OutTotal = items.Sum(p => p.OutTotal),
|
|
|
|
+ OutConnectionQuantity = items.Sum(p => p.OutConnectionQuantity)
|
|
|
|
+ };
|
|
|
|
+ items.Add(total);
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ , "话务日期明细数据");
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -247,12 +173,10 @@ public class BiCallController : BaseController
|
|
/// <param name="dto"></param>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpGet("query_incall_calls_list")]
|
|
[HttpGet("query_incall_calls_list")]
|
|
- public async Task<PagedDto<TrCallDtoNew>> GetInCallCallListAsync([FromQuery] BiQueryCallsDto dto)
|
|
|
|
|
|
+ public async Task<PagedDto<CallRecordOutDto>> GetInCallCallListAsync([FromQuery] BiQueryCallsDto dto)
|
|
{
|
|
{
|
|
- var (total, items) = await _callReportApplication.QueryCallsDetailInTotalAsync(dto)
|
|
|
|
- .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
|
-
|
|
|
|
- return new PagedDto<TrCallDtoNew>(total, _mapper.Map<IReadOnlyList<TrCallDtoNew>>(items));
|
|
|
|
|
|
+ var (total, items) = await _callReportApplication.QueryCallsDetailInTotalAsync(dto, false);
|
|
|
|
+ return new PagedDto<CallRecordOutDto>(total, items);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -263,32 +187,24 @@ public class BiCallController : BaseController
|
|
[HttpPost("query_incall_calls_list_export")]
|
|
[HttpPost("query_incall_calls_list_export")]
|
|
public async Task<FileStreamResult> GetInCallCallListExportAsync([FromBody] ExportExcelDto<BiQueryCallsDto> dto)
|
|
public async Task<FileStreamResult> GetInCallCallListExportAsync([FromBody] ExportExcelDto<BiQueryCallsDto> dto)
|
|
{
|
|
{
|
|
- var query = _callReportApplication.QueryCallsDetailInTotalAsync(dto.QueryDto);
|
|
|
|
- List<TrCallRecord> data;
|
|
|
|
- if (dto.IsExportAll)
|
|
|
|
- {
|
|
|
|
- data = await query.ToListAsync(HttpContext.RequestAborted);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- var (_, items) = await query.ToPagedListAsync(dto.QueryDto, HttpContext.RequestAborted);
|
|
|
|
- data = items;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- var dataDtos = _mapper.Map<ICollection<TrCallDtoNew>>(data);
|
|
|
|
|
|
+ var (total, data) = await _callReportApplication.QueryCallsDetailInTotalAsync(dto.QueryDto, dto.IsExportAll);
|
|
|
|
|
|
dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
|
|
|
- var dtos = dataDtos
|
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(TrCallDtoNew), dynamicClass))
|
|
|
|
|
|
+ var dtos = data
|
|
|
|
+ .Select(stu => _mapper.Map(stu, typeof(CallRecordOutDto), dynamicClass))
|
|
.Cast<object>()
|
|
.Cast<object>()
|
|
.ToList();
|
|
.ToList();
|
|
|
|
|
|
var stream = ExcelHelper.CreateStream(dtos);
|
|
var stream = ExcelHelper.CreateStream(dtos);
|
|
|
|
|
|
- string name = dto.QueryDto.TypeCode == "2" ? "话务日期-接通明细数据" : "话务日期-总量明细数据";
|
|
|
|
|
|
|
|
- return ExcelStreamResult(stream, name);
|
|
|
|
|
|
+ return ExcelStreamResult(
|
|
|
|
+ await _exportApplication.FittingAsync(
|
|
|
|
+ dto,
|
|
|
|
+ (await _callReportApplication.QueryCallsDetailInTotalAsync(dto.QueryDto, dto.IsExportAll)).Item2
|
|
|
|
+ ),
|
|
|
|
+ dto.QueryDto.TypeCode == "2" ? "话务日期-接通明细数据" : "话务日期-总量明细数据");
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -298,26 +214,9 @@ public class BiCallController : BaseController
|
|
/// <param name="dto"></param>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpGet("query_calls_hour_detail_list")]
|
|
[HttpGet("query_calls_hour_detail_list")]
|
|
- public async Task<object> QueryCallsHourDetailListAsync([FromQuery] BiQueryCallsDto dto)
|
|
|
|
|
|
+ public async Task<TotalDataList<QueryCallsDetailDto>> QueryCallsHourDetailListAsync([FromQuery] BiQueryCallsDto dto)
|
|
{
|
|
{
|
|
- if (!dto.StartTime.HasValue || !dto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
-
|
|
|
|
- //超时接通量
|
|
|
|
- int CallInOverConnRingTime = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.CallInOverConnRingTime)?.SettingValue[0]);
|
|
|
|
- //坐席超时挂断时间
|
|
|
|
- int SeatChaoTime = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.SeatChaoTime)?.SettingValue[0]);
|
|
|
|
-
|
|
|
|
- //未接秒挂时间
|
|
|
|
- int noConnectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.NoConnectByeTimes)?.SettingValue[0]);
|
|
|
|
- //呼入有效时间
|
|
|
|
- int effectiveTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.EffectiveTimes)?.SettingValue[0]);
|
|
|
|
- //接通秒挂时间
|
|
|
|
- int connectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.ConnectByeTimes)?.SettingValue[0]);
|
|
|
|
-
|
|
|
|
- var items = await _trCallRecordRepositoryEx.QueryCallsHourDetail(dto.StartTime.Value, dto.EndTime.Value, noConnectByeTimes, effectiveTimes
|
|
|
|
- , connectByeTimes, CallInOverConnRingTime, SeatChaoTime, dto.Keyword);
|
|
|
|
-
|
|
|
|
|
|
+ var items = await _callReportApplication.QueryCallsHourDetailAsync(dto, HttpContext.RequestAborted);
|
|
var total = new QueryCallsDetailDto
|
|
var total = new QueryCallsDetailDto
|
|
{
|
|
{
|
|
Date = "",
|
|
Date = "",
|
|
@@ -336,7 +235,7 @@ public class BiCallController : BaseController
|
|
OutConnectionQuantity = items.Sum(p => p.OutConnectionQuantity)
|
|
OutConnectionQuantity = items.Sum(p => p.OutConnectionQuantity)
|
|
};
|
|
};
|
|
|
|
|
|
- return new { List = items, Total = total };
|
|
|
|
|
|
+ return new TotalDataList<QueryCallsDetailDto>(items, total);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -347,57 +246,33 @@ public class BiCallController : BaseController
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost("query_calls_hour_detail_list_export")]
|
|
[HttpPost("query_calls_hour_detail_list_export")]
|
|
public async Task<FileStreamResult> QueryCallsHourDetailListExportAsync([FromBody] ExportExcelDto<BiQueryCallsDto> dto)
|
|
public async Task<FileStreamResult> QueryCallsHourDetailListExportAsync([FromBody] ExportExcelDto<BiQueryCallsDto> dto)
|
|
- {
|
|
|
|
- if (!dto.QueryDto.StartTime.HasValue || !dto.QueryDto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
-
|
|
|
|
- //超时接通量
|
|
|
|
- int CallInOverConnRingTime = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.CallInOverConnRingTime)?.SettingValue[0]);
|
|
|
|
- //坐席超时挂断时间
|
|
|
|
- int SeatChaoTime = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.SeatChaoTime)?.SettingValue[0]);
|
|
|
|
-
|
|
|
|
- //未接秒挂时间
|
|
|
|
- int noConnectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.NoConnectByeTimes)?.SettingValue[0]);
|
|
|
|
- //呼入有效时间
|
|
|
|
- int effectiveTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.EffectiveTimes)?.SettingValue[0]);
|
|
|
|
- //接通秒挂时间
|
|
|
|
- int connectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.ConnectByeTimes)?.SettingValue[0]);
|
|
|
|
|
|
+ => ExcelStreamResult(
|
|
|
|
+ await _exportApplication.FittingAsync(
|
|
|
|
+ dto,
|
|
|
|
+ await _callReportApplication.QueryCallsHourDetailAsync(dto.QueryDto, HttpContext.RequestAborted),
|
|
|
|
+ items =>
|
|
|
|
+ {
|
|
|
|
+ var total = new QueryCallsDetailDto
|
|
|
|
+ {
|
|
|
|
+ Date = "",
|
|
|
|
+ Hour = "合计",
|
|
|
|
+ InTotal = items.Sum(p => p.InTotal),
|
|
|
|
+ InConnectionQuantity = items.Sum(p => p.InConnectionQuantity),
|
|
|
|
+ NotAcceptedHang = items.Sum(p => p.NotAcceptedHang),
|
|
|
|
+ TotalDurationIncomingCalls = items.Sum(p => p.TotalDurationIncomingCalls),
|
|
|
|
+ InAvailableAnswer = items.Sum(p => p.InAvailableAnswer),
|
|
|
|
+ InHangupImmediateWhenAnswered = items.Sum(p => p.InHangupImmediateWhenAnswered),
|
|
|
|
+ TimeoutConnection = items.Sum(p => p.TimeoutConnection),
|
|
|
|
+ TimeoutSuspension = items.Sum(p => p.TimeoutSuspension),
|
|
|
|
+ QueueByeCount = items.Sum(p => p.QueueByeCount),
|
|
|
|
+ IvrByeCount = items.Sum(p => p.IvrByeCount),
|
|
|
|
+ OutTotal = items.Sum(p => p.OutTotal),
|
|
|
|
+ OutConnectionQuantity = items.Sum(p => p.OutConnectionQuantity)
|
|
|
|
+ };
|
|
|
|
+ items.Add(total);
|
|
|
|
+ })
|
|
|
|
+ , "话务日期明细-时间段");
|
|
|
|
|
|
- var items = await _trCallRecordRepositoryEx.QueryCallsHourDetail(dto.QueryDto.StartTime.Value, dto.QueryDto.EndTime.Value, noConnectByeTimes, effectiveTimes
|
|
|
|
- , connectByeTimes, CallInOverConnRingTime, SeatChaoTime, dto.QueryDto.Keyword);
|
|
|
|
-
|
|
|
|
- var total = new QueryCallsDetailDto
|
|
|
|
- {
|
|
|
|
- Date = "",
|
|
|
|
- Hour = "合计",
|
|
|
|
- InTotal = items.Sum(p => p.InTotal),
|
|
|
|
- InConnectionQuantity = items.Sum(p => p.InConnectionQuantity),
|
|
|
|
- NotAcceptedHang = items.Sum(p => p.NotAcceptedHang),
|
|
|
|
- TotalDurationIncomingCalls = items.Sum(p => p.TotalDurationIncomingCalls),
|
|
|
|
- InAvailableAnswer = items.Sum(p => p.InAvailableAnswer),
|
|
|
|
- InHangupImmediateWhenAnswered = items.Sum(p => p.InHangupImmediateWhenAnswered),
|
|
|
|
- TimeoutConnection = items.Sum(p => p.TimeoutConnection),
|
|
|
|
- TimeoutSuspension = items.Sum(p => p.TimeoutSuspension),
|
|
|
|
- QueueByeCount = items.Sum(p => p.QueueByeCount),
|
|
|
|
- IvrByeCount = items.Sum(p => p.IvrByeCount),
|
|
|
|
- OutTotal = items.Sum(p => p.OutTotal),
|
|
|
|
- OutConnectionQuantity = items.Sum(p => p.OutConnectionQuantity)
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- items.Add(total);
|
|
|
|
-
|
|
|
|
- dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
|
-
|
|
|
|
- var dtos = items
|
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(QueryCallsDetailDto), dynamicClass))
|
|
|
|
- .Cast<object>()
|
|
|
|
- .ToList();
|
|
|
|
-
|
|
|
|
- var stream = ExcelHelper.CreateStream(dtos);
|
|
|
|
-
|
|
|
|
- return ExcelStreamResult(stream, "话务日期明细-时间段");
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 坐席话务统计分析
|
|
/// 坐席话务统计分析
|
|
@@ -405,42 +280,32 @@ public class BiCallController : BaseController
|
|
/// <param name="dto"></param>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost("seats/export")]
|
|
[HttpPost("seats/export")]
|
|
- public async Task<FileStreamResult> ExportSeatss([FromBody] ExportExcelDto<ReportPagedRequest> dto)
|
|
|
|
|
|
+ public async Task<FileStreamResult> ExportSeatss([FromBody] ExportExcelDto<ReportRequiredPagedRequest> dto)
|
|
{
|
|
{
|
|
- if (!dto.QueryDto.StartTime.HasValue || !dto.QueryDto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
-
|
|
|
|
- var list = await _callReportApplication.QuerySeatCallAsync(dto.QueryDto);
|
|
|
|
- if (list != null && list.Count > 0)
|
|
|
|
- {
|
|
|
|
- list.Add(new BiSeatCallsDto()
|
|
|
|
- {
|
|
|
|
- Name = "合计",
|
|
|
|
- InTotal = list.Sum(p => p.InTotal),
|
|
|
|
- InAnswered = list.Sum(p => p.InAnswered),
|
|
|
|
- InHangupImmediate = list.Sum(p => p.InHangupImmediate),
|
|
|
|
- InHanguped = list.Sum(m => m.InHanguped),
|
|
|
|
- OutDurationAvg = list.Sum(m => m.OutDurationAvg),
|
|
|
|
- InAvailableAnswer = list.Sum(m => m.InAvailableAnswer),
|
|
|
|
- InHangupImmediateWhenAnswered = list.Sum(m => m.InHangupImmediateWhenAnswered),
|
|
|
|
- OutTotal = list.Sum(m => m.OutTotal),
|
|
|
|
- OutAnswered = list.Sum(m => m.OutAnswered),
|
|
|
|
- LoginDuration = list.Sum(m => m.LoginDuration),
|
|
|
|
- RestDuration = list.Sum(m => m.RestDuration),
|
|
|
|
- InDurationAvg = list.Sum(m => m.InDurationAvg)
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
|
-
|
|
|
|
- var dtos = list
|
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(BiSeatCallsDto), dynamicClass))
|
|
|
|
- .Cast<object>()
|
|
|
|
- .ToList();
|
|
|
|
-
|
|
|
|
- var stream = ExcelHelper.CreateStream(dtos);
|
|
|
|
-
|
|
|
|
- return ExcelStreamResult(stream, "坐席话务统计分析");
|
|
|
|
|
|
+ return ExcelStreamResult(
|
|
|
|
+ await _exportApplication.FittingAsync(
|
|
|
|
+ dto,
|
|
|
|
+ await _callReportApplication.QuerySeatCallAsync(dto.QueryDto, HttpContext.RequestAborted),
|
|
|
|
+ list =>
|
|
|
|
+ {
|
|
|
|
+ list.Add(new BiSeatCallsDto()
|
|
|
|
+ {
|
|
|
|
+ Name = "合计",
|
|
|
|
+ InTotal = list.Sum(p => p.InTotal),
|
|
|
|
+ InAnswered = list.Sum(p => p.InAnswered),
|
|
|
|
+ InHangupImmediate = list.Sum(p => p.InHangupImmediate),
|
|
|
|
+ InHanguped = list.Sum(m => m.InHanguped),
|
|
|
|
+ OutDurationAvg = list.Sum(m => m.OutDurationAvg),
|
|
|
|
+ InAvailableAnswer = list.Sum(m => m.InAvailableAnswer),
|
|
|
|
+ InHangupImmediateWhenAnswered = list.Sum(m => m.InHangupImmediateWhenAnswered),
|
|
|
|
+ OutTotal = list.Sum(m => m.OutTotal),
|
|
|
|
+ OutAnswered = list.Sum(m => m.OutAnswered),
|
|
|
|
+ LoginDuration = list.Sum(m => m.LoginDuration),
|
|
|
|
+ RestDuration = list.Sum(m => m.RestDuration),
|
|
|
|
+ InDurationAvg = list.Sum(m => m.InDurationAvg)
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ , "坐席话务统计分析");
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -450,55 +315,8 @@ public class BiCallController : BaseController
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpGet("seats")]
|
|
[HttpGet("seats")]
|
|
[AllowAnonymous]
|
|
[AllowAnonymous]
|
|
- public async Task<IReadOnlyList<BiSeatCallsDto>> QuerySeatCallsAsync([FromQuery] ReportPagedRequest dto)
|
|
|
|
- {
|
|
|
|
- if (!dto.StartTime.HasValue || !dto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
-
|
|
|
|
- //获取配置
|
|
|
|
- int noConnectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.NoConnectByeTimes)?.SettingValue[0]);
|
|
|
|
- int effectiveTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.EffectiveTimes)?.SettingValue[0]);
|
|
|
|
- int connectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.ConnectByeTimes)?.SettingValue[0]);
|
|
|
|
-
|
|
|
|
- var list = await _userRepository.Queryable()
|
|
|
|
- .LeftJoin<TrCallRecord>((u, c) => u.Id == c.UserId)
|
|
|
|
- .Where(u => !u.IsDeleted && u.UserType == EUserType.Seat)
|
|
|
|
- .WhereIF(dto.StartTime.HasValue, (u, c) => c.CreatedTime >= dto.StartTime.Value)
|
|
|
|
- .WhereIF(dto.EndTime.HasValue, (u, c) => c.CreatedTime <= dto.EndTime.Value)
|
|
|
|
- .GroupBy((u, c) => new { c.UserName, c.UserId })
|
|
|
|
- .Select((u, c) => new BiSeatCallsDto
|
|
|
|
- {
|
|
|
|
- Name = c.UserName,
|
|
|
|
- UserId = c.UserId,
|
|
|
|
- InTotal = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In, 1, 0)),
|
|
|
|
- OutTotal = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.Out, 1, 0)),
|
|
|
|
- InAnswered = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime != null, 1, 0)),
|
|
|
|
- OutAnswered = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.Out && c.AnsweredTime != null, 1, 0)),
|
|
|
|
- InHangupImmediate = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime == null && c.RingTimes < noConnectByeTimes, 1, 0)),
|
|
|
|
- InHanguped = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime == null, 1, 0)),
|
|
|
|
- InDurationAvg = SqlFunc.Ceil(SqlFunc.AggregateAvg(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime != null, c.Duration, 0))),
|
|
|
|
- OutDurationAvg = SqlFunc.Ceil(SqlFunc.AggregateAvg(SqlFunc.IIF(c.CallDirection == ECallDirection.Out && c.AnsweredTime != null, c.Duration, 0))),
|
|
|
|
- InAvailableAnswer = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime != null && c.Duration >= effectiveTimes, 1, 0)),
|
|
|
|
- InHangupImmediateWhenAnswered = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime != null && c.Duration < connectByeTimes, 1, 0)),
|
|
|
|
- })
|
|
|
|
- .MergeTable()
|
|
|
|
- .ToListAsync(HttpContext.RequestAborted);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- list.ForEach(d =>
|
|
|
|
- {
|
|
|
|
- d.LoginDuration = _workRepository.Queryable().Where(q => q.UserId == d.UserId && q.CreationTime >= dto.StartTime && q.CreationTime <= dto.EndTime).Sum(q => q.WorkingDuration);
|
|
|
|
- if (d.LoginDuration != null)
|
|
|
|
- {
|
|
|
|
- d.LoginDuration = Math.Round(d.LoginDuration.Value, digits: 2);
|
|
|
|
- }
|
|
|
|
- d.RestDuration = _telRestRepository.Queryable().Where(q => q.UserId == d.UserId && q.CreationTime >= dto.StartTime && q.CreationTime <= dto.EndTime).Sum(q => q.RestDuration);
|
|
|
|
- d.RestDuration = Math.Round(d.RestDuration, digits: 2);
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- return list;
|
|
|
|
- }
|
|
|
|
|
|
+ public async Task<IReadOnlyList<BiSeatCallsDto>> QuerySeatCallsAsync([FromQuery] ReportRequiredPagedRequest dto)
|
|
|
|
+ => await _callReportApplication.QuerySeatCallAsync(dto, HttpContext.RequestAborted);
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 小休统计
|
|
/// 小休统计
|
|
@@ -509,14 +327,11 @@ public class BiCallController : BaseController
|
|
[AllowAnonymous]
|
|
[AllowAnonymous]
|
|
public async Task<IReadOnlyList<BiSeatRestDto>> QuerySeatRest([FromQuery] QuerySeatRestRequest dto)
|
|
public async Task<IReadOnlyList<BiSeatRestDto>> QuerySeatRest([FromQuery] QuerySeatRestRequest dto)
|
|
{
|
|
{
|
|
- if (!dto.StartTime.HasValue || !dto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
-
|
|
|
|
return await _telRestRepository.Queryable()
|
|
return await _telRestRepository.Queryable()
|
|
.WhereIF(!string.IsNullOrEmpty(dto.UserName), x => x.UserName.Contains(dto.UserName))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.UserName), x => x.UserName.Contains(dto.UserName))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.StaffNo), x => x.StaffNo.Contains(dto.StaffNo))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.StaffNo), x => x.StaffNo.Contains(dto.StaffNo))
|
|
- .WhereIF(dto.StartTime.HasValue, x => x.CreationTime >= dto.StartTime.Value)
|
|
|
|
- .WhereIF(dto.EndTime.HasValue, x => x.CreationTime <= dto.EndTime.Value)
|
|
|
|
|
|
+ .Where(x => x.CreationTime >= dto.StartTime)
|
|
|
|
+ .Where(x => x.CreationTime <= dto.EndTime)
|
|
.GroupBy(x => new { x.UserId, x.StaffNo, x.UserName })
|
|
.GroupBy(x => new { x.UserId, x.StaffNo, x.UserName })
|
|
.Select(x => new BiSeatRestDto
|
|
.Select(x => new BiSeatRestDto
|
|
{
|
|
{
|
|
@@ -541,28 +356,8 @@ public class BiCallController : BaseController
|
|
[AllowAnonymous]
|
|
[AllowAnonymous]
|
|
public async Task<PagedDto<BiSeatSwitchDto>> QuerySeatSwitch([FromQuery] QuerySeatSwitchRequest dto)
|
|
public async Task<PagedDto<BiSeatSwitchDto>> QuerySeatSwitch([FromQuery] QuerySeatSwitchRequest dto)
|
|
{
|
|
{
|
|
- if (!dto.StartTime.HasValue || !dto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
-
|
|
|
|
- var (total, items) = await _trCallRecordRepository.Queryable()
|
|
|
|
- .Where(x => !string.IsNullOrEmpty(x.AgentTransferNumber))
|
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.UserName), x => x.UserName.Contains(dto.UserName))
|
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.CDPN), x => x.CDPN.Contains(dto.CDPN))
|
|
|
|
- .WhereIF(dto.StartTime.HasValue, x => x.CreatedTime >= dto.StartTime.Value)
|
|
|
|
- .WhereIF(dto.EndTime.HasValue, x => x.CreatedTime <= dto.EndTime.Value)
|
|
|
|
- .Select(x => new BiSeatSwitchDto
|
|
|
|
- {
|
|
|
|
- UserId = x.UserId,
|
|
|
|
- CPN = x.CPN,
|
|
|
|
- CDPN = x.CDPN,
|
|
|
|
- CreatedTime = x.CreatedTime,
|
|
|
|
- TelNo = x.AgentTransferNumber,
|
|
|
|
- UserName = x.UserName,
|
|
|
|
- })
|
|
|
|
- .OrderByDescending(x => x.CreatedTime)
|
|
|
|
- .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
|
-
|
|
|
|
- return new PagedDto<BiSeatSwitchDto>(total, _mapper.Map<IReadOnlyList<BiSeatSwitchDto>>(items));
|
|
|
|
|
|
+ var (total, items) = await _callReportApplication.QuerySeatSwitchAsync(dto, HttpContext.RequestAborted);
|
|
|
|
+ return new PagedDto<BiSeatSwitchDto>(total, items);
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -572,16 +367,7 @@ public class BiCallController : BaseController
|
|
[HttpGet("hourcall")]
|
|
[HttpGet("hourcall")]
|
|
[AllowAnonymous]
|
|
[AllowAnonymous]
|
|
public async Task<List<TrCallHourDto>> QueryHourCall([FromQuery] BiQueryHourCallDto dto)
|
|
public async Task<List<TrCallHourDto>> QueryHourCall([FromQuery] BiQueryHourCallDto dto)
|
|
- {
|
|
|
|
- if (!dto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
- //获取配置
|
|
|
|
- int noConnectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.NoConnectByeTimes)?.SettingValue[0]);
|
|
|
|
- int effectiveTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.EffectiveTimes)?.SettingValue[0]);
|
|
|
|
- int connectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.ConnectByeTimes)?.SettingValue[0]);
|
|
|
|
- var list = await _trCallRecordRepositoryEx.GetCallHourList(dto.StartTime, dto.EndTime, noConnectByeTimes, effectiveTimes, connectByeTimes, dto.Source);
|
|
|
|
- return list;
|
|
|
|
- }
|
|
|
|
|
|
+ => await _callReportApplication.GetCallHourListAsync(dto, HttpContext.RequestAborted);
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 小时统计--导出
|
|
/// 小时统计--导出
|
|
@@ -590,39 +376,23 @@ public class BiCallController : BaseController
|
|
[HttpPost("hourcall/export")]
|
|
[HttpPost("hourcall/export")]
|
|
[AllowAnonymous]
|
|
[AllowAnonymous]
|
|
public async Task<FileStreamResult> ExportQueryHourCall([FromBody] ExportExcelDto<BiQueryHourCallDto> dto)
|
|
public async Task<FileStreamResult> ExportQueryHourCall([FromBody] ExportExcelDto<BiQueryHourCallDto> dto)
|
|
- {
|
|
|
|
- if (!dto.QueryDto.EndTime.HasValue)
|
|
|
|
- throw UserFriendlyException.SameMessage("请选择时间!");
|
|
|
|
- //获取配置
|
|
|
|
- int noConnectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.NoConnectByeTimes)?.SettingValue[0]);
|
|
|
|
- int effectiveTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.EffectiveTimes)?.SettingValue[0]);
|
|
|
|
- int connectByeTimes = int.Parse(_systemSettingCacheManager.GetSetting(SettingConstants.ConnectByeTimes)?.SettingValue[0]);
|
|
|
|
- var list = await _trCallRecordRepositoryEx.GetCallHourList(dto.QueryDto.StartTime, dto.QueryDto.EndTime, noConnectByeTimes, effectiveTimes, connectByeTimes, dto.QueryDto.Source);
|
|
|
|
-
|
|
|
|
- if (list != null && list.Count > 0)
|
|
|
|
- {
|
|
|
|
- list.Add(new TrCallHourDto()
|
|
|
|
- {
|
|
|
|
- HourTo = "合计",
|
|
|
|
- EffectiveCount = list.Sum(p => p.EffectiveCount),
|
|
|
|
- ConnectByeCount = list.Sum(p => p.ConnectByeCount),
|
|
|
|
- NoConnectByeCount = list.Sum(p => p.NoConnectByeCount),
|
|
|
|
- QueueByeCount = list.Sum(m => m.QueueByeCount),
|
|
|
|
- IvrByeCount = list.Sum(m => m.IvrByeCount)
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(dto.ColumnInfos);
|
|
|
|
-
|
|
|
|
- var dtos = list
|
|
|
|
- .Select(stu => _mapper.Map(stu, typeof(TrCallHourDto), dynamicClass))
|
|
|
|
- .Cast<object>()
|
|
|
|
- .ToList();
|
|
|
|
-
|
|
|
|
- var stream = ExcelHelper.CreateStream(dtos);
|
|
|
|
-
|
|
|
|
- return ExcelStreamResult(stream, "通话时段分析");
|
|
|
|
- }
|
|
|
|
|
|
+ => ExcelStreamResult(
|
|
|
|
+ await _exportApplication.FittingAsync(
|
|
|
|
+ dto,
|
|
|
|
+ await _callReportApplication.GetCallHourListAsync(dto.QueryDto, HttpContext.RequestAborted),
|
|
|
|
+ list =>
|
|
|
|
+ {
|
|
|
|
+ list.Add(new TrCallHourDto()
|
|
|
|
+ {
|
|
|
|
+ HourTo = "合计",
|
|
|
|
+ EffectiveCount = list.Sum(p => p.EffectiveCount),
|
|
|
|
+ ConnectByeCount = list.Sum(p => p.ConnectByeCount),
|
|
|
|
+ NoConnectByeCount = list.Sum(p => p.NoConnectByeCount),
|
|
|
|
+ QueueByeCount = list.Sum(m => m.QueueByeCount),
|
|
|
|
+ IvrByeCount = list.Sum(m => m.IvrByeCount)
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ , "通话时段分析");
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|