接口开发.md 12 KB

一.获取组织信息接口

服务名:getOrgInfoOsfService

参数:

字段名 类型 必填 说明 示例
layerType String 组织类型(精确匹配) 公司
modifyDate String 最后修改日期(>= 该日期) yyyy-MM-dd
name String 组织名称(左模糊匹配) 业务部
code String 组织编号(精确匹配) 010056
size int 每页条数(默认100,最大1000) 100
page int 页码(默认1) 1

字段:

描述 接口字段 类型 说明
组织名称 name String
组织全称 fullname String
组织编号 code String
上级组织 parent String 区分大小写的字符串uuid
组织全编码 fullnumber String 根据”!”分割,前一数字是上级组织编号
显示顺序 disporder String 根据”!”分割,前一数字是上级组织排序码
是否启用 status String 1(有效);0(封存),与DB字段fissealup取反
主键 id String 区分大小写的字符串uuid
备注 description String
修改日期 modifyDate String 当前版本不返回此字段
组织类型 layerType String 公司 / 部门 / 集团 / 子中心 / 中心 / 公司(新)

返回说明:

字段名 类型 说明
code String 状态码(200:成功, 500:异常)
msg String 提示信息
page int 当前页码
size int 每页条数
data Array 组织列表,结构见”字段”表

使用sdk调用示例(Java)

二.获取岗位信息接口

服务名:getPosInfoOsfService

参数:

OSFWSClient osfwsClient = new OSFWSClient();
String shrAddr = “http://192.168.1.250:6888/shr”;
Map map = new HashMap();
map.put(“modifyDate”, “2025-01-01”);
map.put(“layerType”, “部门”);
map.put(“page”, 1);
map.put(“size”, 100);
String result = osfwsClient.proceedOSF(shrAddr, “getOrgInfoOsfService”, map);
System.out.println(result);
字段名 类型 必填 说明 示例
modifyDate String 修改日期(范围过滤:岗位或人员职位 >= 该日期) yyyy-MM-dd
name String 岗位名称(左模糊匹配) 经理
code String 岗位编号(精确匹配) 010056
size int 每页条数(默认100,最大1000) 100
page int 页码(默认1) 1

字段:

描述 接口字段 类型 说明
是否负责人岗 isrespposition String 1(是),0(否)
岗位名称 name String
岗位编号 code String
显示顺序 disporder String
所属组织ID department String 区分大小写的字符串uuid
上级岗位 parent String 区分大小写的字符串uuid
部门副职 vice String 1(是),0(否)
备注 description String
主键 id String 区分大小写的字符串uuid

返回说明:

字段名 类型 说明
code String 状态码(200:成功, 500:异常)
msg String 提示信息
page int 当前页码
size int 每页条数
data Array 岗位列表,结构见”字段”表

使用sdk调用示例(Java)

三.人员接口

参数:

OSFWSClient osfwsClient = new OSFWSClient();
String shrAddr = “http://192.168.1.250:6888/shr”;
Map map = new HashMap();
map.put(“modifyDate”, “2025-01-01”);
map.put(“name”, “经理”);
map.put(“page”, 1);
map.put(“size”, 100);
String result = osfwsClient.proceedOSF(shrAddr, “getPosInfoOsfService”, map);
System.out.println(result);
字段名 类型 必填 说明 示例
modifyTime String 修改时间 yyyy-MM-dd

字段:

描述 接口字段 类型 示例
姓名 username string
邮箱 email string
上级 superior Array[String]
手机 mobile string
性别 sex string
工号 job_num string
所属组织 department string
岗位 position string
状态 personnel_status string
登录名 loginid string
办公电话 telephone string
其他上级 other_superior Array[String]
别名 alias string
入职时间 hiredate string
职级 grade string
办公地点 location string
身份证 id_no string
出生日期 birthday string
年龄 age string
毕业日期 graduate_date string
毕业院校 graduate_school string
学位 degree string
学历学历 education string
婚姻状况 marital_status string
籍贯 native_place string
民族 nation string
户口类型 household_type string
政治面貌 politics_status string
现居住地 residence_place string
家庭联系方式 family_contact string
首次参加工作日期 first_work_date string
个人工龄(年) work_year string
子女状态 child_status string
仅人员新增有效;不允许修改。(该字段仅可以传递 手机号码或者邮箱) account string
密码 password string
安全级别 sec_level string
密级 classification string
第三方主键 outkey string

