|
版本: |
|
小版本号: |
|
|
|
数据库: |
|
服务器操作系统: |
|
应用服务器: |
|
客户端操作系统: |
|
浏览器: |
|
|
|
本帖最后由 renchunjia 于 2014-6-10 21:24 编辑
1 findOrgChildren2
<static> List findOrgChildren2(Object org, String childCondition, Map params, Boolean includeSelf, Boolean includeAllChildren, Boolean includePersonMember)
获取指定组织的子
Parameters: {Object} org 组织单元; 允许两种情况: 单个组织单元ID或FID(String类型); 多个组织单元ID或FID(String类型)形成的List;
{String} childCondition 子节点的约束条件; 可以使用变量,变量的值在后一个参数中指定; 在条件中, 使用"org"表示子节点本身, 'org.属性名称'表示子节点的属性, 例如: org.sName='X5开发部'
{Map} params childCondition中使用的变量的值, 可以为null {Boolean}
includeSelf 是否包含自己 {Boolean}
includeAllChildren 是否包含所有子孙 {Boolean}
includePersonMember 是否取到人员成员 Returns: {List}
a 当 childCondition 这个参数中 包含变量或者组织机构表达式时 需要在组织机构表达式前加":"如:
findOrgChildren2(firstOrgUnitFID(findOrgChildren(currentDeptFID(),'org.sName like ''%拟办'' and org.sOrgKindID=''pos''' ,null,false,false)),'org.sOrgKindID=''psm'' and org.sName <> :currentPersonName()',null,false,false,true)
b 对于参数 {Map} params childCondition中使用的变量的值, 可以为null {Boolean} 的使用说明
如果我的参数 childCondition 这个参数中含有动态变量的 值 时 {Map} params 便能派上用场
'org.sOrgKindID=''psm'' and org.sName <> :Name' or org.sName <> :Name1' or org.sName <> :Name2'
// Map 假设有一个返回Map 对应的函数表达式函数
那么map的值就如下:其中map中的key对应的值即:Name,:Name1,:Name2等等。map中的value中对应的值就是实际要给出变量的值。如"规划处","规划处1","规划处2" 等等。
Map<String, Object> params =new HashMap<String, Object>();
params.put("Name", "规划处");
params.put("Name1", "规划处1");
params.put("Name2", "规划处2");
|
评分
-
查看全部评分
|