Dun.Jason hai 1 ano
pai
achega
49da6f684e

+ 2 - 1
src/Hotline.Api/Controllers/Bi/BiOrderController.cs

@@ -380,7 +380,8 @@ namespace Hotline.Api.Controllers.Bi
 					Cause = x.Cause,
 					OrderNum = SqlFunc.AggregateSum(SqlFunc.IIF(true, 1, 0)),
 					MaxSpecialTime = SqlFunc.AggregateMax(x.CreationTime),
-				}).MergeTable();
+				})
+				.MergeTable();
 			switch (dto.SortField)
 			{
 				case "cause":

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

@@ -1133,7 +1133,7 @@ public class OrderController : BaseController
         var setting = _systemSettingCacheManager.GetSetting(SettingConstants.DelayNum);
         if (int.Parse(setting?.SettingValue[0]) != 0)
         {
-            int count = await _orderDelayRepository.CountAsync(x => x.OrderId == delaydto.OrderId);
+            int count = await _orderDelayRepository.CountAsync(x => x.OrderId == delaydto.OrderId && x.DelayState == EDelayState.Pass);
             if (count > int.Parse(setting?.SettingValue[0]))
                 throw UserFriendlyException.SameMessage("延期申请已超过系统预定设置,不能申请");
         }