|
@@ -88,12 +88,12 @@ public abstract class CallReportApplicationBase : ICallReportApplication
|
|
|
int connectByeTimes = _systemSettingCacheManager.ConnectByeTimes;
|
|
|
|
|
|
var callData = await _callNativeRepository.Queryable()
|
|
|
- .Where(p => p.CreationTime >= dto.StartTime && p.CreationTime <= dto.EndTime && p.CallState != ECallState.Invalid)
|
|
|
+ .Where(p => p.BeginIvrTime >= dto.StartTime && p.BeginIvrTime <= dto.EndTime && p.CallState != ECallState.Invalid)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword), p => p.ToNo == dto.Keyword)
|
|
|
- .GroupBy(p => p.CreationTime.ToString("yyyy-MM-dd"))
|
|
|
+ .GroupBy(p => p.BeginIvrTime.Value.ToString("yyyy-MM-dd"))
|
|
|
.Select(p => new QueryCallsDetailDto
|
|
|
{
|
|
|
- Date = p.CreationTime.ToString("yyyy-MM-dd"),
|
|
|
+ Date = p.BeginIvrTime.Value.ToString("yyyy-MM-dd"),
|
|
|
InTotal = SqlFunc.AggregateSum(SqlFunc.IIF(p.Direction == ECallDirection.In, 1, 0)),//呼入总量
|
|
|
InConnectionQuantity = SqlFunc.AggregateSum(SqlFunc.IIF(p.Direction == ECallDirection.In && (p.CallState == ECallState.Missed || p.CallState == ECallState.NotAcceptedHang || p.CallState == ECallState.IVRNoAccept || p.CallState == ECallState.On), 1, 0)),//呼入接通量
|
|
|
NotAcceptedHang = SqlFunc.AggregateSum(SqlFunc.IIF(p.RingDuration <= noConnectByeTimes && p.RingDuration > 0 && p.Direction == ECallDirection.In, 1, 0)), //未接通秒挂
|
|
@@ -123,10 +123,10 @@ public abstract class CallReportApplicationBase : ICallReportApplication
|
|
|
var recordPrefix = _systemSettingCacheManager.RecordPrefix;
|
|
|
var query = _callNativeRepository.Queryable()
|
|
|
.LeftJoin<Order>((p, o) => p.Id == o.CallId)
|
|
|
- .Where((p, o) => p.CreationTime >= dto.StartTime && p.CreationTime <= dto.EndTime && p.Direction == ECallDirection.In && p.CallState != ECallState.Invalid)
|
|
|
+ .Where((p, o) => p.BeginIvrTime >= dto.StartTime && p.BeginIvrTime <= dto.EndTime && p.Direction == ECallDirection.In && p.CallState != ECallState.Invalid)
|
|
|
.WhereIF(dto.TypeCode == "2", (p, o) => p.AnsweredTime != null)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword), (p, o) => p.TelNo == dto.Keyword)
|
|
|
- .OrderByDescending((p, o) => p.CreationTime)
|
|
|
+ .OrderByDescending((p, o) => p.BeginIvrTime)
|
|
|
.Select((p, o) => new CallRecordOutDto
|
|
|
{
|
|
|
OtherAccept = p.Id,
|
|
@@ -162,11 +162,11 @@ public abstract class CallReportApplicationBase : ICallReportApplication
|
|
|
int connectByeTimes = _systemSettingCacheManager.ConnectByeTimes;
|
|
|
|
|
|
var callData = await _callNativeRepository.Queryable()
|
|
|
- .Where(p => p.CreationTime >= dto.StartTime && p.CreationTime <= dto.EndTime && p.CallState != ECallState.Invalid)
|
|
|
- .GroupBy(p => p.CreationTime.ToString("yyyy-MM-dd"))
|
|
|
+ .Where(p => p.BeginIvrTime >= dto.StartTime && p.BeginIvrTime <= dto.EndTime && p.CallState != ECallState.Invalid)
|
|
|
+ .GroupBy(p => p.BeginIvrTime.Value.ToString("yyyy-MM-dd"))
|
|
|
.Select(p => new QueryCallsDetailStatistics
|
|
|
{
|
|
|
- Date = p.CreationTime.ToString("yyyy-MM-dd"),
|
|
|
+ Date = p.BeginIvrTime.Value.ToString("yyyy-MM-dd"),
|
|
|
//InTotal = SqlFunc.AggregateSum(SqlFunc.IIF(p.Direction == ECallDirection.In, 1, 0)),//呼入总量
|
|
|
InConnectionQuantity = SqlFunc.AggregateSum(SqlFunc.IIF(p.Direction == ECallDirection.In && p.AnsweredTime != null, 1, 0)),//呼入接通量
|
|
|
NotAcceptedHang = SqlFunc.AggregateSum(SqlFunc.IIF(p.CallState == ECallState.NotAcceptedHang && p.Direction == ECallDirection.In, 1, 0)), //呼入队列挂断
|
|
@@ -218,7 +218,7 @@ public abstract class CallReportApplicationBase : ICallReportApplication
|
|
|
.WhereIF(dto.ToNo.NotNullOrEmpty(), (c, o) => c.ToNo == dto.ToNo)
|
|
|
.WhereIF(dto.TelNo.NotNullOrEmpty(), (c, o) => c.TelNo == dto.TelNo)
|
|
|
.WhereIF(dto.EndBy.IsNotNull(), (c, o) => c.EndBy == dto.EndBy)
|
|
|
- .Where((c, o) => c.CreationTime >= dto.StartTime && c.CreationTime <= dto.EndTime);
|
|
|
+ .Where((c, o) => c.BeginIvrTime >= dto.StartTime && c.BeginIvrTime <= dto.EndTime);
|
|
|
|
|
|
if (dto.FieldName == "intotal") // 呼入总量
|
|
|
query = query.Where((c, o) => c.Direction == ECallDirection.In);
|
|
@@ -254,8 +254,8 @@ public abstract class CallReportApplicationBase : ICallReportApplication
|
|
|
.LeftJoin<CallNative>((u, c) => u.Id == c.UserId)
|
|
|
.Where((u, c) => c.CallState != ECallState.Invalid)
|
|
|
.Where(u => !u.IsDeleted && u.UserType == EUserType.Seat)
|
|
|
- .Where((u, c) => c.CreationTime >= dto.StartTime)
|
|
|
- .Where((u, c) => c.CreationTime <= dto.EndTime)
|
|
|
+ .Where((u, c) => c.BeginIvrTime >= dto.StartTime)
|
|
|
+ .Where((u, c) => c.BeginIvrTime <= dto.EndTime)
|
|
|
.GroupBy((u, c) => new { c.UserName, c.UserId })
|
|
|
.Select((u, c) => new BiSeatCallsDto
|
|
|
{
|
|
@@ -297,8 +297,8 @@ public abstract class CallReportApplicationBase : ICallReportApplication
|
|
|
.Where(x => !string.IsNullOrEmpty(x.AgentTransferNumber) && x.CallState != ECallState.Invalid)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.UserName), x => x.UserName.Contains(dto.UserName))
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.CDPN), x => x.ToNo.Contains(dto.CDPN))
|
|
|
- .Where(x => x.CreationTime >= dto.StartTime)
|
|
|
- .Where(x => x.CreationTime <= dto.EndTime)
|
|
|
+ .Where(x => x.BeginIvrTime >= dto.StartTime)
|
|
|
+ .Where(x => x.BeginIvrTime <= dto.EndTime)
|
|
|
.Select(x => new BiSeatSwitchDto
|
|
|
{
|
|
|
UserId = x.UserId,
|