跳到主要内容

GET 工序字典列表

参数位置:query:keyword、enabled、type。 GET 查询。query 参数:keyword(可选)、enabled(可选,1 启用 0 停用)、type(可选,1 加工 2 装配 3 检验 4 包装 5 委外)。返回全量,按编码自然排序。

接口编码所需范围后端接口
production.operation.listproduction:readGET /v1/production-operation/list(comap-srm)

员工权限:本接口按权限码 base:bom:list,business:production:page:production-config:list,production:cost-config:list,production:inspection-plans:list,production:onboarding:list,production:operations:list,production:routings:list,production:tasks:list,production:work-orders:list,production:workshops:list,production:workstations:list 对照绑定员工的主站功能权限。

请求参数(query)

本接口的 query 参数由后端查询对象整体展开,接口规格未保留各字段的原始 类型,故类型列统一显示为 string。实际取值语义见「说明」列,按自然类型 传即可(如 "pageNum": 1),服务端会完成转换。

字段类型必填说明
keywordstring—编码、名称、默认车间名、说明模糊匹配(不分大小写)
enabledstring—启用:1 启用 0 停用;不传为全部
typestring—工序类型 1~5;不传为全部

「必填」仅反映接口规格声明的部分。服务内还有未体现在规格里的校验, 标「—」不等于可以不传;租户在主站配置的字段必填不约束本接口。 详见必填字段的判定与字段清单与自定义字段。

请求示例

curl -X POST https://open.risemap.cn/v1/api/invoke \
-H "Authorization: Bearer <访问令牌>" \
-H "Content-Type: application/json" \
-d '{
"apiCode": "production.operation.list",
"query": {}
}'

响应 data 字段

字段类型必填说明
idinteger(int64)—ID
codestring—工序编码
namestring—工序名称
typeinteger(int32)—类型:1 加工 2 装配 3 检验 4 包装 5 委外
typeNamestring—类型名称
defaultWorkshopIdinteger(int64)—默认车间
defaultWorkshopNamestring—默认车间名称
standardMinutesnumber—标准工时(分钟 / 件);空 = 未定
setupMinutesnumber—准备时间(分钟)
pieceRatenumber—默认计件单价(元 / 件)
outsourcingDaysinteger(int32)—委外周期(天)
defaultSupplierIdinteger(int64)—默认委外供应商
defaultSupplierNamestring—默认委外供应商名称
defaultSupplierSubcontractboolean—默认委外供应商启用了委外没有(委外供应商页「委外业务」开着);没选、供应商已删除时为空。false 时页面标「未启用委外」,保存不拦(MES 优化内容 3 O3-03)
defectReasonIdsinteger(int64)[]—不良品项;空 = 全部不良原因都能选
defectReasonNamesstring[]—不良品项名称;停用的带「(已停用)」
inspectionTypesinteger(int32)[]—检验方法:1 首检 2 巡检 3 工序检
inspectionPlanIdinteger(int64)—检验方案
inspectionPlanNamestring—检验方案名称(第 5 批起有)
firstArticleQtyinteger(int32)—首件数
patrolEveryQtyinteger(int32)—巡检间隔(件)
patrolEveryMinutesinteger(int32)—巡检间隔(分钟):空 = 跟随生产配置,0 = 不按时间巡
transferGateinteger(int32)—检验卡转序(C34):0 跟随生产配置 1 卡 2 不卡
firstArticleGateinteger(int32)—首检限报(C34):0 跟随生产配置 1 卡 2 不卡
releasePointinteger(int32)—放行点(需上道放行,C20、A20):0 跟随生产配置 1 是 2 否
sopFiles11MesSopFileVO[]—默认作业指导
clockRequiredboolean—计时工序(原「报工前要打卡」):开工先开始计时,终端报工按计时算
reportRequiredboolean—加进路线时默认必需
inspectionPointinteger(int32)—旧检验点(由检验方法换算):0 无 1 首检 2 完工检
restrictStationsboolean—限定工位(P10)
systemboolean—系统工序「整单生产」:不能删除
enabledinteger(int32)—启用:1 启用 0 停用
remarkstring—说明
routingRefCountinteger(int32)—引用它的路线版本数(任何状态)
createdAtstring(date-time)—创建时间
updatedAtstring(date-time)—更新时间
workstationIdsinteger(int64)[]—勾了它的工位(含停用;委外类型恒为空)
workstationNamesstring[]—勾了它的工位名称
versioninteger(int32)—[L29] 版本号:编辑保存时原样带回,打开以后被别处改过(含车间建模改了它的可做工位)就报 77821 让刷新(定-7)

错误处理​

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

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

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

← 返回operation