中文

Supports

Home/Sevices/Supports/

查询组合计算下的传感器

本接口可根据项目的主键id来查找项目下组合内的传感器,比如:水平位移组合,浸润线组合等。

请求头参数

需要放到http请求头(Headers)里的参数,通常为token。

 Header参数名类型是否必填示例描述
cookieStringgenerator=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0ODM5NzA5MTgxMjE0NzIwMDAiLCJzeXN0ZW1JZCI6MzMzMjE4NTQ1MTU4OTc5NTg0L将access token写入到cookie中,用于网关校验。

请求参数

Body参数类型是否必填示例描述
projectIdlong569项目的唯一id

示例代码

 请求方式 POST

 请求地址 https://api.njgn.com/api/combination/select_combination_detail_by_project

public static String getAllSensorDataByProject() {    // 接口请求地址
    String url = "https://api.njgn.com/api/combination/select_combination_detail_by_project";    // 获取的AccessToken组装成cookie
    String cookie = "generator=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0ODM5NzA5MTgxMjE0NzIwMDAiLCJzeXN0ZW1JZCI6MzMzMjE4NTQ1MTU4OTc5NTg0LCJlbnYiOiJ0ZXN0IiwidHlwZSI6ImdlbmVyYXRpb24iLCJleHAiOjQ3NTEyMjc3MjQsInZlcnNpb24iOiIxLjAiLCJpYXQiOjE1OTU1NTQxMjR9.wTbTICUpp9siuILzSaUYWWoE9dn_Runpa1lURSk2WRY";    // 请求参数
    Map<String, String> requestParam = new HashMap<>();
    requestParam.put("projectId", "569");    // 请求头的参数
    Map<String, String> headerMap = new HashMap<>();
    headerMap.put("cookie", cookie);    // 调用提供的HttpUtil库,result即为本次调用的结果
    String result = HttpUtil.post(url, requestParam, headerMap);    
    return result;
  }

返回示例

{
    "id": "82",
    "createTime": 1562237524143,
    "updateTime": 1562237524143,
    "type": "水平累加位移",
    "name": "层水平位移",
    "projectId": "60",
    "unit": "mm",
    "valueXs": "1",
    "max": null,
    "min": null,
    "combinationSensor": [
        {
            "id": "45",
            "sensorId": "1508",
            "sensorname": "NGC592",
            "valueType": "结果值",
            "unitXs": "1",
            "time": null,
            "calculationTime": 1,
            "datumPoint": null,
            "combinationId": 82,
            "location": -5.0,
            "height": null
        },
        {
            "id": "46",
            "sensorId": "1509",
            "sensorname": "NG",
            "valueType": "结果值",
            "unitXs": "1",
            "time": null,
            "calculationTime": 1,
            "datumPoint": null,
            "combinationId": 82,
            "location": -1.0,
            "height": null
        }
            ]
 }

参数名称类型描述
opboolean标识调用是否成功
messageString调用失败时返回错误信息
result.idString组合的唯一id
result.createTimelong组合的创建时间
result.updateTimelong组合的更新时间
result.typeString组合类型
result.nameString组合名称
result.projectIdString组合所属项目的id
result.sensorIdString组合下的传感器ID
result.sensornameString组合下的传感器名称


logo

Reaching the Nature, Discovering the World
Reverence for heaven and earth, concern for people and safety
For that tranquil landscape
We are always on the road
Follow Us
Follow Us
Preview

Address

China Jiangsu
9th Floor, Building 34, Shanggu Center, No. 2 Junlan Road, Gulou District, Nanjing
+86 25 84443850
Mon-Sun 8:00 am- 18:00 pm

Cooperations