GET 工位列表
参数位置:query:keyword、workshopId、enabled。 GET 查询。query 参数:keyword(编码、名称、车间名、设备名模糊匹配)、workshopId(车间 ID)、enabled(1 启用 0 停用;不传为全部)。返回工位及产能构成、负责班组、操作工等现算字段,按编码自然排序,不分页。
| 接口编码 | 所需范围 | 后端接口 |
|---|---|---|
production.workstation.list | production:read | GET /v1/production-workstation/list(comap-srm) |
员工权限:本接口按权限码 production:onboarding:list,production:operations:list,production:routings:list,production:tasks:list,production:terminals:list,production:work-orders:list,production:workstations:list 对照绑定员工的主站功能权限。
请求参数(query)
本接口的 query 参数由后端查询对象整体展开,接口规格未保留各字段的原始 类型,故类型列统一显示为
string。实际取值语义见「说明」列,按自然类型 传即可(如"pageNum": 1),服务端会完成转换。
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
keyword | string | — | 编码、名称、车间名、设备名模糊匹配(不分大小写) |
workshopId | string | — | 车间 |
enabled | string | — | 启用:1 启用 0 停用;不传为全部 |
「必填」仅反映接口规格声明的部分。服务内还有未体现在规格里的校验, 标「—」不等于可以不传;租户在主站配置的字段必填不约束本接口。 详见必填字段的判定与字段清单与自定义字段。
请求示例
curl -X POST https://open.risemap.cn/v1/api/invoke \
-H "Authorization: Bearer <访问令牌>" \
-H "Content-Type: application/json" \
-d '{
"apiCode": "production.workstation.list",
"query": {}
}'
响应 data 字段
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | integer(int64) | — | 工位 ID |
code | string | — | 工位编码 |
name | string | — | 工位名称 |
workshopId | integer(int64) | — | 所属车间 |
workshopCode | string | — | 车间编码 |
workshopName | string | — | 车间名称 |
workshopEnabled | integer(int32) | — | 所属车间启用:车间停用时工位视同停用 |
equipmentId | integer(int64) | — | 已废弃,恒为空(设备反挂工位) |
equipmentName | string | — | 挂在本工位的设备名称,用「、」连接 |
equipmentCount | integer(int32) | — | 挂在本工位的设备台数(含不计产能、停机的) |
operationIds | integer(int64)[] | — | 能做的工序 |
teamId | integer(int64) | — | 负责班组 |
teamName | string | — | 负责班组名称 |
teamEnabled | integer(int32) | — | 负责班组启用:停用的班组不带人、不算产能 |
teamMemberIds | integer(int64)[] | — | 负责班组的全部组员 |
operatorIds | integer(int64)[] | — | 默认操作工(有序,第一个是派工默认带出的人) |
operatorNames | string[] | — | 默认操作工姓名,与 operatorIds 一一对应 |
resignedOperatorIds | integer(int64)[] | — | 默认操作工里已离职或已从人事删除的人(页面标出来,提示交接) |
dailyCapacityMinutes | integer(int32) | — | 典型日产能(分钟),= capacity.dailyCapacityMinutes |
efficiency | integer(int32) | — | 人工效率 % |
headcount | integer(int32) | — | 定员(P08);空 = 按默认操作工推算 |
capacity9 | MesWorkstationCapacityVO | — | 工位产能构成 |
dispatchedLoadMinutes | integer(int32) | — | 已派到本工位、还没做完的工时(分钟,第 4 批起有数) |
enabled | integer(int32) | — | 启用:1 启用 0 停用 |
remark | string | — | 备注 |
activeTaskCount | integer(int32) | — | 在制工序数(第 4 批起有数) |
routingRefCount | integer(int32) | — | 被几条生效的工艺路线指定(只在车间建模,2C 起有数) |
createdAt | string(date-time) | — | 创建时间 |
updatedAt | string(date-time) | — | 更新时间 |
错误处理
响应统一信封 { code, message, data },code == 200 为成功。以下是本接口可能返回的开放平台层错误:
| 错误码 | 说明 | 可重试 |
|---|---|---|
| 92101 | 访问凭证无效 | 否 |
| 92201 | 接口未登记或已停用 | 否 |
| 92202 | 超出凭证授权范围——本接口需 production:read | 否 |
| 92204 | 绑定员工无此接口的功能权限 | 否 |
| 92203 | 上游服务调用失败 | 是 |
| 92301 | 请求过于频繁 | 是 |
除此之外,comap-srm 自身的业务校验失败会原样透传其业务码与提示
(如字段校验、状态不允许、数据不存在),这类码不在开放平台的号段内,
以响应里的 message 为准。完整的平台层错误码见错误码说明。
← 返回workstation