Browse Source

添加注册接口

wangchangsheng 2 years ago
parent
commit
ace8361968

+ 6 - 1
web/consumer-hb/pom.xml

@@ -18,6 +18,7 @@
         <spring-boot.version>2.3.7.RELEASE</spring-boot.version>
         <spring-cloud-alibaba.version>2.2.5.RELEASE</spring-cloud-alibaba.version>
         <feign-version>9.5.0</feign-version>
+        <pgsql.version>42.2.5</pgsql.version>
     </properties>
 
     <dependencies>
@@ -40,7 +41,11 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+            <version>${pgsql.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>

+ 2 - 1
web/consumer-hb/src/main/java/com/gyee/consumer/controller/peranalysis/PointPerSisController.java

@@ -51,6 +51,7 @@ public class PointPerSisController {
     @CrossOrigin(origins = "*", maxAge = 3600)
     @GetMapping(value = "/getpoints")
     public AjaxResult getpoints(){
-        return null;
+        AjaxResult ajax  = pointPerSisService.getpoints();
+        return ajax;
     }
 }

+ 16 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/controller/warn/WarningController.java

@@ -118,5 +118,21 @@ public class WarningController {
         return ajax;
     }
 
+    @PostMapping("/getLonShutdownevent")
+    @ResponseBody
+    @ApiOperation(value = "长停事件查询", notes = "长停事件查询")
+    public AjaxResult getLonShutdownevent(@RequestParam(value = "pageNum", required = true) Integer pageNum,
+                                          @RequestParam(value = "pageSize", required = true) Integer pageSize,
+                                          @RequestParam(value = "wpId", required = false) String wpId,
+                                          @RequestParam(value = "wtId", required = false) String wtId,
+                                          @RequestParam(value = "beginDate", required = true) String beginDate,
+                                          @RequestParam(value = "endDate", required = true) String endDate,
+                                          @RequestParam(value = "type", required = false) String type) throws Exception {
+        AjaxResult ajax = warningService.getLongShutdownevent(pageNum, pageSize, wpId, wtId,beginDate, endDate, type);
+
+        return ajax;
+    }
+
+
     /*****************************************************************************************************************/
 }

+ 5 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/warn/WarningServiceFallbackFactory.java

@@ -51,6 +51,11 @@ public class WarningServiceFallbackFactory implements FallbackFactory<WarningSer
                 return  AjaxResult.error(throwable.getMessage());
             }
 
+            @Override
+            public AjaxResult getLongShutdownevent(int pageNum, int pageSize, String wpId, String wtId, String beginDate, String endDate, String type) throws Exception {
+                return  AjaxResult.error(throwable.getMessage());
+            }
+
 
         };
     }

+ 2 - 2
web/consumer-hb/src/main/java/com/gyee/consumer/service/peranalysis/StationPerSisService.java

@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
-@FeignClient(name = "stationpersis", url = "${provider.peranalyurl}",
+@FeignClient(name = "stationPersis", url = "${provider.peranalyurl}",
         fallbackFactory = StationPerSisServiceFallbackFactory.class,
         configuration = FeignConfiguration.class)
 public interface StationPerSisService {
@@ -22,7 +22,7 @@ public interface StationPerSisService {
      * @param startdate
      * @param enddate
      */
-    @GetMapping(value = "/stationpersis/getStationPersis")
+    @GetMapping(value = "/stationPersis/getStationPersis")
     public AjaxResult getStationPersis(
             @RequestParam(value = "station") String station,
             @RequestParam(value = "startdate") String startdate,

+ 9 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/service/warn/WarningService.java

@@ -38,5 +38,14 @@ public interface WarningService {
     /***********************************************************************************************************************/
     @PostMapping("/event/getShutdownevent")
     public AjaxResult getShutdownevent(@RequestBody  Tablepar tablepar,@RequestParam("wpId")  String wpId,@RequestParam("wtId")  String wtId,@RequestParam("beginDate")  String beginDate,@RequestParam("endDate")  String endDate,@RequestParam("type")  String type) throws Exception ;
+    @GetMapping("/event/getLonShutdownevent")
+    public AjaxResult getLongShutdownevent( @RequestParam(value = "pageNum") int pageNum,
+                                            @RequestParam(value = "pageSize") int pageSize,
+                                            @RequestParam(value = "wpId") String wpId,
+                                            @RequestParam(value = "wtId") String wtId,
+                                            @RequestParam(value = "beginDate") String beginDate,
+                                            @RequestParam(value = "endDate") String endDate,
+                                            @RequestParam(value = "type") String type) throws Exception ;
+
 
 }