Ver Fonte

二氧化碳数据除以10000并保留两位小数

fuyuchuan há 4 dias atrás
pai
commit
6310ee0a7d

+ 405 - 0
service-ems/service-ems-biz/src/main/resources/InterfaceDesign.md

@@ -0,0 +1,405 @@
+**接口要求**:
+
+1.根据当前项目代码风格来编写,检查现有VO、枚举、工具类等,不要重复新建;
+2.下面三个接口目前已经存在并且有实现,先进行检查是否满足接口实现和要求,若满足则进行代码优化,不满足则重新实现;
+3.三个接口的导出功能是前端实现,后端无需实现;
+
+
+
+# 1.能源报表
+
+请求体示例:
+
+```json
+{
+    "startTime": "2026-06-09 00:00:00",
+    "endTime": "2026-06-09 15:00:00",
+    "energyType": 1,
+    "deviceList": [
+        {
+            "commAddress": "137",
+            "productId": 14,
+            "name": "阀控电表测试",
+            "id": "OYEXY5VJO9C00"
+        }
+    ],
+    "timeType": "date",
+    "funcList": [
+        {
+            "productIds": [
+                14
+            ],
+            "identifier": "11X",
+            "identifierName": "正向有功电能",
+            "label": "正向有功电能",
+            "value": "11X"
+        }
+    ]
+}
+```
+
+返回体仅参考,字段名等与实际项目不一致按项目实际情况实现。
+返回体示例:
+
+```json
+{
+    "code": "200",
+    "message": "",
+    "data": {
+        "columnList": [
+            {
+                "label": "设备名称",
+                "prop": "deviceName",
+                "fixed": true,
+                "children": null
+            },
+            {
+                "label": "通讯地址",
+                "prop": "commAddress",
+                "fixed": true,
+                "children": null
+            },
+            {
+                "label": "功能点",
+                "prop": "identifier",
+                "fixed": true,
+                "children": null
+            },
+            {
+                "label": "合计",
+                "prop": "total",
+                "fixed": true,
+                "children": null
+            },
+            {
+                "label": "0时",
+                "prop": "_0",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "1时",
+                "prop": "_1",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "2时",
+                "prop": "_2",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "3时",
+                "prop": "_3",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "4时",
+                "prop": "_4",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "5时",
+                "prop": "_5",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "6时",
+                "prop": "_6",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "7时",
+                "prop": "_7",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "8时",
+                "prop": "_8",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "9时",
+                "prop": "_9",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "10时",
+                "prop": "_10",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "11时",
+                "prop": "_11",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "12时",
+                "prop": "_12",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "13时",
+                "prop": "_13",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "14时",
+                "prop": "_14",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "15时",
+                "prop": "_15",
+                "fixed": false,
+                "children": null
+            }
+        ],
+        "valueList": [
+            {
+                "deviceId": "OYEXY5VJO9C00",
+                "deviceName": "阀控电表测试",
+                "commAddress": "137",
+                "identifier": "正向有功电能",
+                "_0": "-",
+                "_1": "-",
+                "_2": "-",
+                "_3": "-",
+                "_4": "-",
+                "_5": "-",
+                "_6": "-",
+                "_7": "-",
+                "_8": "-",
+                "_9": "-",
+                "_10": "-",
+                "_11": "-",
+                "_12": "-",
+                "_13": "-",
+                "_14": "-",
+                "_15": "-",
+                "total": "-"
+            }
+        ]
+    }
+}
+```
+
+
+
+# 2.分项报表
+
+请求体示例:
+
+```json
+{
+    "spaceId": 30,
+    "startTime": "2026-06-01 00:00:00",
+    "endTime": "2026-06-09 00:00:00",
+    "itemCodes": [
+        {
+            "code": "10100000",
+            "name": "照明插座系统用电"
+        }
+    ],
+    "dateType": "month"
+}
+```
+
+返回体仅参考,字段名等与实际项目不一致按项目实际情况实现。
+
+返回体示例:
+
+```json
+{
+    "code": "200",
+    "message": "",
+    "data": {
+        "dataList": [
+            {
+                "_1": 0,
+                "total": 0,
+                "_2": 0,
+                "_3": 0,
+                "_4": 0,
+                "_5": 0,
+                "_6": 0,
+                "_7": 0,
+                "name": "照明插座系统用电",
+                "_8": 0,
+                "_9": 0
+            }
+        ],
+        "titleList": [
+            {
+                "prop": "name",
+                "fixed": true,
+                "label": "分项名称"
+            },
+            {
+                "prop": "total",
+                "fixed": true,
+                "label": "合计"
+            },
+            {
+                "prop": "_1",
+                "label": "01日",
+                "value": 1
+            },
+            {
+                "prop": "_2",
+                "label": "02日",
+                "value": 2
+            },
+            {
+                "prop": "_3",
+                "label": "03日",
+                "value": 3
+            },
+            {
+                "prop": "_4",
+                "label": "04日",
+                "value": 4
+            },
+            {
+                "prop": "_5",
+                "label": "05日",
+                "value": 5
+            },
+            {
+                "prop": "_6",
+                "label": "06日",
+                "value": 6
+            },
+            {
+                "prop": "_7",
+                "label": "07日",
+                "value": 7
+            },
+            {
+                "prop": "_8",
+                "label": "08日",
+                "value": 8
+            },
+            {
+                "prop": "_9",
+                "label": "09日",
+                "value": 9
+            }
+        ]
+    }
+}
+```
+
+
+
+# 3.区域报表
+
+请求体示例:
+
+```json
+{
+    "spaces": [
+        {
+            "id": 30,
+            "name": "监控区域"
+        }
+    ],
+    "startTime": "2026-01-01 00:00:00",
+    "endTime": "2026-06-01 00:00:00",
+    "itemCodes": [
+        {
+            "code": "70100000",
+            "name": "太阳能热水系统"
+        },
+        {
+            "code": "70101000",
+            "name": "太阳能热水系统累计产热量"
+        }
+    ],
+    "dateType": "year"
+}
+```
+
+
+返回体仅参考,字段名等与实际项目不一致按项目实际情况实现。
+返回体示例:
+
+```json
+{
+    "code": "200",
+    "message": "",
+    "data": {
+        "columnList": [
+            {
+                "label": "区域名称",
+                "prop": "spaceName",
+                "fixed": true,
+                "children": null
+            },
+            {
+                "label": "分项名称",
+                "prop": "itemName",
+                "fixed": true,
+                "children": null
+            },
+            {
+                "label": "合计",
+                "prop": "total",
+                "fixed": true,
+                "children": null
+            },
+            {
+                "label": "1月",
+                "prop": "_1",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "2月",
+                "prop": "_2",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "3月",
+                "prop": "_3",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "4月",
+                "prop": "_4",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "5月",
+                "prop": "_5",
+                "fixed": false,
+                "children": null
+            },
+            {
+                "label": "6月",
+                "prop": "_6",
+                "fixed": false,
+                "children": null
+            }
+        ],
+        "valueList": [],
+        "total": 0
+    }
+}
+```