* [task#132175,0.5h,doing] get tasks in gantt by search.
This commit is contained in:
@@ -131,10 +131,12 @@ class programplanModel extends model
|
||||
* @param int $baselineID
|
||||
* @param string $selectCustom
|
||||
* @param bool $returnJson
|
||||
* @param string $browseType
|
||||
* @param int $queryID
|
||||
* @access public
|
||||
* @return string|array
|
||||
*/
|
||||
public function getDataForGantt(int $projectID, int $productID, int $baselineID = 0, string $selectCustom = '', bool $returnJson = true): string|array
|
||||
public function getDataForGantt(int $projectID, int $productID, int $baselineID = 0, string $selectCustom = '', bool $returnJson = true, $browseType = '', $queryID = 0): string|array
|
||||
{
|
||||
$plans = $this->getStage($projectID, $productID, 'all', 'order');
|
||||
$project = $this->loadModel('project')->getById($projectID);
|
||||
@@ -158,7 +160,7 @@ class programplanModel extends model
|
||||
if(empty($selectCustom)) $selectCustom = $this->loadModel('setting')->getItem("owner={$this->app->user->account}&module=programplan§ion=browse&key=stageCustom");
|
||||
|
||||
/* Set task baseline data. */
|
||||
$tasks = empty($planIdList) ? array() : $this->dao->select('*')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in($planIdList)->orderBy('execution_asc, order_asc, id_desc')->fetchAll('id');
|
||||
$tasks = $this->getGanttTasks($projectID, $planIdList, $browseType, $queryID);
|
||||
if($baselineID) $this->programplanTao->setTaskBaseline(isset($oldData->task) ? $oldData->task : array(), $tasks); // Set task baseline.
|
||||
|
||||
/* Set task for gantt view. */
|
||||
@@ -187,10 +189,12 @@ class programplanModel extends model
|
||||
* @param int $baselineID
|
||||
* @param string $selectCustom
|
||||
* @param bool $returnJson
|
||||
* @param string $browseType
|
||||
* @param int $queryID
|
||||
* @access public
|
||||
* @return string|array
|
||||
*/
|
||||
public function getDataForGanttGroupByAssignedTo(int $executionID, int $productID, int $baselineID = 0, string $selectCustom = '', bool $returnJson = true): string|array
|
||||
public function getDataForGanttGroupByAssignedTo(int $executionID, int $productID, int $baselineID = 0, string $selectCustom = '', bool $returnJson = true, string $browseType = '', int $queryID = 0): string|array
|
||||
{
|
||||
$datas = array();
|
||||
$stageIndex = array();
|
||||
@@ -198,7 +202,7 @@ class programplanModel extends model
|
||||
$plans = $this->getStage($executionID, $productID);
|
||||
$planIdList = array_column($plans, 'id');
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
$tasks = $this->dao->select('*')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in($planIdList)->fetchAll('id');
|
||||
$tasks = $this->getGanttTasks($executionID, $planIdList, $browseType, $queryID);
|
||||
$tasksGroup = $this->programplanTao->buildTaskGroup($tasks);
|
||||
|
||||
/* Judge whether to display tasks under the stage. */
|
||||
@@ -740,4 +744,10 @@ class programplanModel extends model
|
||||
$this->setting->setItem("$owner.$module.ganttCustom.ganttFields", $ganttFields);
|
||||
$this->setting->setItem("$owner.$module.ganttCustom.zooming", $zooming);
|
||||
}
|
||||
|
||||
public function getGanttTasks(int $projectID, array $planIdList, string $browseType, int $queryID)
|
||||
{
|
||||
$tasks = array();
|
||||
return $tasks;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user