1. 根据模型编码获取模型key

1.1. 基本信息

Path

POST http://building-bos.rickricks.com/bosfoundationservice/{buildingId}/prototype/query/uoModelDocument?noRelation=true

API描述

根据模型编码获取模型key(用于模型展示)

1.2. 请求参数

Request Headers

参数名称 介绍 举例
Authorization 用户令牌 abc
Content-Type media type application/json

Path Param

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

Request Body

application/json

参数名称 类型 必需 介绍
code String Y 模型编码
{
    "condition": [
        {
            "field": "bosclass",
            "operator": "==",
            "value": "uoModelDocument",
            "number": "false",
            "logic": "And"
        },
        {
            "field": "code",
            "operator": "==",
            "value": "{code}",
            "number": "false",
            "logic": "And"
        }
    ],
    "select": [
        "modelKey"
    ]
}

1.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "data": [
            {
                "currentUserPermissions": "rwdc",
                "key": "0d72d27c753e49a18e88167199652522",
                "modelKey": "M1561603580617" // 三维模型key
            }
        ],
        "count": 1
    }
}

2. 模糊搜索建筑内的模型

2.1. 基本信息

Path

POST http://building-bos.rickricks.com/buildingservice/{buildingId}/data/search

API描述

搜索建筑中模型编码、名称包含搜索关键字的模型并返回。

2.2. 请求参数

Request Headers

参数名称 介绍 举例
Authorization token abc

Path Param

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

Query Param

参数名称 必需 介绍 举例
type Y 搜索类型,值固定为“model” model
keyword Y 搜索关键字 abc
page Y 指定第几页,指定每页的记录数,值为正整数 1
per_page Y 指定每页的记录数,值为正整数 5

2.3. 返回内容

执行成功

{
    "message":"请求处理成功",
    "code":"SUCCESS",
    "data":{
        "model":
        {
            "count":1, // 模型文档总数量
            "data":[    // 模型文档数据
                {
                    "isDownload":true,
                    "creator":"cdytest1",
                    "fileName":"污水处理厂.zip",
                    "rev":"_YtkzSte---",
                    "code":"M0001",
                    "modelKey":"M111111111111",
                    "parseStatus":"8",
                    "revision":"0",
                    "guser":"users/xxxxxxxx",
                    "size":12354934,
                    "createTime":"1558966261394",
                    "gtime":"1558966269850",
                    "permissionGroup":[],
                    "name":"污水处理厂",
                    "guid":"2c0ca01190804bc3aa790ffc68509146",
                    "bosclass":"uoModelDocument",
                    "id":"documents/2c0ca01190804bc3aa790ffc68509146",
                    "key":"2c0ca01190804bc3aa790ffc68509146",
                    "gcreatetime":"1558966269850"
                }
            ]
        }
    }
}

执行失败

  • keyword参数为空时
{
    "message": "搜索关键词必填",
    "code": "FAILURE",
    "data": null
}
  • type为空时
{
    "message": "搜索类型必填",
    "code": "FAILURE",
    "data": null
}
  • type值未按规范传入时
{
    "message": "搜索类型值错误",
    "code": "FAILURE",
    "data": null
}
  • 分页参数page、per_page类型错误时
{
    "message": "参数page或per_page错误",
    "code": "PARAM_PAGE_OR_PERPAGE_ERROR",
    "data": null
}

3. 获取指定模型类别的模型列表

3.1. 基本信息

Path

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

API描述

获取指定模型类别的模型列表

3.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": [
        {
            "field": "gcategory",
            "operator": "==",
            "value": "2", // 0 Obj外轮廓模型; 1 Obj点云扫描模型; 2 BIM精细化模型;
            "number": "false",
            "logic": ""
        }
    ]
}

3.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "data": [
            {
                "bosclass": "uoModelDocument",
                "code": "3",
                "createTime": "1573108395574",
                "creator": "zhaobing",
                "currentUserPermissions": "rwdc",
                "fileName": "3号楼.zip",
                "gcategory": "2",
                "gcreatetime": "1573108400748",
                "gtime": "1573108400748",
                "guser": "users/a9eda0ae03064874b74268541e49c923",
                "key": "3bdbb3aad4e2447ab951f0b9be181f81",
                "modelKey": "M1573108399901",
                "name": "3号楼",
                "parseStatus": "3",
                "revision": "0",
                "size": 4438701
            }
        ],
        "count": 1
    }
}

4. 获取指定文件夹下的文件夹及模型列表

4.1. 基本信息

Path

POST http://building-bos.rickricks.com/bosdocumentservice/{buildingId}/folders/folders&documents?noRelation=true

API描述

获取指定文件夹下的文件夹及模型列表

4.2. 请求参数

Request Headers

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

Path Param

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

Request Body

application/json

{
    "key": "l1b2427fccb8447f84a8e996a2f5f731_bim", // 模型文件夹key
    "entity": "both", // 查询的类别,只查文件夹(folders),只查文档(documents),都查(both),    默认为both
    "page": 1, // 页数
    "per_page": 10, // 每页条数
    "sortby": "createTime",
    "order": "desc",
    "nestOr": null
}

