1. 获取指定物项的关联文档

1.1. 基本信息

Path

POST http://building-bos.rickricks.com/bosfoundationservice/{buildingId}/prototype/linked/query?page=1&per_page=10

API描述

获取指定物项的关联文档

1.2. 请求参数

Request Headers

参数名称 介绍 举例
Authorization 用户令牌 abc
Content-Type 内容类型 application/json

Path Param

参数名称 介绍 举例
buildingId 建筑id abc

Query Param

参数名称 介绍 举例
page 页数 1
per_page 每页条数 10

Request Body

application/json

{
    "condition": [
        {
            "bosclass": "tags",
            "alias": "bld",
            "subCondition": [
                {
                    "field": "_key",
                    "operator": "==",
                    "value": "eec653df4446435f8d98273f4d2671e4", //物项key
                    "number": "false"
                }
            ]
        },
        {
            "bosclass": "documents",
            "alias": "doc",
            "subCondition": []
        },
        {
            "bosclass": "irTagDocument",
            "alias": "ubd",
            "type": "relationship",
            "from": "bld",
            "to": "doc",
            "subCondition": []
        }
    ],
    "select": {
        "name": "doc.name",
        "key": "doc._key",
        "code": "doc.code",
        "type": "ubd.type",
        "revision": "doc.revision"
    }
}

1.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "data": [
            {
                "code": "I3htrf9NvMMg79PvlyMl", // 文档编码
                "name": "data", // 文档名称
                "type": "厂家资料", // 物项与文档的关系名
                "key": "6685a738efda4b279f1968d52fe476d6", // 文档key
                "revision": "0" // 文档版本
            }
        ],
        "count": 1
    }
}

2. 获取指定物项的关联物项

2.1. 基本信息

Path

POST http://building-bos.rickricks.com/bosfoundationservice/{buildingId}/prototype/linked/query?page=1&per_page=10

API描述

获取指定物项的关联物项

2.2. 请求参数

Request Headers

参数名称 介绍 举例
Authorization 用户令牌 abc
Content-Type 内容类型 application/json

Path Param

参数名称 介绍 举例
buildingId 建筑id abc

Query Param

参数名称 介绍 举例
page 页数 1
per_page 每页条数 10

Request Body

application/json

{
    "condition": [
        {
            "bosclass": "tags",
            "alias": "bld",
            "subCondition": [
                {
                    "field": "_key",
                    "operator": "==",
                    "value": "eec653df4446435f8d98273f4d2671e4", //物项key
                    "number": "false"
                }
            ]
        },
        {
            "bosclass": "tags",
            "alias": "tags",
            "subCondition": []
        },
        {
            "bosclass": "uirTagTag",
            "alias": "ubt",
            "type": "relationship",
            "from": "bld",
            "to": "tags",
            "subCondition": []
        }
    ],
    "select": {
        "name": "tags.name",
        "key": "tags._key",
        "attribute": "tags.basicAttribute",
        "code": "tags.code",
        "type": "ubt.type"
    }
}

2.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "data": [
            {
                "code": "BB", // 关联物项编码
                "name": "BB", // 关联物项名称
                "attribute": { // 关联物项属性
                    "编码": "BB",
                    "名称": "BB"
                },
                "type": "下游设备", // 物项与关联物项的关系名
                "key": "61affbe4aa094aedbb2bdc68f624636c" // 关联物项key
            },
            {
                "code": "XX",
                "name": "XX",
                "attribute": {
                    "编码": "XX",
                    "名称": "XX"
                },
                "type": "下游设备",
                "key": "ae674016b10244359c39b94b2becb7ff"
            }
        ],
        "count": 2
    }
}

3. 获取指定物项关联的自定义数据所属树节点

3.1. 基本信息

Path

POST http://building-bos.rickricks.com/bosfoundationservice/{buildingId}/prototype/linked/query

API描述

获取指定物项关联的自定义数据所属树节点

3.2. 请求参数

Request Headers

参数名称 介绍 举例
Authorization 用户令牌 abc
Content-Type 内容类型 application/json

Path Param

参数名称 介绍 举例
buildingId 建筑id abc

Request Body

application/json

