跳到主要内容

GET 工位列表

参数位置:query:keyword、workshopId、enabled。 GET 查询。query 参数:keyword(编码、名称、车间名、设备名模糊匹配)、workshopId(车间 ID)、enabled(1 启用 0 停用;不传为全部)。返回工位及产能构成、负责班组、操作工等现算字段,按编码自然排序,不分页。

接口编码所需范围后端接口
production.workstation.listproduction:readGET /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),服务端会完成转换。

字段类型必填说明
keywordstring—编码、名称、车间名、设备名模糊匹配(不分大小写)
workshopIdstring—车间
enabledstring—启用: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 字段

字段类型必填说明
idinteger(int64)—工位 ID
codestring—工位编码
namestring—工位名称
workshopIdinteger(int64)—所属车间
workshopCodestring—车间编码
workshopNamestring—车间名称
workshopEnabledinteger(int32)—所属车间启用:车间停用时工位视同停用
equipmentIdinteger(int64)—已废弃,恒为空(设备反挂工位)
equipmentNamestring—挂在本工位的设备名称,用「、」连接
equipmentCountinteger(int32)—挂在本工位的设备台数(含不计产能、停机的)
operationIdsinteger(int64)[]—能做的工序
teamIdinteger(int64)—负责班组
teamNamestring—负责班组名称
teamEnabledinteger(int32)—负责班组启用:停用的班组不带人、不算产能
teamMemberIdsinteger(int64)[]—负责班组的全部组员
operatorIdsinteger(int64)[]—默认操作工(有序,第一个是派工默认带出的人)
operatorNamesstring[]—默认操作工姓名,与 operatorIds 一一对应
resignedOperatorIdsinteger(int64)[]—默认操作工里已离职或已从人事删除的人(页面标出来,提示交接)
dailyCapacityMinutesinteger(int32)—典型日产能(分钟),= capacity.dailyCapacityMinutes
efficiencyinteger(int32)—人工效率 %
headcountinteger(int32)—定员(P08);空 = 按默认操作工推算
capacity9MesWorkstationCapacityVO—工位产能构成
dispatchedLoadMinutesinteger(int32)—已派到本工位、还没做完的工时(分钟,第 4 批起有数)
enabledinteger(int32)—启用:1 启用 0 停用
remarkstring—备注
activeTaskCountinteger(int32)—在制工序数(第 4 批起有数)
routingRefCountinteger(int32)—被几条生效的工艺路线指定(只在车间建模,2C 起有数)
createdAtstring(date-time)—创建时间
updatedAtstring(date-time)—更新时间

错误处理​

响应统一信封 { code, message, data },code == 200 为成功。以下是本接口可能返回的开放平台层错误:

错误码说明可重试
92101访问凭证无效否
92201接口未登记或已停用否
92202超出凭证授权范围——本接口需 production:read否
92204绑定员工无此接口的功能权限否
92203上游服务调用失败是
92301请求过于频繁是

除此之外,comap-srm 自身的业务校验失败会原样透传其业务码与提示 (如字段校验、状态不允许、数据不存在),这类码不在开放平台的号段内, 以响应里的 message 为准。完整的平台层错误码见错误码说明。

← 返回workstation