Merge branch '15.6' into sprint/167

This commit is contained in:
王怡栋
2021-10-18 08:53:13 +08:00
2 changed files with 22 additions and 30 deletions
+5 -5
View File
@@ -1273,11 +1273,11 @@ class programModel extends model
/* Get the number of left tasks. */
if($this->cookie->projectType and $this->cookie->projectType == 'bycard')
{
$leftTasks = $this->dao->select('project,count(*) as tasks')->from(TABLE_TASK)
->where('project')->in($projectKeys)
->andWhere('status')->notIn('cancel,closed')
->andWhere('execution')->in(array_keys($executions))
->groupBy('project')
$leftTasks = $this->dao->select('t2.parent as project, count(*) as tasks')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
->where('t1.execution')->in(array_keys($executions))
->andWhere('t1.status')->notIn('cancel,closed')
->groupBy('t2.parent')
->fetchAll('project');
}