| | |
| | | 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 javax.annotation.security.PermitAll; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | * @createTime 2024年08月19日 |
| | | */ |
| | | @FeignClient(name = ApiConstants.NAME) |
| | | @Tag(name = "数据测点服务") |
| | | @Tag(name = "测点接口") |
| | | public interface DataPointApi { |
| | | |
| | | String PREFIX = ApiConstants.PREFIX + "/point"; |
| | | |
| | | @PostMapping(PREFIX + "/point/{pointNo}") |
| | | @Operation(summary = "查询测点信息") |
| | | ApiPointDTO getPoint(@PathVariable("pointNo") String pointNo); |
| | | @GetMapping(PREFIX + "/info/no/{pointNo}") |
| | | @Operation(summary = "根据测点编号查询测点信息") |
| | | ApiPointDTO getInfoByNo(@PathVariable("pointNo") String pointNo); |
| | | |
| | | @PostMapping(PREFIX + "/current") |
| | | @GetMapping(PREFIX + "/info/id/{pointId}") |
| | | @Operation(summary = "根据测点ID查询测点信息") |
| | | ApiPointDTO getInfoById(@PathVariable("pointId") String pointId); |
| | | |
| | | @PostMapping(PREFIX + "/info/ids") |
| | | @Operation(summary = "根据多个测点ID查询测点信息") |
| | | List<ApiPointDTO> getInfoByIds(@RequestParam("pointNos") List<String> pointIds); |
| | | |
| | | @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") |
| | | @PostMapping(PREFIX + "/query-point/history-value") |
| | | @Operation(summary = "查询单个测点历史值") |
| | | List<ApiPointValueDTO> getValue(@RequestBody ApiPointValueQueryDTO queryDto); |
| | | List<ApiPointValueDTO> queryPointHistoryValue(@RequestBody 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); |
| | | |
| | | |
| | | } |