* Finish task #92312.

This commit is contained in:
tanghucheng
2023-05-08 20:26:53 +08:00
parent b24ce954fd
commit aa1cb2ac8d
+12 -1
View File
@@ -148,7 +148,18 @@ class stageModel extends model
}
else
{
return $this->dao->select('*')->from(TABLE_STAGE)->where('deleted')->eq(0)->andWhere('projectType')->eq($type)->orderBy($orderBy)->fetchAll('id');
$stageType = '';
if($this->config->systemMode == 'PLM' and $this->app->rawMethod == 'create' and $this->app->rawModule == 'programplan' and $type == 'ipd')
{
$project = $this->loadModel('project')->getByID($this->session->project);
$stageType = $this->config->project->categoryStages[$project->category];
}
return $this->dao->select('*')->from(TABLE_STAGE)
->where('deleted')->eq(0)
->andWhere('projectType')->eq($type)
->beginIF(!empty($stageType))->andWhere('type')->in($stageType)->fi()
->orderBy($orderBy)
->fetchAll('id');
}
}