瀏覽代碼

补全流转方向枚举判断

xf 6 月之前
父節點
當前提交
b7b344515f
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

+ 9 - 1
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -958,7 +958,6 @@ namespace Hotline.FlowEngine.Workflows
                             directionStepBusinessType, null)
                     };
                 case EBusinessType.Department:
-                case EBusinessType.File:
                     return directionStepBusinessType switch
                     {
                         EBusinessType.Seat => EFlowDirection.OrgToCenter,
@@ -968,6 +967,15 @@ namespace Hotline.FlowEngine.Workflows
                         _ => throw new ArgumentOutOfRangeException(nameof(directionStepBusinessType),
                             directionStepBusinessType, null)
                     };
+                case EBusinessType.File:
+                    return directionStepBusinessType switch
+                    {
+                        EBusinessType.Seat => EFlowDirection.FiledToCenter,
+                        EBusinessType.Send => EFlowDirection.FiledToCenter,
+                        EBusinessType.Department => EFlowDirection.FiledToOrg,
+                        EBusinessType.DepartmentLeader => EFlowDirection.FiledToOrg,
+                        _ => throw new ArgumentOutOfRangeException(nameof(directionStepBusinessType), directionStepBusinessType, null)
+                    };
                 default:
                     throw new ArgumentOutOfRangeException(nameof(sourceStepBusinessType), sourceStepBusinessType, null);
             }