P.GroupID,dbo.Get_PartGroupDesc(P.Site,P.GroupID) as GroupName
from SORouting as T,ShopOrder as D,WorkCenter as W,Part as P
<where>
AND T.Site=D.Site and T.OrderNo=D.OrderNo and T.Site=W.Site and T.WorkCenterNo=W.WorkCenterNo and D.Site=P.Site and D.PartNo=P.PartNo and T.OrderNo='8888' and T.site in (Select Site from AccessSite where upper(UserID)=#{user})
AND T.Site=D.Site and T.OrderNo=D.OrderNo and T.Site=W.Site and T.WorkCenterNo=W.WorkCenterNo and D.Site=P.Site and D.PartNo=P.PartNo and T.site in (Select Site from AccessSite where upper(UserID)=#{user})