GET 查询全部生产检验项目
参数位置:此接口无需 query 或 body 参数。 GET 查询,无参数。返回全部生产检验项目(含停用的):编码、名称、分类、判定方式(1 结果型 2 数值型 3 选项型 4 文本型)、检验要求、方法、数值上下限、选项、是否必检、缺陷等级(1 致命 2 严重 3 轻微)、启用状态、用到它的检验方案名称。配置项:生产检验项目。
| 接口编码 | 所需范围 | 后端接口 |
|---|---|---|
config.production.inspection-item.all | config:read | GET /v1/production-inspection-item/all(comap-srm) |
员工权限:本接口按权限码 production:inspection-items:list,production:inspection-plans:list 对照绑定员工的主站功能权限。
请求示例
curl -X POST https://open.risemap.cn/v1/api/invoke \
-H "Authorization: Bearer <访问令牌>" \
-H "Content-Type: application/json" \
-d '{
"apiCode": "config.production.inspection-item.all"
}'
响应 data 字段
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | integer(int64) | — | ID |
code | string | — | 编码 |
name | string | — | 名称 |
category | string | — | 分类 |
judgeType | integer(int32) | — | 判定方式:1 结果型 2 数值型 3 选项型 4 文本型 |
requirement | string | — | 检验要求 |
method | string | — | 检验方法、量具 |
unit | string | — | 单位 |
standardValue | number | — | 标准值 |
lowerLimit | number | — | 下限 |
upperLimit | number | — | 上限 |
decimalPlaces | integer(int32) | — | 小数位 |
options2 | MesQcOption[] | — | 选项 |
required | boolean | — | 必检 |
defectLevel | integer(int32) | — | 缺陷等级:1 致命 2 严重 3 轻微 |
enabled | integer(int32) | — | 启用:1 启用 0 停用 |
remark | string | — | 备注 |
updatedAt | string(date-time) | — | 更新时间 |
updatedBy | string | — | 最后修改人 |
planNames | string[] | — | 用到它的检验方案名称(现算) |
错误处理
响应统一信封 { code, message, data },code == 200 为成功。以下是本接口可能返回的开放平台层错误:
| 错误码 | 说明 | 可重试 |
|---|---|---|
| 92101 | 访问凭证无效 | 否 |
| 92201 | 接口未登记或已停用 | 否 |
| 92202 | 超出凭证授权范围——本接口需 config:read | 否 |
| 92204 | 绑定员工无此接口的功能权限 | 否 |
| 92203 | 上游服务调用失败 | 是 |
| 92301 | 请求过于频繁 | 是 |
除此之外,comap-srm 自身的业务校验失败会原样透传其业务码与提示
(如字段校验、状态不允许、数据不存在),这类码不在开放平台的号段内,
以响应里的 message 为准。完整的平台层错误码见错误码说明。
← 返回检验项目