From efbd476378e73e7f531025f7d35490f3ab8aacf5 Mon Sep 17 00:00:00 2001 From: vilson <545522390@qq.com> Date: Thu, 18 Jul 2019 16:19:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=87=AA=E5=8A=A8=E6=B5=81?= =?UTF-8?q?=E8=BD=AC=E5=A2=9E=E5=8A=A0=E7=8A=B6=E6=80=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: vilson <545522390@qq.com> --- application/common/Model/TaskWorkflowRule.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/application/common/Model/TaskWorkflowRule.php b/application/common/Model/TaskWorkflowRule.php index 5420d55..9b216ba 100644 --- a/application/common/Model/TaskWorkflowRule.php +++ b/application/common/Model/TaskWorkflowRule.php @@ -23,6 +23,13 @@ class TaskWorkflowRule extends CommonModel TaskWorkflowRule::createData($workflowCode, 3, $taskWorkflowRules->firstResult->value, $taskWorkflowRules->firstResult->action); if ($taskWorkflowRules->lastResult->value) { TaskWorkflowRule::createData($workflowCode, 4, $taskWorkflowRules->lastResult->value, $taskWorkflowRules->lastResult->action); + if ($taskWorkflowRules->state->value) { + TaskWorkflowRule::createData($workflowCode, 5, '', $taskWorkflowRules->state->value); + } + } else { + if ($taskWorkflowRules->state->value) { + TaskWorkflowRule::createData($workflowCode, 4, '', $taskWorkflowRules->state->value); + } } } @@ -85,6 +92,14 @@ class TaskWorkflowRule extends CommonModel TaskMember::inviteMember($do['object_code'], $task['code'], 1, 0, false, true); } catch (\Exception $exception) { } + } elseif ($do['action'] == 1) { + //完成 + $task->done = 1; + $task->save(); + } elseif ($do['action'] == 2) { + //重做 + $task->done = 0; + $task->save(); } $next = self::where(['workflow_code' => $do['workflow_code'], 'sort' => $do['sort'] + 1])->find(); if ($next) {