跳转至

户型图评测报告

接口说明:

客户通过此接口获取模型对应户型图的评测报告数据。

客户侧只需要传入众趣模型id或众趣房源id。开放平台会将请求转发到房产系统,房产系统根据模型或房源找到对应户型图并返回评测报告数据。

请求路径:

{HostName}/api/v2/op/openapi/floorplan/report/

请求方式:
  • GET
Headers:
{
  "Content-Type": "application/json;charset=UTF-8",
  "Authorization": "开放平台token"
}
接口校验:

token获取请查看 身份验证-获取token

基于token请求接口,校验token。

入参示例
{
  "zq_model_id": "众趣模型id",
  "zq_house_id": "zq房源编号"
}
传入参数字段及含义:
字段名 类型 是否必传 含义
zq_model_id string 众趣模型id
zq_house_id string 房源在众趣平台的编号

注意:zq_model_id和zq_house_id二者必须传其一,建议传模型id效率更高一些。

响应参数示例
{
  "msg": "success",
  "code": 1,
  "data": {
    "version": "1.0",
    "levelList": [
      {
        "floorName": "1F",
        "floorIndex": 0,
        "layout": {
          "totalInnerArea": 113.15,
          "totalOuterArea": 155,
          "usableAreaRatio": 73,
          "occupancy": [3, 4],
          "squarenessIndex": 0.56,
          "widthDepthRatio": "1:1.2",
          "ventilationType": "南北通透",
          "mainLightDirection": "东",
          "privacyScore": 57.8,
          "additionalFeatures": ["阳台"]
        },
        "rooms": [
          {
            "roomIndex": 0,
            "name": "卧室A",
            "type": "卧室",
            "businessType": "bedroom",
            "innerArea": 12.48,
            "outerArea": 12.48,
            "width": 3.5,
            "depth": 4.1,
            "widthDepthRatio": "1:1.2",
            "lightDirection": "西",
            "windowFloorRatio": 0.2,
            "houseFeature": [],
            "connectedRooms": [
              {
                "roomIndex": 7,
                "name": "客厅A",
                "type": "客厅",
                "businessType": "livingRoom"
              }
            ],
            "originData": {
              "name": "卧室A",
              "type": "",
              "mainType": "其它空间",
              "innerArea": 12480000,
              "outerArea": 12480000,
              "outlineCoord": [],
              "boundingBox": {},
              "wallList": [],
              "innerWallList": [],
              "stuffList": []
            }
          }
        ],
        "summary": {
          "bedroom": {
            "count": 3,
            "innerArea": 29.58,
            "outerArea": 29.58,
            "areaRatio": 26.1,
            "roomIndexList": [0, 6, 1]
          },
          "livingRoom": { "count": 2, "innerArea": 29.08, "outerArea": 29.08, "areaRatio": 25.7, "roomIndexList": [7, 11] },
          "kitchen": { "count": 1, "innerArea": 3.97, "outerArea": 3.97, "areaRatio": 3.5, "roomIndexList": [2] },
          "bathroom": { "count": 2, "innerArea": 6.91, "outerArea": 6.91, "areaRatio": 6.1, "roomIndexList": [4, 8] },
          "balcony": { "count": 4, "innerArea": 16.07, "outerArea": 16.07, "areaRatio": 14.2, "roomIndexList": [3, 5, 9, 10] },
          "study": { "count": 0, "innerArea": 0, "outerArea": 0, "areaRatio": 0, "roomIndexList": [] },
          "storage": { "count": 0, "innerArea": 0, "outerArea": 0, "areaRatio": 0, "roomIndexList": [] },
          "foyer": { "count": 0, "innerArea": 0, "outerArea": 0, "areaRatio": 0, "roomIndexList": [] },
          "others": { "count": 0, "innerArea": 0, "outerArea": 0, "areaRatio": 0, "roomIndexList": [] }
        }
      }
    ],
    "allFloorData": {
      "totalInnerArea": 113.15,
      "totalOuterArea": 155,
      "usableAreaRatio": 73,
      "mainLightDirection": "东",
      "additionalFeatures": ["阳台"]
    }
  }
}
响应参数字段及含义:
字段名 类型 是否必传 含义
msg string 响应状态描述
code int 响应状态码
data object 户型图评测报告数据
消息码code取值及说明:
code值 说明
1 成功
-2 缺少必要的参数房源id或模型id
3 无此模型,请检查参数后重试
4 找到了多个对应模型
-4 没有绘制户型图
5 接口出现未知错误
1002 失败,缺少校验参数
1003 失败,超时
1004 失败,签名校验失败

