须知
- 请求该接口需要token,默认取token中的企业id作为查询条件。
- 如果员工编号不存在,则会返回异常信息:员工不存在
- 如果是离职或停用的员工,则返回null
接口地址
/console-api/staff/v1/info/number
请求方式
GET
请求参数
参数名称 | 参数类型 | 参数说明 | 是否必填 |
---|---|---|---|
staffNumber | string | 员工工号 | true |
响应示例
{
"code": "200",
"data": {
"staffId": "1309331342793773056",
"staffUsId": "1309331342693109760",
"staffName": "测试管理员2",
"pinyin": "CE SHI GUAN LI YUAN 2",
"staffDeptId": "1531938329171083264",
"staffPostId": "1344199581033644034",
"staffPostName": null,
"staffNo": "FE005",
"staffHiredate": "2020-08-31T16:00:00.000+0000",
"staffType": "2",
"staffPhone": "13012345678",
"staffEmail": "324342@qq.com",
"staffSex": "2",
"staffHead": "50ba381a069545ff9b8eabd1ad9437a1",
"staffStatus": "1",
"entId": "1309331342667943936",
"entName": "广东飞企互联科技股份有限公司",
"deptName": "FE事业部",
"staffDepartureDate": null,
"sourceIdentifier": null,
"sourceDeptId": null,
"usName": "13012345678",
"partTimes": null,
"roles": null,
"roleIds": null
},
"time": 1662447384058,
"msg": "操作成功",
"annex": null,
"success": true
}
异常返回
员工不存在
{
"code": "1125",
"data": null,
"time": 1662449445930,
"msg": "员工不存在",
"annex": {
"applicationName": "pai-console",
"bizExceptionClassName": "cn.flyrise.pai.console.exception.ConsoleBizException",
"errorMsg": "员工不存在"
},
"success": false
}
离职或停用员工
{
"code": "200",
"data": null,
"time": 1662449445930,
"msg": null,
"annex": null,
"success": true
}
文档更新时间: 2022-09-06 15:33 作者:伍润源