四.分管领导接口

服务名:getRoleSupervisorInfoOsfService

参数:

字段名 类型 必填 说明 示例
modifyDate String 修改日期(范围过滤:角色或人员-角色关联 >= 该日期) yyyy-MM-dd
name String 角色名称(左模糊匹配) 分管领导
code String 角色编号(精确匹配) 010056
size int 每页条数(默认100,最大1000) 100
page int 页码(默认1) 1

字段:

描述 接口字段 类型 说明
主键 id String 区分大小写的字符串uuid(人员-角色关联表主键)
角色ID roleid String 区分大小写的字符串uuid(关联 T_WFR_WFROLE.FID)
组织ID orgid String 区分大小写的字符串uuid
人员ID personid String 区分大小写的字符串uuid
是否包含下级 isinclude String 1(是),0(否)
是否委托 isdele String 1(是),0(否)
委托操作人 deleperson String 区分大小写的字符串uuid
角色名称 rolename String
角色编号 rolenumber String
角色描述 roledescribe String
角色类型 roletype String 0 (职员角色),1 (职位角色),2 (组织角色)
角色状态 state String 1 (启用),0(禁用)

返回说明:

字段名 类型 说明
code String 状态码(200:成功, 500:异常)
msg String 提示信息
page int 当前页码
size int 每页条数
data Array 角色成员列表,结构见"字段"表

使用sdk调用示例(Java)

五:人员兼职接口

参数:

OSFWSClient osfwsClient = new OSFWSClient();
String shrAddr = "http://192.168.1.250:6888/shr";
Map map = new HashMap();
map.put("modifyDate", "2025-01-01");
map.put("name", "分管领导");
map.put("page", 1);
map.put("size", 100);
String result = osfwsClient.proceedOSF(shrAddr, "getRoleSupervisorInfoOsfService", map);
System.out.println(result);
字段名 类型 必填 说明 示例
modifyTime String 修改时间 yyyy-MM-dd

字段:

描述 接口字段 类型 示例
主身份人员id id String
兼职部门或者分部 departmentId String
兼职岗位 positionId String
兼职上级 superior Array[String]
兼职开始时间 start_date String
兼职结束时间 end_date String
备注 remark String

六.保存打卡记录接口

服务名:savePunchCardRecords

参数:

字段名 类型 必填 说明 示例
EquNo String 打卡来源 OA
CardId String 员工工号 904213
RecDate String 打卡日期 2025-11-07
RecTime String 打卡时间 09:00:00
Address String 打卡地点 广东惠州

返回说明:

字段名 类型 说明
recordCtn int 总数
successCtn int 成功数
formatErrorRecords Array 格式化失败打卡记录列表
notExistRecords Array 获取人员信息失败打卡记录列表
duplicateRecords Array 重复打卡记录列表

使用sdk调用示例(Java)

七:单点登录集成

八:待办集成

OSFWSClient osfwsClient = new OSFWSClient();
String shrAddr = "http://192.168.1.250:6888/shr";
Map paramMap = new HashMap();
paramMap.put("EquNo","OA001");
paramMap.put("CardId","980132");
paramMap.put("RecDate","2026-06-15");
paramMap.put("RecTime","09:00");
list.add(paramMap);
Gson gson =new Gson();
param.put("records",gson.toJson(list));
String result = osfwsClient.proceedOSF(shrAddr, "savePunchCardRecords", map);
System.out.println(result);