Browse Source

bicall rests

Dun.Jason 11 months ago
parent
commit
509d810324
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Hotline.Api/Controllers/Bi/BiCallController.cs

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

@@ -194,7 +194,7 @@ public class BiCallController : BaseController
                  StaffNo  = x.StaffNo,
                  StaffNo  = x.StaffNo,
                  UserName = x.UserName,
                  UserName = x.UserName,
                  RestCount = SqlFunc.AggregateCount(x.Id),
                  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 ==0,a=> a.RestDuration,OrderByType.Asc)
             .OrderByIF(dto.SortRule ==1,a=> a.RestDuration,OrderByType.Desc)
             .OrderByIF(dto.SortRule ==1,a=> a.RestDuration,OrderByType.Desc)