{
    "condition": [
        {
            "bosclass": "tags",
            "alias": "tags",
            "subCondition": [
                {
                    "field": "_key",
                    "operator": "==",
                    "value": "{tagKey}", // 物项key
                    "number": "false"
                }
            ]
        },
        {
            "bosclass": "uoCustomDatas",
            "alias": "ucd",
            "subCondition": []
        },
        {
            "bosclass": "uirCustomDataTag",
            "alias": "uct",
            "type": "relationship",
            "from": "ucd",
            "to": "tags",
            "subCondition": []
        },
        {
            "bosclass": "uoCustomDataStructures",
            "alias": "ucds",
            "subCondition": []
        },
        {
            "bosclass": "uirCustomStructureData",
            "alias": "ucsd",
            "type": "relationship",
            "from": "ucds",
            "to": "ucd",
            "subCondition": []
        }
    ],
    "select": {
        "name": "ucds.longName",
        "key": "ucds._key"
    }
}

3.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "data": [
            {
                "name": "自定义数据※f1", // 自定义数据树节点路径
                "key": "40ad0348f4cb404cb371944d727620d4" // 自定义数据树节点key
            }
        ],
        "count": 1
    }
}

4. 获取指定物项的关联(指定自定义数据树节点的)自定义数据

4.1. 基本信息

Path

POST http://building-bos.rickricks.com/bosfoundationservice/{buildingId}/prototype/linked/query?page=1&per_page=10

API描述

获取指定物项的关联(指定自定义数据树节点的)自定义数据

4.2. 请求参数

Request Headers

参数名称 介绍 举例
Authorization 用户令牌 abc
Content-Type 内容类型 application/json

Path Param

参数名称 介绍 举例
buildingId 建筑id abc

Query Param

参数名称 介绍 举例
page 页数 1
per_page 每页条数 10

Request Body

application/json

{
    "condition": [
        {
            "bosclass": "tags",
            "alias": "tags",
            "subCondition": [
                {
                    "field": "_key",
                    "operator": "==",
                    "value": "{tagKey}", // 物项key
                    "number": "false"
                }
            ]
        },
        {
            "bosclass": "uoCustomDatas",
            "alias": "ucd",
            "subCondition": []
        },
        {
            "bosclass": "uirCustomDataTag",
            "alias": "uct",
            "type": "relationship",
            "from": "ucd",
            "to": "tags",
            "subCondition": []
        },
        {
            "bosclass": "uoCustomDataStructures",
            "alias": "ucds",
            "subCondition": [
                {
                    "field": "_key",
                    "operator": "==",
                    "value": "{cdskey}", // 自定义数据树节点
                    "number": "false"
                }
            ]
        },
        {
            "bosclass": "uirCustomStructureData",
            "alias": "ucsd",
            "type": "relationship",
            "from": "ucds",
            "to": "ucd",
            "subCondition": []
        }
    ],
    "select": {
        "name": "ucd.name",
        "key": "ucd._key",
        "attribute": "ucd.attribute",
        "code": "ucd.code",
        "type": "uct.type"
    }
}

4.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "data": [
            {
                "code": "A1", // 自定义数据编码
                "name": "A1", // 自定义数据名称
                "attribute": { // 自定义数据 自定义扩展属性
                    "A1": "A1",
                    "A2": "A1",
                    "编码": "A1",
                    "名称": "A1"
                },
                "type": "CC", // 物项与自定义数据的关系名
                "key": "a25ba28a990d4bfc838a851e1ed095e7" // 自定义数据key
            }
        ],
        "count": 1
    }
}

5. 获取指定物项绑定的模型构件

5.1. 基本信息

Path

GET http://building-bos.rickricks.com/buildingservice/{buildingId}/tagModelRel?tagKey={tagKey}

API描述

获取指定物项绑定的模型构件

5.2. 请求参数

Request Headers

参数名称 介绍 举例
Authorization 用户令牌 abc
Content-Type 内容类型 application/json

Path Param

参数名称 介绍 举例
buildingId 建筑id abc
tagKey 物项key a332f0fab6bf4fdb93746d8d40c8c464

5.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "id": "tagModelRels/5f76645ad1154f0c8be160c9a5032b24",
        "key": "5f76645ad1154f0c8be160c9a5032b24",
        "rev": "_a1QAMdq---",
        "componentKey": "M1590485261484_121805057578698",
        "modelDB": "za2da2253c924e7ea282dfc86b2d89bd",
        "modelKey": "M1590485261484",
        "properties": null,
        "tagKey": "a332f0fab6bf4fdb93746d8d40c8c464"
    }
}
版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2020 all right reserved,powered by Gitbook该文件修订时间: 2021-09-23 15:25:50

results matching ""

    No results matching ""