跳到主要内容

GET 生产设备详情

参数位置:query:id。 GET 查询,query 参数:id(必填,设备 ID)。返回档案、关联资产、所在工位、生产异常、未来 14 天产能和操作日志。

接口编码所需范围后端接口
production.equipment.detailproduction:readGET /v1/production-equipment/detail(comap-srm)

员工权限:本接口按权限码 production:equipment:list 对照绑定员工的主站功能权限。

请求参数(query)

字段类型必填说明
idinteger(int64)是—

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

请求示例

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

响应 data 字段

字段类型必填说明
idinteger(int64)—设备 ID
codestring—设备编号
namestring—设备名称
modelstring—型号
workshopIdinteger(int64)—所属车间
workshopNamestring—车间名称
workstationIdinteger(int64)—所在工位;空 = 车间公用
workstationNamestring—工位名称
statusinteger(int32)—状态:1 可用 2 维保中 3 故障停机 4 已停用
statusNamestring—状态名称;已报废显示「已报废」
lifecycleNamestring—在用 / 已停用 / 已报废
hoursPerShiftnumber—每班可用工时(小时)
shiftsPerDayinteger(int32)—每天班次
efficiencynumber—综合效率 %
dailyCapacityMinutesinteger(int32)—典型日产能(分钟,按标准工作日现算)
continuousRunboolean—连续运行
expectedRecoveryDatestring(date)—停机预计恢复日(yyyy-MM-dd)
operationCodesstring[]—适用工序编码;空 = 通用
remarkstring—备注
capacityEnabledboolean—计入产能
scrappedAtstring(date)—报废日期(yyyy-MM-dd)
scrapReasonstring—报废原因
assetIdinteger(int64)—关联固定资产卡片
assetCodestring—资产编号
assetNamestring—资产名称
openExceptionCountinteger(int32)—未关闭的生产异常数
exceptionRefCountinteger(int32)—关联的生产异常数(含已关闭,只在车间建模)
removalBlockerstring—删除拦截理由;为空 = 可以删
createdAtstring(date-time)—创建时间
updatedAtstring(date-time)—更新时间
versioninteger(int32)—[L29] 版本号:编辑档案保存时原样带回,别处改过就报 77730 让刷新(定-7)
exceptions12MesEquipmentExceptionBriefVO[]—指向这台设备的全部生产异常,按上报时间倒序
workstation4WorkstationBrief—设备所在工位
asset6AssetBrief—关联的固定资产
capacityForecast5CapacityDay[]—从今天起 14 天的产能
logs7MesOperationLogLineVO[]—操作日志,新的在前

错误处理​

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

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

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

← 返回设备维护