户型解析输出数据结构

以下内容为响应参数 data 的完整数据结构说明。

顶层结构

字段 类型 说明
version string 数据版本号,当前为 "1.0"
levelList object[] 每层楼的详细解析数据,数组长度等于 drawing 中的楼层数
allFloorData object 所有楼层的汇总数据

levelList[n] — 单层数据

字段 类型 说明
floorName string 楼层名称,如 "1F""2F",取自 floor.name
floorIndex number 楼层索引,从 0 开始
layout object 当前层整体布局参数
rooms object[] 当前层所有房间的详细数据,与输入数据的功能间数量和顺序一致
summary object 当前层按功能间类型的汇总统计

layout — 整体布局参数

字段 类型 说明
totalInnerArea number 当前层套内面积(㎡),按各房间 innerArea 累加
totalOuterArea number 当前层建筑面积(㎡),按各房间 outerArea 累加
usableAreaRatio number 得房率(%),计算公式:totalInnerArea / totalOuterArea × 100
occupancy number[] 适住人数范围 [min, max],根据卧室数量推算:[卧室数, 卧室数+1]
squarenessIndex number 方正指数(0~1),房间使用面积与最小外接矩形面积的比值,越接近 1 越方正
widthDepthRatio string 整体面宽进深比,格式 "1:x",如 "1:1.2"
ventilationType string 通透性类型,中文描述
mainLightDirection string 主采光朝向,中文方位,无窗时为 "无窗"
privacyScore number 隐私性评分(0~100),100 分表示完全隐私,卧室直连客厅会降低分数
additionalFeatures string[] 户型附加特征列表,中文描述

ventilationType 可选值

说明
南北通透 南侧和北侧均有外窗
东西通透 东侧和西侧均有外窗
转角通透 相邻两侧有外窗(如南+东)
单面通风 仅一侧有外窗
无通风 无外窗

mainLightDirection 可选值

说明
朝东
朝南
西 朝西
朝北
东南 朝东南
东北 朝东北
西南 朝西南
西北 朝西北
无窗 无外窗,无法判断朝向

主采光朝向按所有房间的外窗采光面积(窗宽 × 窗默认高度)加权计算,取面积最大方向。同等面积时按南 > 东南 > 东 > 西南 > 北 > 西 > 东北 > 西北的优先级排序。

additionalFeatures 可选值

说明
阳台 存在阳台
玄关 存在玄关
储物间 存在储物间/衣帽间
书房 存在书房
飘窗 存在飘窗

rooms[n] — 房间详细数据

输出的 rooms 数组与输入 drawing 中的功能间保持数量一致、顺序一致,每个房间拥有完全相同的属性结构。

字段 类型 说明
roomIndex number 房间索引,与输入数据一致
name string 房间名称,与输入数据一致,如 "卧室A""厨房A"
type string 房间中文类型名,从 name 中提取,如 "卧室""厨房""客厅"
businessType string 业务分类英文标识,用于程序逻辑判断
innerArea number 套内面积(㎡)
outerArea number 建筑面积(㎡)
width number\|null 面宽(m),基于房间轮廓计算
depth number\|null 进深(m),基于房间轮廓计算
widthDepthRatio string\|null 面宽进深比,格式 "1:x",如 "1:1.2"
lightDirection string\|null 采光朝向,中文方位。无外窗时为 null
windowFloorRatio number\|null 窗地比,窗户采光面积 / 房间面积。无外窗时为 null
houseFeature string[] 该房间的户型特点标签
connectedRooms object[] 通过门联通的相邻房间列表
originData object 该房间在 BaseDrawingConverter 中的原始数据摘录,坐标/长度为 mm、面积为 mm²,供客户侧自行扩展计算

originData — 原始房间数据

originData 与顶层 rooms 中已换算为㎡、面向展示的字段并行存在:不替换解析结果,仅透出绘图转换后的原始几何与面积字段。其中面积类数值单位为 mm²,与顶层 innerArea / outerArea(㎡)不同。

