获取组织树列表

更新时间:2022-05-12 16:23:49

接口说明

根据租户code获取组织树列表

基本信息

请求方式: GET

请求路径:

https://prod.open-api.mysre.cn/m/Organization/open-api/org-tree-list

请求参数

参数名 参数位置 参数类型 必填 默认值 示例 描述
pageIndex query number 1 1 页码
pageSize query number 15 15 每页数据量
parentId query string 不填默认查询最顶级组织 3a026ff2-953c-0f28-e402-b2d5975b94bd 父级组织ID

请求示例

get /m/Organization/open-api/role-list?tenantCode=betatest&pageIndex=1&pageSize=2&parentId=3a026ff2-953c-0f28-e402-b2d5975b94bd

返回成功示例

{
    "errcode": 0,
    "errmsg": "success",
    "data": {
        "id": "ec8f9397-baa9-485d-8208-f8f7d005de16",
        "name": "鞍山股份制有限公司",
        "code": "0000-0001-",
        "parentId": "11b11db4-e907-4f1f-8835-b9daab6e1f23",
        "isCompany": "1",
        "city": "鞍山",
        "orgCode": "00.A0001.",
        "namePath": "奥园集团有限公司>>鞍山股份制有限公司",
        "orderCode": "00.0001.",
        "level": "1",
        "isEndCompany": "0",
        "isDeleted": "0",
        "childNum": "8",
        "childList": [
            {
                "id": "af86fa9e-65df-47f6-9c35-c3cd17ed8869",
                "name": "上海公司2",
                "code": "0000-0001-0001-",
                "parentId": "ec8f9397-baa9-485d-8208-f8f7d005de16",
                "isCompany": "1",
                "city": "安庆",
                "orgCode": "00.A0001.B0001.",
                "namePath": "奥园集团有限公司>>鞍山股份制有限公司>>上海公司2",
                "orderCode": "00.0001.0001.",
                "level": "2",
                "isEndCompany": "1",
                "isDeleted": "0",
                "childNum": 0
            },
            {
                "id": "39d1bcb9-34bc-2c12-2220-510463463f0c",
                "name": "体验用户部1",
                "code": "0000-0001-0002-",
                "parentId": "ec8f9397-baa9-485d-8208-f8f7d005de16",
                "isCompany": "0",
                "city": null,
                "orgCode": "00.A0001.B0002.",
                "namePath": "奥园集团有限公司>>鞍山股份制有限公司>>体验用户部1",
                "orderCode": "00.0001.0002.",
                "level": "2",
                "isEndCompany": "0",
                "isDeleted": "0",
                "childNum": "1"
            },
            {
                "id": "39db3f60-1768-bf6d-a179-f385a0891edb",
                "name": "工程部",
                "code": "0000-0001-0003-",
                "parentId": "ec8f9397-baa9-485d-8208-f8f7d005de16",
                "isCompany": "0",
                "city": "",
                "orgCode": "00.A0001.B0003.",
                "namePath": "奥园集团有限公司>>鞍山股份制有限公司>>工程部",
                "orderCode": "00.0001.0003.",
                "level": "2",
                "isEndCompany": "0",
                "isDeleted": "0",
                "childNum": "1"
            },
            {
                "id": "39e2c658-222b-38d6-b0c9-3614d1b07e2a",
                "name": "2131",
                "code": "0000-0001-0004-",
                "parentId": "ec8f9397-baa9-485d-8208-f8f7d005de16",
                "isCompany": "0",
                "city": null,
                "orgCode": "00.A0001.B0004.",
                "namePath": "奥园集团有限公司>>鞍山股份制有限公司>>2131",
                "orderCode": "00.0001.0004.",
                "level": "2",
                "isEndCompany": "0",
                "isDeleted": "0",
                "childNum": 0
            },
            {
                "id": "39e65c98-dea7-71e8-9261-6e1e5cd3a063",
                "name": "测试部门",
                "code": "0000-0001-0005-",
                "parentId": "ec8f9397-baa9-485d-8208-f8f7d005de16",
                "isCompany": "0",
                "city": null,
                "orgCode": "00.A0001.B0005.",
                "namePath": "奥园集团有限公司>>鞍山股份制有限公司>>测试部门",
                "orderCode": "00.0001.0005.",
                "level": "2",
                "isEndCompany": "0",
                "isDeleted": "0",
                "childNum": 0
            },
            {
                "id": "39e7b3e8-6872-f835-d52b-7401dbf97655",
                "name": "苹果项目一",
                "code": "0000-0001-0006-",
                "parentId": "ec8f9397-baa9-485d-8208-f8f7d005de16",
                "isCompany": "0",
                "city": null,
                "orgCode": "00.A0001.B0006.",
                "namePath": "奥园集团有限公司>>鞍山股份制有限公司>>苹果项目一",
                "orderCode": "00.0001.0006.",
                "level": "2",
                "isEndCompany": "0",
                "isDeleted": "0",
                "childNum": "1"
            },
            {
                "id": "39f1bcfb-5fc5-a2db-60ef-434a64403d7b",
                "name": "1fdxx2",
                "code": "0000-0001-0007-",
                "parentId": "ec8f9397-baa9-485d-8208-f8f7d005de16",
                "isCompany": "0",
                "city": null,
                "orgCode": "00.A0001.B0007.",
                "namePath": "奥园集团有限公司>>鞍山股份制有限公司>>1fdxx2",
                "orderCode": "00.0001.0007.",
                "level": "2",
                "isEndCompany": "0",
                "isDeleted": "0",
                "childNum": "1"
            },
            {
                "id": "39f1bd29-bac4-ddfd-e422-4df6bbd82515",
                "name": "cff4qc",
                "code": "0000-0001-0008-",
                "parentId": "ec8f9397-baa9-485d-8208-f8f7d005de16",
                "isCompany": "0",
                "city": null,
                "orgCode": "00.A0001.B0008.",
                "namePath": "奥园集团有限公司>>鞍山股份制有限公司>>cff4qc",
                "orderCode": "00.0001.0008.",
                "level": "2",
                "isEndCompany": "0",
                "isDeleted": "0",
                "childNum": "1"
            }
        ]
    }
}

返回参数说明(成功)

参数名 参数类型 描述
errcode number 错误码
errmsg string 错误信息
data object 数据集
data.id string 组织ID
data.name string 组织名称
data.code string 组织机构编码
data.parentId object 父级ID
data.isCompany string 是否为公司
data.city object 所属城市
data.orgCode string 层级编码
data.namePath string 层级路径名
data.orderCode string 排序code
data.level string 层级
data.isEndCompany string 是否末级公司,1表示是,0表示不是
data.isDeleted string 删除状态
data.childNum string 子级组织数量
data.childList array 子级组织
data.childList.id string 组织ID
data.childList.name string 组织名称
data.childList.code string 组织机构编码
data.childList.parentId string 父级ID
data.childList.isCompany string 是否末级公司,1表示是,0表示不是
data.childList.city string 所属城市
data.childList.orgCode string 层级编码
data.childList.namePath string 层级路径名
data.childList.orderCode string 排序code
data.childList.level string 层级
data.childList.isEndCompany string 是否末级公司
data.childList.isDeleted string 删除状态
data.childList.childNum string 子级组织数量

失败返回示例

{"errcode":-1,"errmsg":"未知错误","data":[]}

返回参数说明(失败)

参数名 参数类型 描述
errcode number 错误码
errmsg string 错误信息
data array 数据集

results matching ""

    No results matching ""