* Fix order in dmdb.

This commit is contained in:
朱金勇
2023-04-10 03:13:24 +00:00
parent 9bc7941349
commit 75a3485f47
7 changed files with 23 additions and 9 deletions
+2 -3
View File
@@ -238,14 +238,13 @@ class projectModel extends model
->groupBy('t1.root')
->fetchAll('root');
$condition = 't2.project as project';
$estimates = $this->dao->select("$condition, sum(estimate) as estimate")->from(TABLE_TASK)->alias('t1')
$estimates = $this->dao->select("t2.project as project, sum(estimate) as estimate")->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.execution = t2.id')
->where('t1.parent')->lt(1)
->andWhere('t2.project')->in($projectIdList)
->andWhere('t1.deleted')->eq(0)
->andWhere('t2.deleted')->eq(0)
->groupBy('project')
->groupBy('t2.project')
->fetchAll('project');
$this->app->loadClass('pager', $static = true);