* Finish task #45157.

This commit is contained in:
liumengyi
2021-11-26 08:55:04 +08:00
parent 26da1c72cb
commit fb843381ca
6 changed files with 13 additions and 21 deletions
+3 -1
View File
@@ -166,7 +166,9 @@ class blockModel extends model
{
$data = array();
$data['tasks'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count');
$getTaskCount = "SELECT count(*) AS count FROM `zt_task` WHERE assignedTo = 'admin' AND deleted = '0'"
. " AND (project not in (select id from zt_project where deleted = '0' and status ='suspended') AND execution not in (select id from zt_project where deleted = '0' and status ='suspended'))";
$data['tasks'] = (int)$this->dao->query($getTaskCount)->fetchAll();
$data['doneTasks'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->andWhere('status')->eq('done')->fetch('count');
$data['bugs'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG)
->where('assignedTo')->eq($this->app->user->account)