保存或更新派遣数据

  • 接口:/attendance/dispatch/save

  • Method:POST

  • 数据格式:JSON

  • 接口说明:员工工号和业务编码组合为唯一,不存在则保存,存在则更新

  • 请求参数:

参数 类型 是否必填 描述
employeeId String Y 员工工号
businessCode String Y 该次派遣的业务编码
dispatchStart String Y 派遣开始日期,日期格式 yyyy-MM-dd
dispatchEnd String Y 派遣开始日期,日期格式 yyyy-MM-dd
placeFullCode String Y 派遣目的地城市
custField String N 派遣类型
  • 返回数据:
字段 描述
code “ACK”代表操作成功,“NACK”代表操作失败
message 显示操作失败的原因
data 操作失败的数据
  • 请求示例:

成功的请求

      {
        "data":[
          {
               "employeeId":"emp1001",
               "businessCode":"BIZ001",
               "dispatchStart":"2020-01-01",
               "dispatchEnd":"2020-01-03",
               "placeFullCode":"domestic-ZH1-ZH1_0-ZH1_0_00"
           },{
               "employeeId":"emp1002",
               "businessCode":"BIZ001",
               "dispatchStart":"2020-03-01",
               "dispatchEnd":"2020-03-05",
               "placeFullCode":"domestic-ZH1-ZH1_0-ZH1_0_00"
           }
        ]
      }

部分失败的请求

{
     "data":[{
        "employeeId":"emp1002",
        "businessCode":"BIZ001",
        "dispatchStart":"2020-03-01",
        "dispatchEnd":"2020-03-05",
        "placeFullCode":"domestic-ZH1-ZH1_0-ZH1_0_00"
     }]
}
  • 返回示例:

成功的返回

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

部分失败的返回

{
    "code": "NACK",
    "message": "存在不合法数据,请求修改后重新提交",
    "data": [{
          "employeeId":"emp1002",
          "businessCode":"BIZ001",
          "dispatchStart":"2020-03-01",
          "dispatchEnd":"2020-03-05",
          "placeFullCode":"domestic-ZH1-ZH1_0-ZH1_0_00"
          "errorMsg": "该工号的员工不存在"
        }
    ],
    "args": null,
    "linkDetail": false,
    "nonBizError": false
}

results matching ""

    No results matching ""