wangchangsheng 2 年之前
父节点
当前提交
0b0d9e820a

+ 6 - 5
web/consumer-hb/src/main/java/com/gyee/consumer/controller/peranalysis/EBAPerSisController.java

@@ -4,6 +4,7 @@ import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.service.peranalysis.EBApersisService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -26,11 +27,11 @@ public class EBAPerSisController {
     @ResponseBody
     @CrossOrigin
     @ApiOperation(value = "EBA能效分析", notes = "EBA能效分析")
-    public AjaxResult getEBAPerSisList(@RequestParam(value = "companyid", required = false) String companyid,
-                                       @RequestParam(value = "regionid", required = false) String regionid,
-                                       @RequestParam(value = "station", required = false) String station,
-                                       @RequestParam(value = "year", required = false) String year,
-                                       @RequestParam(value = "month", required = false) String month) {
+    public AjaxResult getEBAPerSisList(@RequestParam(value = "companyid") String companyid,
+                                       @RequestParam(value = "regionid") String regionid,
+                                       @RequestParam(value = "station") String station,
+                                       @RequestParam(value = "year") String year,
+                                       @RequestParam(value = "month") String month) {
 
         AjaxResult ajax = ebApersisService.getEBAPerSisList(companyid,regionid,station,year,month);
 

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

@@ -1,8 +1,8 @@
 package com.gyee.consumer.controller.peranalysis;
 
 
+import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.service.peranalysis.ElePerAnalysisService;
-import com.gyee.frame.common.domain.AjaxResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;

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

@@ -1,7 +1,7 @@
 package com.gyee.consumer.controller.peranalysis;
 
 import com.gyee.consumer.service.peranalysis.PointPerSisService;
-import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.common.domain.AjaxResult;
 import io.swagger.annotations.Api;
 import org.springframework.web.bind.annotation.*;
 

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

@@ -1,7 +1,8 @@
 package com.gyee.consumer.controller.peranalysis;
 
+import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.service.peranalysis.StationPerSisService;
-import com.gyee.frame.common.domain.AjaxResult;
+
 import io.swagger.annotations.Api;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 0
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/peranalysis/EBApersisServiceFallbackFactory.java

@@ -4,6 +4,7 @@ import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.service.peranalysis.EBApersisService;
 import feign.hystrix.FallbackFactory;
 
+
 public class EBApersisServiceFallbackFactory implements FallbackFactory<EBApersisService> {
     @Override
     public EBApersisService create(Throwable throwable) {

+ 2 - 1
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/peranalysis/ElePerAnalysisServiceFallbackFactory.java

@@ -1,7 +1,8 @@
 package com.gyee.consumer.fallback.peranalysis;
 
+import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.service.peranalysis.ElePerAnalysisService;
-import com.gyee.frame.common.domain.AjaxResult;
+
 import feign.hystrix.FallbackFactory;
 
 public class ElePerAnalysisServiceFallbackFactory implements FallbackFactory<ElePerAnalysisService> {

+ 2 - 1
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/peranalysis/PointPerSisServiceFallbackFactory.java

@@ -1,7 +1,8 @@
 package com.gyee.consumer.fallback.peranalysis;
 
+import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.service.peranalysis.PointPerSisService;
-import com.gyee.frame.common.domain.AjaxResult;
+
 import feign.hystrix.FallbackFactory;
 
 public class PointPerSisServiceFallbackFactory implements FallbackFactory<PointPerSisService> {

+ 1 - 1
web/consumer-hb/src/main/java/com/gyee/consumer/fallback/peranalysis/StationPerSisServiceFallbackFactory.java

@@ -1,7 +1,7 @@
 package com.gyee.consumer.fallback.peranalysis;
 
+import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.service.peranalysis.StationPerSisService;
-import com.gyee.frame.common.domain.AjaxResult;
 import feign.hystrix.FallbackFactory;
 
 public class StationPerSisServiceFallbackFactory implements FallbackFactory<StationPerSisService> {

+ 7 - 7
web/consumer-hb/src/main/java/com/gyee/consumer/service/peranalysis/EBApersisService.java

@@ -8,20 +8,20 @@ import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
-@FeignClient(name = "powercompare", url = "${provider.peranalyurl}",
+@FeignClient(name = "ebapersis", url = "${provider.peranalyurl}",
         fallbackFactory = EBApersisServiceFallbackFactory.class,
         configuration = FeignConfiguration.class)
 public interface EBApersisService {
 
 
 
-    @GetMapping("/powercompare/getebapersislist")
+    @GetMapping("/ebapersis/getebapersislist")
     @ApiOperation(value = "EBA能效分析", notes = "EBA能效分析")
-    public AjaxResult getEBAPerSisList(@RequestParam(value = "companyid", required = false) String companyid,
-                                       @RequestParam(value = "regionid", required = false) String regionid,
-                                       @RequestParam(value = "station", required = false) String station,
-                                       @RequestParam(value = "year", required = false) String year,
-                                       @RequestParam(value = "month", required = false) String month);
+    public AjaxResult getEBAPerSisList(@RequestParam(value = "companyid") String companyid,
+                                       @RequestParam(value = "regionid") String regionid,
+                                       @RequestParam(value = "station") String station,
+                                       @RequestParam(value = "year") String year,
+                                       @RequestParam(value = "month") String month);
 
 
 }

+ 8 - 8
web/consumer-hb/src/main/java/com/gyee/consumer/service/peranalysis/ElePerAnalysisService.java

@@ -1,26 +1,26 @@
 package com.gyee.consumer.service.peranalysis;
 
+import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.config.FeignConfiguration;
 import com.gyee.consumer.fallback.peranalysis.ElePerAnalysisServiceFallbackFactory;
-import com.gyee.frame.common.domain.AjaxResult;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
-@FeignClient(name = "powercompare", url = "${provider.peranalyurl}",
+@FeignClient(name = "eleperanalysis", url = "${provider.peranalyurl}",
         fallbackFactory = ElePerAnalysisServiceFallbackFactory.class,
         configuration = FeignConfiguration.class)
 public interface ElePerAnalysisService {
 
-    @GetMapping("/powercompare/geteleperanalysislist")
+    @GetMapping("/eleperanalysis/geteleperanalysislist")
     @ApiOperation(value = "月电量分析", notes = "月电量分析")
     public AjaxResult getElePerAnalysisList(
-            @RequestParam(value = "companyid", required = false) String companyid,
-            @RequestParam(value = "regionid", required = false) String regionid,
-            @RequestParam(value = "station", required = false) String station,
-            @RequestParam(value = "year", required = false) String year,
-            @RequestParam(value = "month", required = false) String month
+            @RequestParam(value = "companyid") String companyid,
+            @RequestParam(value = "regionid") String regionid,
+            @RequestParam(value = "station") String station,
+            @RequestParam(value = "year") String year,
+            @RequestParam(value = "month") String month
     );
 
 }

+ 6 - 6
web/consumer-hb/src/main/java/com/gyee/consumer/service/peranalysis/PointPerSisService.java

@@ -1,9 +1,9 @@
 package com.gyee.consumer.service.peranalysis;
 
 
+import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.config.FeignConfiguration;
 import com.gyee.consumer.fallback.peranalysis.PointPerSisServiceFallbackFactory;
-import com.gyee.frame.common.domain.AjaxResult;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -25,11 +25,11 @@ public interface PointPerSisService {
      */
     @GetMapping(value = "/pointpersis/getPointPerSisList")
     public AjaxResult getPointPerSisList(
-            @RequestParam(value = "wtid", required = true) String wtid,
-            @RequestParam(value = "beginDate", required = true) Long beginDate,
-            @RequestParam(value = "endDate", required = true) Long endDate,
-            @RequestParam(value = "interval", required = true) Integer interval,
-            @RequestParam(value = "uniformcodes", required = true) String uniformcodes
+            @RequestParam(value = "wtid") String wtid,
+            @RequestParam(value = "beginDate") Long beginDate,
+            @RequestParam(value = "endDate") Long endDate,
+            @RequestParam(value = "interval") Integer interval,
+            @RequestParam(value = "uniformcodes") String uniformcodes
 
     );
 

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

@@ -1,10 +1,9 @@
 package com.gyee.consumer.service.peranalysis;
 
 
+import com.gyee.common.domain.AjaxResult;
 import com.gyee.consumer.config.FeignConfiguration;
-import com.gyee.consumer.fallback.peranalysis.PointPerSisServiceFallbackFactory;
 import com.gyee.consumer.fallback.peranalysis.StationPerSisServiceFallbackFactory;
-import com.gyee.frame.common.domain.AjaxResult;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -24,7 +23,7 @@ public interface StationPerSisService {
      */
     @GetMapping(value = "/stationpersis/getStationPersis")
     public AjaxResult getStationPersis(
-            @RequestParam(value = "station", required = false) String station,
-            @RequestParam(value = "startdate", required = false) String startdate,
-            @RequestParam(value = "enddate", required = false) String enddate);
+            @RequestParam(value = "station") String station,
+            @RequestParam(value = "startdate") String startdate,
+            @RequestParam(value = "enddate") String enddate);
 }

+ 1 - 0
web/consumer-hb/src/main/resources/application-jn.yml

@@ -107,6 +107,7 @@ provider:
   analysisurl: http://10.81.3.155:8171/
   adminurl: http://10.81.3.155:8171/
   alarmurl: http://10.81.3.155:8171/
+  peranalyurl: http://10.81.3.155:8171/
 
 #  monitorurl: http://192.168.56.1:8171/
 #  healthurl: http://192.168.56.1:8171/