select SysID,SysName from Module tem where UpSysId=9 and IsProtected='true' 
and not exists (select 1 from Module a where a.SysID in (select SysId from rightGW where b.GangWeiId=1) and a.UpSysId=9 and a.IsProtected='true' and a.SysID=tem.sysid and a.SysName=temsysname)