From 73ed35dd4aa01c4f10f890f7a820501fe1d0df38 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 30 九月 2024 17:41:00 +0800
Subject: [PATCH] data 接口更新

---
 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java          |   12 ++++++------
 iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/DataPointApi.java              |   37 +++++++++++++++++--------------------
 iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java                  |    2 +-
 iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/dto/ApiPointValueWriteDTO.java |    2 +-
 4 files changed, 25 insertions(+), 28 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java
index b14eba7..141c018 100644
--- a/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java
+++ b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/ind/IndItemApi.java
@@ -17,7 +17,7 @@
  * @createTime 2024年08月19日
  */
 @FeignClient(name = ApiConstants.NAME)
-@Tag(name = "指标项服务")
+@Tag(name = "指标数据")
 public interface IndItemApi {
 
     String PREFIX = ApiConstants.PREFIX + "/ind-item";
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 185eb18..28e6b4b 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
@@ -5,10 +5,7 @@
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 import java.util.Map;
@@ -19,34 +16,34 @@
  * @createTime 2024年08月19日
  */
 @FeignClient(name = ApiConstants.NAME)
-@Tag(name = "数据测点服务")
+@Tag(name = "测点接口")
 public interface DataPointApi {
 
     String PREFIX = ApiConstants.PREFIX + "/point";
 
-    @PostMapping(PREFIX + "/point-no/{pointNo}")
-    @Operation(summary = "查询测点信息")
-    ApiPointDTO getPointByNo(@PathVariable("pointNo") String pointNo);
+    @GetMapping(PREFIX + "/info/no/{pointNo}")
+    @Operation(summary = "根据测点编号查询测点信息")
+    ApiPointDTO getInfoByNo(@PathVariable("pointNo") String pointNo);
 
-    @PostMapping(PREFIX + "/point-id/{pointId}")
-    @Operation(summary = "查询测点信息")
-    ApiPointDTO getPointById(@PathVariable("pointId") String pointId);
+    @GetMapping(PREFIX + "/info/id/{pointId}")
+    @Operation(summary = "根据测点ID查询测点信息")
+    ApiPointDTO getInfoById(@PathVariable("pointId") String pointId);
 
-    @PostMapping(PREFIX + "/current")
+    @PostMapping(PREFIX + "/query-points/real-value")
     @Operation(summary = "查询多个测点当前值")
-    Map<String, Object> pointsCurrent(@RequestParam("pointNos") List<String> pointNos);
+    Map<String, Object> queryPointsRealValue(@RequestParam("pointNos") List<String> pointNos);
 
-    @PostMapping(PREFIX + "/history")
+    @PostMapping(PREFIX + "/query-points/history-value")
     @Operation(summary = "查询多个测点历史值")
-    Map<String, List<Map<String, Object>>> pointsHistory(@RequestBody ApiPointsValueQueryDTO queryDto);
+    Map<String, List<Map<String, Object>>> queryPointsHistoryValue(@RequestBody ApiPointsValueQueryDTO queryDto);
 
-    @PostMapping(PREFIX + "/value/get")
+    @GetMapping(PREFIX + "/query-point/history-value")
     @Operation(summary = "查询单个测点历史值")
-    List<ApiPointValueDTO> getValue(@RequestBody ApiPointValueQueryDTO queryDto);
+    List<ApiPointValueDTO> queryPointHistoryValue(@RequestParam ApiPointValueQueryDTO queryDto);
 
-    @PostMapping(PREFIX + "/value/set")
-    @Operation(summary = "设置单个测点值")
-    Boolean setValue(@RequestBody ApiPointValueWriteDTO queryDto);
+    @PutMapping(PREFIX + "/write-point/real-value")
+    @Operation(summary = "写入单个测点值")
+    Boolean writePointRealValue(@RequestBody ApiPointValueWriteDTO queryDto);
 
 
 }
diff --git a/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/dto/ApiPointValueWriteDTO.java b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/dto/ApiPointValueWriteDTO.java
index 48e19cf..ce68939 100644
--- a/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/dto/ApiPointValueWriteDTO.java
+++ b/iailab-module-data/iailab-module-data-api/src/main/java/com/iailab/module/data/api/point/dto/ApiPointValueWriteDTO.java
@@ -20,5 +20,5 @@
     private String pointNo;
 
     @Schema(description = "测点值")
-    private Object pointValue;
+    private Object value;
 }
\ No newline at end of file
diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java
index d2e037f..c765aec 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java
+++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/point/DataPointApiImpl.java
@@ -17,32 +17,32 @@
 public class DataPointApiImpl implements DataPointApi {
 
     @Override
-    public ApiPointDTO getPointByNo(String pointNo) {
+    public ApiPointDTO getInfoByNo(String pointNo) {
         return null;
     }
 
     @Override
-    public ApiPointDTO getPointById(String pointId) {
+    public ApiPointDTO getInfoById(String pointId) {
         return null;
     }
 
     @Override
-    public Map<String, Object> pointsCurrent(List<String> pointNos) {
+    public Map<String, Object> queryPointsRealValue(List<String> pointNos) {
         return null;
     }
 
     @Override
-    public Map<String, List<Map<String, Object>>> pointsHistory(ApiPointsValueQueryDTO queryDto) {
+    public Map<String, List<Map<String, Object>>> queryPointsHistoryValue(ApiPointsValueQueryDTO queryDto) {
         return null;
     }
 
     @Override
-    public List<ApiPointValueDTO> getValue(ApiPointValueQueryDTO queryDto) {
+    public List<ApiPointValueDTO> queryPointHistoryValue(ApiPointValueQueryDTO queryDto) {
         return null;
     }
 
     @Override
-    public Boolean setValue(ApiPointValueWriteDTO queryDto) {
+    public Boolean writePointRealValue(ApiPointValueWriteDTO queryDto) {
         return null;
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3