工厂建模,获取工厂模型树形结构

路径 /industry/modelling/factory/tree/query
版本号 1.0.2
协议 HTTPS
请求方法 POST
是否需要用户身份鉴权
超时时间 10000

请求参数

名称 类型 是否必选 示例值 描述
id Long 指定工厂id
search String 搜索内容,可按id或者名称搜索
pageid Int 目标页码
pageSize Int 每页行数
code String 指定工厂编码
appId String 应用id
employeeId String 用户id,需要做用户级别鉴权时需要传入此参数
corpId String 企业标识,每个企业拥有唯一的CorpID,比如钉钉corpID、LH里面的appId,用参数source来区分参数含义
userId String 员工在当前企业内的唯一标识,比如钉钉userId或者IoT的employeeId
source String 参数来源,枚举值,钉钉填写DINGDING,多租户saas应用填SAAS,source、corpId、userId配合使用

返回数据

名称 类型 示例值 描述
code Int

响应码, 200: 成功

message String

错误消息

localizedMsg String

本地语言错误消息

data String

响应结果,工厂模型Json结构如下:{"factories":{"name":"新建工厂10","id":8818,"code":"","workShops":[{"name":"车间001","id":8818,"code":"","beltlines":[{"name":"产线001","id":8818,"code":"","machiningCenters":[{"name":"加工中心001","id":8818,"code":"","equipments":[{"name":"设备001","id":22,"code":"",}}]}]}]}],"page":{"total":1,"size":15,"to":1}}

示例

请求示例

{
	"id": "1509086454180",
	"version": "1.0",
	"request":{
		"apiVer": "1.0.2"
	},
	"params":{
		"id": "value0",
		"search": "value1",
		"pageid": "value2",
		"pageSize": "value3",
		"code": "value4",
		"appId": "value5",
		"employeeId": "value6",
		"corpId": "value7",
		"userId": "value8",
		"source": "value9"
	}
}

正常返回示例

JSON 格式

{
    "id": "4de2c367-c1db-417c-aa15-8c585e595d92",
    "code": 200,
    "message": null,
    "localizedMsg": null,
    "data": "{\"factories\":[{\"name\":\"新建工厂10\",\"id\":8818,\"code\":\"\",\"workShops\":[{\"name\":\"车间001\",\"id\":8818,\"code\":\"\",\"beltlines\":[{\"name\":\"产线001\",\"id\":8818,\"code\":\"\",\"machiningCenters\":[{\"name\":\"加工中心001\",\"id\":8818,\"code\":\"\",\"equipments\":[{\"name\":\"设备001\",\"id\":22,\"code\":\"\",}]}]}]}]}],\"page\":{\"total\":1,\"size\":15,\"to\":1}}"
}

异常返回示例

JSON 格式

{
    "id": "37f7e5fa-d6a5-4efe-8abf-5bf23dca6284",
    "code": 403,
    "message": "request forbidden.",
    "localizedMsg": "请求被禁止",
    "data": null
}

错误码

HttpCode 错误码 错误信息 描述
500 500 Internal Error Internal Error
503 503 Service Unavailable Service Unavailable
403 403 Request Limited Request Limited
401 401 Empty Signature Empty Signature
400 400 Request Format Error Request Format Error
200 20003 Find Backend Error Find Backend Error
200 20004 Backend Service Error Backend Service Error
200 20055 Backend Service Invalid Request Format Error
200 20056 Hsf Invoke Timeout Hsf Invoke Timeout
200 401 Request Authorized Error Request Authorized Error
200 403 Request Forbidden Request Forbidden
200 500 Server Error Server Error