Browse Source

orderdelay

Dun.Jason 1 year ago
parent
commit
e20d860ca7
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/Hotline.Api/Controllers/OrderController.cs

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

@@ -1264,7 +1264,10 @@ public class OrderController : BaseController
                 var result = await _workflowApplication.GetNextStepsAsync(workflowId, HttpContext.RequestAborted);
                 if (!orderDelay.Order.IsProvince)
                 {
-                    result.Steps.Remove(result.Steps.First(x => x.Value == "省审批"));
+                    if(result.Steps.Any(x => x.Value == "省审批"))
+                    {
+                        result.Steps.Remove(result.Steps.First(x => x.Value == "省审批"));
+                    }
                 }
                 return result;
             }
@@ -1636,7 +1639,10 @@ public class OrderController : BaseController
                 var result = await _workflowApplication.GetNextStepsAsync(workflowId, HttpContext.RequestAborted);
                 if (!orderScreen.Order.IsProvince)
                 {
-                    result.Steps.Remove(result.Steps.First(x => x.Value == "省审批"));
+                    if (result.Steps.Any(x=>x.Value == "省审批"))
+                    {
+                        result.Steps.Remove(result.Steps.First(x => x.Value == "省审批"));
+                    }
                 }
                 return result;
             }