用电趋势 websocket测试 POST localhost:8083/api/jzyn/tongji/YongDianQuShi 接口描述 分项或分户查询用电趋势 说明 / 示例 ## 请求参数示例 ```json { "start": 1609430400000, "end": 1612108800000, "type": "day", "queryType":"2", "attribute": "electricity" } ``` 字段解释 - start:开始时间,如果type是day就传本月第一天,如果是month,就传本年的第一个月 - end:结束时间,如果type是day就传下个月第一天,如果是month,就传明年的第一个月 - type:按天:day;按月:month - queryType:按分户查询:1;按分项查:2; - attribute:按分户查需要传这个,明确查询的统计项。查询电传electricity ## 返回值示例 ```json { "water": { "2021-01-01": 23.8, "2021-01-02": 26.38, "2021-01-03": 25.31, "2021-01-04": 71.67, "2021-01-05": 81.32, "2021-01-06": 75.79, "2021-01-07": 64.91, "2021-01-08": 59.75, "2021-01-09": 26.97, "2021-01-10": 29.15, "2021-01-11": 65.19, "2021-01-12": 69.51, "2021-01-13": 67.01, "2021-01-14": 65.48, "2021-01-15": 56.76, "2021-01-16": 27.25, "2021-01-17": 27.97, "2021-01-18": 70.32, "2021-01-19": 62.08, "2021-01-20": 66.51, "2021-01-21": 57.15, "2021-01-22": 50.41, "2021-01-23": 23.49, "2021-01-24": 23.65, "2021-01-25": 57.51, "2021-01-26": 47.29, "2021-01-27": null, "2021-01-28": null, "2021-01-29": null, "2021-01-30": null, "2021-01-31": null }, "electricity": { "2021-01-01": 79.59, "2021-01-02": 86.74, "2021-01-03": 132.02, "2021-01-04": 352.89, "2021-01-05": 340.15, "2021-01-06": 345.44, "2021-01-07": 378.75, "2021-01-08": 374.32, "2021-01-09": 129.95, "2021-01-10": 155.25, "2021-01-11": 373.53, "2021-01-12": 356, "2021-01-13": 394.91, "2021-01-14": 367.5, "2021-01-15": 329.87, "2021-01-16": 117.25, "2021-01-17": 119.01, "2021-01-18": 388.75, "2021-01-19": 371.35, "2021-01-20": 343.82, "2021-01-21": 329.95, "2021-01-22": 317.24, "2021-01-23": 120.12, "2021-01-24": 157.67, "2021-01-25": 327.97, "2021-01-26": 236.58, "2021-01-27": null, "2021-01-28": null, "2021-01-29": null, "2021-01-30": null, "2021-01-31": null } } ```
## 请求参数示例 ```json { "start": 1609430400000, "end": 1612108800000, "type": "day", "queryType":"2", "attribute": "electricity" } ``` 字段解释 - start:开始时间,如果type是day就传本月第一天,如果是month,就传本年的第一个月 - end:结束时间,如果type是day就传下个月第一天,如果是month,就传明年的第一个月 - type:按天:day;按月:month - queryType:按分户查询:1;按分项查:2; - attribute:按分户查需要传这个,明确查询的统计项。查询电传electricity ## 返回值示例 ```json { "water": { "2021-01-01": 23.8, "2021-01-02": 26.38, "2021-01-03": 25.31, "2021-01-04": 71.67, "2021-01-05": 81.32, "2021-01-06": 75.79, "2021-01-07": 64.91, "2021-01-08": 59.75, "2021-01-09": 26.97, "2021-01-10": 29.15, "2021-01-11": 65.19, "2021-01-12": 69.51, "2021-01-13": 67.01, "2021-01-14": 65.48, "2021-01-15": 56.76, "2021-01-16": 27.25, "2021-01-17": 27.97, "2021-01-18": 70.32, "2021-01-19": 62.08, "2021-01-20": 66.51, "2021-01-21": 57.15, "2021-01-22": 50.41, "2021-01-23": 23.49, "2021-01-24": 23.65, "2021-01-25": 57.51, "2021-01-26": 47.29, "2021-01-27": null, "2021-01-28": null, "2021-01-29": null, "2021-01-30": null, "2021-01-31": null }, "electricity": { "2021-01-01": 79.59, "2021-01-02": 86.74, "2021-01-03": 132.02, "2021-01-04": 352.89, "2021-01-05": 340.15, "2021-01-06": 345.44, "2021-01-07": 378.75, "2021-01-08": 374.32, "2021-01-09": 129.95, "2021-01-10": 155.25, "2021-01-11": 373.53, "2021-01-12": 356, "2021-01-13": 394.91, "2021-01-14": 367.5, "2021-01-15": 329.87, "2021-01-16": 117.25, "2021-01-17": 119.01, "2021-01-18": 388.75, "2021-01-19": 371.35, "2021-01-20": 343.82, "2021-01-21": 329.95, "2021-01-22": 317.24, "2021-01-23": 120.12, "2021-01-24": 157.67, "2021-01-25": 327.97, "2021-01-26": 236.58, "2021-01-27": null, "2021-01-28": null, "2021-01-29": null, "2021-01-30": null, "2021-01-31": null } } ```