* Add comment to productModel, and adjust code order.

This commit is contained in:
zhouxin
2023-05-25 09:55:37 +08:00
parent 9f85b58901
commit 351bb44e31
+14 -10
View File
@@ -401,6 +401,7 @@ class productModel extends model
}
/**
* 获取以所属项目集分组的产品列表。
* Get products group by program.
*
* @access public
@@ -735,6 +736,7 @@ class productModel extends model
}
/**
* 获取需求列表。
* Get stories.
*
* @param int $productID
@@ -761,23 +763,25 @@ class productModel extends model
$stories = array();
if(!isset($this->story)) $this->loadModel('story');
if($browseType == 'unplan') return $this->story->getByPlan($productID, $queryID, $modules, '', $type, $sort, $pager);
if($browseType == 'allstory') return $this->story->getProductStories($productID, $branch, $modules, 'all', $type, $sort, true, '', $pager);
if($browseType == 'bymodule') return $this->story->getProductStories($productID, $branch, $modules, 'all', $type, $sort, true, '', $pager);
if($browseType == 'bysearch') return $this->story->getBySearch($productID, $branch, $queryID, $sort, '', $type, '', $pager);
if($browseType == 'draftstory') return $this->story->getByStatus($productID, $branch, $modules, 'draft', $type, $sort, $pager);
if($browseType == 'activestory') return $this->story->getByStatus($productID, $branch, $modules, 'active', $type, $sort, $pager);
if($browseType == 'changingstory') return $this->story->getByStatus($productID, $branch, $modules, 'changing', $type, $sort, $pager);
if($browseType == 'reviewingstory') return $this->story->getByStatus($productID, $branch, $modules, 'reviewing', $type, $sort, $pager);
if($browseType == 'closedstory') return $this->story->getByStatus($productID, $branch, $modules, 'closed', $type, $sort, $pager);
if($browseType == 'assignedtome') return $this->story->getByAssignedTo($productID, $branch, $modules, $this->app->user->account, $type, $sort, $pager);
if($browseType == 'openedbyme') return $this->story->getByOpenedBy($productID, $branch, $modules, $this->app->user->account, $type, $sort, $pager);
if($browseType == 'reviewedbyme') return $this->story->getByReviewedBy($productID, $branch, $modules, $this->app->user->account, $type, $sort, $pager);
if($browseType == 'reviewbyme') return $this->story->getByReviewBy($productID, $branch, $modules, $this->app->user->account, $type, $sort, $pager);
if($browseType == 'closedbyme') return $this->story->getByClosedBy($productID, $branch, $modules, $this->app->user->account, $type, $sort, $pager);
if($browseType == 'draftstory') return $this->story->getByStatus($productID, $branch, $modules, 'draft', $type, $sort, $pager);
if($browseType == 'activestory') return $this->story->getByStatus($productID, $branch, $modules, 'active', $type, $sort, $pager);
if($browseType == 'changingstory') return $this->story->getByStatus($productID, $branch, $modules, 'changing', $type, $sort, $pager);
if($browseType == 'reviewingstory') return $this->story->getByStatus($productID, $branch, $modules, 'reviewing', $type, $sort, $pager);
if($browseType == 'willclose') return $this->story->get2BeClosed($productID, $branch, $modules, $type, $sort, $pager);
if($browseType == 'closedstory') return $this->story->getByStatus($productID, $branch, $modules, 'closed', $type, $sort, $pager);
if($browseType == 'assignedbyme') return $this->story->getByAssignedBy($productID, $branch, $modules, $this->app->user->account, $type, $sort, $pager);
if($browseType == 'unplan') return $this->story->getByPlan($productID, $queryID, $modules, '', $type, $sort, $pager);
if($browseType == 'allstory') return $this->story->getProductStories($productID, $branch, $modules, 'all', $type, $sort, true, '', $pager);
if($browseType == 'bymodule') return $this->story->getProductStories($productID, $branch, $modules, 'all', $type, $sort, true, '', $pager);
if($browseType == 'bysearch') return $this->story->getBySearch($productID, $branch, $queryID, $sort, '', $type, '', $pager);
if($browseType == 'willclose') return $this->story->get2BeClosed($productID, $branch, $modules, $type, $sort, $pager);
if($browseType == 'unclosed')
{
$unclosedStatus = $this->lang->story->statusList;