From 2516fabea0e77fd15731cf7a3c12787da03b849f Mon Sep 17 00:00:00 2001 From: liweisen Date: Sat, 9 May 2020 13:02:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=8E=92=E5=BA=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/Model/Task.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/common/Model/Task.php b/application/common/Model/Task.php index f99afa2..281524b 100644 --- a/application/common/Model/Task.php +++ b/application/common/Model/Task.php @@ -492,7 +492,7 @@ class Task extends CommonModel $preTask->save(); } else { // 小于安全值 - $this->resetSort($preTask['stage_code']); + $this->resetSort($preTask['stage_code'], $done); $this->sort($preCode, $nextCode, $toStageCode); } return true; @@ -501,9 +501,9 @@ class Task extends CommonModel } - public function resetSort($stageCode) + public function resetSort($stageCode, $done) { - $taskList = self::where('stage_code', $stageCode)->order('sort asc, id asc')->select(); + $taskList = self::where('stage_code', $stageCode)->order('sort asc, id asc')->where('done', $done)->select(); if ($taskList) { $sort = 500; foreach ($taskList as $task) {