From dc2e04954d31d481b862587184da5c2226bbf35d Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期二, 03 九月 2024 09:25:56 +0800
Subject: [PATCH] 查询测点信息API

---
 iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/DataPointApi.java |    8 ++++++--
 iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/enums/Freq.java             |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/DataPointApi.java b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/DataPointApi.java
index 88f676e..185eb18 100644
--- a/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/DataPointApi.java
+++ b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/DataPointApi.java
@@ -24,9 +24,13 @@
 
     String PREFIX = ApiConstants.PREFIX + "/point";
 
-    @PostMapping(PREFIX + "/point/{pointNo}")
+    @PostMapping(PREFIX + "/point-no/{pointNo}")
     @Operation(summary = "查询测点信息")
-    ApiPointDTO getPoint(@PathVariable("pointNo") String pointNo);
+    ApiPointDTO getPointByNo(@PathVariable("pointNo") String pointNo);
+
+    @PostMapping(PREFIX + "/point-id/{pointId}")
+    @Operation(summary = "查询测点信息")
+    ApiPointDTO getPointById(@PathVariable("pointId") String pointId);
 
     @PostMapping(PREFIX + "/current")
     @Operation(summary = "查询多个测点当前值")
diff --git a/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/enums/Freq.java b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/enums/Freq.java
new file mode 100644
index 0000000..4419c0a
--- /dev/null
+++ b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/enums/Freq.java
@@ -0,0 +1,32 @@
+package com.iailab.module.data.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 频率类型
+ */
+@Getter
+@AllArgsConstructor
+public enum Freq {
+    NET10("NET10", 10),
+    NET30("NET30", 30),
+    NET60("NET60",60);
+
+    private String code;
+
+    private Integer value;
+
+    public static Freq getEumByCode(String code) {
+        if (code == null) {
+            return null;
+        }
+
+        for (Freq statusEnum : Freq.values()) {
+            if (statusEnum.getCode().equals(code)) {
+                return statusEnum;
+            }
+        }
+        return null;
+    }
+}

--
Gitblit v1.9.3