Merge branch 'master' into story

This commit is contained in:
sunguangming
2024-05-29 15:44:14 +08:00
204 changed files with 1282 additions and 593 deletions
+5 -4
View File
@@ -2406,10 +2406,11 @@ class executionModel extends model
public function updateProducts(int $executionID, object|array $postData): bool
{
$this->loadModel('user');
$products = array_filter(array_merge(zget($postData, 'products', array()), zget($postData, 'otherProducts', array())));
$branches = zget($postData, 'branch', array(0));
$plans = zget($postData, 'plans', array());
$oldProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($executionID)->fetchGroup('product', 'branch');
$otherProducts = zget($postData, 'otherProducts', array());
$products = !empty($otherProducts) ? array_filter(array_merge(zget($postData, 'products', array()), $otherProducts)) : zget($postData, 'products', array());
$branches = zget($postData, 'branch', array(0));
$plans = zget($postData, 'plans', array());
$oldProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($executionID)->fetchGroup('product', 'branch');
if(empty($_POST['otherProducts'])) $this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->eq($executionID)->exec();
$members = array_keys($this->getTeamMembers($executionID));
if(empty($products))