-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2、新增【批量更新矩阵明细中单个公共属性字段】 3、新增【新增或更新矩阵明细】 4、新增【批量新增或更新矩阵明细】 5、新增【批量删除规则明细】 6、新增【停启用审批矩阵】 7、更新【单据相关字段类型】描述 8、更新【更新收款账户】 9、更新【新增收款账户】 10、更新【更新日志】
- Loading branch information
Showing
24 changed files
with
2,442 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# 停启用审批矩阵 | ||
|
||
import Control from "@theme/Control"; | ||
|
||
<Control | ||
method="PUT" | ||
url="/api/openapi/v2/matrix/active/$`id`" | ||
/> | ||
|
||
<details> | ||
<summary><b>更新日志</b></summary> | ||
<div> | ||
|
||
[**1.27.0**](/docs/open-api/notice/update-log#1270) -> 🆕 新增了本接口。<br/> | ||
|
||
</div> | ||
</details> | ||
|
||
## Path Parameters | ||
|
||
| 名称 | 类型 | 描述 | 是否必填 | 默认值 | 备注 | | ||
| :--- | :--- | :--- | :--- |:--- | :--- | | ||
| **id** | String | 审批矩阵ID | 必填 | - | 通过 [获取企业下所有审批矩阵](/docs/open-api/matrix/get-matrixs) 获取 | | ||
|
||
|
||
## Query Parameters | ||
|
||
| 名称 | 类型 | 描述 | 是否必填 | 默认值 | 备注 | | ||
| :--- | :--- | :--- | :--- |:--- | :--- | | ||
| **active** | Boolean | 停用或启用标识 | 必填 | - | `true`:启用   `false`:停用 | | ||
| **accessToken** | String | 认证token | 必填 | - | 通过 [获取授权](/docs/open-api/getting-started/auth) 获取 `accessToken` | | ||
|
||
|
||
|
||
## CURL | ||
```json | ||
curl --location --request PUT 'https://app.ekuaibao.com/api/openapi/v2/matrix/active/$ID01wh4O1Yl1Cv?active=true&accessToken=ID01wiXBgNwwbR%3APCx3rwm3aA00qM' | ||
``` | ||
|
||
## 成功响应 | ||
```json | ||
{ | ||
"value":{ | ||
"pipeline": 1, | ||
"grayver": "9.95.0.0-prd", | ||
"dbVersion": 0, | ||
"threadId": "", | ||
"id": "ID01p4Q9vzOnAr", //审批矩阵ID | ||
"version": 3, | ||
"active": true, //是否有效(或者理解为是否被删除) true:有效,false:无效 | ||
"createTime": 1682322635458, //创建时间(毫秒级时间戳) | ||
"updateTime": 1682322659786, //更新时间(毫秒级时间戳) | ||
"name": "测试矩阵", //审批矩阵名称 | ||
"nameSpell": "CESHIJUZHEN", //名称大写拼音 | ||
"corporationId": "Tdk3tgber501v0", //企业ID | ||
"sourceCorporationId": null, | ||
"dataCorporationId": null, | ||
"fieldConfig": [ //条件字段配置 | ||
{ | ||
"id": "ID01p4Qa2pkden", //条件字段配置ID | ||
"type": "organization.Staff", //条件字段类型 | ||
"field": "submitterId", //条件字段名称 | ||
"operator": "=", //逻辑运算符:金额字段、数字字段逻辑符可选≥><≤,其他字段默认为等于 | ||
"containChild": false //是否包含子级 | ||
}, | ||
{ | ||
"id": "ID01p4Qa2pkduT", | ||
"type": "flow.FeeType", | ||
"field": "feeTypeId", | ||
"operator": "=", | ||
"containChild": false | ||
}, | ||
{ | ||
"id": "ID01p4Qa2pkdLp", | ||
"type": "organization.Department", | ||
"field": "expenseDepartment", | ||
"operator": "=", | ||
"containChild": false | ||
} | ||
], | ||
"resultConfig": [ //结果字段配置 | ||
{ | ||
"id": "ID01p4Qa2pkeir", //结果字段配置ID | ||
"name": "业务审批", //结果字段配置名称 | ||
"fieldConfig": [ //特有条件配置 | ||
{ | ||
"id": "ID01p4Qa2pke1V", //特有条件配置字段ID | ||
"type": "flow.MoneyModel", //特有条件配置字段类型 | ||
"field": "expenseMoney", //特有条件配置字段名称 | ||
"operator": ">=", //逻辑运算符:金额字段、数字字段逻辑符可选≥><≤,其他字段默认为等于 | ||
"containChild": false //是否包含子级 | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "ID01p4Qa2pkePt", | ||
"name": "财务审批", | ||
"fieldConfig": [ | ||
{ | ||
"id": "ID01p4Qa2pkeyX", | ||
"type": "flow.MoneyModel", | ||
"field": "expenseMoney", | ||
"operator": "<=", | ||
"containChild": false | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "ID01p4Qa2pkf5Z", | ||
"name": "财务审批2", | ||
"fieldConfig": [] | ||
} | ||
], | ||
"indexVersion": 1, | ||
"ownerId": "Tdk3tgber501v0:AvT3lntT8zzpWw", //所属员工ID | ||
"editorId": "Tdk3tgber501v0:AvT3lntT8zzpWw" //编辑员工ID | ||
} | ||
} | ||
``` | ||
|
||
## 失败响应 | ||
| HTTP状态码 | 错误码 | 描述 | 排查建议 | | ||
|:--------| :--- |:---|:-----| | ||
| **400** | - | 无效的审批矩阵 | 请检查**【审批矩阵ID】**是否正确 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,225 @@ | ||
# 批量新增或更新矩阵明细 | ||
|
||
import Control from "@theme/Control"; | ||
|
||
<Control | ||
method="POST" | ||
url="/api/openapi/v2/matrix/updateRuleBatch/$`id`" | ||
/> | ||
|
||
<details> | ||
<summary><b>更新日志</b></summary> | ||
<div> | ||
|
||
[**1.27.0**](/docs/open-api/notice/update-log#1270) -> 🆕 新增了本接口。<br/> | ||
|
||
</div> | ||
</details> | ||
|
||
:::caution | ||
- 更新时为 **全量更新**,若部分字段配置未传参,则会清空该字段配置值 | ||
::: | ||
|
||
## Path Parameters | ||
|
||
| 名称 | 类型 | 描述 | 是否必填 | 默认值 | 备注 | | ||
| :--- | :--- | :--- | :--- |:--- | :--- | | ||
| **id** | String | 审批矩阵ID | 必填 | - | 通过 [获取企业下所有审批矩阵](/docs/open-api/matrix/get-matrixs) 获取 | | ||
|
||
## Query Parameters | ||
|
||
| 名称 | 类型 | 描述 | 是否必填 | 默认值 | 备注 | | ||
| :--- | :--- | :--- | :--- |:--- | :--- | | ||
| **accessToken** | String | 认证token | 必填 | - | 通过 [获取授权](/docs/open-api/getting-started/auth) 获取 `accessToken` | | ||
|
||
## Body Parameters | ||
**目前支持的字段类型:员工、部门、自定义档案、费用类型、城市(同单据传参格式)、金额、数字** | ||
|
||
| 名称 | 类型 | 描述 | 是否必填 | 默认值 | 备注 | | ||
|:-----------|:-------|:------| :--- |:----|:---------| | ||
| **--** | Array | 外层数组 | 必填 | - | 外层数组 | | ||
| **  ∟ id** | String | 规则明细ID | 非必填 | - | **更新矩阵明细时必填**<br/>通过 [根据矩阵ID获取矩阵明细](/docs/open-api/matrix/get-matrix-byId) 获取 | | ||
| **  ∟ rule** | Array | 条件字段信息 | 必填 | - | 条件字段信息 | | ||
| **    ∟ fieldConfigId** | String | 条件字段配置ID | 必填 | - | 条件字段配置ID | | ||
| **    ∟ ids** | Array | 条件字段匹配值 | 必填 | - | 条件字段匹配值具体信息 | | ||
| **     ∟ id** | String | 条件字段匹配值ID | 必填 | - | 条件字段匹配值ID | | ||
| **  ∟ resultRule** | Object | 结果字段信息 | 必填 | - | 结果字段信息 | | ||
| **    ∟ resultConfigId** | String | 结果字段配置ID | 必填 | - | 结果字段配置ID | | ||
| **    ∟ rule** | Object | 特有条件配置信息 | 非必填 | - | 特有条件配置信息 | | ||
| **      ∟ fieldConfigId** | String | 特有条件配置ID | 必填 | - | 特有条件配置ID | | ||
| **      ∟ ids** | Array | 特有条件字段匹配值 | 必填 | - | 特有条件字段匹配值 | | ||
| **        ∟ id** | String | 特有条件匹配值ID | 必填 | - | 特有条件匹配值ID | | ||
| **    ∟ staffRange** | Object | 审批人配置信息 | 非必填 | - | 审批人配置信息 | | ||
| **      ∟ staffIds** | String | 审批人信息 | 必填 | - | 审批人信息 | | ||
| **        ∟ id** | String | 审批人ID | 必填 | - | 审批人ID,通过 [查询员工](/docs/open-api/corporation/get-staff-ids) 获取 | | ||
| **  ∟ priority** | Number | 优先级 | 非必填 | 1 | 优先级不可重复,传入已存在优先级时,系统会重新排序 | | ||
|
||
## CURL | ||
```json | ||
curl --location 'https://app.ekuaibao.com/api/openapi/v2/matrix/updateRule/$ID01wh4O1Yl1Cv?accessToken=ID01wiQRnmMuUn%3APCx3rwm3aA00qM' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '[ | ||
{ //更新矩阵明细 | ||
"id": "ID01wh7Wjx8IZV", //矩阵明细ID | ||
"rule": [ //条件字段信息 | ||
{ | ||
"fieldConfigId": "ID01wh7WjsCS51", //条件字段配置ID | ||
"ids": [ | ||
{ | ||
"id": "3" //条件字段匹配值ID | ||
} | ||
] | ||
}, | ||
{ | ||
"fieldConfigId": "ID01wh7WjsCSlx", | ||
"ids": [ | ||
{ | ||
"id": "101" | ||
} | ||
] | ||
}, | ||
{ | ||
"fieldConfigId": "ID01wh7WjsCSC3", | ||
"ids": [ | ||
{ | ||
"id": "PCx3rwm3aA00qM:office" | ||
} | ||
] | ||
}, | ||
{ | ||
"fieldConfigId": "ID01wh7Wjx8T7x", | ||
"ids": [ | ||
{ | ||
"id": "ID_3JHINML06sf" | ||
} | ||
] | ||
} | ||
], | ||
"resultRule": [ //结果字段信息 | ||
{ | ||
"resultConfigId": "ID01wh7WjsCSSz", //结果字段配置ID | ||
"rule": [ //特有条件配置信息 | ||
{ | ||
"fieldConfigId": "ID01wiTo7NjUM7", //特有条件配置ID | ||
"ids": [ | ||
{ | ||
"id": "5" //特有条件匹配值ID | ||
} | ||
] | ||
} | ||
], | ||
"staffRange": { | ||
"staffIds": [ | ||
{ | ||
"id": "PCx3rwm3aA00qM:VWf3rvZHCb0ghM" | ||
} | ||
], | ||
"roleIds": [], | ||
"departmentIds": [] | ||
} | ||
}, | ||
{ | ||
"resultConfigId": "ID01wiTo7NjV2D", | ||
"rule": [], | ||
"staffRange": { | ||
"staffIds": [ | ||
{ | ||
"id": "PCx3rwm3aA00qM:jBB3t$VjpK0fbw" | ||
} | ||
], | ||
"roleIds": [], | ||
"departmentIds": [] | ||
} | ||
} | ||
], | ||
"priority": 2 | ||
}, | ||
{ //新增矩阵明细 | ||
"rule": [ | ||
{ | ||
"fieldConfigId": "ID01wh7WjsCS51", | ||
"ids": [ | ||
{ | ||
"id": "4" | ||
} | ||
] | ||
}, | ||
{ | ||
"fieldConfigId": "ID01wh7WjsCSlx", | ||
"ids": [ | ||
{ | ||
"id": "102" | ||
} | ||
] | ||
}, | ||
{ | ||
"fieldConfigId": "ID01wh7WjsCSC3", | ||
"ids": [ | ||
{ | ||
"id": "PCx3rwm3aA00qM:office" | ||
} | ||
] | ||
}, | ||
{ | ||
"fieldConfigId": "ID01wh7Wjx8T7x", | ||
"ids": [ | ||
{ | ||
"id": "ID_3JHINML06sf" | ||
} | ||
] | ||
} | ||
], | ||
"resultRule": [ | ||
{ | ||
"resultConfigId": "ID01wh7WjsCSSz", | ||
"rule": [ | ||
{ | ||
"fieldConfigId": "ID01wiTo7NjUM7", | ||
"ids": [ | ||
{ | ||
"id": "5" | ||
} | ||
] | ||
} | ||
], | ||
"staffRange": { | ||
"staffIds": [ | ||
{ | ||
"id": "PCx3rwm3aA00qM:VWf3rvZHCb0ghM" | ||
} | ||
], | ||
"roleIds": [], | ||
"departmentIds": [] | ||
} | ||
}, | ||
{ | ||
"resultConfigId": "ID01wiTo7NjV2D", | ||
"rule": [], | ||
"staffRange": { | ||
"staffIds": [ | ||
{ | ||
"id": "PCx3rwm3aA00qM:jBB3t$VjpK0fbw" | ||
} | ||
], | ||
"roleIds": [], | ||
"departmentIds": [] | ||
} | ||
} | ||
], | ||
"priority": 3 | ||
} | ||
]' | ||
``` | ||
|
||
## 成功响应 | ||
```json | ||
{ | ||
"value": true | ||
} | ||
``` | ||
|
||
## 失败响应 | ||
| HTTP状态码 | 错误码 | 描述 | 排查建议 | | ||
|:--------| :--- |:---|:-----| | ||
| **400** | - | 未找到规则信息,请检查规则Id是否拼写正确 | 请检查矩阵明细Id是否正确 | | ||
| **412** | - | JSON请求参数不正确 | 请检查传参格式层级是否正确 | |
Oops, something went wrong.