* Adjust testreport module.

This commit is contained in:
leiyong
2021-03-29 18:25:15 +08:00
parent 905868cc2d
commit cf6f149d6a
9 changed files with 26 additions and 23 deletions
+4 -4
View File
@@ -147,10 +147,10 @@ class testreportModel extends model
{
$objectID = (int)$objectID;
return $this->dao->select('*')->from(TABLE_TESTREPORT)->where('deleted')->eq(0)
->beginIF(!empty($extra))->andWhere('objectID')->eq($extra)->fi()
->beginIF($objectType == 'product')->andWhere('product')->eq($objectID)->fi()
->beginIF($objectType == 'project')->andWhere('project')->eq($objectID)->fi()
->beginIF($objectType == 'execution')->andWhere('execution')->eq($objectID)->fi()
->beginIF($objectType == 'execution')->andWhere('objectID')->eq($objectID)->andWhere('objectType')->eq('execution')->fi()
->beginIF($objectType == 'project')->andWhere('objectID')->eq($objectID)->andWhere('objectType')->eq('project')->fi()
->beginIF($objectType == 'product' and $extra)->andWhere('objectID')->eq((int)$extra)->andWhere('objectType')->eq('testtask')->fi()
->beginIF($objectType == 'product' and empty($extra))->andWhere('product')->eq($objectID)->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll('id');