- 调用接口IStaffService
- 内置方法
- 1. findById
获取员工详情 - 2. findByIdNoAuth
获取员工详情-内部接口 - 3. findStaffByIds
通过多个员工id获取多个员工信息 - 4. findStaffByIdsNoAuth
通过多个员工id获取多个员工信息-内部接口 - 5. findPartStaffById
获取员工部分信息 - 6. findPartStaffByIds
通过多个员工id获取多个员工部分信息 - 7. findStaffByDeptId
通过部门id获取部门的员工信息 - 8. findStaffByUser
通过用户id、企业id查找对应的员工数据 - 9. findStaffByUserNoAuth
通过用户id、企业id查找对应的员工数据-内部接口 - 10. findSimpleStaffById
获取员工名称 - 11. findSimpleStaffByIds
获取简单的员工信息(Map<String, String>) - 12. findStaffByEntId
通过企业id获取员工名称信息-支持模糊查询 - 13. findStaffByParkCode
通过园区标识获取已激活入驻企业的员工名称信息-支持模糊查询 - 14. findStaffByParkId
通过园区id获取已激活入驻企业的员工名称信息-支持模糊查询
调用接口IStaffService
//员工信息接口
@Resource
private IStaffService staffService;
内置方法
目前拥有14个接口
1. findById
获取员工详情
/**
* 获取员工详情
*
* @param id 员工id
* @return
*/
Reply<StaffEntity> findById(@PathVariable("id") String id)
响应示例:
{
"code": "200",
"data": {
"staffId": "1309331342793773056",
"staffUsId": "1309331342693109760",
"staffName": "测试管理员1",
"staffDeptId": "1333317403593019392",
"staffPostId": "1344199581033644034",
"staffPostName": "测试岗位",
"staffNo": "FE005",
"staffHiredate": "2020-08-31T16:00:00.000+0000",
"staffType": "2",
"staffPhone": "13012345678",
"staffEmail": "",
"staffSex": "2",
"staffHead": "a254c3de15e04e6d814f66862a761232",
"staffStatus": "1",
"entId": "1309331342667943936",
"entName": null,
"deptName": "测试小组",
"staffDepartureDate": null,
"partTimes": [
{
"deptName": "测试小组",
"postName": "财务岗位",
"deptId": "1333317403593019392",
"postId": "1344199631373680642"
}
]
},
"time": 1617243200951,
"msg": "操作成功",
"annex": null,
"success": true
}
2. findByIdNoAuth
获取员工详情-内部接口
/**
* 获取员工详情-无鉴权
*
* @param id 员工id
* @param from 内部调用凭证
* @return
*/
Reply<StaffEntity> findByIdNoAuth(@PathVariable("id") String id, @RequestHeader("from") String from)
3. findStaffByIds
通过多个员工id获取多个员工信息
/**
* 通过多个员工id获取多个员工信息
*
* @param ids 员工id集合
* @return
*/
Reply<List<StaffEntity>> findStaffByIds(@RequestBody List<String> ids)
响应示例:
{
"code": "200",
"data": [
{
"staffId": "1309331342793773056",
"staffUsId": "1309331342693109760",
"staffName": "测试管理员1",
"staffDeptId": "1333317403593019392",
"staffPostId": "1344199581033644034",
"staffPostName": "测试岗位",
"staffNo": "FE005",
"staffHiredate": "2020-08-31T16:00:00.000+0000",
"staffType": "2",
"staffPhone": "13012345678",
"staffEmail": "",
"staffSex": "2",
"staffHead": "a254c3de15e04e6d814f66862a761232",
"staffStatus": "1",
"entId": "1309331342667943936",
"entName": null,
"deptName": "测试小组",
"staffDepartureDate": null,
"partTimes": [
{
"deptName": "测试小组",
"postName": "财务岗位",
"deptId": "1333317403593019392",
"postId": "1344199631373680642"
}
]
},
{
"staffId": "1309334869112918016",
"staffUsId": "1309334869008060416",
"staffName": "张三",
"staffDeptId": "1309334869087752192",
"staffPostId": null,
"staffPostName": null,
"staffNo": null,
"staffHiredate": null,
"staffType": "2",
"staffPhone": "13825601204",
"staffEmail": null,
"staffSex": null,
"staffHead": null,
"staffStatus": "1",
"entId": "1309334868978700288",
"entName": null,
"deptName": "东岸本部",
"staffDepartureDate": null,
"partTimes": []
}
],
"time": 1617243803825,
"msg": "操作成功",
"annex": null,
"success": true
}
4. findStaffByIdsNoAuth
通过多个员工id获取多个员工信息-内部接口
/**
* 通过多个员工id获取多个员工信息-无鉴权
*
* @param ids 员工id集合
* @param from 内部调用凭证
* @return
*/
Reply<List<StaffEntity>> findStaffByIdsNoAuth(@RequestBody List<String> ids, @RequestHeader("from") String from)
5. findPartStaffById
获取员工部分信息
/**
* 获取员工部分信息
*
* @param id 员工id集合
* @return
*/
Reply<SimpleStaffModel> findPartStaffById(@PathVariable("id") String id)
响应示例:
{
"code": "200",
"data": {
"staffId": "1309331342793773056",
"staffName": "测试管理员1"
},
"time": 1617244099319,
"msg": "操作成功",
"annex": null,
"success": true
}
6. findPartStaffByIds
通过多个员工id获取多个员工部分信息
/**
* 通过多个员工id获取多个员工部分信息
*
* @param ids 员工id集合
* @return
*/
Reply<List<SimpleStaffModel>> findPartStaffByIds(@RequestBody List<String> ids)
响应示例:
{
"code": "200",
"data": [
{
"staffId": "1309331342793773056",
"staffName": "测试管理员1"
},
{
"staffId": "1309334869112918016",
"staffName": "张三"
}
],
"time": 1617244264338,
"msg": "操作成功",
"annex": null,
"success": true
}
7. findStaffByDeptId
通过部门id获取部门的员工信息
/**
* 通过部门id获取部门的员工信息
*
* @param page 页码
* @param size 页数
* @param search 搜索条件 (邮箱|员工名称|员工编号|手机号)
* @param deptId 部门id
* @param status 状态(0未激活 1已激活 2停用 3离职)
* @return
*/
Reply<PageInfo<StaffEntity>> findStaffByDeptId(@RequestParam(name = "page", required = false) Integer page,
@RequestParam(name = "size", required = false) Integer size,
@RequestParam(name = "search", required = false) String search,
@RequestParam(name = "deptId") String deptId,
@RequestParam(name = "status", required = false) String status
)
8. findStaffByUser
通过用户id、企业id查找对应的员工数据
/**
* 通过用户id、企业id查找对应的员工数据
*
* @param userId 用户id
* @param entId 企业id
* @return
*/
Reply<StaffEntity> findStaffByUser(@RequestParam("userId") String userId,
@RequestParam("entId") String entId)
响应示例:
{
"code": "200",
"data": {
"staffId": "1309331342793773056",
"staffUsId": "1309331342693109760",
"staffName": "测试管理员1",
"staffDeptId": "1333317403593019392",
"staffPostId": "1344199581033644034",
"staffPostName": null,
"staffNo": "FE005",
"staffHiredate": "2020-08-31T16:00:00.000+0000",
"staffType": "2",
"staffPhone": "13012345678",
"staffEmail": "",
"staffSex": "2",
"staffHead": "a254c3de15e04e6d814f66862a761232",
"staffStatus": "1",
"entId": "1309331342667943936",
"entName": "开发测试企业",
"deptName": "测试小组",
"staffDepartureDate": null,
"partTimes": [
{
"deptName": "测试小组",
"postName": "测试岗位",
"deptId": "1333317403593019392",
"postId": "1344199581033644034"
},
{
"deptName": "测试小组",
"postName": "财务岗位",
"deptId": "1333317403593019392",
"postId": "1344199631373680642"
}
]
},
"time": 1617244372197,
"msg": "操作成功",
"annex": null,
"success": true
}
9. findStaffByUserNoAuth
通过用户id、企业id查找对应的员工数据-内部接口
/**
* 通过用户id、企业id查找对应的员工数据
*
* @param entId 企业id
* @param uid 用户id
* @param from 内部调用凭证
* @return
*/
Reply<StaffEntity> findStaffByUserNoAuth(@RequestParam("entId") String entId,
@RequestParam("uid") String uid,
@RequestHeader("from") String from)
10. findSimpleStaffById
获取员工名称
/**
* 获取员工名称
*
* @param id 用户id
* @return
*/
Reply<String> findSimpleStaffById(@PathVariable String id)
11. findSimpleStaffByIds
获取简单的员工信息(Map<String, String>)
/**
* 获取简单的员工信息 key(员工id)-value(员工名称)
*
* @param ids 用户id集合
* @return
*/
Reply<Map<String, String>> findSimpleStaffByIds(@RequestBody List<String> ids)
12. findStaffByEntId
通过企业id获取员工名称信息-支持模糊查询
/**
* 根据租户id模糊搜索员工名称 key员工id-value员工名称
*
* @param entId 企业id/租户id
* @param search 搜索条件(员工名称)
* @param status 员工状态(0未激活 1已激活 2停用 3离职),null为全部。
* @return
*/
Reply<Map<String, String>> findStaffByEntId(@RequestParam("entId") String entId,
@RequestParam(value = "search", required = false) String search,
@RequestParam(value = "status", required = false) String status)
13. findStaffByParkCode
通过园区标识获取已激活入驻企业的员工名称信息-支持模糊查询
/**
* 根据园区标识获取已激活入驻企业员工名称 key员工id-value员工名称
*
* @param parkCode 园区标识
* @param search 搜索条件(员工名称)
* @param status 员工状态(0未激活 1已激活 2停用 3离职),null为全部。
* @return
*/
Reply<Map<String, String>> findStaffByParkCode(@RequestParam("parkCode") String parkCode,
@RequestParam(value = "search", required = false) String search,
@RequestParam(value = "status", required = false) String status)
14. findStaffByParkId
通过园区id获取已激活入驻企业的员工名称信息-支持模糊查询
/**
* 根据园区id获取已激活入驻企业员工名称 key员工id-value员工名称
*
* @param parkId 园区id
* @param search 搜索条件(员工名称) 模糊搜索
* @param status 员工状态(0未激活 1已激活 2停用 3离职),null为全部。
* @return
*/
Reply<Map<String, String>> findStaffByParkId(@RequestParam("parkId") String parkId,
@RequestParam(value = "search", required = false) String search,
@RequestParam(value = "status", required = false) String status)
文档更新时间: 2023-02-28 09:31 作者:欧阳少海