Bladeren bron

接口调试修改

shilin 3 jaren geleden
bovenliggende
commit
e3306742d7
23 gewijzigde bestanden met toevoegingen van 8817 en 670 verwijderingen
  1. 7 7
      src/main/java/com/gyee/SpringbootStart.java
  2. 57 1
      src/main/java/com/gyee/frame/controller/benchmarking/BenchmarkingController.java
  3. 38 0
      src/main/java/com/gyee/frame/controller/goodness/WindturbineDetailChartController.java
  4. 33 226
      src/main/java/com/gyee/frame/controller/health/HealthSubController.java
  5. 3 3
      src/main/java/com/gyee/frame/controller/projectplan/ProjectPlanController.java
  6. 60 40
      src/main/java/com/gyee/frame/controller/scatter/ScatterController.java
  7. 97 0
      src/main/java/com/gyee/frame/mapper/auto/WindturbineinfodaytopMapper.java
  8. 2202 0
      src/main/java/com/gyee/frame/model/auto/Windturbineinfodaytop.java
  9. 4304 0
      src/main/java/com/gyee/frame/model/auto/WindturbineinfodaytopExample.java
  10. 3 3
      src/main/java/com/gyee/frame/model/custom/weather/Wind.java
  11. 6 1
      src/main/java/com/gyee/frame/service/Windturbineinfodaytop2Service.java
  12. 288 0
      src/main/java/com/gyee/frame/service/WindturbineinfodaytopService.java
  13. 1 1
      src/main/java/com/gyee/frame/service/weather/WeatherService.java
  14. 331 329
      src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java
  15. 1 1
      src/main/resources/application.yml
  16. 1 1
      src/main/resources/mybatis-generator.xml
  17. 1 1
      src/main/resources/mybatis/auto/Windturbineinfodaytop2Mapper.xml
  18. 1236 0
      src/main/resources/mybatis/auto/WindturbineinfodaytopMapper.xml
  19. 6 4
      src/test/java/test/BenchmarkingTest.java
  20. 18 11
      src/test/java/test/HealthTest.java
  21. 30 33
      src/test/java/test/LeaderboardTest.java
  22. 9 8
      src/test/java/test/WeatherServiceTest.java
  23. 85 0
      src/test/java/test/WindturbineinfodaytopTest.java

+ 7 - 7
src/main/java/com/gyee/SpringbootStart.java

@@ -20,12 +20,12 @@ public class SpringbootStart {
 
 
         InitialRedis initialRedis=new InitialRedis();
-//        System.out.println("初始化开始!");
-//        initialRedis.intialWindturbinepowercurvefitting();
-//        initialRedis.intialWpScatter();
-//        initialRedis.intialPjScatter();
-//        initialRedis.intialLnScatter();
-//        initialRedis.intialWtScatter();
-//        System.out.println("初始化完成!");
+        System.out.println("初始化开始!");
+        initialRedis.intialWindturbinepowercurvefitting();
+        initialRedis.intialWpScatter();
+        initialRedis.intialPjScatter();
+        initialRedis.intialLnScatter();
+        initialRedis.intialWtScatter();
+        System.out.println("初始化完成!");
     }
 }

+ 57 - 1
src/main/java/com/gyee/frame/controller/benchmarking/BenchmarkingController.java

@@ -3,10 +3,12 @@ package com.gyee.frame.controller.benchmarking;
 import com.github.pagehelper.PageInfo;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.Windturbineinfodaytop;
 import com.gyee.frame.model.auto.Windturbineinfodaytop2;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.model.custom.ValueVo;
 import com.gyee.frame.service.Windturbineinfodaytop2Service;
+import com.gyee.frame.service.WindturbineinfodaytopService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
 import io.swagger.annotations.Api;
@@ -33,7 +35,8 @@ public class BenchmarkingController {
 //    private Windturbineinfodaytop3Service windturbineinfodaytop2Service;
     @Resource
     private Windturbineinfodaytop2Service windturbineinfodaytop2Service;
-    
+    @Resource
+    private WindturbineinfodaytopService windturbineinfodaytopService;
 
     /**查询等级评估日所有信息**/
 
@@ -168,4 +171,57 @@ public class BenchmarkingController {
 
         return	AjaxResult.error(AjaxStatus.error.code,null);
     }
+
+
+    @PostMapping("/gadayhistlist")
+    @ResponseBody
+    @ApiOperation(value = "查询日历史信息", notes = "查询日历史信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult gadayhistlist(Tablepar tablepar,String wtId, String recorddate) {
+
+        Date tempDate=null;
+        if (StringUtils.isNotEmpty(recorddate))
+        {
+            tempDate=DateUtils.parseDate(recorddate);
+        }
+        List<Windturbineinfodaytop> ls=windturbineinfodaytopService.gadayhistlist(wtId,tempDate);
+
+
+        return	AjaxResult.successData(AjaxStatus.success.code,ls);
+
+    }
+
+    @PostMapping("/gamonthhistlist")
+    @ResponseBody
+    @ApiOperation(value = "查询月历史信息", notes = "查询月历史信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult gamonthhistlist(String wtId, String year,String month) {
+
+
+        List<Windturbineinfodaytop> ls=windturbineinfodaytopService.gamonthhistlist(wtId,year,month);
+
+        return	AjaxResult.successData(AjaxStatus.success.code,ls);
+
+    }
+    /**按页查询等级评估年所有信息**/
+    @PostMapping("/gayearhistlist")
+    @ResponseBody
+    @ApiOperation(value = "查询年历史信息", notes = "查询年历史信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult gayearhistlist(Tablepar tablepar,String wtId, String year) {
+
+
+        List<Windturbineinfodaytop> ls=windturbineinfodaytopService.gayearhistlist(wtId,year);
+
+        return	AjaxResult.successData(AjaxStatus.success.code,ls);
+
+    }
 }

+ 38 - 0
src/main/java/com/gyee/frame/controller/goodness/WindturbineDetailChartController.java

@@ -77,6 +77,14 @@ public class WindturbineDetailChartController {
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
 
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
+
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
+
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     double temp1=0.0;
@@ -303,7 +311,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
 
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     double temp1=0.0;
@@ -493,7 +507,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
 
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
 
@@ -685,7 +705,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
 
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
 
@@ -877,7 +903,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
 
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     double temp1=0.0;
@@ -1068,7 +1100,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
+                int cb = (int) wtdls.get(0).getCb().intValue();
+                int cd = (int) wtdls.get(0).getCd().intValue();
+                int cg = (int) wtdls.get(0).getCg().intValue();
 
+                jfplday = "静风频率为" + cb;
+                jfplmonth = "静风频率为" + cd;
+                jfplyear = "静风频率为" + cg;
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     double temp1=0.0;

+ 33 - 226
src/main/java/com/gyee/frame/controller/health/HealthSubController.java

@@ -2,8 +2,10 @@ package com.gyee.frame.controller.health;
 
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.custom.*;
 import com.gyee.frame.service.health.HealthSubService;
+import com.gyee.frame.service.weather.WeatherDay5Service;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
 import io.swagger.annotations.Api;
@@ -26,6 +28,11 @@ public class HealthSubController {
     @Resource
     private HealthSubService healthSubService;
 
+    @Resource
+    private WeatherDay5Service weatherDay5Service;
+
+
+
     @PostMapping("/findWtHealthInfo")
     @ResponseBody
     @ApiOperation(value = "获取健康管理风机信息", notes = "获取健康管理风机信息")
@@ -86,232 +93,6 @@ public class HealthSubController {
 
     }
 
-//    @PostMapping("/findPartHealthInfo")
-//    @ResponseBody
-//    @ApiOperation(value = "获取健康管理风机部件基础信息", notes = "获取健康管理风机部件基础信息")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
-//            })
-//    public AjaxResult findPartHealthInfo(String wtId) throws Exception {
-//
-//
-//        Map<String, Map<String, Object>>  map = new HashMap<>();
-//
-//        if(StringUtils.notEmp(wtId))
-//        {
-//            map = healthSubService.findPartHealthInfo(wtId);
-//        }
-//
-//        if (null!=map) {
-//            return AjaxResult.successData(AjaxStatus.success.code, map);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.error.code, map);
-//        }
-//
-//    }
-//
-//
-//    @PostMapping("/initalGzjfx")
-//    @ResponseBody
-//    @ApiOperation(value = "故障数据统计", notes = "故障数据统计")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
-//    })
-//    public AjaxResult initalGzjfx(String wtId) throws Exception {
-//
-//
-//        List<GzfxVo> vos = new ArrayList<>();
-//
-//        if(StringUtils.notEmp(wtId))
-//        {
-//            Calendar cal = Calendar.getInstance();
-//            Date recodedate = cal.getTime();
-//            vos = healthSubService.initalGzjfx(wtId,recodedate);
-//        }
-//
-//        if (null!=vos) {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.error.code, vos);
-//        }
-//
-//    }
-//
-//    @PostMapping("/initalYjfx")
-//    @ResponseBody
-//    @ApiOperation(value = "预警数据统计", notes = "预警数据统计")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
-//    })
-//    public AjaxResult initalYjfx(String wtId) throws Exception {
-//
-//
-//        List<YjfxVo> vos = new ArrayList<>();
-//
-//        if(StringUtils.notEmp(wtId))
-//        {
-//            Calendar cal = Calendar.getInstance();
-//            Date recodedate = cal.getTime();
-//            vos = healthSubService.initalYjfx(wtId,recodedate);
-//        }
-//
-//        if (null!=vos) {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.error.code, vos);
-//        }
-//
-//    }
-//
-//    @PostMapping("/initalYxfx")
-//    @ResponseBody
-//    @ApiOperation(value = "部件运行数据", notes = "部件运行数据")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
-//    })
-//    public AjaxResult initalYxfx(String wtId) throws Exception {
-//
-//
-//        List<YxfxVo> vos = new ArrayList<>();
-//
-//        if(StringUtils.notEmp(wtId))
-//        {
-//            Calendar cal = Calendar.getInstance();
-//            Date recodedate = cal.getTime();
-//            vos = healthSubService.initalYxfx(wtId,recodedate);
-//        }
-//
-//        if (null!=vos) {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.error.code, vos);
-//        }
-//
-//    }
-//
-//    @PostMapping("/initalXnfx")
-//    @ResponseBody
-//    @ApiOperation(value = "获得日、月等级评估", notes = "获得日、月等级评估")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
-//    })
-//    public AjaxResult initalXnfx(String wtId) throws Exception {
-//
-//
-//        List<XnfxVo> vos = new ArrayList<>();
-//
-//        if(StringUtils.notEmp(wtId))
-//        {
-//            Calendar cal = Calendar.getInstance();
-//            vos = healthSubService.initalXnfx(wtId,cal);
-//        }
-//
-//        if (null!=vos) {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.error.code, vos);
-//        }
-//
-//    }
-//
-//    @PostMapping("/initalShutdown")
-//    @ResponseBody
-//    @ApiOperation(value = "获得当日停机事件", notes = "获得当日停机事件")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
-//    })
-//    public AjaxResult initalShutdown(String wtId) throws Exception {
-//
-//
-//        List<ShutdowneventVo> vos = new ArrayList<>();
-//
-//        if(StringUtils.notEmp(wtId))
-//        {
-//             vos = healthSubService.initalShutdown(wtId);
-//        }
-//
-//        if (null!=vos) {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.error.code, vos);
-//        }
-//
-//    }
-//
-//    @PostMapping("/findJudgmentList")
-//    @ResponseBody
-//    @ApiOperation(value = "获得健康评价列表", notes = "获得健康评价列表")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
-//    })
-//    public AjaxResult findJudgmentList(String wtId) throws Exception {
-//
-//
-//        List<ValueVo> vos = new ArrayList<>();
-//
-//        if(StringUtils.notEmp(wtId))
-//        {
-//
-//            vos = healthSubService.findJudgmentList(wtId);
-//        }
-//
-//        if (null!=vos) {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.error.code, vos);
-//        }
-//
-//    }
-//
-//    @PostMapping("/findQxpcList")
-//    @ResponseBody
-//    @ApiOperation(value = "各个区间曲线偏差率", notes = "各个区间曲线偏差率")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
-//    })
-//    public AjaxResult findQxpcList(String wtId) throws Exception {
-//
-//
-//        List<QxpcVo> vos = new ArrayList<>();
-//
-//        if(StringUtils.notEmp(wtId))
-//        {
-//
-//            vos = healthSubService.findQxpcList(wtId);
-//        }
-//
-//        if (null!=vos) {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.error.code, vos);
-//        }
-//
-//    }
-//
-//    @PostMapping("/findWdList")
-//    @ResponseBody
-//    @ApiOperation(value = "温度范围", notes = "温度范围")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
-//    })
-//    public AjaxResult findWdList(String wtId) throws Exception {
-//
-//
-//        List<YxfxVo> vos = new ArrayList<>();
-//
-//        if(StringUtils.notEmp(wtId))
-//        {
-//
-//            vos = healthSubService.findWdList(wtId);
-//        }
-//
-//        if (null!=vos) {
-//            return AjaxResult.successData(AjaxStatus.success.code, vos);
-//        } else {
-//            return AjaxResult.successData(AjaxStatus.error.code, vos);
-//        }
-//
-//    }
 /********************************************************************************************************/
 
     @PostMapping("/gadaytop5")
@@ -391,6 +172,32 @@ public class HealthSubController {
 
     }
 
+    @PostMapping("/getWeatherRealDay5Info")
+    @ResponseBody
+    @ApiOperation(value = "获取近5天气象数据", notes = "获取近5天气象数据")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
+    })
+    public AjaxResult getWeatherRealDay5Info(String wtId) throws Exception {
+
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if(StringUtils.notEmp(wtId) && InitialRunner.wpmap.containsKey(wtId))
+        {
+
+            map = weatherDay5Service.getWeatherRealDay5Info(wtId);
+        }
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+
 
     @PostMapping("/findPowerChar")
     @ResponseBody

+ 3 - 3
src/main/java/com/gyee/frame/controller/projectplan/ProjectPlanController.java

@@ -60,11 +60,11 @@ public class ProjectPlanController {
             @ApiImplicitParam(name = "pjId", value = "项目编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query")})
 
