瀏覽代碼

bicall rests

Dun.Jason 11 月之前
父節點
當前提交
509d810324
共有 1 個文件被更改,包括 1 次插入1 次删除
  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,
                  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)