xf 5 months ago
parent
commit
4fca6ec100
1 changed files with 10 additions and 1 deletions
  1. 10 1
      src/Hotline.Api/Controllers/OrderController.cs

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

@@ -4229,7 +4229,16 @@ public class OrderController : BaseController
         var isAdmin = _orderDomainService.IsCheckAdmin();
         var isAdmin = _orderDomainService.IsCheckAdmin();
         if (!isAdmin)
         if (!isAdmin)
         {
         {
-            query.Where(d=>d.WorkflowSteps.Where(expStepFilter));
+            query.Where(d=>d.WorkflowSteps.Where(step =>
+                ((step.FlowAssignType == EFlowAssignType.User && !string.IsNullOrEmpty(step.HandlerId) && step.HandlerId == _sessionContext.RequiredUserId) ||
+                 (step.FlowAssignType == EFlowAssignType.Org && !string.IsNullOrEmpty(step.HandlerOrgId) && step.HandlerOrgId == _sessionContext.RequiredOrgId) ||
+                 (step.FlowAssignType == EFlowAssignType.Role && !string.IsNullOrEmpty(step.RoleId) && _sessionContext.Roles.Contains(step.RoleId)) ||
+                 (step.FlowAssignType == EFlowAssignType.OrgAndRole && !string.IsNullOrEmpty(step.RoleId)
+                                                                    && _sessionContext.Roles.Contains(step.RoleId)
+                                                                    && !string.IsNullOrEmpty(step.HandlerOrgId)
+                                                                    && step.HandlerOrgId == _sessionContext.RequiredOrgId)
+                ))
+            );
 
 
         }
         }