-    public AjaxResult getSingleProjectPlan(String projectid, String year) {
+    public AjaxResult getSingleProjectPlan(String pjId, String year) {
 
-        if (StringUtils.notEmp(projectid) && StringUtils.notEmp(year))
+        if (StringUtils.notEmp(pjId) && StringUtils.notEmp(year))
         {
-            ProjectPlanVo  vo=projectPlanService.getSingleProjectPlan(projectid,year);
+            ProjectPlanVo  vo=projectPlanService.getSingleProjectPlan(pjId,year);
 
             return AjaxResult.successData(AjaxStatus.success.code, vo);
         }

+ 60 - 40
src/main/java/com/gyee/frame/controller/scatter/ScatterController.java

@@ -78,11 +78,11 @@ public class ScatterController {
             if (years == Integer.valueOf(year) && months <= (Integer.valueOf(month) - 1)) {
                 StringBuilder sb = new StringBuilder();
                 if (StringUtils.notEmp(wpId)) {
-                    sb.append("scatter_").append(wpId).append("_").append(months);
+                    sb.append("scatter_").append(wpId).append("_").append(month);
                 } else if (StringUtils.notEmp(pjId)) {
-                    sb.append("scatter_").append(pjId).append("_").append(months);
+                    sb.append("scatter_").append(pjId).append("_").append(month);
                 } else if (StringUtils.notEmp(lnId)) {
-                    sb.append("scatter_").append(lnId).append("_").append(months);
+                    sb.append("scatter_").append(lnId).append("_").append(month);
                 }
 
 
@@ -166,6 +166,8 @@ public class ScatterController {
     public AjaxResult scatterWtAjax(String wtId, String year, String month) throws Exception {
 
         Map<String, List<List<Double>>> result = new HashMap<String, List<List<Double>>>();
+
+        List<List<Double>> vos = new ArrayList<List<Double>>();
         if (StringUtils.notEmp(year) && StringUtils.notEmp(month)) {
 
             Calendar cal = Calendar.getInstance();
@@ -173,56 +175,74 @@ public class ScatterController {
             cal.set(Calendar.MINUTE, 0);
             cal.set(Calendar.SECOND, 0);
 
-            cal.set(Calendar.YEAR, Integer.valueOf(year));
-            cal.set(Calendar.MONTH, Integer.valueOf(month) - 1);
-            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
-            Date beginDate = cal.getTime();
-            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
-            Date endDate = cal.getTime();
 
+            int years = cal.get((Calendar.YEAR));
+            int months = cal.get((Calendar.MONTH));
 
-            WindTurbineTestingPointAi2 gl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.TPOINT_WT_FJGL);
-            int daynum = DateUtils.daysDiff(beginDate, endDate);
-            long pried = 60 * 10;
-            long count = 6 * 24 * daynum;
-            DecimalFormat dcmFmt = new DecimalFormat("0.00");
-            List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
-            WindTurbineTestingPointAi2 fs = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.TPOINT_WT_FJSSFS);
-            List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
 
+            if (years == Integer.valueOf(year) && months <= (Integer.valueOf(month) - 1)) {
+                StringBuilder sb = new StringBuilder();
+                if (StringUtils.notEmp(wtId)) {
+                    sb.append("scatter_").append(wtId).append("_").append(month);
+                }
 
-            List<List<Double>> vos = new ArrayList<List<Double>>();
-            if (!gls.isEmpty() && !fss.isEmpty()) {
-                for (int i = 0; i < fss.size(); i++) {
 
-                    List<Double> ds = new ArrayList<Double>();
 
-                    double f = fss.get(i).getPointValueInDouble();
-                    ds.add(Double.valueOf(dcmFmt.format(f)));
-                    f = gls.get(i).getPointValueInDouble();
-                    ds.add(Double.valueOf(dcmFmt.format(f)));
-                    vos.add(ds);
-                }
-            }
+                String scatter = (String) (globalCache.get(String.valueOf(sb)));
+                vos = JSONObject.parseObject(scatter, new TypeReference<List<List<Double>>>() {
+                });
 
-            List<List<Double>> vos2 = new ArrayList<List<Double>>();
+            } else {
 
-            List<Windturbinecurvefittingmonth> wcls = windturbinecurvefittingmonthService.getWindturbinecurvefittingmonthList(wtId, year, month);
+                cal.set(Calendar.YEAR, Integer.valueOf(year));
+                cal.set(Calendar.MONTH, Integer.valueOf(month) - 1);
+                cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+                Date beginDate = cal.getTime();
+                cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                Date endDate = cal.getTime();
+
+                WindTurbineTestingPointAi2 gl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.TPOINT_WT_FJGL);
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 60 * 10;
+                long count = 6 * 24 * daynum;
+                DecimalFormat dcmFmt = new DecimalFormat("0.00");
+                List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+                WindTurbineTestingPointAi2 fs = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.TPOINT_WT_FJSSFS);
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
 
-            for (Windturbinecurvefittingmonth wc : wcls) {
+                if (!gls.isEmpty() && !fss.isEmpty()) {
+                    for (int i = 0; i < fss.size(); i++) {
 
-                List<Double> ds = new ArrayList<Double>();
-                int c = (int) wc.getSpeed().intValue();
+                        List<Double> ds = new ArrayList<Double>();
 
-                if (c == wc.getSpeed()) {
-                    ds.add(wc.getSpeed());
-                    ds.add(wc.getActualpower());
-                    // vo.setValue1(wc.getSpeed());// 风速
-                    // vo.setValue2(wc.getActualpower());// 实际拟合功率
-                    // vo.setValue3(wc.getOptimalpower());// 最优拟合功率
-                    vos2.add(ds);
+                        double f = fss.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        f = gls.get(i).getPointValueInDouble();
+                        ds.add(Double.valueOf(dcmFmt.format(f)));
+                        vos.add(ds);
+                    }
                 }
             }
+                List<List<Double>> vos2 = new ArrayList<List<Double>>();
+
+                List<Windturbinecurvefittingmonth> wcls = windturbinecurvefittingmonthService.getWindturbinecurvefittingmonthList(wtId, year, month);
+
+                for (Windturbinecurvefittingmonth wc : wcls) {
+
+                    List<Double> ds = new ArrayList<Double>();
+                    int c = (int) wc.getSpeed().intValue();
+
+                    if (c == wc.getSpeed()) {
+                        ds.add(wc.getSpeed());
+                        ds.add(wc.getActualpower());
+                        // vo.setValue1(wc.getSpeed());// 风速
+                        // vo.setValue2(wc.getActualpower());// 实际拟合功率
+                        // vo.setValue3(wc.getOptimalpower());// 最优拟合功率
+                        vos2.add(ds);
+                    }
+                }
+
+
             result.put("scatter", vos);
             result.put("line", vos2);
 

+ 97 - 0
src/main/java/com/gyee/frame/mapper/auto/WindturbineinfodaytopMapper.java

@@ -0,0 +1,97 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.Windturbineinfodaytop;
+import com.gyee.frame.model.auto.WindturbineinfodaytopExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface WindturbineinfodaytopMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    long countByExample(WindturbineinfodaytopExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(WindturbineinfodaytopExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    int insert(Windturbineinfodaytop record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    int insertSelective(Windturbineinfodaytop record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    List<Windturbineinfodaytop> selectByExample(WindturbineinfodaytopExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    Windturbineinfodaytop selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") Windturbineinfodaytop record, @Param("example") WindturbineinfodaytopExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") Windturbineinfodaytop record, @Param("example") WindturbineinfodaytopExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(Windturbineinfodaytop record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINEINFODAYTOP
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(Windturbineinfodaytop record);
+}

File diff suppressed because it is too large
+ 2202 - 0
src/main/java/com/gyee/frame/model/auto/Windturbineinfodaytop.java


File diff suppressed because it is too large
+ 4304 - 0
src/main/java/com/gyee/frame/model/auto/WindturbineinfodaytopExample.java


+ 3 - 3
src/main/java/com/gyee/frame/model/custom/weather/Wind.java

@@ -12,7 +12,7 @@ package com.gyee.frame.model.custom.weather;
 public class Wind {
 
     private double speed;//风速
-    private int deg;//风向
+    private double deg;//风向
     private double gust;
     public void setSpeed(double speed) {
          this.speed = speed;
@@ -21,10 +21,10 @@ public class Wind {
          return speed;
      }
 
-    public void setDeg(int deg) {
+    public void setDeg(double deg) {
          this.deg = deg;
      }
-     public int getDeg() {
+     public double getDeg() {
          return deg;
      }
 

+ 6 - 1
src/main/java/com/gyee/frame/service/Windturbineinfodaytop2Service.java

@@ -404,6 +404,9 @@ public class Windturbineinfodaytop2Service implements BaseService<Windturbineinf
 
 			}
 
+			ValueVo vo1 = new ValueVo();
+			vo1.setName(wtd.getWindturbineid());
+			vos.add(vo1);
 		return	vos;
 
 		}
@@ -489,7 +492,9 @@ public class Windturbineinfodaytop2Service implements BaseService<Windturbineinf
 				vos.add(vo);
 
 			}
-
+			ValueVo vo1 = new ValueVo();
+			vo1.setName(wtd.getWindturbineid());
+			vos.add(vo1);
 			return	vos;
 
 		}

+ 288 - 0
src/main/java/com/gyee/frame/service/WindturbineinfodaytopService.java

@@ -0,0 +1,288 @@
+package com.gyee.frame.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.WindturbineinfodaytopMapper;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ * 风机信息表 WindturbineinfodaytopService
+ * @Title: WindturbineinfodaytopService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-30 17:00:04  
+ **/
+@Service
+public class WindturbineinfodaytopService implements BaseService<Windturbineinfodaytop, WindturbineinfodaytopExample> {
+	@Resource
+	private WindturbineinfodaytopMapper windturbineinfodaytopMapper;
+	@Resource
+	private WindturbineinfodayService windturbineinfodayService;
+
+	/**
+	 * 分页查询
+	 * @param tablepar
+	 * @param name
+	 * @return
+	 */
+	 public PageInfo<Windturbineinfodaytop> list(Tablepar tablepar, String name){
+	        WindturbineinfodaytopExample testExample=new WindturbineinfodaytopExample();
+	        testExample.setOrderByClause("id ASC");
+	        if(name!=null&&!"".equals(name)){
+//	        	testExample.createCriteria().and.andCodeLike("%"+name+"%");
+	        }
+
+	        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+	        List<Windturbineinfodaytop> list= windturbineinfodaytopMapper.selectByExample(testExample);
+	        PageInfo<Windturbineinfodaytop> pageInfo = new PageInfo<Windturbineinfodaytop>(list);
+	        return  pageInfo;
+	 }
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+
+			List<Integer> lista=Convert.toIntArrayList(ids);
+			WindturbineinfodaytopExample example=new WindturbineinfodaytopExample();
+			example.createCriteria().andIdIn(lista);
+			return windturbineinfodaytopMapper.deleteByExample(example);
+
+
+	}
+
+
+	@Override
+	public Windturbineinfodaytop selectByPrimaryKey(String id) {
+
+	 	if(StringUtils.isNotEmpty(id))
+		{
+			return windturbineinfodaytopMapper.selectByPrimaryKey(Integer.valueOf(id));
+
+		}
+	 	return new Windturbineinfodaytop();
+
+	}
+
+
+	@Override
+	public int updateByPrimaryKeySelective(Windturbineinfodaytop record) {
+		return windturbineinfodaytopMapper.updateByPrimaryKeySelective(record);
+	}
+
+
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Windturbineinfodaytop record) {
+
+//		//添加雪花主键id
+//		record.setId(SnowflakeIdWorker.getUUID());
+
+
+		return windturbineinfodaytopMapper.insertSelective(record);
+	}
+
+
+	@Override
+	public int updateByExampleSelective(Windturbineinfodaytop record, WindturbineinfodaytopExample example) {
+
+		return windturbineinfodaytopMapper.updateByExampleSelective(record, example);
+	}
+
+
+	@Override
+	public int updateByExample(Windturbineinfodaytop record, WindturbineinfodaytopExample example) {
+
+		return windturbineinfodaytopMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Windturbineinfodaytop> selectByExample(WindturbineinfodaytopExample example) {
+
+		return windturbineinfodaytopMapper.selectByExample(example);
+	}
+
+
+	@Override
+	public long countByExample(WindturbineinfodaytopExample example) {
+
+		return windturbineinfodaytopMapper.countByExample(example);
+	}
+
+
+	@Override
+	public int deleteByExample(WindturbineinfodaytopExample example) {
+
+		return windturbineinfodaytopMapper.deleteByExample(example);
+	}
+
+
+	/******************************************************************************************************************/
+	public List<Windturbineinfodaytop> gadayhistlist(String wtId, Date recorddate)  {
+		List<Windturbineinfodaytop> ls=null;
+
+		WindturbineinfodaytopExample example=new WindturbineinfodaytopExample();
+		example.setOrderByClause("windturbineid ASC");
+
+		if(StringUtils.notEmp(wtId) &&  StringUtils.notEmp(recorddate)){
+
+
+			example.createCriteria().andWindturbineidEqualTo(wtId).andRecorddateGreaterThanOrEqualTo(recorddate).andRecorddateLessThan(DateUtils.addDays(recorddate,1));
+			ls= windturbineinfodaytopMapper.selectByExample(example);
+
+			Map<String, Windturbine> wtmap = InitialRunner.wtmap;
+
+			if (!ls.isEmpty()) {
+				for (Windturbineinfodaytop wtop : ls) {
+					if (wtmap.containsKey(wtop.getWindturbineid())) {
+						Windturbine wt = wtmap.get(wtop.getWindturbineid());
+						wtop.setWindturbinename(wt.getName());
+					}
+					List<WindTurbineInfoDay> wtdls = windturbineinfodayService.getWindturbineinfo(wtop.getWindturbineid(),recorddate);
+					if (null != wtdls && !wtdls.isEmpty()) {
+						WindTurbineInfoDay wt = wtdls.get(0);
+						double fdl = null != wt.getGeneratingcapacity2() ? wt.getGeneratingcapacity2() : 0.0;
+						double gz = null != wt.getLossofpower2() ? wt.getLossofpower2() : 0.0;
+						double jx = null != wt.getLossofpower3() ? wt.getLossofpower3() : 0.0;
+						double qf = null != wt.getLossofpower4() ? wt.getLossofpower4() : 0.0;
+						double xd = null != wt.getLossofpower1() ? wt.getLossofpower1() : 0.0;
+						double sl1 = null != wt.getMainlossin() ? wt.getMainlossin() : 0.0;
+						double sl2 = null != wt.getFaultlossin() ? wt.getFaultlossin() : 0.0;
+						double sl3 = null != wt.getElectriclossout() ? wt.getElectriclossout() : 0.0;
+						double sl4 = null != wt.getWeatherlossout() ? wt.getWeatherlossout() : 0.0;
+
+						wtop.setDayllfdl(StringUtils.round(fdl + gz + jx + qf + xd + sl1 + sl2 + sl3 + sl4, 2));
+					}
+				}
+			}
+		}else
+		{
+			ls=new ArrayList<>();
+		}
+
+
+		return ls;
+	}
+
+
+	public List<Windturbineinfodaytop> gamonthhistlist(String wtId, String  year,String month)  {
+		List<Windturbineinfodaytop> ls=null;
+
+		WindturbineinfodaytopExample example=new WindturbineinfodaytopExample();
+		example.setOrderByClause("windturbineid ASC");
+
+		if(StringUtils.notEmp(wtId) &&  StringUtils.notEmp(year) &&  StringUtils.notEmp(month)){
+
+			Calendar c = Calendar.getInstance();
+			c.set(Calendar.YEAR, Integer.valueOf(year));
+			c.set(Calendar.MONTH, Integer.valueOf(month) - 1);
+			c.set(Calendar.DAY_OF_MONTH, 1);
+
+			Date beginDate=DateUtils.truncate(c.getTime());
+			c.add(Calendar.MONTH,1);
+			Date endDate=c.getTime();
+
+			example.createCriteria().andWindturbineidEqualTo(wtId).andRecorddateGreaterThanOrEqualTo(beginDate).andRecorddateLessThan(endDate);
+			ls= windturbineinfodaytopMapper.selectByExample(example);
+
+
+			if (!ls.isEmpty()) {
+				List<WindTurbineInfoDay> wtdls = windturbineinfodayService.getWindturbineinfo(beginDate,endDate,wtId);
+				Map<String, Double> map = new HashMap<String, Double>();
+				if (null != wtdls && !wtdls.isEmpty()) {
+					for (WindTurbineInfoDay wt : wtdls) {
+						double result = getllfdlValue(wt);
+						map.put(DateUtils.format(wt.getRecorddate()), result);
+
+					}
+				}
+
+				for (Windturbineinfodaytop w : ls) {
+					if (map.containsKey(DateUtils.format(w.getRecorddate()))) {
+						double llfdl = map.get(DateUtils.format(w.getRecorddate()));
+						w.setDayllfdl(StringUtils.round(llfdl, 2));
+					}
+				}
+			}
+		}else
+		{
+			ls=new ArrayList<>();
+		}
+
+
+		return ls;
+	}
+
+	public List<Windturbineinfodaytop> gayearhistlist(String wtId, String  year)  {
+		List<Windturbineinfodaytop> ls=null;
+
+		WindturbineinfodaytopExample example=new WindturbineinfodaytopExample();
+		example.setOrderByClause("windturbineid ASC");
+
+		if(StringUtils.notEmp(wtId) &&  StringUtils.notEmp(year) ){
+
+			Calendar c = Calendar.getInstance();
+			c.set(Calendar.YEAR, Integer.valueOf(year));
+			c.set(Calendar.MONTH, 0);
+			c.set(Calendar.DAY_OF_MONTH, 1);
+
+			Date beginDate=DateUtils.truncate(c.getTime());
+			c.add(Calendar.YEAR,1);
+			Date endDate=c.getTime();
+
+			example.createCriteria().andWindturbineidEqualTo(wtId).andRecorddateGreaterThanOrEqualTo(beginDate).andRecorddateLessThan(endDate);
+			ls= windturbineinfodaytopMapper.selectByExample(example);
+
+
+			if (!ls.isEmpty()) {
+				List<WindTurbineInfoDay> wtdls = windturbineinfodayService.getWindturbineinfo(beginDate,endDate,wtId);
+				Map<String, Double> map = new HashMap<String, Double>();
+				if (null != wtdls && !wtdls.isEmpty()) {
+					for (WindTurbineInfoDay wt : wtdls) {
+						double result = getllfdlValue(wt);
+						map.put(DateUtils.format(wt.getRecorddate()), result);
+
+					}
+				}
+
+				for (Windturbineinfodaytop w : ls) {
+					if (map.containsKey(DateUtils.format(w.getRecorddate()))) {
+						double llfdl = map.get(DateUtils.format(w.getRecorddate()));
+						w.setDayllfdl(StringUtils.round(llfdl, 2));
+					}
+				}
+
+			}
+		}else
+		{
+			ls=new ArrayList<>();
+		}
+
+
+		return ls;
+	}
+
+	private double getllfdlValue(WindTurbineInfoDay wt) {
+		double fdl = null != wt.getGeneratingcapacity2() ? wt.getGeneratingcapacity2() : 0.0;
+		double gz = null != wt.getLossofpower2() ? wt.getLossofpower2() : 0.0;
+		double jx = null != wt.getLossofpower3() ? wt.getLossofpower3() : 0.0;
+		double qf = null != wt.getLossofpower4() ? wt.getLossofpower4() : 0.0;
+		double xd = null != wt.getLossofpower1() ? wt.getLossofpower1() : 0.0;
+		double sl1 = null != wt.getMainlossin() ? wt.getMainlossin() : 0.0;
+		double sl2 = null != wt.getFaultlossin() ? wt.getFaultlossin() : 0.0;
+		double sl3 = null != wt.getElectriclossout() ? wt.getElectriclossout() : 0.0;
+		double sl4 = null != wt.getWeatherlossout() ? wt.getWeatherlossout() : 0.0;
+		return StringUtils.round(fdl + gz + jx + qf + xd + sl1 + sl2 + sl3 + sl4, 2);
+	}
+}

+ 1 - 1
src/main/java/com/gyee/frame/service/weather/WeatherService.java

@@ -139,7 +139,7 @@ public class WeatherService  {
 
 						if(StringUtils.notEmp(wind.getDeg()))
 						{
-							int fx=wind.getDeg();
+							double fx=wind.getDeg();
 							if(fx>= 11.25 && fx<= 348.76)
 							{
 								map.put("fx","北");

+ 331 - 329
src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java

@@ -175,8 +175,7 @@ public class MatrixPushByWpService {
                     Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
                     jczbmap.put("xdts", xdts);
 
-
-
+                    jczbmap.put("jrts", djts+yxts+gzts+lxts+whts+xdts);
                 } else {
                     //实时风速
                     jczbmap.put("ssfs", 0.0);
@@ -204,6 +203,7 @@ public class MatrixPushByWpService {
                     jczbmap.put("whts", 0.0);
                     //限电台数
                     jczbmap.put("xdts", 0.0);
+                    jczbmap.put("jrts", 0.0);
                 }
 
                 Calendar c = Calendar.getInstance();
@@ -373,19 +373,19 @@ public class MatrixPushByWpService {
 
 
                 List<String> jczbls = new ArrayList<>();
-                //实时风速
-                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS).getCode());
-                //预测功率
-                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, ycPoints1[0]).getCode());
-                //保证功率
-                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.ZBZGL).getCode());
-                //应发功率
-                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_ZZSGL).getCode());
-                //实际功率
-                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL).getCode());
-                //AGC出线有功
-                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.AGC001).getCode());
-                //AGC有功设定
+//                //实时风速
+//                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS).getCode());
+//                //预测功率
+//                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, ycPoints1[0]).getCode());
+//                //保证功率
+//                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.ZBZGL).getCode());
+//                //应发功率
+//                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_ZZSGL).getCode());
+//                //实际功率
+//                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL).getCode());
+//                //AGC出线有功
+//                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.AGC001).getCode());
+//                //AGC有功设定
                 jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.AGC002).getCode());
                 //待机台数
                 jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS).getCode());
