# 查询 ## 请求体 json ::: details 查看代码 ``` { "Cascade": [ { "Cascade": [ null ], "Distinct": true, "Filters": "string", "Group": { "AvgList": [ "string" ], "Count": true, "MaxList": [ "string" ], "MinList": [ "string" ], "NameList": [ "string" ], "SumList": [ "string" ] }, "Name": "string", "Orders": "name asc, createTime desc", "Projection": [ "string" ] } ], "Distinct": true, "Filters": "string", "Group": { "AvgList": [ "string" ], "Count": true, "MaxList": [ "string" ], "MinList": [ "string" ], "NameList": [ "string" ], "SumList": [ "string" ] }, "Orders": "name asc, createTime desc", "PageNumber": 1, "PageSize": 50, "Projection": [ "string" ] } ``` ::: ## 应答 json ::: details 查看代码 ```metadata json { "Content":[ { "EquipID":"Eq3702020002f9052971335b417b896c73bdcd832f2d", "EquipLocalId":"CCTV-15F-06-05", "BimId":"Pj37020200023d180a0a876a11eaad60abc9d54aea48F20:8240980", "BimLocation":"-106089.73,64853.35,92300.0" } ], "Message":"接口失败会返回原因", "PageNumber":1, "PageSize":50, "Result":"success", "Total":1 } ``` ::: ## 分页 PageNumber 请求页码 Int 值 默认 1 PageSize 请求条数 Int 值 默认 50 条 通用接口中 PageSize 请求条数最大为 1000,为了避免大量的数据请求占用过多的资源,减少带宽 ## 过滤条件 Filters 中编写过滤条件 例如: ```metadata json { "Filters": "ProjectId = 'Pj3702020002'; Category = 'FSSN' ", "PageNumber": 1, "PageSize": 50 } ``` 分号(;代表 and )还可以使用 and 来查询,例如: ```metadata json { "Filters": "ProjectId = 'Pj3702020002' and Category = 'FSSN' ", "PageNumber": 1, "PageSize": 50 } ``` 更多详细查询条件以及操作符使用参考 [ “过滤条件” 操作符介绍](./filters) ## 排序 Orders 排序,默认升序 asc 可以多字段排序,升序 asc 降序 desc,例如: ```metadata json { "Filters": "ProjectId = 'Pj3702020002' and Category = 'FSSN' ", "PageNumber": 1, "PageSize": 50, "Orders": "EquipName, CreateTime desc" } ``` 多字段排序从前往后依次按照 Orders 中的条件排序返回结果。 ## 去重 ## 指定应答属性 Projection 指定后返回的属性,有些时候并不想把某些对象所有信息点都查出来,只是用几个属性,提高数据交互质量可以指定需要的属性,例如: ```metadata json { "Filters": "ProjectId = 'Pj3702020002' and Category = 'FSSN' ", "PageNumber": 1, "PageSize": 50, "Projection": [ "EquipID","EquipName","EquipLocalId","EquipLocalName","Category" ] } ``` 如上面的请求体就会返回 Projection 中指定的属性 ## 级联查询 (根据条件筛选、关系类型筛选级联) ## 综合示例 (多条件组合案例)