劳务-设置人员关联

更新时间:2022-11-03 15:27:42

接口说明

劳务-设置人员关联,可设置显源人员信息,并获取劳务人员id

使用接口前请先阅读下文,超链接文档 劳务接入指引文档 sign生成规则

基本信息

请求方式: POST

请求路径:

https://prod.open-api.mysre.cn/aiot/open/labour/set-user

请求参数

参数名 参数位置 参数类型 必填 默认值 示例 描述
tenant_code query string
third_code body string 第三方code
third_proj_id body string 第三方项目id
proj_id body string 明源项目id
third_user_id body string 第三方人员id
basics_record_id body string 明源人员基础档案id
squads_id body string 明源班组id
job_type_id body string 明源工种类型id
user_type_id body string 明源人员类型id
position body string 项目负责人 岗位工程师、项目负责人等
is_squads_leader body string 是否是班长
contractor_id body string 明源承包商组织id
remark body string 备注
sign body string 签名
timestamp body number 10位时间戳

请求示例

/aiot/open/labour/set-user?tenant_code=tenant_code

返回成功示例

{
  "errcode":0,
  "errmsg":"",
  "data":[
    {
      "user_id":"3a071b8f-047f-dde9-0133-085e1e093cb5",
      "third_code":"aiot",
      "squads_id":"3a071b29-3b09-61ac-bdcc-2f7649a8714e",
      "basics_record_id":"3a071b15-5a69-4d03-1857-f90de26b5b31",
      "contractor_id":"3a071b04-744c-d5e6-831a-08512347be09",
      "msg":"唯一条件 third_code+squads_id+basics_record_id+contractor_id",
      "exists":true,
      "update":true,
      "error":""
    }
  ]
}

返回参数说明(成功)

参数名 参数类型 描述
errcode number 异常code 0为没有异常
errmsg string 异常信息
data array 设置信息
data.user_id string 明源人员ID
data.third_code string 第三方code
data.squads_id string 班组组id
data.basics_record_id string 明源人员基础档案id
data.contractor_id string 明源承包商组织id
data.msg string 唯一条件说明
data.exists bool 是否已经存在关联信息
data.update bool 是否为更新操作
data.error string 异常信息

失败返回示例

{
  "errcode": -1,
  "errmsg": "xxx 是必须的"
}

返回参数说明(失败)

参数名 参数类型 描述
errcode number 异常code
errmsg string 异常信息

results matching ""

    No results matching ""