Эх сурвалжийг харах

补全流转方向枚举判断

xf 6 сар өмнө
parent
commit
b7b344515f

+ 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);
             }