潘志宝
2024-09-30 73ed35dd4aa01c4f10f890f7a820501fe1d0df38
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.iailab.module.data.api.point;
 
import com.iailab.module.data.api.point.dto.*;
import com.iailab.module.data.enums.ApiConstants;
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.*;
 
import java.util.List;
import java.util.Map;
 
/**
 * @author PanZhibao
 * @Description
 * @createTime 2024年08月19日
 */
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "测点接口")
public interface DataPointApi {
 
    String PREFIX = ApiConstants.PREFIX + "/point";
 
    @GetMapping(PREFIX + "/info/no/{pointNo}")
    @Operation(summary = "根据测点编号查询测点信息")
    ApiPointDTO getInfoByNo(@PathVariable("pointNo") String pointNo);
 
    @GetMapping(PREFIX + "/info/id/{pointId}")
    @Operation(summary = "根据测点ID查询测点信息")
    ApiPointDTO getInfoById(@PathVariable("pointId") String pointId);
 
    @PostMapping(PREFIX + "/query-points/real-value")
    @Operation(summary = "查询多个测点当前值")
    Map<String, Object> queryPointsRealValue(@RequestParam("pointNos") List<String> pointNos);
 
    @PostMapping(PREFIX + "/query-points/history-value")
    @Operation(summary = "查询多个测点历史值")
    Map<String, List<Map<String, Object>>> queryPointsHistoryValue(@RequestBody ApiPointsValueQueryDTO queryDto);
 
    @GetMapping(PREFIX + "/query-point/history-value")
    @Operation(summary = "查询单个测点历史值")
    List<ApiPointValueDTO> queryPointHistoryValue(@RequestParam ApiPointValueQueryDTO queryDto);
 
    @PutMapping(PREFIX + "/write-point/real-value")
    @Operation(summary = "写入单个测点值")
    Boolean writePointRealValue(@RequestBody ApiPointValueWriteDTO queryDto);
 
 
}