提交 | 用户 | 时间
|
9d7e02
|
1 |
package com.iailab.module.data.api.point; |
潘 |
2 |
|
|
3 |
import com.iailab.module.data.api.point.dto.*; |
|
4 |
import com.iailab.module.data.enums.ApiConstants; |
|
5 |
import io.swagger.v3.oas.annotations.Operation; |
|
6 |
import io.swagger.v3.oas.annotations.tags.Tag; |
|
7 |
import org.springframework.cloud.openfeign.FeignClient; |
73ed35
|
8 |
import org.springframework.web.bind.annotation.*; |
9d7e02
|
9 |
|
5f7008
|
10 |
import javax.annotation.security.PermitAll; |
9d7e02
|
11 |
import java.util.List; |
潘 |
12 |
import java.util.Map; |
|
13 |
|
|
14 |
/** |
|
15 |
* @author PanZhibao |
|
16 |
* @Description |
|
17 |
* @createTime 2024年08月19日 |
|
18 |
*/ |
|
19 |
@FeignClient(name = ApiConstants.NAME) |
73ed35
|
20 |
@Tag(name = "测点接口") |
9d7e02
|
21 |
public interface DataPointApi { |
潘 |
22 |
|
|
23 |
String PREFIX = ApiConstants.PREFIX + "/point"; |
|
24 |
|
73ed35
|
25 |
@GetMapping(PREFIX + "/info/no/{pointNo}") |
潘 |
26 |
@Operation(summary = "根据测点编号查询测点信息") |
|
27 |
ApiPointDTO getInfoByNo(@PathVariable("pointNo") String pointNo); |
dc2e04
|
28 |
|
73ed35
|
29 |
@GetMapping(PREFIX + "/info/id/{pointId}") |
潘 |
30 |
@Operation(summary = "根据测点ID查询测点信息") |
|
31 |
ApiPointDTO getInfoById(@PathVariable("pointId") String pointId); |
9d7e02
|
32 |
|
07890e
|
33 |
@PostMapping(PREFIX + "/info/ids") |
D |
34 |
@Operation(summary = "根据多个测点ID查询测点信息") |
|
35 |
List<ApiPointDTO> getInfoByIds(@RequestParam("pointNos") List<String> pointIds); |
|
36 |
|
73ed35
|
37 |
@PostMapping(PREFIX + "/query-points/real-value") |
9d7e02
|
38 |
@Operation(summary = "查询多个测点当前值") |
73ed35
|
39 |
Map<String, Object> queryPointsRealValue(@RequestParam("pointNos") List<String> pointNos); |
9d7e02
|
40 |
|
73ed35
|
41 |
@PostMapping(PREFIX + "/query-points/history-value") |
9d7e02
|
42 |
@Operation(summary = "查询多个测点历史值") |
73ed35
|
43 |
Map<String, List<Map<String, Object>>> queryPointsHistoryValue(@RequestBody ApiPointsValueQueryDTO queryDto); |
9d7e02
|
44 |
|
6d7e4d
|
45 |
@PostMapping(PREFIX + "/query-point/history-value") |
9d7e02
|
46 |
@Operation(summary = "查询单个测点历史值") |
6d7e4d
|
47 |
List<ApiPointValueDTO> queryPointHistoryValue(@RequestBody ApiPointValueQueryDTO queryDto); |
9d7e02
|
48 |
|
73ed35
|
49 |
@PutMapping(PREFIX + "/write-point/real-value") |
潘 |
50 |
@Operation(summary = "写入单个测点值") |
|
51 |
Boolean writePointRealValue(@RequestBody ApiPointValueWriteDTO queryDto); |
9d7e02
|
52 |
|
潘 |
53 |
|
|
54 |
} |