Kaynağa Gözat

workflow.base-data 增加 CountersignPolicyOptions

xf 4 ay önce
ebeveyn
işleme
7484179668

+ 7 - 0
src/Hotline.Api/Controllers/WorkflowController.cs

@@ -493,6 +493,13 @@ public class WorkflowController : BaseController
             InstanceModeOptions = EnumExts.GetDescriptions<EInstanceMode>(),
             StepTypeOptions = EnumExts.GetDescriptions<EStepType>().Where(d => d.Key != 1 && d.Key != 2),
             DynamicPolicyOptions = EnumExts.GetDescriptions<EDynamicPolicy>()
+                .Select(d => new
+                {
+                    Key = d.Key,
+                    Value = d.Value,
+                    Items = d.Key is 0 or 2 or 4 or 6? centerIsTop : orgs
+                }),
+            CountersignPolicyOptions = EnumExts.GetDescriptions<ECountersignPolicy>()
                 .Select(d => new
                 {
                     Key = d.Key,

+ 3 - 3
src/Hotline.Application/FlowEngine/WorkflowApplication.cs

@@ -667,7 +667,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
                     var countersignEndOption = GetCsEndStepByTargetPrev(workflow.Steps, startCountersignStep);
 
                     //按会签策略
-                    var nextStepOption = await GetDynamicStepAsync(currentStep.CountersignPolicy.Value,
+                    var nextStepOption = await GetCountersignStepAsync(currentStep.CountersignPolicy.Value,
                         EStepType.Normal, currentStep.BusinessType, cancellationToken);
 
                     dto.Steps = new List<NextStepOption> { nextStepOption };
@@ -682,7 +682,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
                 var countersignEndOption = GetCsEndStepByTargetPrev(workflow.Steps, currentStep);
                 //按会签策略
                 var nextStepOption =
-                    await GetDynamicStepAsync(currentStep.CountersignPolicy.Value,
+                    await GetCountersignStepAsync(currentStep.CountersignPolicy.Value,
                         EStepType.Normal, currentStep.BusinessType, cancellationToken);
                 dto.Steps = new List<NextStepOption> { nextStepOption };
                 if (countersignEndOption != null)
@@ -1488,7 +1488,7 @@ public class WorkflowApplication : IWorkflowApplication, IScopeDependency
     /// 会签 动态策略
     /// </summary>
     /// <returns></returns>
-    private async Task<NextStepOption> GetDynamicStepAsync(
+    private async Task<NextStepOption> GetCountersignStepAsync(
         ECountersignPolicy policy, EStepType stepType,
         EBusinessType currentBusinessType, CancellationToken cancellationToken)
     {