田爽 1 rok pred
rodič
commit
2579a49f91

+ 3 - 2
src/Hotline.Api/Controllers/OrderController.cs

@@ -2724,8 +2724,9 @@ public class OrderController : BaseController
                 d => d.Order.Title.Contains(dto.Keyword!) || d.Order.No.Contains(dto.Keyword!))
             .WhereIF(dto.CreationTimeStart.HasValue, d => d.CreationTime >= dto.CreationTimeStart)
             .WhereIF(dto.CreationTimeEnd.HasValue, d => d.CreationTime <= dto.CreationTimeEnd)
-            .WhereIF(dto.State.HasValue && dto.AuditState == 1, d => d.State == dto.State)
-            .WhereIF(dto.AuditState == 2, d => d.State > ESendBackAuditState.Apply)
+            .WhereIF(dto.AuditState == 1, d => d.State == ESendBackAuditState.Apply)
+            .WhereIF(dto.AuditState == 2 && !dto.State.HasValue, d => d.State > ESendBackAuditState.Apply)
+            .WhereIF(dto.AuditState == 2 && dto.State.HasValue, d => d.State == dto.State)
 			.Where(x=>x.SendBackOrgId == _sessionContext.OrgId)
             .OrderByDescending(x => x.CreationTime)
             .ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);