* replace ne() function to notIN().

This commit is contained in:
wangyidong
2019-09-05 16:00:04 +08:00
parent fd790da12c
commit c16eeefa33
3 changed files with 4 additions and 5 deletions
+1 -2
View File
@@ -176,8 +176,7 @@ class blockModel extends model
->fetch('count');
$data['stories'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->fetch('count');
$data['projects'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
->where('status')->ne('done')
->andWhere('status')->ne('closed')
->where('status')->notIN('done,closed')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->andWhere('deleted')->eq(0)
->fetch('count');
+2 -2
View File
@@ -724,7 +724,7 @@ class projectModel extends model
->where('t1.product')->eq($productID)
->andWhere('t2.deleted')->eq(0)
->andWhere('t2.iscat')->eq(0)
->beginIF($status == 'undone')->andWhere('t2.status')->ne('done')->andWhere('t2.status')->ne('closed')->fi()
->beginIF($status == 'undone')->andWhere('t2.status')->notIN('done,closed')->fi()
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
@@ -735,7 +735,7 @@ class projectModel extends model
else
{
return $this->dao->select('*, IF(INSTR(" done,closed", status) < 2, 0, 1) AS isDone')->from(TABLE_PROJECT)->where('iscat')->eq(0)
->beginIF($status == 'undone')->andWhere('status')->ne('done')->andWhere('status')->ne('closed')->fi()
->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi()
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->andWhere('deleted')->eq(0)
+1 -1
View File
@@ -1652,7 +1652,7 @@ class taskModel extends model
->andWhere("((t4.`account` = '{$this->app->user->account}' AND t4.`type` = 'task') OR t1.`assignedTo` = '{$this->app->user->account}' OR t1.`finishedby` = '{$this->app->user->account}')")
->fi()
->beginIF($productID)->andWhere("((t5.root=" . (int)$productID . " and t5.type='story') OR t2.product=" . (int)$productID . ")")->fi()
->beginIF($type == 'undone')->andWhere('t1.status')->ne('done')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($type == 'undone')->andWhere('t1.status')->notIN('done,closed')->fi()
->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi()
->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
->beginIF($type == 'finishedbyme')