提交 | 用户 | 时间
|
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; |
|
8 |
import org.springframework.web.bind.annotation.PathVariable; |
|
9 |
import org.springframework.web.bind.annotation.PostMapping; |
|
10 |
import org.springframework.web.bind.annotation.RequestBody; |
|
11 |
import org.springframework.web.bind.annotation.RequestParam; |
|
12 |
|
|
13 |
import java.util.List; |
|
14 |
import java.util.Map; |
|
15 |
|
|
16 |
/** |
|
17 |
* @author PanZhibao |
|
18 |
* @Description |
|
19 |
* @createTime 2024年08月19日 |
|
20 |
*/ |
|
21 |
@FeignClient(name = ApiConstants.NAME) |
|
22 |
@Tag(name = "数据测点服务") |
|
23 |
public interface DataPointApi { |
|
24 |
|
|
25 |
String PREFIX = ApiConstants.PREFIX + "/point"; |
|
26 |
|
dc2e04
|
27 |
@PostMapping(PREFIX + "/point-no/{pointNo}") |
9d7e02
|
28 |
@Operation(summary = "查询测点信息") |
dc2e04
|
29 |
ApiPointDTO getPointByNo(@PathVariable("pointNo") String pointNo); |
潘 |
30 |
|
|
31 |
@PostMapping(PREFIX + "/point-id/{pointId}") |
|
32 |
@Operation(summary = "查询测点信息") |
|
33 |
ApiPointDTO getPointById(@PathVariable("pointId") String pointId); |
9d7e02
|
34 |
|
潘 |
35 |
@PostMapping(PREFIX + "/current") |
|
36 |
@Operation(summary = "查询多个测点当前值") |
|
37 |
Map<String, Object> pointsCurrent(@RequestParam("pointNos") List<String> pointNos); |
|
38 |
|
|
39 |
@PostMapping(PREFIX + "/history") |
|
40 |
@Operation(summary = "查询多个测点历史值") |
|
41 |
Map<String, List<Map<String, Object>>> pointsHistory(@RequestBody ApiPointsValueQueryDTO queryDto); |
|
42 |
|
|
43 |
@PostMapping(PREFIX + "/value/get") |
|
44 |
@Operation(summary = "查询单个测点历史值") |
|
45 |
List<ApiPointValueDTO> getValue(@RequestBody ApiPointValueQueryDTO queryDto); |
|
46 |
|
|
47 |
@PostMapping(PREFIX + "/value/set") |
|
48 |
@Operation(summary = "设置单个测点值") |
|
49 |
Boolean setValue(@RequestBody ApiPointValueWriteDTO queryDto); |
|
50 |
|
|
51 |
|
|
52 |
} |