@@ -405,60 +405,60 @@ public class MatrixPushByWpService {
 
                 if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
 
-                    //实时风速
-                    jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));
-                    //预测功率
-                    jczbmap.put("ycgl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
-                    //保证功率
-                    double bzgl = new BigDecimal(jczblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    jczbmap.put("bzgl", bzgl);
-                    //应发功率
-                    double yfgl = new BigDecimal(jczblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    jczbmap.put("yfgl", yfgl);
-                    //实际功率
-                    jczbmap.put("sjgl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
-                    //AGC出线有功
-                    jczbmap.put("agccxyg", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
-                    //AGC有功设定
-                    jczbmap.put("agcygsd", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));
-
-
-                    Double djts = MathUtil.twoBit(jczblist.get(7).getPointValueInDouble());
+//                    //实时风速
+//                    jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));
+//                    //预测功率
+//                    jczbmap.put("ycgl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
+//                    //保证功率
+//                    double bzgl = new BigDecimal(jczblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//                    jczbmap.put("bzgl", bzgl);
+//                    //应发功率
+//                    double yfgl = new BigDecimal(jczblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//                    jczbmap.put("yfgl", yfgl);
+//                    //实际功率
+//                    jczbmap.put("sjgl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
+//                    //AGC出线有功
+//                    jczbmap.put("agccxyg", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+//                    //AGC有功设定
+//                    jczbmap.put("agcygsd", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));
+
+
+                    Double djts = MathUtil.twoBit(jczblist.get(0).getPointValueInDouble());
                     //待机台数
                     jczbmap.put("djts", djts);
                     //运行台数
-                    Double yxts = MathUtil.twoBit(jczblist.get(8).getPointValueInDouble());
+                    Double yxts = MathUtil.twoBit(jczblist.get(1).getPointValueInDouble());
                     jczbmap.put("yxts", yxts);
                     //故障台数
-                    Double gzts = MathUtil.twoBit(jczblist.get(9).getPointValueInDouble());
+                    Double gzts = MathUtil.twoBit(jczblist.get(2).getPointValueInDouble());
                     jczbmap.put("gzts", gzts);
                     //离线台数
-                    Double lxts = MathUtil.twoBit(jczblist.get(10).getPointValueInDouble());
+                    Double lxts = MathUtil.twoBit(jczblist.get(3).getPointValueInDouble());
                     jczbmap.put("lxts", lxts);
                     //维护台数
-                    Double whts = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
+                    Double whts = MathUtil.twoBit(jczblist.get(4).getPointValueInDouble());
                     jczbmap.put("whts", whts);
                     //限电台数
-                    Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
+                    Double xdts = MathUtil.twoBit(jczblist.get(5).getPointValueInDouble());
                     jczbmap.put("xdts", xdts);
 
-
+                    jczbmap.put("jrts", djts+yxts+gzts+lxts+whts+xdts);
 
                 } else {
-                    //实时风速
-                    jczbmap.put("ssfs", 0.0);
-                    //预测功率
-                    jczbmap.put("ssfs", 0.0);
-                    //保证功率
-                    jczbmap.put("bzgl", 0.0);
-                    //应发功率
-                    jczbmap.put("yfgl", 0.0);
-                    //实际功率
-                    jczbmap.put("sjgl", 0.0);
-                    //AGC出线有功
-                    jczbmap.put("agccxyg", 0.0);
-                    //AGC有功设定
-                    jczbmap.put("agcygsd", 0.0);
+//                    //实时风速
+//                    jczbmap.put("ssfs", 0.0);
+//                    //预测功率
+//                    jczbmap.put("ssfs", 0.0);
+//                    //保证功率
+//                    jczbmap.put("bzgl", 0.0);
+//                    //应发功率
+//                    jczbmap.put("yfgl", 0.0);
+//                    //实际功率
+//                    jczbmap.put("sjgl", 0.0);
+//                    //AGC出线有功
+//                    jczbmap.put("agccxyg", 0.0);
+//                    //AGC有功设定
+//                    jczbmap.put("agcygsd", 0.0);
                     //待机台数
                     jczbmap.put("djts", 0.0);
                     //运行台数
@@ -471,6 +471,8 @@ public class MatrixPushByWpService {
                     jczbmap.put("whts", 0.0);
                     //限电台数
                     jczbmap.put("xdts", 0.0);
+
+                    jczbmap.put("jrts", 0.0);
                 }
 
 
@@ -481,239 +483,239 @@ public class MatrixPushByWpService {
                 fczbmap.put("jczbmap",jczbmap);
 /*************************************************风场指标统计*************************************************************/
 
-
-/*************************************************五项损失**************************************************************/
-
-                Map<String, Double> wxssmap = new HashMap<>();
-                List<String> wxssls = new ArrayList<>();
-
-                // 日场内受累检修
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RLZSSDL).getCode());
-                // 日场内受累故障
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RSZSSDL).getCode());
-                // 月场内受累检修
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YLZSSDL).getCode());
-                // 月场内受累故障
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YSZSSDL).getCode());
-                // 年场内受累检修
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NLZSSDL).getCode());
-                // 年场内受累故障
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NSZSSDL).getCode());
-
-                //日待机损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RSDJZSDL).getCode());
-                //日手动停机损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RSSTZSDL).getCode());
-                //日性能损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RXNZSDL).getCode());
-                //日缺陷降出力损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RSQXZSDL).getCode());
-                //日故障损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RGZSSDL).getCode());
-                //日检修损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RJXSSDL).getCode());
-
-                //月待机损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YSDJZSDL).getCode());
-                //月手动停机损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YSSTZSDL).getCode());
-                //月性能损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YXNZSDL).getCode());
-                //月缺陷降出力损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YSQXZSDL).getCode());
-                //月故障损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YGZSSDL).getCode());
-                //月检修损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YJXSSDL).getCode());
-
-
-                //年待机损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NSDJZSDL).getCode());
-                //年手动停机损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NSSTZSDL).getCode());
-                //年性能损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NXNZSDL).getCode());
-                //年缺陷降出力损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NSQXZSDL).getCode());
-                //年故障损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NGZSSDL).getCode());
-                //年检修损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NJXSSDL).getCode());
-
-
-                //日限电损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RXDSSDL).getCode());
-                //月限电损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YXDSSDL).getCode());
-                //年限电损失
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NXDSSDL).getCode());
-
-
-                //日场外受累电网
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RWZSSDL).getCode());
-                // 日场外受累天气
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RTZSSDL).getCode());
-                // 月场外受累电网
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YWZSSDL).getCode());
-                // 月场外受累天气
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YTZSSDL).getCode());
-                // 年场外受累电网
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NWZSSDL).getCode());
-                // 年场外受累天气
-                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NTZSSDL).getCode());
-
-
-                List<PointData> wxsslist = realApiUtil.getRealData(wxssls);
-
-                if (!wxsslist.isEmpty() && wxsslist.size() == wxssls.size()) {
-
-                    Double rjxsl = MathUtil.twoBit(wxsslist.get(0).getPointValueInDouble());
-                    // 日场内受累故障
-                    Double rgzzsl = MathUtil.twoBit(wxsslist.get(1).getPointValueInDouble());
-                    // 月场内受累检修
-                    Double yjxsl = MathUtil.twoBit(wxsslist.get(2).getPointValueInDouble());
-                    // 月场内受累故障
-                    Double ygzzsl = MathUtil.twoBit(wxsslist.get(3).getPointValueInDouble());
-                    // 年场内受累检修
-                    Double njxsl = MathUtil.twoBit(wxsslist.get(4).getPointValueInDouble());
-                    // 年场内受累故障
-                    Double ngzzsl = MathUtil.twoBit(wxsslist.get(5).getPointValueInDouble());
-
-                    wxssmap.put("rjxsl", rjxsl);
-                    wxssmap.put("rgzzsl", rgzzsl);
-                    wxssmap.put("yjxsl", yjxsl);
-                    wxssmap.put("ygzzsl", ygzzsl);
-                    wxssmap.put("njxsl", njxsl);
-                    wxssmap.put("ngzzsl", ngzzsl);
-
-                    //日待机损失
-                    Double rdjss = MathUtil.twoBit(wxsslist.get(6).getPointValueInDouble());
-                    //日手动停机损失
-                    Double rsdtjss = MathUtil.twoBit(wxsslist.get(7).getPointValueInDouble());
-                    //日性能损失
-                    Double rxnss = MathUtil.twoBit(wxsslist.get(8).getPointValueInDouble());
-                    //日缺陷降出力损失
-                    Double rqxjclss = MathUtil.twoBit(wxsslist.get(9).getPointValueInDouble());
-
-                    //日欠发损失=日待机损失+日手动停机损失+日性能损失+日缺陷降出力损失
-                    Double rqfssdl = new BigDecimal(rdjss + rsdtjss + rxnss + rqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-                    Double rgzss = MathUtil.twoBit(wxsslist.get(10).getPointValueInDouble());
-                    //日故障损失电量=日故障损失+日故障受累
-                    Double rgzssdl = new BigDecimal(rgzss + rgzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    //日检修损失电量=日检修损失+日检修受累
-                    Double rjxss = MathUtil.twoBit(wxsslist.get(11).getPointValueInDouble());
-                    Double rjxssdl = new BigDecimal(rjxss + rjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-
-                    wxssmap.put("rqfssdl", rqfssdl);
-                    wxssmap.put("rgzssdl", rgzssdl);
-                    wxssmap.put("rjxssdl", rjxssdl);
-
-                    // 月场内受累检修
-                    Double ydjss = MathUtil.twoBit(wxsslist.get(12).getPointValueInDouble());
-                    // 月场内受累检修
-                    Double ysdtjss = MathUtil.twoBit(wxsslist.get(13).getPointValueInDouble());
-                    // 月场内受累检修
-                    Double yxnss = MathUtil.twoBit(wxsslist.get(14).getPointValueInDouble());
-                    // 月场内受累检修
-                    Double yqxjclss = MathUtil.twoBit(wxsslist.get(15).getPointValueInDouble());
-                    //月欠发损失=月待机损失+月手动停机损失+月性能损失+月缺陷降出力损失
-                    Double yqfssdl = new BigDecimal(ydjss + ysdtjss + yxnss + yqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-                    Double ygzss = MathUtil.twoBit(wxsslist.get(16).getPointValueInDouble());
-                    //月故障损失电量=月故障损失+月故障受累
-                    Double ygzssdl = new BigDecimal(ygzss + ygzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    Double yjxss = MathUtil.twoBit(wxsslist.get(17).getPointValueInDouble());
-                    //月检修损失电量=月检修损失+月检修受累
-                    Double yjxssdl = new BigDecimal(yjxss + yjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-                    wxssmap.put("yqfssdl", yqfssdl);
-                    wxssmap.put("ygzssdl", ygzssdl);
-                    wxssmap.put("yjxssdl", yjxssdl);
-
-                    // 年场内受累检修
-                    Double ndjss = MathUtil.twoBit(wxsslist.get(18).getPointValueInDouble());
-                    // 年场内受累检修
-                    Double nsdtjss = MathUtil.twoBit(wxsslist.get(19).getPointValueInDouble());
-                    // 年场内受累检修
-                    Double nxnss = MathUtil.twoBit(wxsslist.get(20).getPointValueInDouble());
-                    // 年场内受累检修
-                    Double nqxjclss = MathUtil.twoBit(wxsslist.get(21).getPointValueInDouble());
-
-                    Double nqfssdl = new BigDecimal(ndjss + nsdtjss + nxnss + nqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-                    Double ngzss = MathUtil.twoBit(wxsslist.get(22).getPointValueInDouble());
-                    //年故障损失电量=年故障损失+年故障受累
-                    Double ngzssdl = new BigDecimal(ngzss + ngzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    Double njxss = MathUtil.twoBit(wxsslist.get(23).getPointValueInDouble());
-                    //年检修损失电量=年检修损失+年检修受累
-                    Double njxssdl = new BigDecimal(njxss + njxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-                    wxssmap.put("nqfssdl", nqfssdl);
-                    wxssmap.put("ngzssdl", ngzssdl);
-                    wxssmap.put("njxssdl", njxssdl);
-
-                    double temp = 0.0;
-                    temp = MathUtil.twoBit(wxsslist.get(24).getPointValueInDouble());
-                    Double rxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    temp = MathUtil.twoBit(wxsslist.get(25).getPointValueInDouble());
-                    Double yxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    temp = MathUtil.twoBit(wxsslist.get(26).getPointValueInDouble());
-                    Double nxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-                    wxssmap.put("rxdssdl", StringUtils.round(rxdssdl < 0.0 ? 0.0 : rxdssdl, 2));
-                    wxssmap.put("yxdssdl", StringUtils.round(yxdssdl < 0.0 ? 0.0 : yxdssdl, 2));
-                    wxssmap.put("nxdssdl", StringUtils.round(nxdssdl < 0.0 ? 0.0 : nxdssdl, 2));
-
-                    Double rdwsl = MathUtil.twoBit(wxsslist.get(27).getPointValueInDouble());
-                    Double rtqsl = MathUtil.twoBit(wxsslist.get(28).getPointValueInDouble());
-                    Double rslssdl = new BigDecimal(rdwsl + rtqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    Double ydwsl = MathUtil.twoBit(wxsslist.get(29).getPointValueInDouble());
-                    Double ytqsl = MathUtil.twoBit(wxsslist.get(30).getPointValueInDouble());
-                    Double yslssdl = new BigDecimal(ydwsl + ytqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    Double ndwsl = MathUtil.twoBit(wxsslist.get(31).getPointValueInDouble());
-                    Double ntqsl = MathUtil.twoBit(wxsslist.get(32).getPointValueInDouble());
-                    Double nslssdl = new BigDecimal(ndwsl + ntqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-                    wxssmap.put("rslssdl", rslssdl);
-                    wxssmap.put("yslssdl", yslssdl);
-                    wxssmap.put("nslssdl", nslssdl);
-
-                } else {
-
-                    wxssmap.put("rjxsl", 0.0);
-                    wxssmap.put("rgzzsl", 0.0);
-                    wxssmap.put("yjxsl", 0.0);
-                    wxssmap.put("ygzzsl", 0.0);
-                    wxssmap.put("njxsl", 0.0);
-                    wxssmap.put("ngzzsl", 0.0);
-                    wxssmap.put("rqfssdl", 0.0);
-                    wxssmap.put("rgzssdl", 0.0);
-                    wxssmap.put("rjxssdl", 0.0);
-
-                    wxssmap.put("yqfssdl", 0.0);
-                    wxssmap.put("ygzssdl", 0.0);
-                    wxssmap.put("yjxssdl", 0.0);
-
-                    wxssmap.put("nqfssdl", 0.0);
-                    wxssmap.put("ngzssdl", 0.0);
-                    wxssmap.put("njxssdl", 0.0);
-
-
-                    wxssmap.put("rxdssdl", 0.0);
-                    wxssmap.put("yxdssdl", 0.0);
-                    wxssmap.put("nxdssdl", 0.0);
-
-
-                    wxssmap.put("rslssdl", 0.0);
-                    wxssmap.put("yslssdl", 0.0);
-                    wxssmap.put("nslssdl", 0.0);
-
-                }
-                map.put("wxssmap", wxssmap);
-/*************************************************五项损失**************************************************************/
-
+//
+///*************************************************五项损失**************************************************************/
+//
+//                Map<String, Double> wxssmap = new HashMap<>();
+//                List<String> wxssls = new ArrayList<>();
+//
+//                // 日场内受累检修
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RLZSSDL).getCode());
+//                // 日场内受累故障
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RSZSSDL).getCode());
+//                // 月场内受累检修
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YLZSSDL).getCode());
+//                // 月场内受累故障
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YSZSSDL).getCode());
+//                // 年场内受累检修
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NLZSSDL).getCode());
+//                // 年场内受累故障
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NSZSSDL).getCode());
+//
+//                //日待机损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RSDJZSDL).getCode());
+//                //日手动停机损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RSSTZSDL).getCode());
+//                //日性能损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RXNZSDL).getCode());
+//                //日缺陷降出力损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RSQXZSDL).getCode());
+//                //日故障损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RGZSSDL).getCode());
+//                //日检修损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RJXSSDL).getCode());
+//
+//                //月待机损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YSDJZSDL).getCode());
+//                //月手动停机损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YSSTZSDL).getCode());
+//                //月性能损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YXNZSDL).getCode());
+//                //月缺陷降出力损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YSQXZSDL).getCode());
+//                //月故障损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YGZSSDL).getCode());
+//                //月检修损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YJXSSDL).getCode());
+//
+//
+//                //年待机损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NSDJZSDL).getCode());
+//                //年手动停机损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NSSTZSDL).getCode());
+//                //年性能损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NXNZSDL).getCode());
+//                //年缺陷降出力损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NSQXZSDL).getCode());
+//                //年故障损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NGZSSDL).getCode());
+//                //年检修损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NJXSSDL).getCode());
+//
+//
+//                //日限电损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RXDSSDL).getCode());
+//                //月限电损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YXDSSDL).getCode());
+//                //年限电损失
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NXDSSDL).getCode());
+//
+//
+//                //日场外受累电网
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RWZSSDL).getCode());
+//                // 日场外受累天气
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.RTZSSDL).getCode());
+//                // 月场外受累电网
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YWZSSDL).getCode());
+//                // 月场外受累天气
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.YTZSSDL).getCode());
+//                // 年场外受累电网
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NWZSSDL).getCode());
+//                // 年场外受累天气
+//                wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.NTZSSDL).getCode());
+//
+//
+//                List<PointData> wxsslist = realApiUtil.getRealData(wxssls);
+//
+//                if (!wxsslist.isEmpty() && wxsslist.size() == wxssls.size()) {
+//
+//                    Double rjxsl = MathUtil.twoBit(wxsslist.get(0).getPointValueInDouble());
+//                    // 日场内受累故障
+//                    Double rgzzsl = MathUtil.twoBit(wxsslist.get(1).getPointValueInDouble());
+//                    // 月场内受累检修
+//                    Double yjxsl = MathUtil.twoBit(wxsslist.get(2).getPointValueInDouble());
+//                    // 月场内受累故障
+//                    Double ygzzsl = MathUtil.twoBit(wxsslist.get(3).getPointValueInDouble());
+//                    // 年场内受累检修
+//                    Double njxsl = MathUtil.twoBit(wxsslist.get(4).getPointValueInDouble());
+//                    // 年场内受累故障
+//                    Double ngzzsl = MathUtil.twoBit(wxsslist.get(5).getPointValueInDouble());
+//
+//                    wxssmap.put("rjxsl", rjxsl);
+//                    wxssmap.put("rgzzsl", rgzzsl);
+//                    wxssmap.put("yjxsl", yjxsl);
+//                    wxssmap.put("ygzzsl", ygzzsl);
+//                    wxssmap.put("njxsl", njxsl);
+//                    wxssmap.put("ngzzsl", ngzzsl);
+//
+//                    //日待机损失
+//                    Double rdjss = MathUtil.twoBit(wxsslist.get(6).getPointValueInDouble());
+//                    //日手动停机损失
+//                    Double rsdtjss = MathUtil.twoBit(wxsslist.get(7).getPointValueInDouble());
+//                    //日性能损失
+//                    Double rxnss = MathUtil.twoBit(wxsslist.get(8).getPointValueInDouble());
+//                    //日缺陷降出力损失
+//                    Double rqxjclss = MathUtil.twoBit(wxsslist.get(9).getPointValueInDouble());
+//
+//                    //日欠发损失=日待机损失+日手动停机损失+日性能损失+日缺陷降出力损失
+//                    Double rqfssdl = new BigDecimal(rdjss + rsdtjss + rxnss + rqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//
+//                    Double rgzss = MathUtil.twoBit(wxsslist.get(10).getPointValueInDouble());
+//                    //日故障损失电量=日故障损失+日故障受累
+//                    Double rgzssdl = new BigDecimal(rgzss + rgzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//                    //日检修损失电量=日检修损失+日检修受累
+//                    Double rjxss = MathUtil.twoBit(wxsslist.get(11).getPointValueInDouble());
+//                    Double rjxssdl = new BigDecimal(rjxss + rjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//
+//
+//                    wxssmap.put("rqfssdl", rqfssdl);
+//                    wxssmap.put("rgzssdl", rgzssdl);
+//                    wxssmap.put("rjxssdl", rjxssdl);
+//
+//                    // 月场内受累检修
+//                    Double ydjss = MathUtil.twoBit(wxsslist.get(12).getPointValueInDouble());
+//                    // 月场内受累检修
+//                    Double ysdtjss = MathUtil.twoBit(wxsslist.get(13).getPointValueInDouble());
+//                    // 月场内受累检修
+//                    Double yxnss = MathUtil.twoBit(wxsslist.get(14).getPointValueInDouble());
+//                    // 月场内受累检修
+//                    Double yqxjclss = MathUtil.twoBit(wxsslist.get(15).getPointValueInDouble());
+//                    //月欠发损失=月待机损失+月手动停机损失+月性能损失+月缺陷降出力损失
+//                    Double yqfssdl = new BigDecimal(ydjss + ysdtjss + yxnss + yqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//
+//                    Double ygzss = MathUtil.twoBit(wxsslist.get(16).getPointValueInDouble());
+//                    //月故障损失电量=月故障损失+月故障受累
+//                    Double ygzssdl = new BigDecimal(ygzss + ygzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//                    Double yjxss = MathUtil.twoBit(wxsslist.get(17).getPointValueInDouble());
+//                    //月检修损失电量=月检修损失+月检修受累
+//                    Double yjxssdl = new BigDecimal(yjxss + yjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//
+//                    wxssmap.put("yqfssdl", yqfssdl);
+//                    wxssmap.put("ygzssdl", ygzssdl);
+//                    wxssmap.put("yjxssdl", yjxssdl);
+//
+//                    // 年场内受累检修
+//                    Double ndjss = MathUtil.twoBit(wxsslist.get(18).getPointValueInDouble());
+//                    // 年场内受累检修
+//                    Double nsdtjss = MathUtil.twoBit(wxsslist.get(19).getPointValueInDouble());
+//                    // 年场内受累检修
+//                    Double nxnss = MathUtil.twoBit(wxsslist.get(20).getPointValueInDouble());
+//                    // 年场内受累检修
+//                    Double nqxjclss = MathUtil.twoBit(wxsslist.get(21).getPointValueInDouble());
+//
+//                    Double nqfssdl = new BigDecimal(ndjss + nsdtjss + nxnss + nqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//
+//                    Double ngzss = MathUtil.twoBit(wxsslist.get(22).getPointValueInDouble());
+//                    //年故障损失电量=年故障损失+年故障受累
+//                    Double ngzssdl = new BigDecimal(ngzss + ngzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//                    Double njxss = MathUtil.twoBit(wxsslist.get(23).getPointValueInDouble());
+//                    //年检修损失电量=年检修损失+年检修受累
+//                    Double njxssdl = new BigDecimal(njxss + njxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//
+//                    wxssmap.put("nqfssdl", nqfssdl);
+//                    wxssmap.put("ngzssdl", ngzssdl);
+//                    wxssmap.put("njxssdl", njxssdl);
+//
+//                    double temp = 0.0;
+//                    temp = MathUtil.twoBit(wxsslist.get(24).getPointValueInDouble());
+//                    Double rxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//                    temp = MathUtil.twoBit(wxsslist.get(25).getPointValueInDouble());
+//                    Double yxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//                    temp = MathUtil.twoBit(wxsslist.get(26).getPointValueInDouble());
+//                    Double nxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//
+//                    wxssmap.put("rxdssdl", StringUtils.round(rxdssdl < 0.0 ? 0.0 : rxdssdl, 2));
+//                    wxssmap.put("yxdssdl", StringUtils.round(yxdssdl < 0.0 ? 0.0 : yxdssdl, 2));
+//                    wxssmap.put("nxdssdl", StringUtils.round(nxdssdl < 0.0 ? 0.0 : nxdssdl, 2));
+//
+//                    Double rdwsl = MathUtil.twoBit(wxsslist.get(27).getPointValueInDouble());
+//                    Double rtqsl = MathUtil.twoBit(wxsslist.get(28).getPointValueInDouble());
+//                    Double rslssdl = new BigDecimal(rdwsl + rtqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//                    Double ydwsl = MathUtil.twoBit(wxsslist.get(29).getPointValueInDouble());
+//                    Double ytqsl = MathUtil.twoBit(wxsslist.get(30).getPointValueInDouble());
+//                    Double yslssdl = new BigDecimal(ydwsl + ytqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//                    Double ndwsl = MathUtil.twoBit(wxsslist.get(31).getPointValueInDouble());
+//                    Double ntqsl = MathUtil.twoBit(wxsslist.get(32).getPointValueInDouble());
+//                    Double nslssdl = new BigDecimal(ndwsl + ntqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+//
+//                    wxssmap.put("rslssdl", rslssdl);
+//                    wxssmap.put("yslssdl", yslssdl);
+//                    wxssmap.put("nslssdl", nslssdl);
+//
+//                } else {
+//
+//                    wxssmap.put("rjxsl", 0.0);
+//                    wxssmap.put("rgzzsl", 0.0);
+//                    wxssmap.put("yjxsl", 0.0);
+//                    wxssmap.put("ygzzsl", 0.0);
+//                    wxssmap.put("njxsl", 0.0);
+//                    wxssmap.put("ngzzsl", 0.0);
+//                    wxssmap.put("rqfssdl", 0.0);
+//                    wxssmap.put("rgzssdl", 0.0);
+//                    wxssmap.put("rjxssdl", 0.0);
+//
+//                    wxssmap.put("yqfssdl", 0.0);
+//                    wxssmap.put("ygzssdl", 0.0);
+//                    wxssmap.put("yjxssdl", 0.0);
+//
+//                    wxssmap.put("nqfssdl", 0.0);
+//                    wxssmap.put("ngzssdl", 0.0);
+//                    wxssmap.put("njxssdl", 0.0);
+//
+//
+//                    wxssmap.put("rxdssdl", 0.0);
+//                    wxssmap.put("yxdssdl", 0.0);
+//                    wxssmap.put("nxdssdl", 0.0);
+//
+//
+//                    wxssmap.put("rslssdl", 0.0);
+//                    wxssmap.put("yslssdl", 0.0);
+//                    wxssmap.put("nslssdl", 0.0);
+//
+//                }
+//                map.put("wxssmap", wxssmap);
+///*************************************************五项损失**************************************************************/
+//
 
 /*************************************************风机指标统计*************************************************************/
                 List<String> fjzbls = new ArrayList<>();
