Merge branch 'sprint/167_wangyidong' into sprint/167

This commit is contained in:
王怡栋
2021-10-18 10:26:28 +08:00
2 changed files with 20 additions and 3 deletions
+14
View File
@@ -98,6 +98,20 @@ class userEntry extends Entry
$info->task['tasks'] = $data->data->tasks;
}
break;
case 'bug':
$info->bug = array('total' => 0, 'bugs' => array());
$control = $this->loadController('my', 'bug');
$control->bug($this->param('type', 'assignedTo'), $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 5), $this->param('page', 1));
$data = $this->getData();
if($data->status == 'success')
{
$info->bug['total'] = $data->data->pager->recTotal;
$info->bug['bugs'] = $data->data->bugs;
}
break;
case 'todo':
$info->todo = array('total' => 0, 'todos' => array());
+6 -3
View File
@@ -193,11 +193,14 @@ class myModel extends model
$account = $this->app->user->account;
$contribute = new stdclass();
$contribute->docCreatedTotal = $this->dao->select('count(*) AS count')->from(TABLE_DOC)->where('addedBy')->eq($this->app->user->account)->andWhere('deleted')->eq('0')->fetch('count');
$contribute->ownerProductTotal = $this->dao->select('count(*) AS count')->from(TABLE_PRODUCT)->where('PO')->eq($this->app->user->account)->andWhere('deleted')->eq('0')->fetch('count');
$contribute->myTaskTotal = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count');
$contribute->myStoryTotal = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->andWhere('type')->eq('story')->fetch('count');
$contribute->myBugTotal = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count');
$contribute->docCreatedTotal = (int)$this->dao->select('count(*) AS count')->from(TABLE_DOC)->where('addedBy')->eq($this->app->user->account)->andWhere('deleted')->eq('0')->fetch('count');
$contribute->ownerProductTotal = (int)$this->dao->select('count(*) AS count')->from(TABLE_PRODUCT)->where('PO')->eq($this->app->user->account)->andWhere('deleted')->eq('0')->fetch('count');
$inTeam = $this->dao->select('root')->from(TABLE_TEAM)->where('type')->eq('project')->andWhere('account')->eq($this->app->user->account)->fetchPairs('root', 'root');
$contribute->involvedProjectTotal = $this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
$contribute->involvedProjectTotal = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
->where('deleted')->eq('0')
->andWhere('type')->eq('project')
->andWhere('id', true)->in($inTeam)