|
@@ -2,6 +2,7 @@ package com.gyee.sampleimpala.controller;
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.gyee.sampleimpala.common.result.JsonResult;
|
|
|
import com.gyee.sampleimpala.common.result.ResultCode;
|
|
|
import com.gyee.sampleimpala.model.custom.TsPointData;
|
|
@@ -9,12 +10,10 @@ import com.gyee.sampleimpala.model.kudu.Windturbinepoint;
|
|
|
import com.gyee.sampleimpala.service.GoldenService;
|
|
|
import com.gyee.sampleimpala.service.kudu.WindturbinepointService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 故障样本库操作
|
|
@@ -34,12 +33,15 @@ public class WindturbinePointController {
|
|
|
/**
|
|
|
* 根据风机编号和部件查询关联测点
|
|
|
*
|
|
|
- * @param wtId
|
|
|
- * @param widget
|
|
|
+ * @param wtId 风机编号
|
|
|
+ * @param widget 部件编码
|
|
|
* @return
|
|
|
*/
|
|
|
- @GetMapping("/all")
|
|
|
- public JSONObject pointAll(String wtId, String widget) {
|
|
|
+ @GetMapping("/list")
|
|
|
+ public JSONObject pointAll(
|
|
|
+ @RequestParam(value = "wtId",required = false) String wtId,
|
|
|
+ @RequestParam(value = "widget",required = false) String widget
|
|
|
+ ) {
|
|
|
List<Windturbinepoint> list = windturbinepointService.getAll(wtId, widget);
|
|
|
return JsonResult.successData(ResultCode.SUCCESS, list);
|
|
|
}
|
|
@@ -48,16 +50,22 @@ public class WindturbinePointController {
|
|
|
/**
|
|
|
* 获取golden原始点数据
|
|
|
*
|
|
|
- * @param point 测点
|
|
|
- * @param startTs
|
|
|
- * @param endTs
|
|
|
- * @param interval 等间隔时间 s
|
|
|
+ * @param point [] 测点
|
|
|
+ * @param startTs 开始时间(毫秒)
|
|
|
+ * @param endTs 结束时间(毫秒)
|
|
|
+ * @param interval 等间隔时间(秒)
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/item")
|
|
|
- public JSONObject pointAll(String point, long startTs, long endTs, int interval) {
|
|
|
- List<TsPointData> list = goldenService.getOriginalData(point, startTs, endTs, interval);
|
|
|
+ public JSONObject pointAll(
|
|
|
+ @RequestParam(value = "point",required = false) String[] point,
|
|
|
+ @RequestParam(value = "startTs",required = false) long startTs,
|
|
|
+ @RequestParam(value = "endTs",required = false) long endTs,
|
|
|
+ @RequestParam(value = "interval",required = false) int interval) {
|
|
|
+ List<Map> list = goldenService.getOriginalData(point, startTs, endTs, interval);
|
|
|
return JsonResult.successData(ResultCode.SUCCESS, list);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
}
|