@@ -726,12 +728,12 @@ public class MatrixPushByWpService {
                 {
                     //风机状态
                     fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
-                    //风速
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getId());
-                    //功率
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
-                    //发电机转数
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FDJZS).getId());
+//                    //风速
+//                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getId());
+//                    //功率
+//                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
+//                    //发电机转数
+//                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FDJZS).getId());
 
                 }
 
@@ -756,27 +758,27 @@ public class MatrixPushByWpService {
                         }
 
                         vo.setWpId(wt.getWindpowerstationid());
-                        double fjzt = MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble());
+                        double fjzt = MathUtil.twoBit(fjzblist.get(i ).getPointValueInDouble());
                         vo.setFjzt(fjzt);
-                        vo.setFs(MathUtil.twoBit(fjzblist.get(i*step+1).getPointValueInDouble()));
-                        double gl = MathUtil.twoBit(fjzblist.get(i * step + 2).getPointValueInDouble());
-                        vo.setGl(gl);
-                        vo.setFdjzs(MathUtil.twoBit(fjzblist.get(i*step+3).getPointValueInDouble()));
+//                        vo.setFs(MathUtil.twoBit(fjzblist.get(i*step+1).getPointValueInDouble()));
+//                        double gl = MathUtil.twoBit(fjzblist.get(i * step + 2).getPointValueInDouble());
+//                        vo.setGl(gl);
+//                        vo.setFdjzs(MathUtil.twoBit(fjzblist.get(i*step+3).getPointValueInDouble()));
                         vo.setWtCode(wt.getCode());
