|
@@ -0,0 +1,88 @@
|
|
|
+package com.gyee.table.controller;
|
|
|
+
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
+import com.gyee.table.entity.Line;
|
|
|
+import com.gyee.table.entity.Project;
|
|
|
+import com.gyee.table.entity.Windpowerstation;
|
|
|
+import com.gyee.table.entity.Windturbine;
|
|
|
+import com.gyee.table.result.Result;
|
|
|
+import com.gyee.table.result.ResultCode;
|
|
|
+import com.gyee.table.service.ILineService;
|
|
|
+import com.gyee.table.service.IProjectService;
|
|
|
+import com.gyee.table.service.IWindpowerstationService;
|
|
|
+import com.gyee.table.service.IWindturbineService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author hlf
|
|
|
+ * @date 2023/3/16 16:59
|
|
|
+ * 文件说明:
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@RequestMapping("/terminal")
|
|
|
+public class TerminalController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IWindpowerstationService windpowerstationService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IProjectService projectService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ILineService lineService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IWindturbineService windturbineService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取所有场站
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getYardStationData")
|
|
|
+ public JSONObject getYardStationData() {
|
|
|
+ List<Windpowerstation> list = windpowerstationService.list();
|
|
|
+ return Result.successData(ResultCode.SUCCESS, list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据场站ID获取期次
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getPeriodBySnData/{windpowerstationid}")
|
|
|
+ public JSONObject getPeriodBySnData(@PathVariable String windpowerstationid) {
|
|
|
+ List<Project> list = projectService.getWindpowerstationid(windpowerstationid);
|
|
|
+ return Result.successData(ResultCode.SUCCESS, list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据期次ID获取集电线路
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getCollectorWireByPidData/{projectid}")
|
|
|
+ public JSONObject getCollectorWireByPidData(@PathVariable String projectid) {
|
|
|
+ List<Line> list = lineService.getProjectid(projectid);
|
|
|
+ return Result.successData(ResultCode.SUCCESS, list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据场站ID获取所有测点
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getMeasuringPointBySnData/{windpowerstationid}")
|
|
|
+ public JSONObject getMeasuringPointBySnData(@PathVariable String windpowerstationid) {
|
|
|
+ List<Windturbine> list = windturbineService.getWindpowerstationid(windpowerstationid);
|
|
|
+ return Result.successData(ResultCode.SUCCESS, list);
|
|
|
+ }
|
|
|
+}
|