1. 根据单个自定义数据key获取自定义数据信息

1.1. 基本信息

Path

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

API描述

根据单个自定义数据key获取自定义数据信息

1.2. 请求参数

Request Headers

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

Path Param

参数名称 介绍 举例
buildingId 建筑id abc
customDataKey 自定义数据key abc

1.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "attribute": { // 自定义数据属性
            "A1": "A1",
            "A2": "A1",
            "编码": "A1",
            "名称": "A1"
        },
        "bosclass": "uoCustomDatas", // 自定义数据class
        "code": "A1", // 自定义数据编码
        "currentUserPermissions": "rwdc",
        "gcreatetime": "1574057894977", // 自定义数据创建时间
        "gtime": "1574057894977", // 自定义数据操作时间
        "guser": "users/a9eda0ae03064874b74268541e49c923", // 自定义数据操作者
        "key": "a25ba28a990d4bfc838a851e1ed095e7", // 自定义数据key
        "name": "A1" // 自定义数据名称
    }
}

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": "uoCustomDataStructures",
      "alias": "d1",
      "subCondition": [
        {
          "field": "_key",
          "operator": "==",
          "value": "{key}", // 自定义数据树节点key
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "uoCustomDatas",
      "alias": "d2",
      "subCondition": [],
      "nestOr": []
    },
    {
      "bosclass": "uirCustomStructureData",
      "alias": "u1",
      "type": "relationship",
      "from": "d1",
      "to": "d2",
      "subCondition": []
    }
  ],
  "select": {
    "name": "d2.name",
    "key": "d2._key",
    "attribute": "d2.attribute",
    "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": "uoCustomDataStructures",
      "alias": "d1",
      "subCondition": [
        {
          "field": "_key",
          "operator": "==",
          "value": "{key}", // 自定义数据结构树节点key
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "uoCustomDatas",
      "alias": "d2",
      "subCondition": [],
      "nestOr": [
        {
          "field": "attribute.编码",
          "operator": "LIKE",
          "value": "{keyword}", // 搜索关键词
          "number": "false"
        },
        {
          "field": "attribute.名称",
          "operator": "LIKE",
          "value": "{keyword}", // 搜索关键词
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "uirCustomStructureData",
      "alias": "u1",
      "type": "relationship",
      "from": "d1",
      "to": "d2",
      "subCondition": []
    }
  ],
  "select": {
    "name": "d2.name",
    "key": "d2._key",
    "attribute": "d2.attribute",
    "code": "d2.code"
  }
}

3.3. 返回内容

执行成功

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

4. 模糊搜索建筑中自定义数据并返回所在自定义数据结构树

4.1. 基本信息

Path

POST http://building-bos.rickricks.com/buildingservice/{buildingId}/data/search?keyword={keyword}&type=custom&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": {
        "custom": {
            "data": [
                {
                    "id": "uoCustomDataStructures/l1b2427fccb8447f84a8e996a2f5f731_udr",
                    "key": "l1b2427fccb8447f84a8e996a2f5f731_udr",
                    "rev": "_ZiMmHfW---",
                    "name": "自定义数据",
                    "longCode": "UDR",
                    "longName": "自定义数据",
                    "level": 1,
                    "leaf": false,
                    "parentId": null,
                    "bosclass": "uoCustomDataStructures",
                    "gacl": null,
                    "guser": "users/a9eda0ae03064874b74268541e49c923",
                    "gtime": 1573093124630,
                    "code": "UDR",
                    "treeName": "自定义数据",
                    "description": "",
                    "order": 0,
                    "showCode": false,
                    "applyToChildNode": false,
                    "permissionGroup": [],
                    "children": [
                        {
                            "id": "uoCustomDataStructures/40ad0348f4cb404cb371944d727620d4",
                            "key": "40ad0348f4cb404cb371944d727620d4",
                            "rev": "_Zkc0S_a---",
                            "name": "f1",
                            "longCode": "UDR※40ad0348f4cb404cb371944d727620d4",
                            "longName": "自定义数据※f1",
                            "level": 2,
                            "leaf": false,
                            "parentId": "l1b2427fccb8447f84a8e996a2f5f731_udr",
                            "bosclass": "uoCustomDataStructures",
                            "gacl": null,
                            "guser": "users/a9eda0ae03064874b74268541e49c923",
                            "gtime": 1573698009074,
                            "code": "f1",
                            "treeName": null,
                            "description": null,
                            "order": 1,
                            "showCode": null,
                            "applyToChildNode": false,
                            "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": "uoCustomDataStructures",
      "alias": "d1",
      "subCondition": [
        {
          "field": "_key",
          "operator": "==",
          "value": "{key}", // 自定义数据结构树节点key
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "uoCustomDatas",
      "alias": "d2",
      "subCondition": [],
      "nestOr": [
        {
          "field": "attribute.编码",
          "operator": "LIKE",
          "value": "{keyword}", // 关键词
          "number": "false"
        },
        {
          "field": "attribute.名称",
          "operator": "LIKE",
          "value": "{keyword}", // 关键词
          "number": "false"
        }
      ]
    },
    {
      "bosclass": "uirCustomStructureData",
      "alias": "u1",
      "type": "relationship",
      "from": "d1",
      "to": "d2",
      "subCondition": []
    }
  ],
  "select": {
    "name": "d2.name",
    "key": "d2._key",
    "attribute": "d2.attribute",
    "code": "d2.code"
  }
}

5.3. 返回内容

执行成功

{
  "message": "请求处理成功",
  "code": "SUCCESS",
  "data": {
    "data": [
      {
        "code": "XX", // 自定义数据编码
        "name": "XX", // 自定义数据名称
        "attribute": { // 自定义数据属性
          "编码": "XX",
          "名称": "XX"
        },
        "key": "ae674016b10244359c39b94b2becb7ff" // 自定义数据key
      }
    ],
    "count": 1
  }
}
版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2020 all right reserved,powered by Gitbook该文件修订时间: 2021-09-23 15:25:50

results matching ""

    No results matching ""