-
-                        if (fjzt == 3) {
-                            vo.setLyl(0.0);
-                        } else {
-                            if (InitialRunner.mlmap.containsKey(wt.getModelid())) {
-                                Equipmentmodel ml = InitialRunner.mlmap.get(wt.getModelid());
-                                double generatingcapacity = ml.getPowerproduction();
-                                BigDecimal temp = new BigDecimal(generatingcapacity).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP);
-                                double lyl = new BigDecimal(gl).divide(temp, 2, RoundingMode.HALF_UP).doubleValue();
-                                vo.setLyl(lyl);
-                            } else {
-                                vo.setLyl(0.0);
-                            }
-                        }
+//
+//                        if (fjzt == 3) {
+//                            vo.setLyl(0.0);
+//                        } else {
+//                            if (InitialRunner.mlmap.containsKey(wt.getModelid())) {
+//                                Equipmentmodel ml = InitialRunner.mlmap.get(wt.getModelid());
+//                                double generatingcapacity = ml.getPowerproduction();
+//                                BigDecimal temp = new BigDecimal(generatingcapacity).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP);
+//                                double lyl = new BigDecimal(gl).divide(temp, 2, RoundingMode.HALF_UP).doubleValue();
+//                                vo.setLyl(lyl);
+//                            } else {
+//                                vo.setLyl(0.0);
+//                            }
+//                        }
                         //vomap.put(wt.getId(),vo);
                         vos.add(vo);
 
