获取员工请假类型
接口说明: 获取员工所有请假类型详情列表。
请求方式:POST(HTTPS)
请求地址:https://api.xinrenxinshi.com/v5/workflow/holiday/types
请求Header:
key | value |
---|---|
access_token | 获取的access_token的实际值 |
Query参数:
key | value |
---|---|
sign | 签名值 |
Body参数:
参数 | 类型 | 必传(Y/N) | 说明 |
---|---|---|---|
employeeId | String | Y | 员工id |
timestamp | Long | Y | 请求时间戳(精确到毫秒) |
返回结果:
参数 | 类型 | 必传(Y/N) | 说明 |
---|---|---|---|
errcode | Integer | Y | 0成功,其他失败 |
errmsg | String | Y | 操作结果描述 |
data | List<AttendanceHolidayTypeResult> | N | 处理成功时的数据结果,返回请假类型对象 |
AttendanceHolidayTypeResult
参数 | 类型 | 必传(Y/N) | 说明 |
---|---|---|---|
holidayType | Integer | Y | 请假类型id |
holidayName | String | Y | 请假类型名称 |
timeUnit | Integer | Y | 申请单位,0-按天,1-按小时,2-按小时或天 |
isDef | Integer | Y | 是否是自定义假期,0否1是 |
isSetHolidayBalance | Integer | Y | 设置假期余额(不包括调休) 开关,0—关闭,1—打开。调休类型比较特殊,调休是需要在薪人薪事管理端打开考勤设置里的加班设置的移动端显示调休余额开关 |
请求示例(HTTPS):
https://api.xinrenxinshi.com/v5/workflow/holiday/types?sign=7omyqoNIY5QPWKCyQM3Q7Hk8mNQ=
请求Body示例:
{
"employeeId": "a42c11aed7b645a2be77cd0a54cc33da",
"timestamp": 1606297914820
}
SDK请求示例(java):
FlowHolidayTypesRequest request = new FlowHolidayTypesRequest(access_token());
request.setEmployeeId("a42c11aed7b645a2be77cd0a54cc33da");
OpenapiResponse<List<FlowHolidayTypeResult>> response = XrxsApprovalService.getFlowHolidayTypes(request);
响应示例:
{
"errcode":0,
"errmsg":"成功",
"data":[
{
"holidayType":1,
"holidayName":"年假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":1
},
{
"holidayType":2,
"holidayName":"事假",
"timeUnit":1,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":3,
"holidayName":"病假",
"timeUnit":2,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":4,
"holidayName":"婚假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":5,
"holidayName":"丧假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":6,
"holidayName":"产假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":7,
"holidayName":"奖励产假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":8,
"holidayName":"陪产假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":9,
"holidayName":"探亲假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":10,
"holidayName":"工伤假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":11,
"holidayName":"调休",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":12,
"holidayName":"产检假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":13,
"holidayName":"流产假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":40,
"holidayName":"哺乳假",
"timeUnit":1,
"isDef":0,
"isSetHolidayBalance":0
},
{
"holidayType":99,
"holidayName":"长期病假",
"timeUnit":0,
"isDef":0,
"isSetHolidayBalance":0
}
]
}