wzl před 6 měsíci
rodič
revize
33b8aaa427

+ 41 - 0
src/main/java/com/dskj/znzn/transData/web/WaveData/controller/WaveDataController.java

@@ -0,0 +1,41 @@
+
+package com.dskj.znzn.transData.web.WaveData.controller;
+
+import com.dskj.znzn.transData.common.base.R;
+import com.dskj.znzn.transData.web.WaveData.entity.WaveData;
+import com.dskj.znzn.transData.web.WaveData.indata.GetMesureDataInData;
+import com.dskj.znzn.transData.web.WaveData.service.IWaveDataService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.List;
+import javax.validation.Valid;
+
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping({"/waveData"})
+@Api(tags = {"振动数据接口"})
+@RequiredArgsConstructor(onConstructor = @__({@Autowired}))
+public class WaveDataController {
+    private final IWaveDataService waveDataService;
+
+    @PostMapping({"getMesureData"})
+    @ApiOperation("获取测点数据")
+    public R<List<WaveData>> getMesureData(@RequestBody @Valid GetMesureDataInData inData) {
+        return R.ok(this.waveDataService.getMesureData(inData));
+    }
+
+    @GetMapping({"/{windCode}/{id}"})
+    @ApiOperation("根据ID获取测点数据")
+    public R<WaveData> getById(@PathVariable String windCode, @PathVariable Integer id) {
+        return R.ok(this.waveDataService.getById(windCode, id));
+    }
+}