This commit is contained in:
tanghucheng
2022-04-13 10:46:44 +08:00
parent 7e1a3564d1
commit 0c2c898c01
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -2343,6 +2343,8 @@ class taskModel extends model
*/
public function getUserTaskPairs($account, $status = 'all', $skipExecutionIDList = array())
{
$deletedProjectIDList = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(1)->fetchPairs('id', 'id');
$stmt = $this->dao->select('t1.id, t1.name, t2.name as execution')
->from(TABLE_TASK)->alias('t1')
->leftjoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
@@ -2351,6 +2353,7 @@ class taskModel extends model
->beginIF($this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi()
->beginIF($status != 'all')->andWhere('t1.status')->in($status)->fi()
->beginIF(!empty($skipExecutionIDList))->andWhere('t1.execution')->notin($skipExecutionIDList)->fi()
->beginIF(!empty($deletedProjectIDList))->andWhere('t1.execution')->notin($deletedProjectIDList)->fi()
->query();
$tasks = array();