From 107b6bff21618043738c6de8fe88e21de778d030 Mon Sep 17 00:00:00 2001 From: hawind Date: Mon, 12 Apr 2021 02:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B5=81=E7=A8=8B=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E6=97=B6=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E6=89=A7?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Gdoo/Model/Services/StepService.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Gdoo/Model/Services/StepService.php b/app/Gdoo/Model/Services/StepService.php index 44b2ee79..c707ed84 100644 --- a/app/Gdoo/Model/Services/StepService.php +++ b/app/Gdoo/Model/Services/StepService.php @@ -41,9 +41,9 @@ class StepService $step_next = $step_user['step']; $continue = $step_user['continue']; $ret[$step_id] = $step_next; - + // 节点是审核节点时不再获取下一个节点 - if ($step['option'] == 1) { + if ($step_next['option'] == 1) { if ($continue) { continue; } @@ -129,12 +129,14 @@ class StepService $parent_user_ids = DB::table('model_run_log') ->where('run_id', $run_id) ->where('parent_id', $parent_log['parent_id']) - ->get()->toArray(); + ->where('option', 1) + ->pluck('user_id')->toArray(); } else { // 退回到开始取最后一个开始节点 $parent_user_id = DB::table('model_run_log') ->where('run_id', $run_id) ->where('parent_id', $parent_log['parent_id']) + ->where('option', 1) ->orderBy('id', 'desc') ->value('user_id'); $parent_user_ids = [$parent_user_id];