* Code for bug#15543.Modify the consumed hours of the project in the block.

This commit is contained in:
xieqiyu
2021-10-16 08:27:28 +08:00
parent 5cd2f5d2db
commit 21ad4ecf0a
+5 -4
View File
@@ -213,10 +213,11 @@ class projectModel extends model
->groupBy('root')
->fetchAll('root');
$estimates = $this->dao->select('project, sum(estimate) as estimate')->from(TABLE_TASK)
->where('project')->in($projectIdList)
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
$estimates = $this->dao->select('t2.parent as project, sum(estimate) as estimate')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
->where('t2.parent')->in($projectIdList)
->andWhere('t1.deleted')->eq(0)
->andWhere('t1.parent')->lt(1)
->groupBy('project')
->fetchAll('project');