
# 查询租户下用户信息（API名称：getPersonListByTenant）
#### 功能介绍
该接口用于查询当前租户下的用户信息：人员名称、归属分包商、人员状态等信息。
#### 相关API
| **接口名称**                                                             | **调用说明**                                                     |
|:---|:---|
| [获取Token](https://support.huaweicloud.com/api-isdp/api_01_0019.html) | 调用该接口获取到Token，再调用其他接口时，需要在请求消息头中添加"Authorization"，其值即为Token。 |
   
#### 调用流程
图1查询租户下用户信息流程   
![](https://support.huaweicloud.com/api-isdp/zh-cn_image_0000002490654850.png "点击放大")
#### URL
| **请求方式** | **HTTPS地址**                                                   | **服务架构** | **消息体类型**        |
|:---|:---|:---|:---|
| POST     | https://***isdp+域名***/openapi/v1/person/getPersonListByTenant | OpenAPI  | application/json |
   
#### 请求头
| **KEY**       | VALUE                  | 是否必填 | **描述**                                                                                           |
|:---|:---|:---|:---|
| Content-Type  | application/json       | 是    | 无                                                                                                |
| Authorization | bearer ${access_token} | 是    | bearer +" "+[5.2.1](https://support.huaweicloud.com/api-isdp/api_01_0019.html)中获取的access_token的值 |
   
#### 请求参数
| **参数**               | **类型**  | **是否必填** | **描述**                                                                                                                                                                                                                                       |
|:---|:---|:---|:---|
| start                | int     | 是        | 开始位置，不传默认0                                                                                                                                                                                                                                   |
| count                | int     | 是        | 每页总数，不传默认50                                                                                                                                                                                                                                  |
| idList               | Array   | 否        | 人员id集合                                                                                                                                                                                                                                       |
| personCodeList       | String  | 否        | 人员账号批量精确查询，多个用英文逗号分隔                                                                                                                                                                                                                         |
| keyWords             | String  | 否        | 人员账号或者人员名称过滤，OP为全模糊，OC为右模糊                                                                                                                                                                                                                   |
| personStatus         | String  | 否        | 人员状态编码NoAccountOpened;OpeningAccount;OpenAccount;Freeze;Cancel，多个用英文分号分隔 注意： 不传默认将已注销人员查询出来                            |
| personType           | String  | 否        | 人员类型编码Admin;Customer;Employee;Other;Supplier，多个用英文分号分隔                                                                                                                                                                                       |
| isSmartDevice        | String  | 否        | 是否查询智能设备账号，Y：不查询智能设备账号， 其它：查询智能设备账号 注意： 不传此参数查询结果包含智能设备账号 |
| orgIdList            | Array   | 否        | 所属组织id集合                                                                                                                                                                                                                                     |
| orgIncludeChild      | Boolean | 否        | 是否包含所属组织的子级组织                                                                                                                                                                                                                                |
| orgNoList            | Array   | 否        | 所属组织编码集合                                                                                                                                                                                                                                     |
| orgName              | String  | 否        | 单个组织名称则为右模糊查询，多个用英文分号分隔则为精确批量查询                                                                                                                                                                                                              |
| customerCode         | String  | 否        | 单个客户编码则为右模糊查询，多个用英文分号分隔则为精确批量查询                                                                                                                                                                                                              |
| customerName         | String  | 否        | 单个客户名称则为右模糊查询，多个用英文分号分隔则为精确批量查询                                                                                                                                                                                                              |
| supplierCode         | String  | 否        | 单个供应商编码则为右模糊查询，多个用英文分号分隔则为精确批量查询                                                                                                                                                                                                             |
| supplierName         | String  | 否        | 单个供应商名称则为右模糊查询，多个用英文分号分隔则为精确批量查询                                                                                                                                                                                                             |
| profilePictureStatus | String  | 否        | 工作照状态，已上传：CollectionSucceeded，未上传：CollectionFailed                                                                                                                                                                                           |
   
#### 响应参数
| **参数**                   | **类型**              | **描述**                                             |
|:---|:---|:---|
| personId                 | Long                | 人员id                                               |
| personCode               | String              | 人员账号                                               |
| personName               | String              | 人员名称                                               |
| personTypeCode           | String              | 人员类型编码                                             |
| personType               | String              | 人员类型名称                                             |
| personStatusCode         | String              | 人员状态编码                                             |
| personStatus             | String              | 人员状态名称                                             |
| orgId                    | Long                | 所属组织id                                             |
| orgNo                    | String              | 所属组织编码                                             |
| orgName                  | String              | 所属组织名称                                             |
| customerId               | Long                | 所属客户id                                             |
| customerCode             | String              | 所属客户编码                                             |
| customerName             | String              | 所属客户名称                                             |
| supplierId               | Long                | 所属分包商id                                            |
| supplierCode             | String              | 所属分包商code                                          |
| supplierName             | String              | 所属分包商名称                                            |
| positionCode             | String              | 人员岗位编码                                             |
| positionName             | String              | 人员岗位名称                                             |
| profilePictureStatusCode | String              | 工作照状态，CollectionSucceeded:已注册、CollectionFailed:未注册 |
| profilePictureStatus     | String              | 工作照状态                                              |
| userId                   | Long                | 用户id                                               |
| phone                    | String              | 手机号码，脱敏返回                                          |
| integrationAccount       | String              | 集成账号                                               |
| qualificationName        | String              | 技能名称                                               |
| role                     | Map\<StringObject\> | 角色信息                                               |
   
role参数说明：
| 参数             | 类型     | 描述                     |
|:---|:---|:---|
| id             | Long   | 角色id                   |
| roleId         | Long   | 角色id                   |
| roleName       | String | 角色名称                   |
| roleNo         | String | 角色编号                   |
| deletFlag      | Int    | 删除标志                   |
| createdBy      | Long   | 创建人                    |
| creationDate   | String | 创建时间                   |
| lastUpdatedBy  | Long   | 更新人                    |
| lastUpdateDate | String | 更新时间                   |
| tenantId       | Long   | Long                   |
| entityName     | String | String                 |
| appName        | String | String                 |
| roleType       | Int    | 角色类型, 1 系统默认角色,2 自定义角色 |
| orderNum       | Int    | 角色排序                   |
| value          | String | 角色名称                   |
| roleName       | String | 角色名称                   |
| roleDesc       | String | 角色说明                   |
   
#### 请求示例
```
{
    "personStatus": "NoAccountOpened;OpeningAccount;OpenAccount;Freeze",
    "isSmartDevice": "Y",
    "count": 1,
    "start": 0
}
```
#### 响应示例
```
{
    "data": [
        {
            "personStatus": "已开户",
            "udfExtend9": null,
            "supplierId": 84,
            "role": {
                "id": -998,
                "roleId": -998,
                "roleNo": "Admin",
                "status": "",
                "deleteFlag": 0,
                "createdBy": 641524227610000,
                "creationDate": "2016-11-19 19:11:00",
                "lastUpdatedBy": 641524227610000,
                "lastUpdateDate": "2016-11-19 19:11:00",
                "tenantId": 1,
                "entityName": "Role",
                "appName": "pub-privilege",
                "roleType": 1,
                "orderNum": 80,
                "value": "Admin",
                "roleName": "Admin",
                "roleDesc": "Admin"
            },
            "lastUpdateDate": "2023-07-27T23:59:27.000+08:00",
            "udfExtend2": "项目",
            "customerCode": "test1",
            "positionCode": null,
            "udfExtend1": "1",
            "udfExtend4": null,
            "supplierCode": null,
            "udfExtend3": null,
            "udfExtend6": null,
            "udfExtend5": null,
            "personCode": "superman",
            "orgId": 502,
            "qualificationName": "急救证",
            "udfExtend8": null,
            "udfExtend7": null,
            "positionName": null,
            "orgNo": "01",
            "customerId": 3001569,
            "udfExtend10": null,
            "personType": "管理员",
            "supplierName": null,
            "lastUpdatedBy": -1,
            "integrationAccount": "",
            "orgName": "save",
            "profilePictureStatusCode": "CollectionSucceeded",
            "personTypeCode": "Admin",
            "personStatusCode": "OpenAccount",
            "userId": -1,
            "customerName": "xxx",
            "personName": "超级管理员",
            "phone": "{sa**************************************************************PC",
            "profilePictureStatus": "已注册",
            "personId": -1
        }
    ],
    "pos": 0,
    "total_count": 4114,
    "entityName": "person",
    "totalCount": 4114
}
```
#### 状态码
状态码请参见[状态码](https://support.huaweicloud.com/api-isdp/api_01_0326.html)。
#### 错误码
错误码请参见[错误码](https://support.huaweicloud.com/api-isdp/api_01_0327.html)。
