SELECT 
	PM.userid 
from  (select 
	proj.id as projectid ,
	GROUP_CONCAT(user.realname) as realname,
	GROUP_CONCAT(user.userid) as userid
from t_s_user_org uo
left join t_s_depart dept on uo.org_id = dept.id 
left join t_b_project proj  on proj.id = dept.projectid 
inner join ( 
	select bu.id as userid,realname 
	from t_s_role_user ru 
	left join t_s_base_user bu on ru.userid = bu.id 
	left join t_s_role role on role.id = ru.roleid 
	where role.rolecode = 'P_XMJL') user on user.userid = uo.user_id 
WHERE LENGTH(dept.org_code) = 6 and proj.id is not null
group by projectid) PM 
WHERE 
PM.projectid = :project


