查询员工原始打卡记录接口
请求地址 | /api/attendance/timingRecords |
---|---|
返回格式 | JSON |
content-type | application/json |
请求方式 | GET |
请求参数 | QUERY 参数 |
请求举例 | 获取2025年1月20日当天的GPS类型的打卡数据并倒顺排序 请求示例(经过 URL Encode 编码):https://open.hrsaas.com/api/attendance/timingRecords?filter=dateTime%20le%20%E2%80%982025-01-20T23:59%E2%80%99%20and%20dateTime%20ge%20%E2%80%982025-01-20T00:00%E2%80%99%20and%20source%20eq%20%E2%80%98WechatGPS%E2%80%99%20&keyword=&offset=0&limit=10&orderby=id%20desc 获取2025年1月20日当天的GPS类型的打卡数据并倒顺排序 请求示例(经过 URL Encode 编码):https://open.hrsaas.com/api/attendance/timingRecords?filter=dateTime%20le%20%E2%80%982025-01-20T23:59%E2%80%99%20and%20dateTime%20ge%20%E2%80%982025-01-20T00:00%E2%80%99%20and%20source%20eq%20%E2%80%98WechatGPS%E2%80%99%20&keyword=&offset=0&limit=10&orderby=id%20desc |
说明 | 可以通过该接口获取系统打卡记录的数据 |
请求参数说明
参数 | 类型 | 说明 | 举例 | 必选 |
---|---|---|---|---|
offset | int | 分页查询的页码,从 0 开始 | 0 | Yes |
limit | int | 每页条目数量 | 20 | Yes |
orderby | string | 分页排序字段 | id desc | Yes |
filter | string | 过滤条件,请参考ODATA表达式了解表达式规则。 示例说明已经 URL Decode 解码,意为: 获取 2025 年 1 月 20 日当天的 GPS 类型的打卡数据 。 |
dateTime le '2025-01-20T23:59' and dateTime ge '2025-01-20T00:00' and source eq 'WechatGPS' |
No |
返回值结构
属性 | 类型 | 说明 |
---|---|---|
totalCount | long | 符合条件的打卡记录数据总量 |
list | 打卡数据类型数组 | 打卡数据对象数组 |
打卡数据类型
属性 | 类型 | 说明 | 举例 |
---|---|---|---|
id | long | 打卡记录ID,唯一 | 20177912 |
employeeId | long | 员工ID | 张三 |
legalEntityName | string | 法务实体名称 | 橘子科技(上海)有限公司 |
departmentPath | string | 部门路径 | 橘子科技集团公司/产品研发部 |
dateTime | LocalDateTime | 打卡时间 | 2024-07-02T01:01:00.000 |
configurableEnumSourceName | string | 打卡来源 | 补打卡 |
externalRecordId | string | 外部系统ID(如果是外部系统集成,此字段有值且唯一) | 23888189971 |
批量写入(更新)员工打卡数据
请求地址 | https://open.hrsaas.com/api/attendance/timingRecords/batchWrite |
---|---|
返回格式 | JSON |
content-type | application/json |
请求方式 | POST |
请求参数 | 打卡数据的数组 |
返回值 | 无返回值 |
备注 | 该接口一次最多接收100条考勤数据,超过100将报错 对于外部第三方的数据,需要设置externalRecordId来作为数据的唯一标识符,这样多次调用就不会出现重复数据 |
考勤打卡数据结构
属性 | 类型 | 说明 | 举例 | 必选 |
---|---|---|---|---|
employeeId | long | 员工Id | 10001 | employeeId和employeeCode2选1 |
employeeCode | String | 员工工号 | C0001 | employeeId和employeeCode2选1 |
dateTime | LocalDateTime | 打卡时间 | 2020-08-11T12:05:93:000 | 是 |
location | String | 打卡地点 | 普通软件园1号楼 | |
source | string | 打卡数据来源 | 对于第三方集成,请使用 ThirdPartyIntegration常量 | 是 |
sourceIdentifier | string | 打卡数据来源说明标志 | ||
memo | string | 备注信息 | ||
latitude | double | 维度 | ||
longitude | double | 经度 | ||
SSID | string | WIFI打开的WIFI SSID 信息 | ||
BSSID | string | 打卡设备的MAC地址 | ||
outside | boolean | 是否外勤打卡 | true | |
outsideConfirmed | boolean | 外勤打卡是否已确认 | true | |
externalRecordId | string | 外部考勤数据的唯一标志符 | a000233 | 是 |
示例
[
{
"employeeCode": "E003",
"dateTime": "2024-05-24T15:07:54.000",
"source": "ThirdPartyIntegration",
"externalRecordId": "5bfa896e34906a7cb34e227378f3ef1fd"
},
{
"employeeCode": "E003",
"dateTime": "2024-05-24T15:08:00.000",
"source": "ThirdPartyIntegration",
"externalRecordId": "eed21001aeb6395ed871887cf1a8eb9a7"
},
{
"employeeCode": "E003",
"dateTime": "2024-05-24T15:08:21.000",
"source": "ThirdPartyIntegration",
"externalRecordId": "4543a91663c5cdff51bebcd04d236ad26"
}
]