您可以通过this.org获取组织中的人员、人员属性、组织、组织属性、身份、群组和角色。
syntax
//您可以在流程表单、内容管理表单、门户页面、视图和查询视图中,通过this来获取当前实例的org对象,如下:
var org = this.org;
source
methods
getidentity(name, asyncorcallbackopt) → {promise|identitydata|array.}
根据身份标识获取对应的身份对象或数组
syntax
//同步执行,返回身份,单个是对象,多个是数组。
var identitylist = this.org.getidentity( name );
//异步执行,返回promise对象
var promise = this.org.getidentity( name, true);
promise.then(function(identitylist){
//identitylist 为返回的身份,单个是对象,多个是数组。
})
//异步执行,在回调方法中获取身份
this.org.getidentity( name, function(identitylist){
//identitylist 为返回的身份,单个是对象,多个是数组。
})
parameters
-
name
identityflag
|array.<identityflag>
身份的distinguishedname、id、unique属性值,身份对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
identitydata
array.
当async为true时,返回 。 否则返回身份,单个是object,多个是array。
{
"matchkey": " ", //匹配字段
"id": " ", //数据库主键,自动生成.
"pinyin": " ", //name拼音,自动生成
"pinyininitial": " ", //name拼音首字母,自动生成
"description": " ", //描述.
"name": "李四", //名称,可重名.
"unique": "23dd1b53-feed-485d-8c9c-1a4e64ff58a2", //唯一标识,不可重复,为空则使用自动填充值
"distinguishedname": "李四@23dd1b53-feed-485d-8c9c-1a4e64ff58a2@i", //识别名.
"person": "李四@lisi@p", //身份所属个人,存放个人 id,不为空.
"unit": "开发部@kfb@u", //属性所属组织,不可为空.
"unitname": "开发部", //组织名称.
"unitlevel": 2, //组织级别.
"unitlevelname": "浙江兰德纵横/开发部", //显示的层级名.
"ordernumber": 24920439, //排序号,升序排列,为空在最后
"major": true, //主身份标识
"createtime": "2023-11-21 15:02:35", //创建时间,自动生成,索引创建在约束中.
"updatetime": "2023-11-21 15:02:35" //修改时间,自动生成,索引创建在约束中.
}
source
listidentitywithperson(name, asyncorcallbackopt, findcnopt) → {promise|array.}
根据人员标识获取对应的身份对象数组。
syntax
//同步执行,返回身份对象数组。
var identitylist = this.org.listidentitywithperson( person );
//异步执行,返回promise对象
var promise = this.org.listidentitywithperson( person, true);
promise.then(function(identitylist){
//identitylist 返回的身份对象数组。
})
//异步执行,在回调方法中获取
this.org.listidentitywithperson( person, function(identitylist){
//identitylist 返回的身份对象数组。
})
parameters
-
name
personflag
|array.<personflag>
人员的distinguishedname、id、unique属性值,人员对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
-
findcn
boolean
是否需要额外查找中文名称(如张三),默认false。如果为true,除匹配unique和distingiushedname外,还会在身份的第一段中查找所有匹配到的身份(精确匹配)。
returns
-
promise
array.
当async为true时,返回 。 否则返回身份对象数组。
{
"matchkey": " ", //匹配字段
"name": "李四", //身份名称
"unique": "23dd1b53-feed-485d-8c9c-1a4e64ff58a2", //身份标识
"description": " ", //说明
"distinguishedname": "李四@23dd1b53-feed-485d-8c9c-1a4e64ff58a2@i", //识别名
"person": "李四@lisi@p", //人员
"unit": "开发部@kfb@u", //组织
"unitname": "开发部", //组织名称
"unitlevel": 2, //组织级别
"unitlevelname": "浙江兰德纵横/开发部", //组织级别名
"ordernumber": 24920439, //排序号
"major": true //是否是设定的主身份
}
source
listidentitywithunit(name, nestedopt, asyncorcallbackopt) → {promise|array.}
根据组织标识获取对应的身份对象数组:identity对象数组。
syntax
//同步执行,返回直接组织身份对象数组。
var identitylist = this.org.listidentitywithunit( unit );
//同步执行,返回嵌套组织身份对象数组。
var identitylist = this.org.listidentitywithunit( unit, true );
//异步执行,返回promise对象
var promise = this.org.listidentitywithunit( unit, false, true);
promise.then(function(identitylist){
//identitylist 返回直接组织身份对象数组。
})
//异步执行,在回调方法中获取
this.org.listidentitywithunit( unit, false, function(identitylist){
//identitylist 返回直接组织身份对象数组。
})
parameters
-
name
unitflag
|array.<unitflag>
组织的distinguishedname、id、unique属性值,组织对象,或上述属性值和对象的数组。
-
nested
boolean
true嵌套的所有身份成员;false直接身份成员;默认false。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回身份对象数组。
{
"matchkey": " ", //匹配字段
"name": "李四", //身份名称
"unique": "23dd1b53-feed-485d-8c9c-1a4e64ff58a2", //身份标识
"description": " ", //说明
"distinguishedname": "李四@23dd1b53-feed-485d-8c9c-1a4e64ff58a2@i", //识别名
"person": "李四@lisi@p", //人员
"unit": "开发部@kfb@u", //组织
"unitname": "开发部", //组织名称
"unitlevel": 2, //组织级别
"unitlevelname": "浙江兰德纵横/开发部", //组织级别名
"ordernumber": 24920439, //排序号
"major": true //是否是设定的主身份
}
source
getunit(name, asyncorcallbackopt, findcnopt) → {promise|unitdata|array.}
根据组织标识获取对应的组织:unit对象或数组
syntax
//同步执行,返回组织,单个是对象,多个是数组。
var unitlist = this.org.getunit( name );
//异步执行,返回promise对象
var promise = this.org.getunit( name, true);
promise.then(function(unitlist){
//unitlist 为返回的组织,单个是对象,多个是数组。
})
//异步执行,在回调方法中获取组织
this.org.getunit( name, function(unitlist){
//unitlist 为返回的组织,单个是对象,多个是数组。
})
parameters
-
name
unitflag
|array.<unitflag>
组织的distinguishedname、id、unique属性值,组织对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
-
findcn
boolean
是否需要额外查找中文名称(如综合部),默认false。如果为true,除匹配unique和distingiushedname外,还会在名称的第一段中查找所有匹配到的部门(精确匹配)。
returns
-
promise
unitdata
array.
当async为true时,返回 。 否则返回组织,单个是object,多个是array。
{
"matchkey": " ", //匹配字段
"subdirectunitcount": 1, //直接下级组织数量
"subdirectidentitycount": 1, //直接下级身份数量
"subdirectdutycount": 1, //直接下级职务数量
"id": " ", //数据库主键,自动生成.
"name": "开发部", //名称,可以重名.
"unique": "kfb", //唯一标识,不可重复,为空则使用自动填充值
"distinguishedname": "开发部@kfb@u", //识别名.以@u结尾.
"typelist": [
"部门"
], //组织类型.
"pinyin": " ", //name拼音,自动生成
"pinyininitial": " ", //name拼音首字母,自动生成
"description": " ", //描述.
"shortname": "kfb", //组织简称。
"level": 2, //组织级别,1为最上层组织.自动计算.
"levelname": "浙江兰德纵横/开发部", //显示的层级名.
"levelordernumber": " ", //层级排序号,使用/进行分割.将逐级unit中的ordernumber的integer值扩充到在organization配置中指定位数的文本值,前填充0
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织.
"ordernumber": 1, //排序号,升序排列,为空在最后
"dingdingid": " ", //钉钉部门id.
"dingdinghash": " ", //钉钉部门哈希特征.
"welinkid": " ", //welink部门id.
"welinkhash": " ", //welink部门哈希特征.
"qiyeweixinid": " ", //企业微信人员id.
"zhengwudingdingid": " ", //政务钉钉人员id.
"andfxid": " ", //移动办公组织id.
"zhengwudingdinghash": " ", //政务钉钉人员哈希特征.
"qiyeweixinhash": " ", //企业微信人员哈希特征.
"andfxhash": " ", //移动办公组织哈希特征.
"createtime": "2023-11-21 15:02:35", //创建时间,自动生成,索引创建在约束中.
"updatetime": "2023-11-21 15:02:35" //修改时间,自动生成,索引创建在约束中.
}
source
listsubunit(name, nestedopt, asyncorcallbackopt) → {promise|array.}
根据组织标识获取下级组织的对象数组:unit对象数组。
syntax
//同步执行,返回嵌套下级组织数组。
var unitlist = this.org.listsubunit( name, true );
//异步执行,返回promise对象
var promise = this.org.listsubunit( name, false, true);
promise.then(function(unitlist){
//unitlist 为返回的直接下级组织数组。
})
//异步执行,在回调方法中获取
this.org.listsubunit( name, true, function(unitlist){
//unitlist 为返回嵌套下级组织数组。
})
parameters
-
name
unitflag
|array.<unitflag>
组织的distinguishedname、id、unique属性值,组织对象,或上述属性值和对象的数组。
-
nested
boolean
true嵌套的所有下级组织;false直接下级组织;默认false。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回组织数组。
{
"name": "开发部", //组织名称
"unique": "kfb", //唯一标识
"distinguishedname": "开发部@kfb@u", //识别名
"typelist": [
"部门"
], //组织类型
"description": " ", //说明
"shortname": "kfb", //简称
"level": 2, //组织层次
"levelname": "浙江兰德纵横/开发部", //组织层次名
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织
"ordernumber": 1, //排序号
"levelordernumber": " ", //层级排序号
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " " //华为welink id
}
source
listsupunit(name, nestedopt, asyncorcallbackopt) → {promise|array.}
根据组织标识批量获取上级组织的对象数组:unit对象数组。
syntax
//同步执行,返回嵌套上级组织数组。
var unitlist = this.org.listsupunit( name, true );
//异步执行,返回promise对象
var promise = this.org.listsupunit( name, false, true);
promise.then(function(unitlist){
//unitlist 为返回的直接上级组织数组。
})
//异步执行,在回调方法中获取
this.org.listsupunit( name, true, function(unitlist){
//unitlist 为返回嵌套上级组织数组。
})
parameters
-
name
unitflag
|array.<unitflag>
组织的distinguishedname、id、unique属性值,组织对象,或上述属性值和对象的数组。
-
nested
boolean
true嵌套的所有上级组织;false直接上级组织;默认false。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回组织数组。
{
"name": "开发部", //组织名称
"unique": "kfb", //唯一标识
"distinguishedname": "开发部@kfb@u", //识别名
"typelist": [
"部门"
], //组织类型
"description": " ", //说明
"shortname": "kfb", //简称
"level": 2, //组织层次
"levelname": "浙江兰德纵横/开发部", //组织层次名
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织
"ordernumber": 1, //排序号
"levelordernumber": " ", //层级排序号
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " " //华为welink id
}
source
getunitbyidentity(name, flagopt, asyncorcallbackopt) → {promise|unitdata|array.}
根据个人身份获取组织:unit对象或数组。
syntax
//同步执行,返回直接所在组织,单个为对象,多个为数组。
var unitlist = this.org.getunitbyidentity( name );
//同步执行,返回第一层组织,单个为对象,多个为数组。
var unitlist = this.org.getunitbyidentity( name, 1 );
* //同步执行,返回类型为company的组织,单个为对象,多个为数组。
var unitlist = this.org.getunitbyidentity( name, "company" );
//异步执行,返回promise对象
var promise = this.org.getunitbyidentity( name, null, true);
promise.then(function(unitlist){
//unitlist 返回直接所在组织,单个为对象,多个为数组。
})
//异步执行,在回调方法中获取
this.org.getunitbyidentity( name, 1, function(unitlist){
//unitlist 返回第一层组织,单个为对象,多个为数组。
})
parameters
-
name
identityflag
身份的distinguishedname、id、unique属性值,身份对象。
-
flag
string
|number
当值为数字的时候, 表示获取第几层的组织。
当值为字符串的时候,表示获取指定类型的组织。
当值为空的时候,表示获取直接所在组织。 -
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
unitdata
array.
当async为true时,返回 。 否则返回对应组织,单个为对象,多个为数组。
{
"name": "开发部", //组织名称
"unique": "kfb", //唯一标识
"distinguishedname": "开发部@kfb@u", //识别名
"typelist": [
"部门"
], //组织类型
"description": " ", //说明
"shortname": "kfb", //简称
"level": 2, //组织层次
"levelname": "浙江兰德纵横/开发部", //组织层次名
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织
"ordernumber": 1, //排序号
"levelordernumber": " ", //层级排序号
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " " //华为welink id
}
source
listallsupunitwithidentity(name, asyncorcallbackopt) → {promise|array.}
批量查询身份所在的组织,并递归查找其上级组织对象.
syntax
//同步执行,返回组织数组。
var unitlist = this.org.listallsupunitwithidentity( name );
//异步执行,返回promise对象
var promise = this.org.listallsupunitwithidentity( name, true);
promise.then(function(unitlist){
//unitlist 返回组织数组。
})
//异步执行,在回调方法中获取
this.org.listallsupunitwithidentity( name, function(unitlist){
//unitlist 返回组织数组。
})
parameters
-
name
identityflag
|array.<identityflag>
身份的distinguishedname、id、unique属性值,身份对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回组织数组。
{
"name": "开发部", //组织名称
"unique": "kfb", //唯一标识
"distinguishedname": "开发部@kfb@u", //识别名
"typelist": [
"部门"
], //组织类型
"description": " ", //说明
"shortname": "kfb", //简称
"level": 2, //组织层次
"levelname": "浙江兰德纵横/开发部", //组织层次名
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织
"ordernumber": 1, //排序号
"levelordernumber": " ", //层级排序号
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " " //华为welink id
}
source
listunitwithperson(name, asyncorcallbackopt) → {promise|array.}
根据个人标识批量获取组织对象成员:unit对象数组。
syntax
//同步执行,返回组织数组。
var unitlist = this.org.listunitwithperson( name );
//异步执行,返回promise对象
var promise = this.org.listunitwithperson( name, true);
promise.then(function(unitlist){
//unitlist 返回组织数组。
})
//异步执行,在回调方法中获取
this.org.listunitwithperson( name, function(unitlist){
//unitlist 返回组织数组。
})
parameters
-
name
personflag
|array.<personflag>
人员的distinguishedname、id、unique属性值,人员对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回组织数组。
{
"name": "开发部", //组织名称
"unique": "kfb", //唯一标识
"distinguishedname": "开发部@kfb@u", //识别名
"typelist": [
"部门"
], //组织类型
"description": " ", //说明
"shortname": "kfb", //简称
"level": 2, //组织层次
"levelname": "浙江兰德纵横/开发部", //组织层次名
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织
"ordernumber": 1, //排序号
"levelordernumber": " ", //层级排序号
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " " //华为welink id
}
source
listallsupunitwithperson(name, asyncorcallbackopt) → {promise|array.}
根据个人标识批量查询所在组织及所有上级组织:unit对象数组。
syntax
//同步执行,返回组织数组。
var unitlist = this.org.listallsupunitwithperson( name );
//异步执行,返回promise对象
var promise = this.org.listallsupunitwithperson( name, true);
promise.then(function(unitlist){
//unitlist 返回组织数组。
})
//异步执行,在回调方法中获取
this.org.listallsupunitwithperson( name, function(unitlist){
//unitlist 返回组织数组。
})
parameters
-
name
personflag
|array.<personflag>
人员的distinguishedname、id、unique属性值,人员对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回个人所在组织及所有上级组织。
{
"name": "开发部", //组织名称
"unique": "kfb", //唯一标识
"distinguishedname": "开发部@kfb@u", //识别名
"typelist": [
"部门"
], //组织类型
"description": " ", //说明
"shortname": "kfb", //简称
"level": 2, //组织层次
"levelname": "浙江兰德纵横/开发部", //组织层次名
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织
"ordernumber": 1, //排序号
"levelordernumber": " ", //层级排序号
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " " //华为welink id
}
source
listunitwithattribute(attributename, attributevalue, asyncorcallbackopt) → {promise|array.}
根据组织属性,获取所有符合的组织。
syntax
//同步执行,返回组织数组。
var unitlist = this.org.listunitwithattribute( attributename, attributename );
//异步执行,返回promise对象
var promise = this.org.listunitwithattribute( attributename, attributename, true);
promise.then(function(unitlist){
//unitlist 返回组织数组。
})
//异步执行,在回调方法中获取
this.org.listunitwithattribute( attributename, attributename, function(unitlist){
//unitlist 返回组织数组。
})
parameters
-
attributename
string
组织属性名称。
-
attributevalue
string
组织属性值。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回组织数组。
{
"name": "开发部", //组织名称
"unique": "kfb", //唯一标识
"distinguishedname": "开发部@kfb@u", //识别名
"typelist": [
"部门"
], //组织类型
"description": " ", //说明
"shortname": "kfb", //简称
"level": 2, //组织层次
"levelname": "浙江兰德纵横/开发部", //组织层次名
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织
"ordernumber": 1, //排序号
"levelordernumber": " ", //层级排序号
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " " //华为welink id
}
source
listunitwithduty(dutyname, identity, asyncorcallbackopt) → {promise|array.}
根据组织职务,获取所有符合的组织。
syntax
//同步执行,返回组织数组。
var unitlist = this.org.listunitwithduty( dutyname, identity );
//异步执行,返回promise对象
var promise = this.org.listunitwithduty( dutyname, identity, true);
promise.then(function(unitlist){
//unitlist 返回组织数组。
})
//异步执行,在回调方法中获取
this.org.listunitwithduty( dutyname, identity, function(unitlist){
//unitlist 返回组织数组。
})
parameters
-
dutyname
string
组织职务名称。
-
identity
identityflag
身份的distinguishedname、id、unique属性值,身份对象。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回组织数组。
{
"name": "开发部", //组织名称
"unique": "kfb", //唯一标识
"distinguishedname": "开发部@kfb@u", //识别名
"typelist": [
"部门"
], //组织类型
"description": " ", //说明
"shortname": "kfb", //简称
"level": 2, //组织层次
"levelname": "浙江兰德纵横/开发部", //组织层次名
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织
"ordernumber": 1, //排序号
"levelordernumber": " ", //层级排序号
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " " //华为welink id
}
source
listtopunit(asyncorcallbackopt) → {promise|array.}
列式所有顶层组织。
syntax
//同步执行,返回顶层组织数组。
var unitlist = this.org.listtopunit();
//异步执行,返回promise对象
var promise = this.org.listtopunit(true);
promise.then(function(unitlist){
//unitlist 返回顶层组织数组。
})
//异步执行,在回调方法中获取
this.org.listtopunit(function(unitlist){
//unitlist 返回顶层组织数组。
})
parameters
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回顶层组织数组。
{
"matchkey": " ", //匹配字段
"subdirectunitcount": 1, //直接下级组织数量
"subdirectidentitycount": 1, //直接下级身份数量
"subdirectdutycount": 1, //直接下级职务数量
"id": " ", //数据库主键,自动生成.
"name": "开发部", //名称,可以重名.
"unique": "kfb", //唯一标识,不可重复,为空则使用自动填充值
"distinguishedname": "开发部@kfb@u", //识别名.以@u结尾.
"typelist": [
"部门"
], //组织类型.
"pinyin": " ", //name拼音,自动生成
"pinyininitial": " ", //name拼音首字母,自动生成
"description": " ", //描述.
"shortname": "kfb", //组织简称。
"level": 2, //组织级别,1为最上层组织.自动计算.
"levelname": "浙江兰德纵横/开发部", //显示的层级名.
"levelordernumber": " ", //层级排序号,使用/进行分割.将逐级unit中的ordernumber的integer值扩充到在organization配置中指定位数的文本值,前填充0
"superior": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u", //上级组织.
"ordernumber": 1, //排序号,升序排列,为空在最后
"dingdingid": " ", //钉钉部门id.
"dingdinghash": " ", //钉钉部门哈希特征.
"welinkid": " ", //welink部门id.
"welinkhash": " ", //welink部门哈希特征.
"qiyeweixinid": " ", //企业微信人员id.
"zhengwudingdingid": " ", //政务钉钉人员id.
"andfxid": " ", //移动办公组织id.
"zhengwudingdinghash": " ", //政务钉钉人员哈希特征.
"qiyeweixinhash": " ", //企业微信人员哈希特征.
"andfxhash": " ", //移动办公组织哈希特征.
"createtime": "2023-11-21 15:02:35", //创建时间,自动生成,索引创建在约束中.
"updatetime": "2023-11-21 15:02:35" //修改时间,自动生成,索引创建在约束中.
}
source
getpersondata(name, asyncorcallbackopt) → {promise|persondata}
根据人员标识获取对应的人员对象,附带身份,身份所在的组织,个人所在群组,个人拥有角色.
syntax
//同步执行,返回人员对象。
var person = this.org.getpersondata( name );
//异步执行,返回promise对象
var promise = this.org.getpersondata( name, true);
promise.then(function(person){
//personlist 为返回的人员对象。
})
//异步执行,在回调方法中获取人员
this.org.getpersondata( name, function(person){
//personlist 为返回的人员对象。
})
parameters
-
name
string
人员的distinguishedname、id、unique属性值,人员名称。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
persondata
当async为true时,返回 。 否则返回人员对象。
{
"woidentitylist": [ //身份对象
{
"wounit": { //身份所在组织
"id": "e56ef746-a923-494b-bdfe-81ab65c523da",
"name": "综合部",
"unique": "zhb",
"distinguishedname": "综合部@zhb@u",
"typelist": [
"department"
],
"pinyin": "zonghebu",
"pinyininitial": "zhb",
"description": "",
"shortname": "da",
"level": 2,
"levelname": "演示公司/综合部",
"levelordernumber": "0053522524/0053522721",
"superior": "0f98a161-df27-45f0-833b-e29105ba82f7",
"ordernumber": 53522721,
"controllerlist": [
"5a272f71-02b3-4abb-a0e4-f11e23d9b824"
],
"createtime": "2019-09-12 11:25:21",
"updatetime": "2022-08-01 15:36:39"
},
"wounitdutylist": [ //身份拥有的职务
{
"wounit": { //该职务绑定的组织
"id": "e56ef746-a923-494b-bdfe-81ab65c523da",
"name": "综合部",
"unique": "zhb",
"distinguishedname": "综合部@zhb@u",
"typelist": [
"department"
],
"pinyin": "zonghebu",
"pinyininitial": "zhb",
"description": "",
"shortname": "da",
"level": 2,
"levelname": "演示公司/综合部",
"levelordernumber": "0053522524/0053522721",
"superior": "0f98a161-df27-45f0-833b-e29105ba82f7",
"ordernumber": 53522721,
"controllerlist": [
"5a272f71-02b3-4abb-a0e4-f11e23d9b824"
],
"createtime": "2019-09-12 11:25:21",
"updatetime": "2022-08-01 15:36:39"
},
"id": "d14dbd1a-1db8-492b-9cf3-f1a2117f815d",
"pinyin": "bumenlingdao",
"pinyininitial": "bmld",
"description": "",
"name": "部门领导",
"unique": "d14dbd1a-1db8-492b-9cf3-f1a2117f815d",
"distinguishedname": "部门领导@d14dbd1a-1db8-492b-9cf3-f1a2117f815d@ud",
"unit": "e56ef746-a923-494b-bdfe-81ab65c523da",
"ordernumber": 173379080,
"identitylist": [
"b7c7db79-0241-4989-b31a-fbba5c17ada2"
],
"createtime": "2023-06-30 16:51:21",
"updatetime": "2023-06-30 16:51:30"
}
],
"id": "b7c7db79-0241-4989-b31a-fbba5c17ada2",
"pinyin": "zhangsan",
"pinyininitial": "zs",
"description": "",
"name": "张三",
"unique": "zhb_zhangsan",
"distinguishedname": "张三@zhb_zhangsan@i",
"person": "97941ea3-e3eb-4db7-aaf6-1263b048d909",
"unit": "e56ef746-a923-494b-bdfe-81ab65c523da",
"unitname": "综合部",
"unitlevel": 2,
"unitlevelname": "演示公司/综合部",
"ordernumber": 144603421,
"major": true, //是否为主身份
"createtime": "2022-08-01 15:37:01",
"updatetime": "2022-08-01 15:37:01"
}
], //身份对象
"worolelist": [
{
"id": "4de87a00-66a2-4c6a-94d7-4a2afdeb9e42",
"pinyin": "bssmanager",
"pinyininitial": "bssmanager",
"name": "bssmanager",
"unique": "bssmanagersystemrole",
"distinguishedname": "bssmanager@bssmanagersystemrole@r",
"ordernumber": 15329841,
"personlist": [
"97941ea3-e3eb-4db7-aaf6-1263b048d909"
],
"grouplist": [],
"createtime": "2018-06-27 10:17:21",
"updatetime": "2023-06-30 16:52:00"
}
], //角色对象
"wogrouplist": [
{
"id": "f2637ec1-d3be-4076-8dde-df88892cb4da",
"pinyin": "yunweiqunzu",
"pinyininitial": "ywqz",
"description": "",
"name": "运维群组",
"unique": "f2637ec1-d3be-4076-8dde-df88892cb4da",
"distinguishedname": "运维群组@f2637ec1-d3be-4076-8dde-df88892cb4da@g",
"ordernumber": 97928948,
"personlist": [
"3455b82a-399c-4ee4-b9b9-e70ae40fbaf1",
"5d2699d4-e411-4027-a87e-435371823d5d",
"97941ea3-e3eb-4db7-aaf6-1263b048d909"
],
"grouplist": [],
"unitlist": [],
"identitylist": [],
"createtime": "2021-02-07 10:29:09",
"updatetime": "2023-06-30 16:52:19"
}
], //群组对象
"wopersonattributelist": [
{
"id": "acc8a5ec-8e76-4a3a-9a0e-f8d4d9001c42",
"pinyin": "shuxingyi",
"pinyininitial": "sxy",
"description": "属性描述",
"name": "属性一",
"unique": "acc8a5ec-8e76-4a3a-9a0e-f8d4d9001c42",
"distinguishedname": "属性一@acc8a5ec-8e76-4a3a-9a0e-f8d4d9001c42@pa",
"person": "97941ea3-e3eb-4db7-aaf6-1263b048d909",
"ordernumber": 24943622,
"attributelist": [
"1"
],
"createtime": "2018-10-16 16:47:02",
"updatetime": "2023-06-30 16:50:43"
}
], //个人属性对象
"id": "97941ea3-e3eb-4db7-aaf6-1263b048d909", //数据库主键,自动生成.
"gendertype": "m", //性别.男:m,女:f,未知:d
"iconmdpi": " ", //icon base64编码后的文本(中等尺寸图像).
"iconldpi": " ", //icon base64编码后的文本(小尺寸图像).
"signature": " ", //个性签名.
"pinyin": "zhangsan", //name拼音,自动生成
"pinyininitial": "zs", //name拼音首字母,自动生成
"description": " ", //描述.
"name": "张三", //名称,可重名.
"nickname": " ", //昵称.
"employee": "1111", //工号,不可重复.
"unique": "zhangsan", //唯一标识,不可重复,为空则使用自动填充值
"distinguishedname": "张三@zhangsan@p", //识别名,自动填充,@p结尾.
"ordernumber": 14214946, //排序号,升序排列,为空在最后
"controllerlist": [
"3455b82a-399c-4ee4-b9b9-e70ae40fbaf1"
"8e527447-635c-4775-8107-239096fc3ec4"
], //个人管理者.默认为创建者。
"superior": " ", //汇报对象.
"passwordexpiredtime": "2023-11-21 15:02:35", //用户密码到期时间.
"changepasswordtime": "2023-04-04", //用户密码最后修改时间.
"lastlogintime": "2023-04-07", //最后登录时间.
"lastloginaddress": " ", //最后登录地址.
"lastloginclient": " ", //最后登录客户端类型,web,android或者ios.
"ipaddress": " ", //允许登录的ip.
"mail": " ", //邮件地址.
"weixin": " ", //微信号.
"qq": " ", //qq号.
"mobile": "13812345678", //必填,手机号.
"hiddenmobile": true, //是否隐藏手机号.
"officephone": " ", //办公电话.
"boarddate": "2023-11-21 15:02:35", //入职时间.
"birthday": "2023-11-21 15:02:35", //生日.
"age": 1, //年龄
"dingdingid": " ", //钉钉人员id.
"dingdinghash": " ", //钉钉人员哈希特征.
"welinkid": " ", //welikn人员id.
"welinkhash": " ", //welink人员哈希特征.
"zhengwudingdingid": " ", //政务钉钉人员id.
"andfxid": " ", //移动办公人员id.
"zhengwudingdinghash": " ", //政务钉钉人员哈希特征.
"qiyeweixinid": " ", //企业微信人员id.
"qiyeweixinhash": " ", //企业微信人员哈希特征.
"andfxhash": " ", //移动办公人员哈希特征.
"mpwxopenid": " ", //微信公众号人员openid.
"open1id": " ", //oauth登录id1.
"open2id": " ", //oauth登录id2.
"open3id": " ", //oauth登录id3.
"open4id": " ", //oauth登录id4.
"open5id": " ", //oauth登录id5.
"failuretime": "2022-12-15 14:10:23", //登录失败记录时间.
"failurecount": 2, //登录失败次数
"language": " ", //国际化语言,如:zh-cn,zh,en,zh_tw等.
"topunitlist": [
" "
], //所属顶层组织.
"subjectsecurityclearance": 1, //主体秘级标识.
"createtime": "2018-06-14 12:35:46", //创建时间,自动生成,索引创建在约束中.
"updatetime": "2023-04-07 17:56:32" //修改时间,自动生成,索引创建在约束中.
}
source
getperson(name, asyncorcallbackopt, findcnopt) → {promise|persondata|array.}
根据人员标识获取对应的人员对象或数组:person对象或数组
syntax
//同步执行,返回人员,单个是对象,多个是数组。
var personlist = this.org.getperson( name );
//异步执行,返回promise对象
var promise = this.org.getperson( name, true);
promise.then(function(personlist){
//personlist 为返回的人员,单个是对象,多个是数组。
})
//异步执行,在回调方法中获取人员
this.org.getperson( name, function(personlist){
//personlist 为返回的人员,单个是对象,多个是数组。
})
parameters
-
name
personflag
|array.<personflag>
人员的distinguishedname、id、unique属性值,人员对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
-
findcn
boolean
是否需要额外查找中文名称(如张三),默认false。如果为true,除匹配unique和distingiushedname外,还会在名称的第一段中查找所有匹配到的人(精确匹配)。
returns
-
promise
persondata
array.
当async为true时,返回 。 否则返回人员,单个是object,多个是array。
{
"matchkey": " ", //匹配字段
"id": " ", //数据库主键
"name": "李四", //个人名称
"nickname": " ", //昵称
"gendertype": "m", //性别,m:男,f:女,d:未知
"signature": " ", //签名
"description": " ", //说明
"employee": "1111", //员工号
"unique": "lisi", //唯一标识
"distinguishedname": "李四@lisi@p", //识别名
"ordernumber": 14214946, //排序号
"superior": " ", //主管
"mail": " ", //邮件地址
"weixin": " ", //微信号
"qq": " ", //qq号
"mobile": "85252281460", //手机号
"officephone": " ", //办公电话
"boarddate": "2023-11-21 15:02:35", //入职时间
"birthday": "2023-11-21 15:02:35", //生日
"age": 1, //年龄
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " ", //华为welink id
"subjectsecurityclearance": 1 //主体密级标识.
}
source
listsubperson(name, nestedopt, asyncorcallbackopt) → {promise|array.}
根据人员标识获取下级人员的对象数组:person对象数组。该上下级关系被人员的汇报对象值(superior)决定。
syntax
//同步执行,返回嵌套下级人员数组。
var personlist = this.org.listsubperson( name, true );
//异步执行,返回promise对象
var promise = this.org.listsubperson( name, false, true);
promise.then(function(personlist){
//personlist 为返回的直接下级人员数组。
})
//异步执行,在回调方法中获取
this.org.listsubperson( name, true, function(personlist){
//personlist 为返回嵌套下级人员数组。
})
parameters
-
name
personflag
|array.<personflag>
人员的distinguishedname、id、unique属性值,人员对象,或上述属性值和对象的数组。
-
nested
boolean
true嵌套的所有下级人员;false直接下级人员;默认false。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回人员数组。
{
"matchkey": " ", //匹配字段
"id": " ", //数据库主键
"name": "李四", //个人名称
"nickname": " ", //昵称
"gendertype": "m", //性别,m:男,f:女,d:未知
"signature": " ", //签名
"description": " ", //说明
"employee": "1111", //员工号
"unique": "lisi", //唯一标识
"distinguishedname": "李四@lisi@p", //识别名
"ordernumber": 14214946, //排序号
"superior": " ", //主管
"mail": " ", //邮件地址
"weixin": " ", //微信号
"qq": " ", //qq号
"mobile": "85252281460", //手机号
"officephone": " ", //办公电话
"boarddate": "2023-11-21 15:02:35", //入职时间
"birthday": "2023-11-21 15:02:35", //生日
"age": 1, //年龄
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " ", //华为welink id
"subjectsecurityclearance": 1 //主体密级标识.
}
source
listsupperson(name, nestedopt, asyncorcallbackopt) → {promise|array.}
根据人员标识获取上级人员的对象数组:person对象数组。该上下级关系被人员的汇报对象值(superior)决定。
syntax
//同步执行,返回嵌套上级人员数组。
var personlist = this.org.listsupperson( name, true );
//异步执行,返回promise对象
var promise = this.org.listsupperson( name, false, true);
promise.then(function(personlist){
//personlist 为返回的直接上级人员数组。
})
//异步执行,在回调方法中获取
this.org.listsupperson( name, true, function(personlist){
//personlist 为返回嵌套上级人员数组。
})
parameters
-
name
personflag
|array.<personflag>
人员的distinguishedname、id、unique属性值,人员对象,或上述属性值和对象的数组。
-
nested
boolean
true嵌套的所有上级人员;false直接上级人员;默认false。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回人员数组。
{
"matchkey": " ", //匹配字段
"id": " ", //数据库主键
"name": "李四", //个人名称
"nickname": " ", //昵称
"gendertype": "m", //性别,m:男,f:女,d:未知
"signature": " ", //签名
"description": " ", //说明
"employee": "1111", //员工号
"unique": "lisi", //唯一标识
"distinguishedname": "李四@lisi@p", //识别名
"ordernumber": 14214946, //排序号
"superior": " ", //主管
"mail": " ", //邮件地址
"weixin": " ", //微信号
"qq": " ", //qq号
"mobile": "85252281460", //手机号
"officephone": " ", //办公电话
"boarddate": "2023-11-21 15:02:35", //入职时间
"birthday": "2023-11-21 15:02:35", //生日
"age": 1, //年龄
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " ", //华为welink id
"subjectsecurityclearance": 1 //主体密级标识.
}
source
listpersonwithgroup(name, asyncorcallbackopt) → {promise|array.}
根据群组标识获取人员对象成员:person对象数组。
syntax
//同步执行,返回人员数组。
var personlist = this.org.listpersonwithgroup( group );
//异步执行,返回promise对象
var promise = this.org.listpersonwithgroup( group, true);
promise.then(function(personlist){
//personlist 为返回的人员数组。
})
//异步执行,在回调方法中获取
this.org.listpersonwithgroup( group, function(personlist){
//personlist 为返回的人员数组。
})
parameters
-
name
groupflag
|array.<groupflag>
群组的distinguishedname、name、id、unique属性值,群组对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回人员对象数组。
{
"matchkey": " ", //匹配字段
"id": " ", //数据库主键
"name": "李四", //个人名称
"nickname": " ", //昵称
"gendertype": "m", //性别,m:男,f:女,d:未知
"signature": " ", //签名
"description": " ", //说明
"employee": "1111", //员工号
"unique": "lisi", //唯一标识
"distinguishedname": "李四@lisi@p", //识别名
"ordernumber": 14214946, //排序号
"superior": " ", //主管
"mail": " ", //邮件地址
"weixin": " ", //微信号
"qq": " ", //qq号
"mobile": "85252281460", //手机号
"officephone": " ", //办公电话
"boarddate": "2023-11-21 15:02:35", //入职时间
"birthday": "2023-11-21 15:02:35", //生日
"age": 1, //年龄
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " ", //华为welink id
"subjectsecurityclearance": 1 //主体密级标识.
}
source
listpersonwithrole(name, asyncorcallbackopt) → {promise|array.}
根据角色标识获取人员对象数组:person对象数组。
syntax
//同步执行,返回人员数组。
var personlist = this.org.listpersonwithrole( role );
//异步执行,返回promise对象
var promise = this.org.listpersonwithrole( role, true);
promise.then(function(personlist){
//personlist 为返回的人员数组。
})
//异步执行,在回调方法中获取
this.org.listpersonwithrole( role, function(personlist){
//personlist 为返回的人员数组。
})
parameters
-
name
roleflag
|array.<roleflag>
角色的distinguishedname、name、id、unique属性值,角色对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回人员对象数组。
{
"matchkey": " ", //匹配字段
"id": " ", //数据库主键
"name": "李四", //个人名称
"nickname": " ", //昵称
"gendertype": "m", //性别,m:男,f:女,d:未知
"signature": " ", //签名
"description": " ", //说明
"employee": "1111", //员工号
"unique": "lisi", //唯一标识
"distinguishedname": "李四@lisi@p", //识别名
"ordernumber": 14214946, //排序号
"superior": " ", //主管
"mail": " ", //邮件地址
"weixin": " ", //微信号
"qq": " ", //qq号
"mobile": "85252281460", //手机号
"officephone": " ", //办公电话
"boarddate": "2023-11-21 15:02:35", //入职时间
"birthday": "2023-11-21 15:02:35", //生日
"age": 1, //年龄
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " ", //华为welink id
"subjectsecurityclearance": 1 //主体密级标识.
}
source
listpersonwithidentity(name, asyncorcallbackopt) → {promise|array.}
根据身份标识获取人员对象成员:person对象数组。
syntax
//同步执行,返回人员数组。
var personlist = this.org.listpersonwithidentity( identity );
//异步执行,返回promise对象
var promise = this.org.listpersonwithidentity( identity, true);
promise.then(function(personlist){
//personlist 为返回的人员数组。
})
//异步执行,在回调方法中获取
this.org.listpersonwithidentity( identity, function(personlist){
//personlist 为返回的人员数组。
})
parameters
-
name
identityflag
|array.<identityflag>
身份的distinguishedname、id、unique属性值,身份对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回人员对象数组。
{
"matchkey": " ", //匹配字段
"id": " ", //数据库主键
"name": "李四", //个人名称
"nickname": " ", //昵称
"gendertype": "m", //性别,m:男,f:女,d:未知
"signature": " ", //签名
"description": " ", //说明
"employee": "1111", //员工号
"unique": "lisi", //唯一标识
"distinguishedname": "李四@lisi@p", //识别名
"ordernumber": 14214946, //排序号
"superior": " ", //主管
"mail": " ", //邮件地址
"weixin": " ", //微信号
"qq": " ", //qq号
"mobile": "85252281460", //手机号
"officephone": " ", //办公电话
"boarddate": "2023-11-21 15:02:35", //入职时间
"birthday": "2023-11-21 15:02:35", //生日
"age": 1, //年龄
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " ", //华为welink id
"subjectsecurityclearance": 1 //主体密级标识.
}
source
listpersonwithunit(name, nestedopt, asyncorcallbackopt) → {promise|array.}
根据组织标识获取人员对象成员:person对象数组。
syntax
//同步执行,返回组织的直接人员数组。
var personlist = this.org.listpersonwithunit( unit );
//同步执行,返回组织的以及嵌套下级组织所有的人员数组。
var personlist = this.org.listpersonwithunit( unit, true );
//异步执行,返回promise对象
var promise = this.org.listpersonwithunit( unit, false, true);
promise.then(function(personlist){
//personlist 为返回的组织的直接人员数组。
})
//异步执行,在回调方法中获取
this.org.listpersonwithunit( unit, false, function(personlist){
//personlist 为返回的群组的直接人员数组。
})
parameters
-
name
unitflag
|array.<unitflag>
组织的distinguishedname、id、unique属性值,组织对象,或上述属性值和对象的数组。
-
nested
boolean
是否嵌套获取组织以及下级组织的人员,true表示嵌套,flase表示获取直接组织。默认为false
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回人员对象数组。
{
"matchkey": " ", //匹配字段
"id": " ", //数据库主键
"name": "李四", //个人名称
"nickname": " ", //昵称
"gendertype": "m", //性别,m:男,f:女,d:未知
"signature": " ", //签名
"description": " ", //说明
"employee": "1111", //员工号
"unique": "lisi", //唯一标识
"distinguishedname": "李四@lisi@p", //识别名
"ordernumber": 14214946, //排序号
"superior": " ", //主管
"mail": " ", //邮件地址
"weixin": " ", //微信号
"qq": " ", //qq号
"mobile": "85252281460", //手机号
"officephone": " ", //办公电话
"boarddate": "2023-11-21 15:02:35", //入职时间
"birthday": "2023-11-21 15:02:35", //生日
"age": 1, //年龄
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " ", //华为welink id
"subjectsecurityclearance": 1 //主体密级标识.
}
source
listpersonwithattribute(name, value, asyncorcallbackopt) → {promise|array.}
根据人员属性名称和属性值获取人员对象成员:person对象数组。
syntax
//同步执行,返回拥有对应属性名和属性值人员数组。
var personlist = this.org.listpersonwithattribute( name, value );
//异步执行,返回promise对象
var promise = this.org.listpersonwithattribute( name, value, true);
promise.then(function(personlist){
//personlist 返回拥有对应属性名和属性值人员数组。
})
//异步执行,在回调方法中获取
this.org.listpersonwithattribute( name, value, function(personlist){
//personlist 返回拥有对应属性名和属性值人员数组。
})
parameters
-
name
string
人员属性名称。
-
value
string
人员属性值。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回人员对象数组。
{
"matchkey": " ", //匹配字段
"id": " ", //数据库主键
"name": "李四", //个人名称
"nickname": " ", //昵称
"gendertype": "m", //性别,m:男,f:女,d:未知
"signature": " ", //签名
"description": " ", //说明
"employee": "1111", //员工号
"unique": "lisi", //唯一标识
"distinguishedname": "李四@lisi@p", //识别名
"ordernumber": 14214946, //排序号
"superior": " ", //主管
"mail": " ", //邮件地址
"weixin": " ", //微信号
"qq": " ", //qq号
"mobile": "85252281460", //手机号
"officephone": " ", //办公电话
"boarddate": "2023-11-21 15:02:35", //入职时间
"birthday": "2023-11-21 15:02:35", //生日
"age": 1, //年龄
"qiyeweixinid": " ", //企业微信id
"dingdingid": " ", //钉钉id
"zhengwudingdingid": " ", //政务钉钉id
"welinkid": " ", //华为welink id
"subjectsecurityclearance": 1 //主体密级标识.
}
source
getduty(dutyname, unit, asyncorcallbackopt) → {promise|array.}
根据职务名称和组织名称获取身份。
syntax
//同步执行,返回身份数组。
var identitylist = this.org.getduty( dutyname, unit );
//异步执行,返回promise对象
var promise = this.org.getduty( dutyname, unit, true);
promise.then(function(identitylist){
//identitylist 返回身份数组。
})
//异步执行,在回调方法中获取
this.org.getduty( dutyname, unit, function(unitlist){
//unitlist 返回身份数组。
})
parameters
-
dutyname
string
组织职务名称。
-
unit
unitflag
组织的distinguishedname、id、unique属性值,组织对象。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回身份数组。
{
"id": " ", //数据库主键,自动生成.
"pinyin": " ", //name拼音,自动生成
"pinyininitial": " ", //name拼音首字母,自动生成
"description": " ", //描述.
"name": "李四", //名称,同一组织下不可重名.
"unique": "23dd1b53-feed-485d-8c9c-1a4e64ff58a2", //唯一标识,不可重复,为空则使用自动填充值
"distinguishedname": "李四@23dd1b53-feed-485d-8c9c-1a4e64ff58a2@i", //识别名,自动填充,@ud结尾.
"unit": "开发部@kfb@u", //组织职务所属组织,不可为空.
"ordernumber": 24920439, //排序号,升序排列,为空在最后
"identitylist": [
" "
], //组织职务身份成员,多值.
"createtime": "2023-11-21 15:02:35", //创建时间,自动生成,索引创建在约束中.
"updatetime": "2023-11-21 15:02:35" //修改时间,自动生成,索引创建在约束中.
}
source
listdutynamewithidentity(identity, asyncorcallbackopt) → {promise|array.}
批量获取身份的所有职务名称。
syntax
//同步执行,返回职务名称数组。
var dutynamelist = this.org.listdutynamewithidentity( identity );
//异步执行,返回promise对象
var promise = this.org.listdutynamewithidentity( identity, true);
promise.then(function(dutynamelist){
//dutynamelist 返回职务名称数组。
})
//异步执行,在回调方法中获取
this.org.listdutynamewithidentity( identity, function(dutynamelist){
//dutynamelist 返回职务名称数组。
})
parameters
-
identity
identityflag
|array.<identityflag>
身份的distinguishedname、id、unique属性值,身份对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回职务名称数组。
source
listdutynamewithunit(unit, asyncorcallbackopt) → {promise|array.}
批量获取组织的所有职务名称。
syntax
//同步执行,返回职务名称数组。
var dutynamelist = this.org.listdutynamewithunit( unit );
//异步执行,返回promise对象
var promise = this.org.listdutynamewithunit( unit, true);
promise.then(function(dutynamelist){
//dutynamelist 返回职务名称数组。
})
//异步执行,在回调方法中获取
this.org.listdutynamewithunit( unit, function(dutynamelist){
//dutynamelist 返回职务名称数组。
})
parameters
-
unit
unitflag
|array.<unitflag>
组织的distinguishedname、id、unique属性值,组织对象,或上述属性值和对象的数组。
-
asyncorcallback
boolean
|function
当参数为boolean,表示是否异步执行,默认为false。当参数为function,表示回调方法。
returns
-
promise
array.
当async为true时,返回 。 否则返回职务名称数组。