@@ -790,23 +792,23 @@ public class MatrixPushByWpService {
 /*************************************************关系库**************************************************************/
 
 
-            Map<String, Double> gxkmap = new HashMap<>();
-            List<Windpowerinfoday> wpdls = windpowerinfodayService.getWindpowerinfodayList(wpId, DateUtils.truncate(new Date()));
-            if (!wpdls.isEmpty()) {
-                Windpowerinfoday wd = wpdls.get(0);
-                gxkmap.put("ndxkyss", wd.getYeardxkyxs());
-                gxkmap.put("nsbklyl", wd.getYearsbklyl());
-
-                gxkmap.put("ydxkyss", wd.getMonthdxkyxs());
-                gxkmap.put("ysbklyl", wd.getMonthsbklyl());
-
-            } else {
-                gxkmap.put("ndxkyss", 0.0);
-                gxkmap.put("nsbklyl", 0.0);
-                gxkmap.put("ydxkyss", 0.0);
-                gxkmap.put("ysbklyl", 0.0);
-            }
-            map.put("gxkmap", gxkmap);
+//            Map<String, Double> gxkmap = new HashMap<>();
+//            List<Windpowerinfoday> wpdls = windpowerinfodayService.getWindpowerinfodayList(wpId, DateUtils.truncate(new Date()));
+//            if (!wpdls.isEmpty()) {
+//                Windpowerinfoday wd = wpdls.get(0);
+//                gxkmap.put("ndxkyss", wd.getYeardxkyxs());
+//                gxkmap.put("nsbklyl", wd.getYearsbklyl());
+//
+//                gxkmap.put("ydxkyss", wd.getMonthdxkyxs());
+//                gxkmap.put("ysbklyl", wd.getMonthsbklyl());
+//
+//            } else {
+//                gxkmap.put("ndxkyss", 0.0);
+//                gxkmap.put("nsbklyl", 0.0);
+//                gxkmap.put("ydxkyss", 0.0);
+//                gxkmap.put("ysbklyl", 0.0);
+//            }
+//            map.put("gxkmap", gxkmap);
 
 /*************************************************关系库指标**************************************************************/
 

+ 1 - 1
src/main/resources/application.yml

@@ -33,7 +33,7 @@ gyee:
   digit: 2
 #tomcat config
 server :
-  port : 8082
+  port : 8777
   session:
     timeout: 7200
   ##项目名字配置

+ 1 - 1
src/main/resources/mybatis-generator.xml

@@ -108,7 +108,7 @@
 
 
 
-        <table tableName='WindTurbineTestingPointaiyj' domainObjectName='WindTurbineTestingPointaiyj'/>
+        <table tableName='Windturbineinfodaytop' domainObjectName='Windturbineinfodaytop'/>
 
     </context>
 </generatorConfiguration>

+ 1 - 1
src/main/resources/mybatis/auto/Windturbineinfodaytop2Mapper.xml

@@ -157,7 +157,7 @@
     yeartjsj, dayLYXS, monthLYXS, yearLYXS, dayNHYD, monthNHYD, yearNHYD, daySBKLYL, 
     monthSBKLYL, yearSBKLYL, dayDXKYXS, monthDXKYXS, yearDXKYXS, dayyxfss, monthyxfss, 
     yearyxfss, dayxfqr, monthxfqr, yearxfqr, dayjfpl, monthjfpl, yearjfpl, dayglyzxxs, 
-    monthglyzxxs, yearglyzxxs, type, Rank, Level, year, month
+    monthglyzxxs, yearglyzxxs, type, Rank, "LEVEL", year, month
   </sql>
   <select id="selectByExample" parameterType="com.gyee.frame.model.auto.Windturbineinfodaytop2Example" resultMap="BaseResultMap">
     <!--

File diff suppressed because it is too large
+ 1236 - 0
src/main/resources/mybatis/auto/WindturbineinfodaytopMapper.xml


+ 6 - 4
src/test/java/test/BenchmarkingTest.java

@@ -5,7 +5,7 @@ import com.gyee.SpringbootStart;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.benchmarking.BenchmarkingController;
-import com.gyee.frame.model.auto.Windturbineinfodaytop3;
+import com.gyee.frame.model.auto.Windturbineinfodaytop2;
 import com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
@@ -35,6 +35,8 @@ public class BenchmarkingTest {
 
         String wpid="MHS_FDC";
 
+//        Windturbineinfodaytop3Service windturbineinfodaytop3Service= SpringUtils.getBean("windturbineinfodaytop3Service");
+
         BenchmarkingController benchmarkingController= SpringUtils.getBean("benchmarkingController");
 //
 //        AjaxResult ajaxResult = dayBenchmarkingController.gadaylist(wpid,"2021-01-01");
@@ -45,10 +47,10 @@ public class BenchmarkingTest {
         tablepar.setPageNum(1);
         tablepar.setPageSize(10);
 
-        AjaxResult ajaxResult = benchmarkingController.gadaylistByPage(tablepar,wpid,"2021-01-01");
+        AjaxResult ajax = benchmarkingController.gadaylistByPage(tablepar,wpid,"2021-01-01");
 
-        PageInfo<Windturbineinfodaytop3> test=(PageInfo<Windturbineinfodaytop3>)ajaxResult.get("data");
-        for(Windturbineinfodaytop3 wtd:test.getList())
+        PageInfo<Windturbineinfodaytop2> test=(PageInfo<Windturbineinfodaytop2>)ajax.get("data");
+        for(Windturbineinfodaytop2 wtd:test.getList())
         {
             System.out.println(wtd.getWindturbineid()+"----------------"+wtd.getDayfdl());
         }

+ 18 - 11
src/test/java/test/HealthTest.java

@@ -1,15 +1,16 @@
 package test;
 
 import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.health.HealthMainController;
 import com.gyee.frame.controller.health.HealthSubController;
+import com.gyee.frame.controller.health.WindTurbineHealthListController;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
 import java.util.Calendar;
 import java.util.Date;
-import java.util.Map;
 
 public class HealthTest {
 
@@ -31,10 +32,12 @@ public class HealthTest {
 
         Date date = c.getTime();
 
-        String wtid="MG01_01";
+        String wtid="MG01_07";
         HealthMainController healthMainController= SpringUtils.getBean("healthMainController");
 
         HealthSubController healthSubController= SpringUtils.getBean("healthSubController");
+
+        WindTurbineHealthListController windTurbineHealthListController= SpringUtils.getBean("windTurbineHealthListController");
 //        Map<String, Object> map =healthMainController.findAllMap();
 ////
 ////
@@ -58,14 +61,14 @@ public class HealthTest {
 //        System.out.println(map);
 //
 //
-       Map<String, Object> map =healthSubController.hsFjValueIndexByPart(wtid,"1");
-        Map<String, Object> map1 =healthSubController.hsFjValueIndexByPart(wtid,"2");
-        Map<String, Object> map2 =healthSubController.hsFjValueIndexByPart(wtid,"3");
-        Map<String, Object> map3 =healthSubController.hsFjValueIndexByPart(wtid,"4");
-        Map<String, Object> map4 =healthSubController.hsFjValueIndexByPart(wtid,"5");
-//
-//
-       System.out.println(map);
+//       Map<String, Object> map =healthSubController.hsFjValueIndexByPart(wtid,"1");
+//        Map<String, Object> map1 =healthSubController.hsFjValueIndexByPart(wtid,"2");
+//        Map<String, Object> map2 =healthSubController.hsFjValueIndexByPart(wtid,"3");
+//        Map<String, Object> map3 =healthSubController.hsFjValueIndexByPart(wtid,"4");
+//        Map<String, Object> map4 =healthSubController.hsFjValueIndexByPart(wtid,"5");
+////
+////
+//       System.out.println(map);
 
 
 
@@ -83,8 +86,12 @@ public class HealthTest {
 //        System.out.println(map1.size());
 
 
-//        Map<String, Object> map1 =healthSubController.getWtMttrandMtbfByBj(wtid);
+//        Map<String, Object> map1 =healthSubController.findWtHealthInfo(wtid);
 //        System.out.println(map1.size());
+
+
+        AjaxResult ajax=windTurbineHealthListController.windTurbineHealthList("MHS_FDC");
+        System.out.println(ajax.size());
         System.out.println("***************************************************************************************");
 
 

+ 30 - 33
src/test/java/test/LeaderboardTest.java

@@ -4,9 +4,7 @@ import com.gyee.SpringbootStart;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.leaderboard.LeaderboardController;
-import com.gyee.frame.model.auto.Curvefittingmain;
 import com.gyee.frame.model.auto.Curvefittingmonthmain;
-import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
@@ -14,7 +12,6 @@ import org.springframework.boot.SpringApplication;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 public class LeaderboardTest {
 
@@ -99,37 +96,37 @@ public class LeaderboardTest {
 //        }
 //
 //
-        AjaxResult ajaxResult =leaderboardController.curvefittingmainList(tablepar,wpid,"2021-01-01");
-
-        List<Curvefittingmain> test=(List<Curvefittingmain>)ajaxResult.get("data");
-        for(Curvefittingmain wtd:test)
-        {
-            System.out.println(wtd.getDeviationrate1()+"----------------"+wtd.getDeviationrate2()+"----------------"+wtd.getDeviationrate3());
-        }
-
-
-        AjaxResult  ajaxResult2 =leaderboardController.getCurvechatAjax("sjbz","MG01_01","2021-01-01");
-
-
-        Map<String, Object> map=(Map<String, Object>)ajaxResult2.get("data");
-        List<DataVo> datavos =(List<DataVo>)map.get("datas");
-        for(DataVo wtd:datavos)
-        {
-            System.out.println(wtd.getValue1()+"----------------"+wtd.getValue2()+"----------------"+wtd.getValue3());
-        }
-
-
-        AjaxResult ajaxResult3 =leaderboardController.curvefittingmonthmainList(tablepar,  "MHS_FDC",  "2021", "1");
-
-
-        List<Curvefittingmonthmain> list=(List<Curvefittingmonthmain>)ajaxResult3.get("data");
-
-        for(Curvefittingmonthmain wtd:list)
-        {
-            System.out.println(wtd.getDeviationrate1()+"----------------"+wtd.getDeviationrate2()+"----------------"+wtd.getDeviationrate3());
-        }
+//        AjaxResult ajaxResult =leaderboardController.curvefittingmainList(tablepar,wpid,"2021-01-01");
+//
+//        List<Curvefittingmain> test=(List<Curvefittingmain>)ajaxResult.get("data");
+//        for(Curvefittingmain wtd:test)
+//        {
+//            System.out.println(wtd.getDeviationrate1()+"----------------"+wtd.getDeviationrate2()+"----------------"+wtd.getDeviationrate3());
+//        }
+//
+//
+//        AjaxResult  ajaxResult2 =leaderboardController.getCurvechatAjax("sjbz","MG01_01","2021-01-01");
+//
+//
+//        Map<String, Object> map=(Map<String, Object>)ajaxResult2.get("data");
+//        List<DataVo> datavos =(List<DataVo>)map.get("datas");
+//        for(DataVo wtd:datavos)
+//        {
+//            System.out.println(wtd.getValue1()+"----------------"+wtd.getValue2()+"----------------"+wtd.getValue3());
+//        }
+//
+//
+//        AjaxResult ajaxResult3 =leaderboardController.curvefittingmonthmainList(tablepar,  "MHS_FDC",  "2021", "1");
+//
+//
+//        List<Curvefittingmonthmain> list=(List<Curvefittingmonthmain>)ajaxResult3.get("data");
+//
+//        for(Curvefittingmonthmain wtd:list)
+//        {
+//            System.out.println(wtd.getDeviationrate1()+"----------------"+wtd.getDeviationrate2()+"----------------"+wtd.getDeviationrate3());
+//        }
 
-       AjaxResult ajaxResult4 =leaderboardController.curveMonthchatAjax("sjzy",  "MG01_01",  "2021", "1");
+       AjaxResult ajaxResult4 =leaderboardController.curveMonthchatAjaxbg("bg",  "XG01_53",  "2021", "06");
 
 
         List<Curvefittingmonthmain> list2=(List<Curvefittingmonthmain>)ajaxResult4.get("data");

+ 9 - 8
src/test/java/test/WeatherServiceTest.java

@@ -2,6 +2,7 @@ package test;
 
 import com.gyee.SpringbootStart;
 import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.weather.WeatherDay5Service;
 import com.gyee.frame.service.weather.WeatherService;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
@@ -33,14 +34,14 @@ public class WeatherServiceTest {
         String wtid="MG01_01";
         WeatherService weatherService= SpringUtils.getBean("weatherService");
 
-
-
-        Map<String, Object> map1= weatherService.getWeatherRealInfo("0");
-        Map<String, Object> map2= weatherService.getWeatherRealInfo("-1");
-        Map<String, Object> map3= weatherService.getWeatherRealInfo("-2");
-        Map<String, Object> map4= weatherService.getWeatherRealInfo("MHS_FDC");
-        Map<String, Object> map5= weatherService.getWeatherRealInfo("MHS02_GC");
-        Map<String, Object> map6= weatherService.getWeatherRealInfo("MHS04_XL");
+        WeatherDay5Service weatherDay5Service= SpringUtils.getBean("weatherDay5Service");
+        Map<String, Object> map1=weatherDay5Service.getWeatherRealDay5Info("0");
+//        Map<String, Object> map1= weatherService.getWeatherRealInfo("0");
+//        Map<String, Object> map2= weatherService.getWeatherRealInfo("-1");
+//        Map<String, Object> map3= weatherService.getWeatherRealInfo("-2");
+//        Map<String, Object> map4= weatherService.getWeatherRealInfo("MHS_FDC");
+//        Map<String, Object> map5= weatherService.getWeatherRealInfo("MHS02_GC");
+//        Map<String, Object> map6= weatherService.getWeatherRealInfo("MHS04_XL");
         System.out.println(map1);
 //
 //        Map<String, Object> map =healthMainController.findWpMap("MHS_FDC");

+ 85 - 0
src/test/java/test/WindturbineinfodaytopTest.java

@@ -0,0 +1,85 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.model.auto.Windturbineinfodaytop;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.service.WindturbineinfodaytopService;
+import com.gyee.frame.util.DateUtils;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.List;
+
+public class WindturbineinfodaytopTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        WindturbineinfodaytopService windturbineinfodaytopService= SpringUtils.getBean("windturbineinfodaytopService");
+
+        Tablepar tablepar=new Tablepar();
+        tablepar.setPageNum(1);
+        tablepar.setPageSize(10);
+        tablepar.setOrderByColumn(null);
+        tablepar.setIsAsc(null);
+
+
+
+        List<Windturbineinfodaytop> dayls = windturbineinfodaytopService.gadayhistlist(wtId, DateUtils.parseStrtoDate("2021-01-03"));
+        List<Windturbineinfodaytop> monthls= windturbineinfodaytopService.gamonthhistlist(wtId, "2021","7");
+        List<Windturbineinfodaytop> years = windturbineinfodaytopService.gayearhistlist(wtId, "2021");
+
+
+
+        for(Windturbineinfodaytop wtd:dayls)
+        {
+            System.out.println(wtd.getRecorddate()+"----------------"+wtd.getDaydxkyxs()
+                    +"----------------"+wtd.getDayfdl()+"----------------"+wtd.getWindturbineid());
+        }
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}