From 9648b4851318aea65ce0bdd7fe5cdbf3e824965f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Wed, 14 Dec 2022 09:45:36 +0800 Subject: [PATCH] * Finish task #79457. --- module/execution/control.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 5379ec4ddb..30a6c981cd 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -4195,14 +4195,22 @@ class execution extends control include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php'; } - $executionProductList = $this->loadModel('product')->getProducts($executionID); $multiBranchProduct = false; - foreach($executionProductList as $executionProduct) + if($productID) { - if($executionProduct->type != 'normal') + $product = $this->loadModel('product')->getByID($productID); + if($product->type != 'normal') $multiBranchProduct = true; + } + else + { + $executionProductList = $this->loadModel('product')->getProducts($executionID); + foreach($executionProductList as $executionProduct) { - $multiBranchProduct = true; - break; + if($executionProduct->type != 'normal') + { + $multiBranchProduct = true; + break; + } } } $importPlanStoryTips = $multiBranchProduct ? $this->lang->execution->haveBranchDraft : $this->lang->execution->haveDraft;