Эх сурвалжийг харах

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

田爽 4 сар өмнө
parent
commit
7d2caf45de

+ 2 - 2
src/Hotline.Application/Orders/OrderApplication.cs

@@ -1849,8 +1849,8 @@ public class OrderApplication : IOrderApplication, IScopeDependency
                 .Select(x => new VisitAndOrgSatisfactionStatisticsDto()
                 {
                     OrgCode = x.VisitOrgCode,//.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>(orgLevelStr)),
-                    TotalSumCount =
-                        SqlFunc.AggregateCount(x.VisitOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>(orgLevelStr))),
+                    TotalSumCount = SqlFunc.AggregateCount(x.VisitOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("6"))),
+                        //SqlFunc.AggregateCount(x.VisitOrgCode.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>(orgLevelStr))),
                     VerySatisfiedCount = SqlFunc.IIF(dto.TypeId == 1,
                         SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgProcessingResults, "Key") == "5", 1, 0)),
                         SqlFunc.AggregateSum(SqlFunc.IIF(SqlFunc.JsonField(x.OrgHandledAttitude, "Key") == "5", 1, 0))), //非常满意数

+ 1 - 1
src/Hotline.Application/StatisticalReport/CallReport/YiBinCallReportApplication.cs

@@ -287,7 +287,7 @@ public class YiBinCallReportApplication : CallReportApplicationBase, ICallReport
     /// <returns></returns>
     public override async Task<List<QueryCallOutDateStatisticsDetailResp>> QueryCallOutDateStatisticsDetail(QueryCallDateStatisticsDetailDto dto)
     {
-        return null;
+        return await _trCallRecordRepositoryEx.QueryCallOutDateStatisticsDetail(dto.StartTime.Value, dto.EndTime.Value);
     }
 
 

+ 13 - 0
src/Hotline.Repository.SqlSugar/CallCenter/TrCallRecordRepository.cs

@@ -344,5 +344,18 @@ namespace Hotline.Repository.SqlSugar.CallCenter
                 .OrderBy(x => x.Date);
             return await query.ToListAsync();
         }
+
+        public async Task<List<QueryCallOutDateStatisticsDetailResp>> QueryCallOutDateStatisticsDetail(DateTime startTime,DateTime endTime)
+        {
+            //var query = Db.Queryable<TrCallRecord>()
+            //    .Where(x => x.CreatedTime >= startTime && x.CreatedTime <= endTime && SqlFunc.Length(x.Gateway) > 4 && x.CallDirection == ECallDirection.Out)
+            //    .GroupBy(x => x.CreatedTime.ToString("yyyy-MM-dd"))
+            //    .Select(x => new QueryCallOutDateStatisticsDetailResp()
+            //    {
+            //        Date = x.CreatedTime.ToString("yyyy-MM-dd"),
+            //        PersonCallOutCount = SqlFunc.AggregateSum(SqlFunc.IIF(x.))
+            //    });
+            return null;
+        }
     }
 }

+ 9 - 0
src/Hotline/CallCenter/Calls/ITrCallRecordRepository.cs

@@ -59,5 +59,14 @@ namespace Hotline.CallCenter.Calls
         /// <param name="endTime"></param>
         /// <returns></returns>
         Task<List<QueryEnterpriseCallDateStatisticsDetailResp>> QueryEnterpriseCallDateStatisticsDetail(DateTime startTime, DateTime endTime);
+
+
+        /// <summary>
+        /// 呼出话务统计明细
+        /// </summary>
+        /// <param name="startTime"></param>
+        /// <param name="endTime"></param>
+        /// <returns></returns>
+        Task<List<QueryCallOutDateStatisticsDetailResp>> QueryCallOutDateStatisticsDetail(DateTime startTime, DateTime endTime);
     }
 }