功能说明:获取用户可见范围内成本中心,且对应的成本中心-展示应用中,需要勾选上【API】选项
请求方式:POST(HTTPS)
请求地址:https://qwif.do1.com.cn/qwcgi/api/reimApiCtl/centerCostList.do
| 参数名 | 释义 | 类型 | 是否必须 | 描述 |
|---|---|---|---|---|
| token | 用于验证 | String | 是 | 参考获取token接口 |
| corpId | 公司唯一标识 | String | 是 | |
| wxUserId | 提单人账号 | String | 是 | 传递应用端用户的通讯录账号 |
| keyWord | 搜索关键字 | String | 否 |
ReimApi api = QwSdkUtil.getInter(ReimApi.class); CenterCostListResult result = api.centerCostList(QwSdkUtil.getCacheToken(),"通讯录账号","关键字"); System.out.println(JSONUtil.stringify(result));
{
"code":"0",
"data":
{
"children":
[
{
"fullName":"事业本部->采购部",
"hasChildren":false,
"id":"成本中心id",
"level":0,
"name":"采购部",
"optionalGrade":1,
"parentId":"父级成本中心id"
}
],
"displayShow":0
},
"desc":"成功"
}
| 参数名 | 释义 | 类型 | 是否必须 | 描述 |
|---|---|---|---|---|
| displayShow | 是否展示平铺结构 | Boolean | 是 | 判断本级成本中心可选人员为部分可选和不可选的个数大于0 |
| children | 成本中心列表 | TbQyCenterCostVO[] | 是 | |
| lastList | 最近选择列表 | TbQyCenterCostVO[] | 否 |
| 参数名 | 释义 | 类型 | 是否必须 | 描述 |
|---|---|---|---|---|
| id | 成本中心id | String | 是 | |
| parentId | 父成本中心id | String | 是 | |
| name | 名称 | String | 是 | |
| children | 子成本中心列表 | TbQyCenterCostVO[] | 是 | |
| hasChildren | 是否有子节点 | Boolean | 是 | |
| level | 层级 | Integer | 是 | |
| fullName | 全称 | String | 是 | |
| optionalGrade | 是否可选本级 | Integer | 是 | 1:所有人可选:本级可用对象的人都能选择本级成本中心 2:特定对象可选:若本级有下级成本中心,只有部分人能选择本级,其他人不能选; 若本级为末级成本中心,则全部人可选本级 3:所有人不可选:若本级有下级成本中心,所有人都不能选择本级,只能选择下级;若本级为末级成本中心, |