Dun.Jason 11 сар өмнө
parent
commit
509d810324

+ 1 - 1
src/Hotline.Api/Controllers/Bi/BiCallController.cs

@@ -194,7 +194,7 @@ public class BiCallController : BaseController
                  StaffNo  = x.StaffNo,
                  UserName = x.UserName,
                  RestCount = SqlFunc.AggregateCount(x.Id),
-                 RestDuration = SqlFunc.AggregateSum(x.RestDuration/60)
+                 RestDuration = SqlFunc.AggregateSum(x.RestDuration/60) / SqlFunc.AggregateCount(x.Id)
             })
             .OrderByIF(dto.SortRule ==0,a=> a.RestDuration,OrderByType.Asc)
             .OrderByIF(dto.SortRule ==1,a=> a.RestDuration,OrderByType.Desc)