字段 类型 说明
name string 房间名称(与 drawing 转换结果一致)
type string 房间类型字段(编辑器原始值,可能为空)
mainType string 房间大类(如「其它空间」等)
labelPosition * 房间标签在平面上的位置信息
centroid * 房间多边形重心或代表点坐标(mm)
innerArea number 套内面积(mm²)
outerArea number 建筑面积(mm²)
customArea * 自定义面积(若业务有配置)
wallList object[] 墙体列表,含 hollows(门、窗、入户门 entrance 等)
outlineCoord number[][] 房间轮廓闭合折线顶点 [[x,y], ...](mm)
boundingBox object 轴对齐包围盒,一般为 minX/minY/maxX/maxY(mm)
innerWallList object[] 内墙列表
stuffList array 家具/软装等占位列表

* 表示结构以 BaseDrawingConverter 实际输出为准;若某项无数据可能为 undefined、空数组或 null

businessType 可选值

对应中文 type 说明
bedroom 卧室、主卧、次卧、儿童房 卧室类
livingRoom 客厅、餐厅、客餐厅 客厅/餐厅类
kitchen 厨房 厨房
bathroom 卫生间 卫生间
balcony 阳台、生活阳台、景观阳台 阳台类
study 书房 书房
storage 储物间、衣帽间 储物类
foyer 玄关 玄关
corridor 走廊、过道 通道类
other 未识别的房间类型

houseFeature 可选值

触发条件
客厅连阳台 businessType 为 livingRoom 且 connectedRooms 中有 balcony
卧室连阳台 businessType 为 bedroom 且 connectedRooms 中有 balcony
卫生间有窗 businessType 为 bathroom 且 lightDirection 不为 null"无窗"
入户厨房 businessType 为 kitchen 且该房间墙体上存在入户门(entrance 属性为真)

connectedRooms[n] — 联通房间

字段 类型 说明
roomIndex number 联通房间的索引
name string 联通房间名称,如 "客厅A"
type string 联通房间中文类型名,如 "客厅"
businessType string 联通房间业务分类,如 "livingRoom"

summary — 功能间类型汇总

按功能间类型分组统计,所有类型使用统一的数据结构。

字段 类型 说明
bedroom object 卧室类统计
livingRoom object 客厅/餐厅类统计
kitchen object 厨房统计
bathroom object 卫生间统计
balcony object 阳台类统计
study object 书房统计
storage object 储物间/衣帽间统计
foyer object 玄关统计
others object 未分类房间统计(含走廊、过道及其他未识别类型)

每个分类的统计字段

字段 类型 说明
count number 该类型房间数量
innerArea number 该类型房间套内面积合计(㎡)
outerArea number 该类型房间建筑面积合计(㎡)
areaRatio number 面积占比(%),基于套内面积计算
roomIndexList number[] 该类型包含的房间索引列表(卧室按面积从大到小排列)

allFloorData — 跨楼层汇总数据

汇总所有楼层的核心数据,用于多层户型的整体评估。

字段 类型 说明
totalInnerArea number 所有楼层套内面积总和(㎡)
totalOuterArea number 所有楼层建筑面积总和(㎡)
usableAreaRatio number 整体得房率(%),totalInnerArea / totalOuterArea × 100
mainLightDirection string 整体主采光朝向,取各楼层中出现次数最多的朝向。无窗时为 "无窗"
additionalFeatures string[] 所有楼层附加特征的去重合集

计算逻辑说明

面宽与进深

  • 基于房间的 outlineCoord(实际轮廓坐标)计算包围盒,而非 boundingBox(可能包含墙体厚度等误差)
  • 面宽方向:平行于采光面(窗户所在墙)的尺寸
  • 进深方向:垂直于采光面的尺寸
  • 无采光面时,取包围盒短边为面宽、长边为进深

窗地比

  • 计算公式:窗户采光面积 / 房间面积
  • 窗户采光面积 = 窗宽 × 窗默认高度
  • 不同窗类型默认高度:普通窗 1500mm、飘窗 900mm、落地窗 2400mm、L窗 1500mm

隐私性评分

  • 检查卧室是否通过门直接连通客厅
  • 评分公式:(卧室总面积 - 直连客厅的卧室面积) / 卧室总面积 × 100
  • 所有卧室均不直连客厅时得分 100

方正指数

  • 合并所有房间轮廓为整体轮廓
  • 计算公式:使用面积 / 最小外接矩形面积
  • 值域 0~1,越接近 1 表示户型越方正

入户门判断

  • 遍历房间的 wallList,检查各墙体的 hollows 中是否存在 entrance 属性为真值的构件
  • 用于判断"入户厨房"等户型特点