保存考勤数据

  • 接口:/attendance

  • Method:POST

  • 数据格式:JSON

  • 请求参数:

参数 类型 是否必填 描述
employeeId String Y 员工工号
attendanceDate String Y 打卡日期,日期格式 yyyy-MM-dd
attendanceTime String Y 打卡时间,时间格式 HH:mm:ss
attendedAt String N 打卡时间戳,打卡日期和打卡时间的组合结果,格式: yyyy-MM-dd HH:mm:ss
attendanceEventType String Y 考勤类型 可选值为:ATTENDANCE_WORK - 上下班考勤,ATTENDANCE_LOCATION - 地点考勤
attendanceType String Y 打卡类型,可选值为:CHECK_IN - 签到, CHECK_OUT - 签退 注:考勤类型为ATTENDANCE_LOCATION时,打卡类型只能为CHECK_IN
placeFullCode String N 打卡地点(每刻地址库的code)
placeText String N 打卡地点全名
placeLon String N 打卡地点经度
placeLat String N 打卡地点纬度
  • 返回数据:
字段 描述
code “ACK”代表操作成功,“NACK”代表操作失败
message 显示操作失败的原因
data 操作失败的数据
  • 请求示例:

成功的请求

      {
        "data":[
          {
               "employeeId":"emp1001",
               "attendanceDate":"2017-12-25",
               "attendanceTime":"10:22:30",
               "attendanceEventType":"ATTENDANCE_WORK",
               "attendanceType":"CHECK_IN",
               "placeFullCode":"domestic-ZH1-ZH1_0-ZH1_0_00",
               "placeText":"浙江省杭州市滨江区华业大厦",
               "placeLon":28.232121,
               "placeLat":29.233123
           },{
               "employeeId":"emp1001",
               "attendanceDate":"2017-12-25",
               "attendanceTime":"10:22:30",
               "attendanceEventType":"ATTENDANCE_WORK",
               "attendanceType":"CHECK_OUT",
               "placeFullCode":"domestic-ZH1-ZH1_0-ZH1_0_00",
               "placeText":"浙江省杭州市滨江区华业大厦",
               "placeLon":28.232121,
               "placeLat":29.233123
           },{
               "employeeId":"emp1001",
               "attendanceDate":"2017-12-25",
               "attendanceTime":"10:22:30",
               "attendanceEventType":"ATTENDANCE_LOCATION",
               "attendanceType":"CHECK_IN",
               "placeFullCode":"domestic-ZH1-ZH1_0-ZH1_0_00",
               "placeText":"浙江省杭州市滨江区华业大厦",
               "placeLon":28.232121,
               "placeLat":29.233123
           }
        ]
      }

部分失败的请求

{
     "data":[{
         "employeeId":"errEmp1001",
         "attendanceDate":"2017-12-25",
         "attendanceTime":"10:22:30",
         "attendanceType":"CHECK_IN",
         "placeFullCode":"domestic-ZH1-ZH1_0-ZH1_0_00",
         "placeText":"浙江省杭州市滨江区华业大厦",
         "placeLon":28.232121,
         "placeLat":29.233123
     }]
}
  • 返回示例:

成功的返回

{
  "code":"ACK",
  "message":"操作成功"
}

部分失败的返回

{
    "code": "NACK",
    "message": "存在不合法数据,请求修改后重新提交",
    "data": [{
          "employeeId":"errEmp1001",
          "attendanceDate":"2017-12-25",
          "attendanceTime":"10:22:30",
          "attendanceType":"CHECK_IN",
          "placeFullCode":"domestic-ZH1-ZH1_0-ZH1_0_00",
          "placeText":"浙江省杭州市滨江区华业大厦",
          "placeLon":28.232121,
          "placeLat":29.233123,
          "errorMsg": "该工号的员工不存在"
        }
    ],
    "args": null,
    "linkDetail": false,
    "nonBizError": false
}

results matching ""

    No results matching ""