1. 根据单个物项key获取物项信息

1.1. 基本信息

Path

GET http://building-bos.rickricks.com/bosfoundationservice/{buildingId}/prototype/entity/tags/{tagKey}?noRelation=true

API描述

根据单个物项key获取物项信息

1.2. 请求参数

Request Headers

参数名称 介绍 举例
Authorization 用户令牌 abc

Path Param

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

1.3. 返回内容

执行成功

{
  "message": "请求处理成功",
  "code": "SUCCESS",
  "data": {
    "basicAttribute": { // 物项属性数据
      "编码": "BB",
      "名称": "BB"
    },
    "bosclass": "tags", // 物项class
    "code": "BB", // 物项编码
    "currentUserPermissions": "rwdc",
    "gcomponents": [],
    "gcreatetime": "1573125697135",
    "gtime": "1573178778355",
    "guser": "users/a9eda0ae03064874b74268541e49c923",
    "key": "61affbe4aa094aedbb2bdc68f624636c", // 物项key
    "name": "BB" // 物项名称
  }
}

2. 获取指定物项分类下物项列表

2.1. 基本信息

Path

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

API描述

获取指定物项分类下物项列表

2.2. 请求参数

Request Headers

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

Path Param

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

Request Body

application/json

{
  "condition": [
    {
      "bosclass": "uoBldStructures",
      "alias": "d1",
      "subCondition": [
        {
          "field": "_key",
          "operator": "==",
          "value": "{key}", // 物项分类树节点key
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "tags",
      "alias": "d2",
      "subCondition": [],
      "nestOr": []
    },
    {
      "bosclass": "uirBldStructureTag",
      "alias": "u1",
      "type": "relationship",
      "from": "d1",
      "to": "d2",
      "subCondition": []
    }
  ],
  "select": {
    "name": "d2.name",
    "key": "d2._key",
    "attribute": "d2.basicAttribute",
    "code": "d2.code"
  }
}

2.3. 返回内容

执行成功

{
  "message": "请求处理成功",
  "code": "SUCCESS",
  "data": {
    "data": [
      {
        "code": "XX", // 物项编码
        "name": "XX", // 物项名称
        "attribute": { // 物项属性
          "编码": "XX",
          "名称": "XX"
        },
        "key": "ae674016b10244359c39b94b2becb7ff" // 物项key
      }
    ],
    "count": 1
  }
}

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": "uoBldStructures",
      "alias": "d1",
      "subCondition": [
        {
          "field": "_key",
          "operator": "==",
          "value": "{key}", // 物项分类树节点key
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "tags",
      "alias": "d2",
      "subCondition": [],
      "nestOr": [
        {
          "field": "basicAttribute.编码",
          "operator": "LIKE",
          "value": "{keyword}", // 搜索关键词
          "number": "false"
        },
        {
          "field": "basicAttribute.名称",
          "operator": "LIKE",
          "value": "{keyword}", // 搜索关键词
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "uirBldStructureTag",
      "alias": "u1",
      "type": "relationship",
      "from": "d1",
      "to": "d2",
      "subCondition": []
    }
  ],
  "select": {
    "name": "d2.name",
    "key": "d2._key",
    "attribute": "d2.basicAttribute",
    "code": "d2.code"
  }
}

3.3. 返回内容

执行成功

{
  "message": "请求处理成功",
  "code": "SUCCESS",
  "data": {
    "data": [
      {
        "code": "XX",
        "name": "XX",
        "attribute": {
          "编码": "XX",
          "名称": "XX"
        },
        "key": "ae674016b10244359c39b94b2becb7ff"
      }
    ],
    "count": 1
  }
}

4. 模糊搜索建筑中物项并返回所在物项分类树

4.1. 基本信息

Path

POST http://building-bos.rickricks.com/buildingservice/{buildingId}/data/search?keyword={keyword}&type=tag&page=1&per_page=10

API描述

模糊搜索建筑中物项并返回所在物项分类树

4.2. 请求参数

Request Headers

参数名称 介绍 举例
Authorization 用户令牌 abc

Path Param

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

Query Param

参数名称 介绍 举例
keyword 关键词 abc
page 页数 1
per_page 每页条数 10

4.3. 返回内容

执行成功

{
  "message": "请求处理成功",
  "code": "SUCCESS",
  "data": {
    "tag": {
      "data": [
        {
          "id": "uoBldStructures/l1b2427fccb8447f84a8e996a2f5f731_itr",
          "key": "l1b2427fccb8447f84a8e996a2f5f731_itr",
          "rev": "_ZimhZ2u---",
          "name": "物项分类",
          "longCode": "ITR",
          "longName": "物项分类",
          "level": 1,
          "leaf": false,
          "parentId": null,
          "bosclass": "uoBldStructures",
          "gacl": null,
          "guser": "users/a9eda0ae03064874b74268541e49c923",
          "gtime": 1573201866731,
          "code": "ITR",
          "description": null,
          "order": 0,
          "type": "item",
          "showCode": false,
          "applyToChildNode": true,
          "sameNodeAttribute": true,
          "permissionGroup": [],
          "children": [
            {
              "id": "uoBldStructures/d5c0d3b417244bc1b15e2fcf4e1baf07",
              "key": "d5c0d3b417244bc1b15e2fcf4e1baf07",
              "rev": "_ZimhC9e---",
              "name": "分类1",
              "longCode": "ITR※d5c0d3b417244bc1b15e2fcf4e1baf07",
              "longName": "物项分类※分类1",
              "level": 2,
              "leaf": true,
              "parentId": "uoBldStructures/l1b2427fccb8447f84a8e996a2f5f731_itr",
              "bosclass": "uoBldStructures",
              "gacl": null,
              "guser": "users/a9eda0ae03064874b74268541e49c923",
              "gtime": 1573201844179,
              "code": "分类1",
              "description": "",
              "order": 1,
              "type": "item",
              "showCode": false,
              "applyToChildNode": true,
              "sameNodeAttribute": true,
              "permissionGroup": [],
              "children": []
            }
          ]
        }
      ],
      "count": 1
    }
  }
}

5. 搜索指定物项分类树节点下中物项数据

5.1. 基本信息

Path

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

API描述

搜索指定物项分类树节点下中物项数据

5.2. 请求参数

Request Headers

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

Path Param

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

Query Param

参数名称 介绍 举例
keyword 关键词 abc
page 页数 1
per_page 每页条数 10

Request Body

application/json

{
  "condition": [
    {
      "bosclass": "uoBldStructures",
      "alias": "d1",
      "subCondition": [
        {
          "field": "_key",
          "operator": "==",
          "value": "{key}", // 物项分类树节点key
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "tags",
      "alias": "d2",
      "subCondition": [],
      "nestOr": [
        {
          "field": "basicAttribute.编码",
          "operator": "LIKE",
          "value": "{keyword}", // 关键词
          "number": "false"
        },
        {
          "field": "basicAttribute.名称",
          "operator": "LIKE",
          "value": "{keyword}", // 关键词
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "uirBldStructureTag",
      "alias": "u1",
      "type": "relationship",
      "from": "d1",
      "to": "d2",
      "subCondition": []
    }
  ],
  "select": {
    "name": "d2.name",
    "key": "d2._key",
    "attribute": "d2.basicAttribute",
    "code": "d2.code",
    "componentKey": "d2.componentKey"
  }
}

5.3. 返回内容

执行成功

{
  "message": "请求处理成功",
  "code": "SUCCESS",
  "data": {
    "data": [
      {
        "code": "XX", // 物项编码
        "name": "XX", // 物项名称
        "attribute": { // 物项属性
          "编码": "XX",
          "名称": "XX"
        },
        "componentKey": null, // 物项对应的3d构件
        "key": "ae674016b10244359c39b94b2becb7ff" // 物项key
      }
    ],
    "count": 1
  }
}

6. 根据构件Key获取模型构件绑定的物项

6.1. 基本信息

Path

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

API描述

根据构件查物项属性

6.2. 请求参数

Request Headers

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

Path Param

参数名称 介绍 举例
buildingId 建筑id abc
componentKey 构件key M1590485261484_121805057578698

6.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 ""