TOrgUnit.Module.Subordinations 就可以得到下属了
--------------
如用组织机构表达式,应该是
Org.OrgSys.OrgSystem.GetBizURLsByOrgExpr(OrgChildren(OrgSubordination(OrgKey(''部门编号'',''岗位编号'',''人员编号''), ''''), OrgCondition( ''*.dpt'','''',''''), True, True),ABizURLs);
示例代码
var
olist:TStrings;
i : Integer;
begin
//
memo1.Clear;
olist:= TStringList.Create;
//取销售部--部门经理--王六的所有管理下属,附加条件为人员成员
OrgSys.OrgSystem.GetBizURLsByOrgExpr('OrgChildren(OrgSubordination(OrgKey(''XSB'',''BMJL'',''WL''), ''''), OrgCondition(''*.psm'','''',''''), True, True)',olist);
for i:=0 to olist.Count-1 do
begin
memo1.Lines.add(olist);
end;
olist.free;
end; |