浏览代码

Merge branch 'release' of http://110.188.24.182:10023/Fengwo/hotline into release

田爽 8 月之前
父节点
当前提交
37291f6e99
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/Hotline.Application/StatisticalReport/CallReportApplication.cs

+ 3 - 3
src/Hotline.Application/StatisticalReport/CallReportApplication.cs

@@ -58,7 +58,7 @@ namespace Hotline.Application.StatisticalReport
 
             var callData = await _trCallRecordRepository.Queryable()
                     .Where(p => p.CreatedTime >= dto.StartTime && p.CreatedTime <= dto.EndTime)
-                   // .Where(p => p.Gateway != "82826886" && SqlFunc.Length(p.Gateway) != 4)
+                     // .Where(p => p.Gateway != "82826886" && SqlFunc.Length(p.Gateway) != 4)
                      .WhereIF(!string.IsNullOrEmpty(dto.Keyword), p => p.Gateway == dto.Keyword)
                      .GroupBy(p => p.CreatedTime.ToString("yyyy-MM-dd"))
                     .Select(p => new QueryCallsDetailDto
@@ -66,7 +66,7 @@ namespace Hotline.Application.StatisticalReport
                         Date = p.CreatedTime.ToString("yyyy-MM-dd"),
                         InTotal = SqlFunc.AggregateSum(SqlFunc.IIF(p.CallDirection == ECallDirection.In, 1, 0)),//呼入总量
                         InConnectionQuantity = SqlFunc.AggregateSum(SqlFunc.IIF(p.OnState == EOnState.On && p.CallDirection == ECallDirection.In && p.AnsweredTime != null, 1, 0)),//呼入接通量
-                        NotAcceptedHang = SqlFunc.AggregateSum(SqlFunc.IIF(p.Duration == 0 && p.RingTimes <= noConnectByeTimes && p.RingTimes > 0, 1, 0)), //未接通秒挂
+                        NotAcceptedHang = SqlFunc.AggregateSum(SqlFunc.IIF(p.Duration == 0 && p.RingTimes <= noConnectByeTimes && p.RingTimes > 0 && p.CallDirection == ECallDirection.In, 1, 0)), //未接通秒挂
                         TotalDurationIncomingCalls = SqlFunc.AggregateSum(SqlFunc.IIF(p.CallDirection == ECallDirection.In && p.AnsweredTime != null && p.OnState == EOnState.On, p.Duration, 0)), //呼入总时长
                         InAvailableAnswer = SqlFunc.AggregateSum(SqlFunc.IIF(p.CallDirection == ECallDirection.In && p.AnsweredTime != null && p.Duration >= effectiveTimes, 1, 0)),//有效接通量
                         InHangupImmediateWhenAnswered = SqlFunc.AggregateSum(SqlFunc.IIF(p.CallDirection == ECallDirection.In && p.Duration > 0 && p.Duration <= connectByeTimes, 1, 0)), //呼入接通秒挂
@@ -98,7 +98,7 @@ namespace Hotline.Application.StatisticalReport
                      .Includes(p => p.Order)
                     .Where(p => p.CreatedTime >= dto.StartTime && p.CreatedTime <= dto.EndTime && p.CallDirection == ECallDirection.In)
                     .WhereIF(dto.TypeCode == "2", p => p.OnState == EOnState.On && p.AnsweredTime != null)
-                   // .Where(p => p.Gateway != "82826886" && SqlFunc.Length(p.Gateway) != 4)
+                     // .Where(p => p.Gateway != "82826886" && SqlFunc.Length(p.Gateway) != 4)
                      .WhereIF(!string.IsNullOrEmpty(dto.Keyword), p => p.Gateway == dto.Keyword)
                      .OrderByDescending(p => p.CreatedTime)
                     .MergeTable();