购买咨询
微信咨询
电话咨询
预约演示
跳转到内容

部门管理接口

添加部门

接口概述

  • 功能:添加新部门,并返回创建成功的部门信息及层级关系
  • 请求方式:GET
  • 请求地址: /dw-open-api/dept/add.do

请求参数

参数名类型必填描述
appIdstring平台分配的appId
namestring部门名称
noncestring随机字符串
parentIdstring父级部门ID
signaturestring签名
thirdDeptIdstring第三方部门ID
timestampstring当前时间戳

请求示例

http://192.168.5.43:9999/dw-open-api/dept/add.do?appId=mncbn&name=product%20dept&nonce=proorpor&parentId=propropro&signature=afds&thirdDeptId=dsaf&timestamp=123666

返回值

json
{
  "resultCode": 200,
  "resultMsg": "执行成功",
  "data": {
    "id": "37ec443e-5b90-4bd1-aa24-6fb9bdfbc6af",
    "name": "product dept",
    "deptCode": null,
    "parentId": "propropro",
    "orderNo": null,
    "createDate": "2025-08-20 15:32:21",
    "thirdDeptId": "dsaf",
    "deptLevel": null,
    "parentName": null,
    "childDepts": [],
    "parentDept": null
  }
}

删除部门

接口概述

  • 功能:删除指定部门,并返回操作结果
  • 请求方式:DELETE
  • 请求地址: /dw-open-api/dept/delete.do

请求参数

参数名类型必填描述
appIdstring平台分配的appId
noncestring随机字符串
signaturestring签名
timestampstring当前时间戳

请求示例

http://192.168.5.43:9999/dw-open-api/dept/delete.do?appId=gfdgs&nonce=sfdgfds&signature=adsf&timestamp=dsf

返回值

json
{
  "resultCode": 200,
  "resultMsg": "执行成功",
  "data": null
}

修改部门

接口概述

  • 功能:修改指定部门信息,并返回操作结果
  • 请求方式:PUT
  • 请求地址: /dw-open-api/dept/edit.do

请求参数

参数名类型必填描述
appIdstring平台分配的appId
idstring部门ID
namestring部门名称
noncestring随机字符串
parentIdstring父级部门ID
signaturestring签名
thirdDeptIdstring第三方部门ID
timestampstring当前时间戳

请求示例

http://192.168.5.43:9999/dw-open-api/dept/edit.do?appId=zsghs&id=5185129d-3127-4b63-b219-169c8559a4a3&name=%E7%A0%94%E5%8F%91%E9%83%A8&nonce=dasf&parentId=-1&signature=asd&timestamp=456789

返回值

json
{
  "resultCode": 200,
  "resultMsg": "执行成功",
  "data": null
}

系统所有部门列表

接口概述

  • 功能:获取系统所有部门列表及分页信息
  • 请求方式:GET
  • 请求地址: /dw-open-api/dept/list.do

请求参数

参数名类型必填描述
appIdstring平台分配的appId
namestring部门名称
noncestring随机字符串
pageNointeger($int32)页码,默认值1
pageSizeinteger($int32)页数据大小,默认值10
parentIdstring父级部门ID
signaturestring签名
timestampstring当前时间戳

请求示例

http://192.168.5.43:9999/dw-open-api/dept/list.do?appId=qerwpoui&name=333&nonce=afds&pageNo=1&pageSize=1&parentId=5185129d-3127-4b63-b219-169c8559a4a3&signature=adsfds&timestamp=asdfd

返回值

json
{
  "resultCode": 200,
  "resultMsg": "执行成功",
  "data": {
    "pageNo": 1,
    "pageSize": 1,
    "orderBy": "orderNo",
    "orderDir": "desc",
    "countTotal": true,
    "pageNos": null,
    "totalPage": 1,
    "islastpage": false,
    "result": [
      {
        "id": "990166b3-2f6f-4459-a059-68dd13acc71c",
        "name": "333",
        "deptCode": "2PWHCB",
        "parentId": "5185129d-3127-4b63-b219-169c8559a4a3",
        "orderNo": null,
        "createDate": "2025-08-11 12:31:06",
        "thirdDeptId": null,
        "deptLevel": 2,
        "parentName": "研发部",
        "childDepts": [],
        "parentDept": null
      }
    ],
    "totalItems": 1,
    "startpage": 1,
    "endpage": 1,
    "scrollId": null,
    "totalPages": 1,
    "lastPage": true,
    "nextPage": 1,
    "firstPage": true,
    "prePage": 1,
    "offset": 0,
    "sort": [
      {
        "property": "orderNo",
        "dir": "desc"
      }
    ],
    "orderBySetted": true
  }
}

调问-专业的开源问卷表单系统