* Finish task #85048.

This commit is contained in:
Yagami
2023-02-21 08:59:26 +08:00
parent df38f27ead
commit dc9eb5a1a4
+3 -1
View File
@@ -53,10 +53,12 @@ class programplanModel extends model
public function getStage($executionID = 0, $productID = 0, $browseType = 'all', $orderBy = 'id_asc')
{
if(empty($executionID)) return array();
$projectModel = $this->dao->select('model')->from(TABLE_PROJECT)->where('id')->eq($executionID)->fetch('model');
$plans = $this->dao->select('t1.*')->from(TABLE_EXECUTION)->alias('t1')
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.id = t2.project')
->where('t1.type')->eq('stage')
->where('1 = 1')
->beginIF($projectModel != 'waterfallplus')->andWhere('t1.type')->eq('stage')->fi()
->beginIF($productID)->andWhere('t2.product')->eq($productID)->fi()
->beginIF($browseType == 'all')->andWhere('t1.project')->eq($executionID)->fi()
->beginIF($browseType == 'parent')->andWhere('t1.parent')->eq($executionID)->fi()