4.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "per_page": 10,
        "data": [
            {
                "bosclass": "uoDocFolder",
                "code": "5XhtFzPDj4mH6ITSewTtzp",
                "currentUserPermissions": "rwdc",
                "gcreatetime": "1573108130355",
                "gdataType": "folders",
                "gtime": "1573108140534",
                "guser": "users/a9eda0ae03064874b74268541e49c923",
                "key": "a784572c8ae546d2bfb4f0cc0a380a66",
                "leaf": true,
                "level": 2,
                "longCode": "l1b2427fccb8447f84a8e996a2f5f731_doc※a784572c8ae546d2bfb4f0cc0a380a66",
                "longName": "文档管理根节点※cc1",
                "name": "cc1",
                "order": 1,
                "parentId": "l1b2427fccb8447f84a8e996a2f5f731_doc",
                "permissionGroup": [],
                "size": 9530
            },
            {
                "bosclass": "uoDocDocument",
                "code": "0UiOp4ufzPampPpWc2yt",
                "createTime": "1573108121454",
                "creator": "zhaobing",
                "currentUserPermissions": "rwdc",
                "fileName": "css(1).css",
                "gLongCode": "l1b2427fccb8447f84a8e996a2f5f731_doc",
                "gLongName": "文档管理根节点",
                "gcreatetime": "1573108121880",
                "gdataType": "documents",
                "gtime": "1573108121880",
                "guser": "users/a9eda0ae03064874b74268541e49c923",
                "key": "a41754d6842e4d0eb7ae8ceee9ca63c9",
                "name": "css(1)",
                "revision": "0",
                "size": 70238
            }
        ],
        "count": 2,
        "page": 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

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

Request Body

application/json

{
    "condition": [
        {
            "bosclass": "uoModelDocument",
            "alias": "um",
            "subCondition": [
                {
                    "field": "gcategory",
                    "operator": "==",
                    "value": "{gcategory}", // 0 Obj外轮廓模型; 1 Obj点云扫描模型; 2 BIM精细化模型;
                    "number": "false"
                }
            ]
        },
        {
            "bosclass": "uoModelFolder",
            "alias": "uf",
            "subCondition": [
               {
                    "field": "bosclass",
                    "operator": "==",
                    "value": "uoModelFolder",
                    "number": "false",
                    "logic": ""
                },
                {
                    "field": "_key",
                    "operator": "==",
                    "value": "{modelFolderKey}", // 模型文件夹key
                    "number": "false",
                    "logic": "And"
                }
            ]
        },
        {
            "bosclass": "irFolderDocument",
            "alias": "u1",
            "type": "relationship",
            "from": "uf",
            "to": "um",
            "subCondition": []
        }
    ],
    "select": {
        "bosclass": "um.bosclass",
        "name": "um.name",
        "key": "um._key",
        "code": "um.code",
        "creator": "um.creator",
        "gcategory": "um.gcategory",
        "createTime": "um.createTime",
        "parseStatus": "um.parseStatus",
        "modelKey": "um.modelKey"
    }
}

5.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "data": [
            {
                "creator": "zhaobing", // 上传者
                "code": "3", // 模型编码
                "createTime": "1573108395574", // 模型数据创建时间
                "name": "3号楼", // 模型名称
                "bosclass": "uoModelDocument", // 模型文档bosclass
                "key": "3bdbb3aad4e2447ab951f0b9be181f81", // 模型key
                "gcategory": "2", // 模型类别
                "parseStatus": "3", // 模型解析状态
                "modelKey": "M1573108399901" // 模型3dModel key
            }
        ],
        "count": 1
    }
}

6. 在指定文件夹下按模型编码、名称模糊搜索模型

6.1. 基本信息

Path

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

API描述

在指定文件夹下按模型编码、名称模糊搜索模型

6.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": "uoModelDocument",
            "alias": "um",
            "subCondition": [
                {
                    "field": "bosclass",
                    "operator": "==",
                    "value": "uoModelDocument",
                    "number": "false",
                    "logic": ""
                }
            ],
            "nestOr": [
                {
                    "field": "code",
                    "operator": "like",
                    "value": "c", // 搜索关键词
                    "number": "false"
                },
                {
                    "field": "name",
                    "operator": "like",
                    "value": "3", // 搜索关键词
                    "number": "false"
                }
            ]
        },
        {
            "bosclass": "uoModelFolder",
            "alias": "uf",
            "subCondition": [
                {
                    "field": "bosclass",
                    "operator": "==",
                    "value": "uoModelFolder",
                    "number": "false",
                    "logic": ""
                },
                {
                    "field": "_key",
                    "operator": "==",
                    "value": "{key}", // 模型文件夹key
                    "number": "false",
                    "logic": "And"
                }
            ]
        },
        {
            "bosclass": "irFolderDocument",
            "alias": "u1",
            "type": "relationship",
            "from": "uf",
            "to": "um",
            "subCondition": []
        }
    ],
    "select": {
        "bosclass": "um.bosclass",
        "name": "um.name",
        "key": "um._key",
        "code": "um.code",
        "creator": "um.creator",
        "gcategory": "um.gcategory",
        "createTime": "um.createTime",
        "parseStatus": "um.parseStatus",
        "modelKey": "um.modelKey"
    }
}

6.3. 返回内容

执行成功

{
    "message": "请求处理成功",
    "code": "SUCCESS",
    "data": {
        "data": [
            {
                "creator": "zhaobing", // 上传者
                "code": "3", // 模型编码
                "createTime": "1573108395574", // 模型数据创建时间
                "name": "3号楼", // 模型名称
                "bosclass": "uoModelDocument", // 模型文档bosclass
                "key": "3bdbb3aad4e2447ab951f0b9be181f81", // 模型key
                "gcategory": "2", // 模型类别
                "parseStatus": "3", // 模型解析状态
                "modelKey": "M1573108399901" // 模型3dModel 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 ""