Use The login user ,bring the person which in the same department ~!

来源:互联网 发布:2106淘宝查虚假交易 编辑:程序博客网 时间:2024/04/28 10:33

Select * from((

select VGUID,ODESC as DESC0,ODESCCHS as DESC1,PGUID,OID as ZORDER from CSORGA_1 where VGUID in (

select cmpnam from csempl_1 where dcno='{SYS:DCNO}' union all

select DCDEPT from csempl_1 where dcno='{SYS:DCNO}' ) )union (

select VGUID,DCNO+'-'+DCNAME as DESC0,DCNO+'-'+DCNAMECHS as DESC1,DCDEPT as PGUID,DCNO as ZORDER FROM CSEMPL_1 where DCDEPT in (

select DCDEPT from csempl_1 where dcno='{SYS:DCNO}')))A ORDER BY ZORDER

 

 

 

when we use the landa system ,some of the fields is used by the Tree control ,when the use the tree control  to select the relation person ,the want filter the person which in the same department ,so ,when depend on the user number,bring the CMPNAM and the DCDEPT from the CSORGA_1 and DCDEPT from the CSEMPL_1 .is will show the result which you need ~!

原创粉丝点击