소스 검색

fixed: bi math.ceil

xf 1 년 전
부모
커밋
5fd3fa087e
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Hotline.Api/Controllers/Bi/BiCallController.cs
  2. 1 0
      src/Hotline.Api/Controllers/OrderController.cs

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

@@ -103,8 +103,8 @@ public class BiCallController : BaseController
                   OutAnswered = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.Out && c.AnsweredTime != null, 1, 0)),
                   InHangupImmediate = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime == null && c.RingTimes < hangupSeconds, 1, 0)),
                   InHanguped = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime == null, 1, 0)),
-                  InDurationAvg = SqlFunc.AggregateAvg(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime != null, c.Duration, 0)),
-                  OutDurationAvg = SqlFunc.AggregateAvg(SqlFunc.IIF(c.CallDirection == ECallDirection.Out && c.AnsweredTime != null, c.Duration, 0)),
+                  InDurationAvg = SqlFunc.Ceil(SqlFunc.AggregateAvg(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime != null, c.Duration, 0))),
+                  OutDurationAvg = SqlFunc.Ceil(SqlFunc.AggregateAvg(SqlFunc.IIF(c.CallDirection == ECallDirection.Out && c.AnsweredTime != null, c.Duration, 0))),
                   InAvailableAnswer = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime != null && c.Duration >= hangupSeconds, 1, 0)),
                   InHangupImmediateWhenAnswered = SqlFunc.AggregateSum(SqlFunc.IIF(c.CallDirection == ECallDirection.In && c.AnsweredTime != null && c.Duration < hangupSeconds, 1, 0)),
               })

+ 1 - 0
src/Hotline.Api/Controllers/OrderController.cs

@@ -1890,6 +1890,7 @@ public class OrderController : BaseController
         {
             if (order.SmsSended)
             {
+                _logger.LogInformation($"推送短信: orderNo: {order.No}");
                 await _pushDomainService.PushAsync(new MessageDto
                 {
                     PushBusiness = EPushBusiness.OrderAccept,