Merge branch 'sprint/208_tianshujie_58560' into 'master'

* Finish task #58560.

See merge request easycorp/zentaopms!4174
This commit is contained in:
王怡栋
2022-06-28 03:28:15 +00:00
9 changed files with 205 additions and 77 deletions
+20
View File
@@ -2232,6 +2232,26 @@ class projectModel extends model
return array('' => '') + $members;
}
/**
* Get team member group.
*
* @param array|string $projectIdList
* @access public
* @return array
*/
public function getTeamMemberGroup($projectIdList)
{
if(empty($projectIdList)) return array();
return $this->dao->select("t1.account, if(t2.deleted='0', t2.realname, t1.account) as realname, t1.root as project")->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
->where('t1.root')->in($projectIdList)
->andWhere('t1.type')->eq('project')
->andWhere('t2.deleted')->eq('0')
->beginIF($this->config->vision)->andWhere("CONCAT(',', t2.visions, ',')")->like("%,{$this->config->vision},%")->fi()
->fetchGroup('project', 'account');
}
/**
* Get members of a project who can be imported.
*