GET 工序任务可报量
参数位置:query:taskIds。 GET 查询。query 参数:taskIds(工序任务 ID,逗号分隔,必填)。返回每道工序现在能报多少、卡在哪;只含有权限车间的工序。
| 接口编码 | 所需范围 | 后端接口 |
|---|---|---|
production.operation-task.reportable | production:read | GET /v1/production/work-order/task/reportable(comap-srm) |
员工权限:本接口按权限码 production:tasks:list 对照绑定员工的主站功能权限。
请求参数(query)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
taskIds | integer(int64)[] | 是 | — |
「必填」仅反映接口规格声明的部分。服务内还有未体现在规格里的校验, 标「—」不等于可以不传;租户在主站配置的字段必填不约束本接口。 详见必填字段的判定与字段清单与自定义字段。
请求示例
curl -X POST https://open.risemap.cn/v1/api/invoke \
-H "Authorization: Bearer <访问令牌>" \
-H "Content-Type: application/json" \
-d '{
"apiCode": "production.operation-task.reportable",
"query": {
"taskIds": [
"1961000000000000001"
]
}
}'
响应 data 字段
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
taskId | integer(int64) | — | 工序任务 ID |
workOrderId | integer(int64) | — | 工单 ID |
seq | integer(int32) | — | 工序号 |
operationName | string | — | 工序名称 |
statusCode | integer(int32) | — | 状态编码:0 待派工 1 待开工 2 进行中 3 已完工 4 已跳过 5 已暂停 |
outsourced | boolean | — | 委外工序(只能回厂记数) |
gated | boolean | — | 卡口工序(要等上道放行) |
inputQty | number | — | 投入 |
expectedInputQty | number | — | 预计转入 |
capBaseQty | number | — | 上限基数(卡口 = 投入,不卡 = 预计转入;委外工序放行点「否」时也不卡,不等上道) |
overReportRatio | number | — | 超报比例(0.05 = 5%) |
capQty | number | — | 上限 = 基数 ×(1 + 超报比例);委外工序的发出上限也按它(可发 = 上限 − 已发) |
reportedQty | number | — | 已报(含待审核) |
pendingReviewQty | number | — | 待审核数量 |
pendingReviewCount | integer(int32) | — | 待审核条数 |
reportableQty | number | — | 本次可报(不含超报) |
maxReportableQty | number | — | 最多可报(含超报) |
holdKind | string | — | 现在报的合格件会不会先待检:NONE 直接放行、FIRST_ARTICLE 待首检、PROCESS 待工序检 |
firstArticleRequired | boolean | — | 要做首检 |
firstArticleGateOn | boolean | — | 首检限报开着 |
firstArticleState | integer(int32) | — | 首检状态:0 未开始 1 待首检 2 已通过 |
firstArticleLimitQty | number | — | 首检放行上限(限报生效时) |
firstArticlePieceQty | integer(int32) | — | 首件数 |
firstArticleHint | string | — | 首检提示 |
previousDone | boolean | — | 上道已做完(或本道是首道) |
previousOperationName | string | — | 上道名称(首道为空) |
completesWhenFull | boolean | — | 报满就会完工(上道已做完、没有待检和返工中、没挂停线) |
blockedCode | integer(int32) | — | 不能报的错误码(能报为空) |
blockedReason | string | — | 不能报的原因 |
错误处理
响应统一信封 { code, message, data },code == 200 为成功。以下是本接口可能返回的开放平台层错误:
| 错误码 | 说明 | 可重试 |
|---|---|---|
| 92101 | 访问凭证无效 | 否 |
| 92201 | 接口未登记或已停用 | 否 |
| 92202 | 超出凭证授权范围——本接口需 production:read | 否 |
| 92204 | 绑定员工无此接口的功能权限 | 否 |
| 92203 | 上游服务调用失败 | 是 |
| 92301 | 请求过于频繁 | 是 |
除此之外,comap-srm 自身的业务校验失败会原样透传其业务码与提示
(如字段校验、状态不允许、数据不存在),这类码不在开放平台的号段内,
以响应里的 message 为准。完整的平台层错误码见错误码说明。
← 返回operation-task