API docsAPI docs
  • English
  • zh-CN
  • English
  • zh-CN
    • 概述
    • 请求 & 响应
    • 获取Auth Token
    • 使用 Auth Token
    • Api Example
    • 区域API
    • 部门API
    • 职位API
    • 人员API
    • 离职API
    • 设备API
    • 考勤记录API
    • 考勤报表API

离职API

列表

请求

  • Method: GET
  • Url: /personnel/api/resigns/
  • Headers:
    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Query Parameters
参数描述
page显示第几页
page_size显示该页数据的条数
employee使用该字段进行查询
resign_type使用该字段进行查询
resign_date使用该字段进行查询

响应

{
    "count": 5,
    "next": null,
    "previous": null,
    "msg": "",
    "code": 0,
    "data": [
        {
            "id": 5,
            "resign_date": "2020-06-04",
            "resign_type": 1,
            "disableatt": true,
            "employee": {
                "id": 3,
                "emp_code": "11111122",
                "first_name": "aaabb",
                "last_name": ""
            },
            "first_name": "aaabb",
            "last_name": ""
        },
        ......
    ]
}

读取

请求

  • Method: GET

  • Url: /personnel/api/resigns/{id}/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Path Parameters

参数描述
id必填

响应

  • Url: /personnel/api/resigns/5/
{
    "id": 5,
    "resign_date": "2020-06-04",
    "resign_type": 1,
    "disableatt": true,
    "employee": {
        "id": 3,
        "emp_code": "11111122",
        "first_name": "aaabb",
        "last_name": ""
    },
    "first_name": "aaabb",
    "last_name": ""
}

创建

  • Method: POST
  • Url: /personnel/api/resigns/
  • Headers:
    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Request Body
{
    "employee": 3,
    "disableatt": true,
    "resign_type": 1,
    "resign_date": "2020-06-01",
    "reason": ""
}

|参数|必填|类型| 描述 | | ----- | ----- |-----------------| |resign_type|Y|Integer| 默认值为1,(1-5)五个选项 | |disableatt|Y|Bool| True 或者 False | |resign_date|Y|String| 格式化: yyyy-mm-dd | |employee|Y|Integer| 人员ID | |reason|N|String| 限制200个字符 |

响应

{
    "id": 5,
    "resign_date": "2020-06-01",
    "resign_type": 1,
    "disableatt": true,
    "employee": {
        "id": 3,
        "emp_code": "11111122",
        "first_name": "aaabb",
        "last_name": ""
    },
    "first_name": "aaabb",
    "last_name": ""
}

更新

请求

  • Method: PUT

  • Url: /personnel/api/resigns/{id}/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Path Parameters

参数描述
id必填
  • Request Body
{
    "resign_date": "2020-06-02"
}

|参数|必填|类型| 描述 | | ----- | ----- |-----------------| |resign_type|N|Integer| 默认值为1,(1-5)五个选项 | |disableatt|N|Bool| True 或者 False | |resign_date|N|String| 格式化: yyyy-mm-dd | |reason|N|String| 限制200个字符 |

响应

  • Url: /personnel/api/resigns/5/
{
    "id": 5,
    "resign_date": "2020-06-02",
    "resign_type": 1,
    "disableatt": true,
    "employee": {
        "id": 3,
        "emp_code": "11111122",
        "first_name": "aaabb",
        "last_name": ""
    },
    "first_name": "aaabb",
    "last_name": ""
}

删除

请求

  • Method: DELETE

  • Url: /personnel/api/resigns/{id}/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Path Parameters

参数描述
id必填

响应

None

复职

请求

  • Method: POST

  • Url: /personnel/api/resigns/reinstatement/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Request Body

{
    "resigns": [1]
}
参数必填类型描述
resignsYList离职人员编号, 示例: [1, 2, 3, ...]
Prev
人员API