Browse Source

Merge branch 'master' of http://49.4.49.126:3000/GYEE_R.D/Gyee_Frame_NX

wsy 3 years ago
parent
commit
7ea9661de7
34 changed files with 9493 additions and 732 deletions
  1. 3 3
      src/main/java/com/gyee/frame/common/spring/InitialRedis.java
  2. 4 3
      src/main/java/com/gyee/frame/common/spring/InitialRunner.java
  3. 57 1
      src/main/java/com/gyee/frame/controller/benchmarking/BenchmarkingController.java
  4. 38 0
      src/main/java/com/gyee/frame/controller/goodness/WindturbineDetailChartController.java
  5. 33 226
      src/main/java/com/gyee/frame/controller/health/HealthSubController.java
  6. 23 0
      src/main/java/com/gyee/frame/controller/powercompare/PowerCompareController.java
  7. 3 3
      src/main/java/com/gyee/frame/controller/projectplan/ProjectPlanController.java
  8. 60 40
      src/main/java/com/gyee/frame/controller/scatter/ScatterController.java
  9. 97 0
      src/main/java/com/gyee/frame/mapper/auto/WindturbineinfodaytopMapper.java
  10. 2202 0
      src/main/java/com/gyee/frame/model/auto/Windturbineinfodaytop.java
  11. 4304 0
      src/main/java/com/gyee/frame/model/auto/WindturbineinfodaytopExample.java
  12. 78 0
      src/main/java/com/gyee/frame/model/custom/weather/City.java
  13. 55 0
      src/main/java/com/gyee/frame/model/custom/weather/JsonRootBean.java
  14. 87 0
      src/main/java/com/gyee/frame/model/custom/weather/List.java
  15. 3 3
      src/main/java/com/gyee/frame/model/custom/weather/Wind.java
  16. 6 1
      src/main/java/com/gyee/frame/service/Windturbineinfodaytop2Service.java
  17. 288 0
      src/main/java/com/gyee/frame/service/WindturbineinfodaytopService.java
  18. 46 18
      src/main/java/com/gyee/frame/service/health/HealthMainService.java
  19. 39 13
      src/main/java/com/gyee/frame/service/health/HealthSubService.java
  20. 2 1
      src/main/java/com/gyee/frame/service/report/WtHealthReport3Service.java
  21. 26 1
      src/main/java/com/gyee/frame/service/report/Wttragetreport3Service.java
  22. 245 0
      src/main/java/com/gyee/frame/service/weather/WeatherDay5Service.java
  23. 1 1
      src/main/java/com/gyee/frame/service/weather/WeatherService.java
  24. 53 10
      src/main/java/com/gyee/frame/service/websocket/AgcService.java
  25. 331 329
      src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java
  26. 1 1
      src/main/resources/mybatis-generator.xml
  27. 1 1
      src/main/resources/mybatis/auto/Windturbineinfodaytop2Mapper.xml
  28. 1236 0
      src/main/resources/mybatis/auto/WindturbineinfodaytopMapper.xml
  29. 6 4
      src/test/java/test/BenchmarkingTest.java
  30. 20 18
      src/test/java/test/GoodnessTest.java
  31. 21 14
      src/test/java/test/HealthTest.java
  32. 30 33
      src/test/java/test/LeaderboardTest.java
  33. 9 8
      src/test/java/test/WeatherServiceTest.java
  34. 85 0
      src/test/java/test/WindturbineinfodaytopTest.java

+ 3 - 3
src/main/java/com/gyee/frame/common/spring/InitialRedis.java

@@ -117,7 +117,7 @@ public  class InitialRedis {
 
 
                // cal.add(Calendar.MONTH,1);
                // cal.add(Calendar.MONTH,1);
                 StringBuilder sb=new StringBuilder();
                 StringBuilder sb=new StringBuilder();
-                sb.append("scatter_").append(wpId).append("_").append(month);
+                sb.append("scatter_").append(wpId).append("_").append(j+1);
                 globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
                 globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
                 System.out.println(String.valueOf(sb.append("完成")));
                 System.out.println(String.valueOf(sb.append("完成")));
             }
             }
@@ -197,7 +197,7 @@ public  class InitialRedis {
 
 
                 // cal.add(Calendar.MONTH,1);
                 // cal.add(Calendar.MONTH,1);
                 StringBuilder sb=new StringBuilder();
                 StringBuilder sb=new StringBuilder();
-                sb.append("scatter_").append(wpId).append("_").append(month);
+                sb.append("scatter_").append(wpId).append("_").append(j+1);
                 globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
                 globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
                 System.out.println(String.valueOf(sb.append("完成")));
                 System.out.println(String.valueOf(sb.append("完成")));
             }
             }
@@ -277,7 +277,7 @@ public  class InitialRedis {
 
 
                 // cal.add(Calendar.MONTH,1);
                 // cal.add(Calendar.MONTH,1);
                 StringBuilder sb=new StringBuilder();
                 StringBuilder sb=new StringBuilder();
-                sb.append("scatter_").append(wpId).append("_").append(month);
+                sb.append("scatter_").append(wpId).append("_").append(j+1);
                 globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
                 globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
                 System.out.println(String.valueOf(sb.append("完成")));
                 System.out.println(String.valueOf(sb.append("完成")));
             }
             }

+ 4 - 3
src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -83,6 +83,7 @@ public class InitialRunner implements CommandLineRunner {
 
 
     public static Map<String, Map<String, List<Warning2>>> warnmodelmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,<报警类型,报警集合>>
     public static Map<String, Map<String, List<Warning2>>> warnmodelmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,<报警类型,报警集合>>
     public static Map<String, List<Warning2>> warnmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,报警集合>
     public static Map<String, List<Warning2>> warnmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,报警集合>
+    public static List<WarningClassify> warningClassls = new ArrayList<WarningClassify>(); //报警类型列表
     public static Map<String, WarningClassify> warningClassifymap = new HashMap<String, WarningClassify>();
     public static Map<String, WarningClassify> warningClassifymap = new HashMap<String, WarningClassify>();
     public static Map<String, Manufacturer> manufacturermap = new HashMap<String, Manufacturer>();
     public static Map<String, Manufacturer> manufacturermap = new HashMap<String, Manufacturer>();
 
 
@@ -428,9 +429,9 @@ public class InitialRunner implements CommandLineRunner {
         }
         }
 
 
         WarningClassifyExample wcexample = new WarningClassifyExample();
         WarningClassifyExample wcexample = new WarningClassifyExample();
-        List<WarningClassify> wcls = warningClassifyService.selectByExample(wcexample);
-        if (!wcls.isEmpty()) {
-            for (WarningClassify model : wcls) {
+        warningClassls = warningClassifyService.selectByExample(wcexample);
+        if (!warningClassls.isEmpty()) {
+            for (WarningClassify model : warningClassls) {
                 warningClassifymap.put(model.getId(), model);
                 warningClassifymap.put(model.getId(), model);
             }
             }
         }
         }

+ 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.github.pagehelper.PageInfo;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
 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.auto.Windturbineinfodaytop2;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.model.custom.ValueVo;
 import com.gyee.frame.model.custom.ValueVo;
 import com.gyee.frame.service.Windturbineinfodaytop2Service;
 import com.gyee.frame.service.Windturbineinfodaytop2Service;
+import com.gyee.frame.service.WindturbineinfodaytopService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
 import com.gyee.frame.util.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
@@ -33,7 +35,8 @@ public class BenchmarkingController {
 //    private Windturbineinfodaytop3Service windturbineinfodaytop2Service;
 //    private Windturbineinfodaytop3Service windturbineinfodaytop2Service;
     @Resource
     @Resource
     private Windturbineinfodaytop2Service windturbineinfodaytop2Service;
     private Windturbineinfodaytop2Service windturbineinfodaytop2Service;
-    
+    @Resource
+    private WindturbineinfodaytopService windturbineinfodaytopService;
 
 
     /**查询等级评估日所有信息**/
     /**查询等级评估日所有信息**/
 
 
@@ -168,4 +171,57 @@ public class BenchmarkingController {
 
 
         return	AjaxResult.error(AjaxStatus.error.code,null);
         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);
                 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++) {
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     ValueVo vo = new ValueVo();
                     double temp1=0.0;
                     double temp1=0.0;
@@ -303,7 +311,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
             if (!wtdls.isEmpty()) {
 
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
                 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++) {
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     ValueVo vo = new ValueVo();
                     double temp1=0.0;
                     double temp1=0.0;
@@ -493,7 +507,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
             if (!wtdls.isEmpty()) {
 
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
                 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++) {
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     ValueVo vo = new ValueVo();
 
 
@@ -685,7 +705,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
             if (!wtdls.isEmpty()) {
 
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
                 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++) {
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     ValueVo vo = new ValueVo();
 
 
@@ -877,7 +903,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
             if (!wtdls.isEmpty()) {
 
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
                 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++) {
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     ValueVo vo = new ValueVo();
                     double temp1=0.0;
                     double temp1=0.0;
@@ -1068,7 +1100,13 @@ public class WindturbineDetailChartController {
             if (!wtdls.isEmpty()) {
             if (!wtdls.isEmpty()) {
 
 
                 Windturbinethewindinfo winfo = wtdls.get(0);
                 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++) {
                 for (int i = 0; i < 16; i++) {
                     ValueVo vo = new ValueVo();
                     ValueVo vo = new ValueVo();
                     double temp1=0.0;
                     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.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.custom.*;
 import com.gyee.frame.model.custom.*;
 import com.gyee.frame.service.health.HealthSubService;
 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.DateUtils;
 import com.gyee.frame.util.StringUtils;
 import com.gyee.frame.util.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
@@ -26,6 +28,11 @@ public class HealthSubController {
     @Resource
     @Resource
     private HealthSubService healthSubService;
     private HealthSubService healthSubService;
 
 
+    @Resource
+    private WeatherDay5Service weatherDay5Service;
+
+
+
     @PostMapping("/findWtHealthInfo")
     @PostMapping("/findWtHealthInfo")
     @ResponseBody
     @ResponseBody
     @ApiOperation(value = "获取健康管理风机信息", notes = "获取健康管理风机信息")
     @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")
     @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")
     @PostMapping("/findPowerChar")
     @ResponseBody
     @ResponseBody

+ 23 - 0
src/main/java/com/gyee/frame/controller/powercompare/PowerCompareController.java

@@ -33,6 +33,29 @@ public class PowerCompareController {
     @Resource
     @Resource
     private Windturbineinfoday3Service windturbineinfoday3Service;
     private Windturbineinfoday3Service windturbineinfoday3Service;
 
 
+    /**
+     * 报警类型列表
+     * @return
+     */
+    @GetMapping("/warningClassAjax")
+    @ResponseBody
+    @CrossOrigin
+    @ApiOperation(value = "查询报警类型列表", notes = "查询报警类型列表")
+    public AjaxResult warningClassAjax() {
+
+        List<WarningClassify> vos = new ArrayList<WarningClassify>();
+        if(!InitialRunner.warningClassls.isEmpty())
+        {
+            vos=InitialRunner.warningClassls;
+        }
+        if(vos !=null && !vos.isEmpty())
+        {
+            return	AjaxResult.successData(AjaxStatus.success.code,vos);
+        }else
+        {
+            return	AjaxResult.successData(AjaxStatus.success.code,vos);
+        }
+    }
 
 
     /**
     /**
      * 风场下拉接口
      * 风场下拉接口

+ 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 = "pjId", value = "项目编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "year", 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);
             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)) {
             if (years == Integer.valueOf(year) && months <= (Integer.valueOf(month) - 1)) {
                 StringBuilder sb = new StringBuilder();
                 StringBuilder sb = new StringBuilder();
                 if (StringUtils.notEmp(wpId)) {
                 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)) {
                 } 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)) {
                 } 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 {
     public AjaxResult scatterWtAjax(String wtId, String year, String month) throws Exception {
 
 
         Map<String, List<List<Double>>> result = new HashMap<String, List<List<Double>>>();
         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)) {
         if (StringUtils.notEmp(year) && StringUtils.notEmp(month)) {
 
 
             Calendar cal = Calendar.getInstance();
             Calendar cal = Calendar.getInstance();
@@ -173,56 +175,74 @@ public class ScatterController {
             cal.set(Calendar.MINUTE, 0);
             cal.set(Calendar.MINUTE, 0);
             cal.set(Calendar.SECOND, 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("scatter", vos);
             result.put("line", vos2);
             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


+ 78 - 0
src/main/java/com/gyee/frame/model/custom/weather/City.java

@@ -0,0 +1,78 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+
+/**
+ * Auto-generated: 2021-07-12 15:16:38
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class City {
+
+    private long id;
+    private String name;
+    private Coord coord;
+    private String country;
+    private int population;
+    private int timezone;
+    private long sunrise;
+    private long sunset;
+    public void setId(long id) {
+         this.id = id;
+     }
+     public long getId() {
+         return id;
+     }
+
+    public void setName(String name) {
+         this.name = name;
+     }
+     public String getName() {
+         return name;
+     }
+
+    public void setCoord(Coord coord) {
+         this.coord = coord;
+     }
+     public Coord getCoord() {
+         return coord;
+     }
+
+    public void setCountry(String country) {
+         this.country = country;
+     }
+     public String getCountry() {
+         return country;
+     }
+
+    public void setPopulation(int population) {
+         this.population = population;
+     }
+     public int getPopulation() {
+         return population;
+     }
+
+    public void setTimezone(int timezone) {
+         this.timezone = timezone;
+     }
+     public int getTimezone() {
+         return timezone;
+     }
+
+    public void setSunrise(long sunrise) {
+         this.sunrise = sunrise;
+     }
+     public long getSunrise() {
+         return sunrise;
+     }
+
+    public void setSunset(long sunset) {
+         this.sunset = sunset;
+     }
+     public long getSunset() {
+         return sunset;
+     }
+
+}

+ 55 - 0
src/main/java/com/gyee/frame/model/custom/weather/JsonRootBean.java

@@ -0,0 +1,55 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+import java.util.List;
+
+/**
+ * Auto-generated: 2021-07-12 15:16:38
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class JsonRootBean {
+
+    private String cod;
+    private int message;
+    private int cnt;
+    private List<com.gyee.frame.model.custom.weather.List> list;
+    private City city;
+    public void setCod(String cod) {
+         this.cod = cod;
+     }
+     public String getCod() {
+         return cod;
+     }
+
+    public void setMessage(int message) {
+         this.message = message;
+     }
+     public int getMessage() {
+         return message;
+     }
+
+    public void setCnt(int cnt) {
+         this.cnt = cnt;
+     }
+     public int getCnt() {
+         return cnt;
+     }
+
+    public void setList(List<com.gyee.frame.model.custom.weather.List> list) {
+         this.list = list;
+     }
+     public List<com.gyee.frame.model.custom.weather.List> getList() {
+         return list;
+     }
+
+    public void setCity(City city) {
+         this.city = city;
+     }
+     public City getCity() {
+         return city;
+     }
+
+}

+ 87 - 0
src/main/java/com/gyee/frame/model/custom/weather/List.java

@@ -0,0 +1,87 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+
+import java.util.Date;
+/**
+ * Auto-generated: 2021-07-12 15:16:38
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class List {
+
+    private long dt;
+    private Main main;
+    private java.util.List<Weather> weather;
+    private Clouds clouds;
+    private Wind wind;
+    private int visibility;
+    private int pop;
+    private Sys sys;
+    private Date dt_txt;
+    public void setDt(long dt) {
+         this.dt = dt;
+     }
+     public long getDt() {
+         return dt;
+     }
+
+    public void setMain(Main main) {
+         this.main = main;
+     }
+     public Main getMain() {
+         return main;
+     }
+
+    public void setWeather(java.util.List<Weather> weather) {
+         this.weather = weather;
+     }
+     public java.util.List<Weather> getWeather() {
+         return weather;
+     }
+
+    public void setClouds(Clouds clouds) {
+         this.clouds = clouds;
+     }
+     public Clouds getClouds() {
+         return clouds;
+     }
+
+    public void setWind(Wind wind) {
+         this.wind = wind;
+     }
+     public Wind getWind() {
+         return wind;
+     }
+
+    public void setVisibility(int visibility) {
+         this.visibility = visibility;
+     }
+     public int getVisibility() {
+         return visibility;
+     }
+
+    public void setPop(int pop) {
+         this.pop = pop;
+     }
+     public int getPop() {
+         return pop;
+     }
+
+    public void setSys(Sys sys) {
+         this.sys = sys;
+     }
+     public Sys getSys() {
+         return sys;
+     }
+
+    public void setDt_txt(Date dt_txt) {
+         this.dt_txt = dt_txt;
+     }
+     public Date getDt_txt() {
+         return dt_txt;
+     }
+
+}

+ 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 {
 public class Wind {
 
 
     private double speed;//风速
     private double speed;//风速
-    private int deg;//风向
+    private double deg;//风向
     private double gust;
     private double gust;
     public void setSpeed(double speed) {
     public void setSpeed(double speed) {
          this.speed = speed;
          this.speed = speed;
@@ -21,10 +21,10 @@ public class Wind {
          return speed;
          return speed;
      }
      }
 
 
-    public void setDeg(int deg) {
+    public void setDeg(double deg) {
          this.deg = deg;
          this.deg = deg;
      }
      }
-     public int getDeg() {
+     public double getDeg() {
          return deg;
          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;
 		return	vos;
 
 
 		}
 		}
@@ -489,7 +492,9 @@ public class Windturbineinfodaytop2Service implements BaseService<Windturbineinf
 				vos.add(vo);
 				vos.add(vo);
 
 
 			}
 			}
-
+			ValueVo vo1 = new ValueVo();
+			vo1.setName(wtd.getWindturbineid());
+			vos.add(vo1);
 			return	vos;
 			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);
+	}
+}

+ 46 - 18
src/main/java/com/gyee/frame/service/health/HealthMainService.java

@@ -5,6 +5,7 @@ import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.*;
 import com.gyee.frame.model.custom.*;
 import com.gyee.frame.service.*;
 import com.gyee.frame.service.*;
+import com.gyee.frame.service.weather.WeatherDay5Service;
 import com.gyee.frame.service.weather.WeatherService;
 import com.gyee.frame.service.weather.WeatherService;
 import com.gyee.frame.util.*;
 import com.gyee.frame.util.*;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -29,7 +30,8 @@ public class HealthMainService {
     private WindPowerstationTestingPointService windPowerstationTestingPointService;
     private WindPowerstationTestingPointService windPowerstationTestingPointService;
     @Resource
     @Resource
     private WeatherService weatherService;
     private WeatherService weatherService;
-
+    @Resource
+    private WeatherDay5Service weatherDay5Service;
 
 
     private final int digit = 2;
     private final int digit = 2;
     private final double NUM = 3.6;
     private final double NUM = 3.6;
@@ -594,32 +596,58 @@ public class HealthMainService {
 
 
                 List<String[]> wtIdls = new ArrayList<String[]>();// 风机编号集合
                 List<String[]> wtIdls = new ArrayList<String[]>();// 风机编号集合
                 List<Integer> yhls = new ArrayList<Integer>();// 隐患集合
                 List<Integer> yhls = new ArrayList<Integer>();// 隐患集合
+                Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(wpId);
 
 
-                List<Weatherfh> wfhls = weatherfhService.findWeatherfh(beginDate, endDate, wpId);
-                if (!wfhls.isEmpty()) {
+                if(!weathermap.isEmpty() && weathermap.containsKey("ls"))
+                {
+                    java.util.List<Map<String,Object>> weatherls=(java.util.List<Map<String,Object>>)weathermap.get("ls");
+                    if(!weatherls.isEmpty() && weatherls.size()>8 )
+                    {
+                        Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
+                    for (int i=0;i<8;i++) {
 
 
-                    Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
-                    for (Weatherfh wh : wfhls) {
-                        cal.setTime(wh.getRecodedata());
-                        int hourtemp = cal.get(Calendar.HOUR_OF_DAY);
-                        if (hourtemp == hour) {
-                            ycdl15minute = StringUtils.round(getPowerByWp(wh.getSpeed(), wpId, 1) * 0.25, 2);
-                        }
-                        if (hourtemp == hour + 1) {
-                            ycdl1hour = getPowerByWp(wh.getSpeed(), wpId, 1);
-                        }
+                        Map<String,Object> wh=weatherls.get(i);
+
+                        double fs=(double)wh.get("fs");
+                        ycdl15minute = StringUtils.round(getPowerByWp(fs, wpId, 1) * 0.25, 2);
+                        ycdl1hour = getPowerByWp(fs, wpId, 1);
 
 
-                        if (speedmap.containsKey(wh.getSpeed())) {
-                            int temp = speedmap.get(wh.getSpeed()) + 1;
-                            speedmap.put(wh.getSpeed(), temp);
+                        if (speedmap.containsKey(fs)) {
+                            int temp = speedmap.get(fs) + 1;
+                            speedmap.put(fs, temp);
                         } else {
                         } else {
-                            speedmap.put(wh.getSpeed(), 1);
+                            speedmap.put(fs, 1);
                         }
                         }
 
 
                     }
                     }
                     ycdl1day = getPowerByWp(speedmap, wpId, 1);
                     ycdl1day = getPowerByWp(speedmap, wpId, 1);
-
+                    }
                 }
                 }
+//                List<Weatherfh> wfhls = weatherfhService.findWeatherfh(beginDate, endDate, wpId);
+//                if (!wfhls.isEmpty()) {
+//
+//                    Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
+//                    for (Weatherfh wh : wfhls) {
+//                        cal.setTime(wh.getRecodedata());
+//                        int hourtemp = cal.get(Calendar.HOUR_OF_DAY);
+//                        if (hourtemp == hour) {
+//                            ycdl15minute = StringUtils.round(getPowerByWp(wh.getSpeed(), wpId, 1) * 0.25, 2);
+//                        }
+//                        if (hourtemp == hour + 1) {
+//                            ycdl1hour = getPowerByWp(wh.getSpeed(), wpId, 1);
+//                        }
+//
+//                        if (speedmap.containsKey(wh.getSpeed())) {
+//                            int temp = speedmap.get(wh.getSpeed()) + 1;
+//                            speedmap.put(wh.getSpeed(), temp);
+//                        } else {
+//                            speedmap.put(wh.getSpeed(), 1);
+//                        }
+//
+//                    }
+//                    ycdl1day = getPowerByWp(speedmap, wpId, 1);
+//
+//                }
                 cal = Calendar.getInstance();
                 cal = Calendar.getInstance();
                 cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
                 cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
                 cal.set(Calendar.HOUR_OF_DAY, 0);
                 cal.set(Calendar.HOUR_OF_DAY, 0);

+ 39 - 13
src/main/java/com/gyee/frame/service/health/HealthSubService.java

@@ -657,14 +657,15 @@ public class HealthSubService {
         Double[] sjglarr = new Double[length];
         Double[] sjglarr = new Double[length];
         Double[] llglarr = new Double[length];
         Double[] llglarr = new Double[length];
         Double[] sjfsarr = new Double[length];
         Double[] sjfsarr = new Double[length];
-
+        Long[] timearr = new Long[length];
         WindTurbineTestingPointAi2 sjgl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.TPOINT_WT_FJGL);
         WindTurbineTestingPointAi2 sjgl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.TPOINT_WT_FJGL);
 
 
         List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 24 * 3600L);
         List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 24 * 3600L);
 
 
         if (!sjglls.isEmpty()) {
         if (!sjglls.isEmpty()) {
             for (int i = 0; i < sjglls.size() - 1; i++) {
             for (int i = 0; i < sjglls.size() - 1; i++) {
-                sjglarr[i] = sjglls.get(i).getPointValueInDouble();
+                timearr[i]=sjglls.get(i).getPointTime();
+                sjglarr[i] = MathUtil.twoBit(sjglls.get(i).getPointValueInDouble());
             }
             }
         }
         }
         WindTurbineTestingPointAi2 llgl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.TPOINT_WT_LLGL);
         WindTurbineTestingPointAi2 llgl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.TPOINT_WT_LLGL);
@@ -673,7 +674,7 @@ public class HealthSubService {
 
 
         if (!llglls.isEmpty()) {
         if (!llglls.isEmpty()) {
             for (int i = 0; i < llglls.size() - 1; i++) {
             for (int i = 0; i < llglls.size() - 1; i++) {
-                llglarr[i] = llglls.get(i).getPointValueInDouble();
+                llglarr[i] = MathUtil.twoBit(llglls.get(i).getPointValueInDouble());
             }
             }
         }
         }
 
 
@@ -683,20 +684,44 @@ public class HealthSubService {
 
 
         if (!ssfsls.isEmpty()) {
         if (!ssfsls.isEmpty()) {
             for (int i = 0; i < ssfsls.size() - 1; i++) {
             for (int i = 0; i < ssfsls.size() - 1; i++) {
-                sjfsarr[i] = ssfsls.get(i).getPointValueInDouble();
+                sjfsarr[i] = MathUtil.twoBit(ssfsls.get(i).getPointValueInDouble());
             }
             }
         }
         }
 
 
         resultmap.put("sjgl", sjglarr);
         resultmap.put("sjgl", sjglarr);
         resultmap.put("llgl", llglarr);
         resultmap.put("llgl", llglarr);
         resultmap.put("ssfs", sjfsarr);
         resultmap.put("ssfs", sjfsarr);
-
+        resultmap.put("timearr", timearr);
         resultmap.put("begin", begin);
         resultmap.put("begin", begin);
         resultmap.put("end", end);
         resultmap.put("end", end);
 
 
         return resultmap;
         return resultmap;
     }
     }
 
 
+    private String selectCol(String value)
+    {
+        String col="#05bb4c";
+
+        switch (value) {
+            case "1.0":
+                col="#05bb4c";
+                break;
+            case "2.0":
+                col="#4b55ae";
+                break;
+            case "3.0":
+                col="#edbf03";
+                break;
+            case "4.0":
+                col="#e17e23";
+                break;
+
+            default:
+                break;
+        }
+
+        return col;
+    }
     /**
     /**
      * 数组 0健康状态、1部件名称 2 7天健康状态 3 故障进度 4 mtbf 5 mttr 6损失电量
      * 数组 0健康状态、1部件名称 2 7天健康状态 3 故障进度 4 mtbf 5 mttr 6损失电量
      * @param wtId
      * @param wtId
@@ -732,15 +757,16 @@ public class HealthSubService {
 
 
         DNAVal[] ssjkvalues = realApiUtil.getRealtimeTagValues(jkpoints);
         DNAVal[] ssjkvalues = realApiUtil.getRealtimeTagValues(jkpoints);
 
 
-        clxstrs[0] = String.valueOf(ssjkvalues[0].DValue);
-        fdjstrs[0] = String.valueOf(ssjkvalues[1].DValue);
-        bjstrs[0] = String.valueOf(ssjkvalues[2].DValue);
-        zkstrs[0] = String.valueOf(ssjkvalues[3].DValue);
 
 
-        zzstrs[0] = "1.0";
-        phstrs[0] = "1.0";
-        jcstrs[0] = "1.0";
-        bpqstrs[0] = "1.0";
+        clxstrs[0] = selectCol(String.valueOf(ssjkvalues[0].DValue));
+        fdjstrs[0] = selectCol(String.valueOf(ssjkvalues[1].DValue));
+        bjstrs[0] = selectCol(String.valueOf(ssjkvalues[2].DValue));
+        zkstrs[0] = selectCol(String.valueOf(ssjkvalues[3].DValue));
+
+        zzstrs[0] = selectCol(String.valueOf(1.0));;
+        phstrs[0] = selectCol(String.valueOf(1.0));;
+        jcstrs[0] = selectCol(String.valueOf(1.0));;
+        bpqstrs[0] =selectCol(String.valueOf(1.0));;
 
 
         StringBuilder clxsb = new StringBuilder();
         StringBuilder clxsb = new StringBuilder();
         StringBuilder fdjsb = new StringBuilder();
         StringBuilder fdjsb = new StringBuilder();

+ 2 - 1
src/main/java/com/gyee/frame/service/report/WtHealthReport3Service.java

@@ -69,8 +69,9 @@ public class WtHealthReport3Service {
                 Windturbine wt = InitialRunner.wtmap.get(wtId);
                 Windturbine wt = InitialRunner.wtmap.get(wtId);
 
 
 
 
+                //List<Wttragetreport3> wtreportls = wttragetreport3Service.findWttragetreport3(wtId, year, month);
 
 
-                List<Wttragetreport3> wtreportls = wttragetreport3Service.findWttragetreport3(wtId, year, month);
+                List<Wttragetreport3> wtreportls = wttragetreport3Service.findWttragetreport3(wtId,recorddate);
 
 
                 if (!wtreportls.isEmpty()) {
                 if (!wtreportls.isEmpty()) {
                     //获得健康报告主表信息
                     //获得健康报告主表信息

+ 26 - 1
src/main/java/com/gyee/frame/service/report/Wttragetreport3Service.java

@@ -5,11 +5,13 @@ import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.Wttragetreport3Mapper;
 import com.gyee.frame.mapper.auto.Wttragetreport3Mapper;
 import com.gyee.frame.model.auto.Wttragetreport3;
 import com.gyee.frame.model.auto.Wttragetreport3;
 import com.gyee.frame.model.auto.Wttragetreport3Example;
 import com.gyee.frame.model.auto.Wttragetreport3Example;
+import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -102,7 +104,7 @@ public class Wttragetreport3Service implements BaseService<Wttragetreport3, Wttr
 
 
 		List<Wttragetreport3> list=new ArrayList<>();
 		List<Wttragetreport3> list=new ArrayList<>();
 
 
-		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(wtId) && StringUtils.notEmp(wtId))
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(year) && StringUtils.notEmp(month))
 		{
 		{
 			Wttragetreport3Example example=new Wttragetreport3Example();
 			Wttragetreport3Example example=new Wttragetreport3Example();
 			example.setOrderByClause("recodedate asc");
 			example.setOrderByClause("recodedate asc");
@@ -121,4 +123,27 @@ public class Wttragetreport3Service implements BaseService<Wttragetreport3, Wttr
 
 
 	}
 	}
 
 
+
+	public List<Wttragetreport3> findWttragetreport3(String wtId,  Date recorddate) {
+
+
+		List<Wttragetreport3> list=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate) )
+		{
+			Wttragetreport3Example example=new Wttragetreport3Example();
+			example.setOrderByClause("recodedate asc");
+
+			Wttragetreport3Example.Criteria criteria =example.createCriteria();
+
+
+			criteria.andRecodedateGreaterThanOrEqualTo(recorddate).andRecodedateLessThan(DateUtils.addDays(recorddate,1));
+			list= wttragetreport3Mapper.selectByExample(example);
+		}
+
+
+		return list;
+
+	}
+
 }
 }

+ 245 - 0
src/main/java/com/gyee/frame/service/weather/WeatherDay5Service.java

@@ -0,0 +1,245 @@
+package com.gyee.frame.service.weather;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.gyee.frame.common.cache.RedisUtils;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Line;
+import com.gyee.frame.model.auto.Project;
+import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.custom.weather.*;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+
+@Service
+public class WeatherDay5Service {
+
+	private final Integer DATABASE=2;
+	@Resource
+	private RedisUtils redisUtils;
+
+	public Map<String,Object> getWeatherRealDay5Info(String id)
+	{
+
+		Map<String,Object> result=new HashMap<>();
+		java.util.List<Map<String,Object>> lsmap=new ArrayList<>();
+
+
+		if(StringUtils.notEmp(id))
+		{
+
+			if (InitialRunner.wpmap.containsKey(id)) {
+				Windpowerstation wp = InitialRunner.wpmap.get(id);
+
+				id=wp.getId();
+
+
+			} else if (InitialRunner.pjmap.containsKey(id)) {
+				Project pj = InitialRunner.pjmap.get(id);
+				Windpowerstation wp = InitialRunner.wpmap.get(pj.getWindpowerstationid());
+				id=wp.getId();
+			} else if (InitialRunner.lnmap.containsKey(id)) {
+				Line ln = InitialRunner.lnmap.get(id);
+				Project pj = InitialRunner.pjmap.get(ln.getProjectid());
+				Windpowerstation wp = InitialRunner.wpmap.get(pj.getWindpowerstationid());
+				id=wp.getId();
+			}
+
+			String weatherStr =null;
+
+			switch(id) {
+				case "0" :
+					result.put("name","银川");
+					weatherStr = redisUtils.get("NX_QYGS_WEATHER_FORECAST",DATABASE);
+					break;
+				case "-1" :
+					result.put("name","银川");
+					weatherStr = redisUtils.get("NX_QYGS_WEATHER_FORECAST",DATABASE);
+					break;
+				case "-2" :
+					result.put("name","银川");
+					weatherStr = redisUtils.get("NX_QYGS_WEATHER_FORECAST",DATABASE);
+					break;
+				case "MHS_FDC" :
+					result.put("name","麻黄山");
+					weatherStr = redisUtils.get("MHS_FDC_WEATHER_FORECAST",DATABASE);
+					break;
+				case "NSS_FDC" :
+					result.put("name","牛首山");
+					weatherStr = redisUtils.get("NSS_FDC_WEATHER_FORECAST",DATABASE);
+					break;
+				case "QS_FDC" :
+					result.put("name","青山");
+					weatherStr = redisUtils.get("QS_FDC_WEATHER_FORECAST",DATABASE);
+					break;
+				case "SBQ_FDC" :
+					result.put("name","石板泉");
+					weatherStr = redisUtils.get("SBQ_FDC_WEATHER_FORECAST",DATABASE);
+					break;
+				case "XS_FDC" :
+					result.put("name","香山");
+					weatherStr = redisUtils.get("XS_FDC_WEATHER_FORECAST",DATABASE);
+					break;
+				case "DWK_GDC" :
+					result.put("name","大武口");
+					weatherStr = redisUtils.get("DWK_GDC_WEATHER_FORECAST",DATABASE);
+					break;
+				case "PL_GDC" :
+					result.put("name","平罗");
+					weatherStr = redisUtils.get("PL_GDC_WEATHER_FORECAST",DATABASE);
+					break;
+				case "XH_GDC" :
+					result.put("name","宣和");
+					weatherStr = redisUtils.get("XH_GDC_WEATHER_FORECAST",DATABASE);
+					break;
+				case "MCH_GDC" :
+					result.put("name","马场湖");
+					weatherStr = redisUtils.get("MCH_GDC_WEATHER_FORECAST",DATABASE);
+					break;
+				case "HZJ_GDC" :
+					result.put("name","海子井");
+					weatherStr = redisUtils.get("HZJ_GDC_WEATHER_FORECAST",DATABASE);
+					break;
+				default:
+					break;
+			}
+
+			if(StringUtils.notEmp(weatherStr))
+			{
+				JsonRootBean jsonRootBean = JSONObject.parseObject(weatherStr, new TypeReference<JsonRootBean>() {
+				});
+
+				if(null!=jsonRootBean && null!=jsonRootBean.getList() && !jsonRootBean.getList().isEmpty())
+				{
+
+					for(com.gyee.frame.model.custom.weather.List weatherReal:jsonRootBean.getList())
+					{
+						Map<String,Object> map=new HashMap<>();
+
+						double qxd=weatherReal.getVisibility();
+						map.put("qxd", MathUtil.twoBit(qxd/1000));
+
+						if(null!=weatherReal.getMain())
+						{
+							Main main=weatherReal.getMain();
+							map.put("wd",main.getTemp());
+							map.put("dqyl",main.getPressure());
+							map.put("sd",main.getHumidity());
+
+						}
+
+
+						if(null!=weatherReal.getWind())
+						{
+							Wind wind=weatherReal.getWind();
+							map.put("fs",wind.getSpeed());
+
+							if(StringUtils.notEmp(wind.getDeg()))
+							{
+								double fx=wind.getDeg();
+
+								map.put("fx",fx);
+//								if(fx>= 11.25 && fx<= 348.76)
+//								{
+//									map.put("fx","北");
+//								}else if(fx>= 33.76 && fx<= 56.25)
+//								{
+//									map.put("fx","东北");
+//								}else if(fx>= 78.76 && fx<= 101.25)
+//								{
+//									map.put("fx","东");
+//								}else if(fx>= 123.76 && fx<= 146.25)
+//								{
+//									map.put("fx","东南");
+//								}else if(fx>= 168.76 && fx<= 191.25)
+//								{
+//									map.put("fx","南");
+//								}else if(fx>= 213.76 && fx<= 236.25)
+//								{
+//									map.put("fx","西南");
+//								}else if(fx>= 258.76 && fx<= 281.25)
+//								{
+//									map.put("fx","西");
+//								}else if(fx>= 303.76 && fx<= 326.25)
+//								{
+//									map.put("fx","西北");
+//								}
+
+							}
+
+						}
+
+						if(null!=weatherReal.getWeather() && !weatherReal.getWeather().isEmpty())
+						{
+							Weather weather=weatherReal.getWeather().get(0);
+
+							String icon=weather.getIcon();
+
+							if (StringUtils.notEmp(icon))
+							{
+								if(icon.equals("01d") || icon.equals("01n"))
+								{
+									map.put("tqmc","晴");
+									map.put("tqtp","01");
+								}else if(icon.equals("02d") || icon.equals("02n"))
+								{
+									map.put("tqmc","少云");
+									map.put("tqtp","02");
+								}else if(icon.equals("03d") || icon.equals("03n"))
+								{
+									map.put("tqmc","多云");
+									map.put("tqtp","06");
+								}else if(icon.equals("04d") || icon.equals("04n"))
+								{
+									map.put("tqmc","阴");
+									map.put("tqtp","07");
+								}else if(icon.equals("09d") || icon.equals("09n"))
+								{
+									map.put("tqmc","阵雨");
+									map.put("tqtp","13");
+								}else if(icon.equals("10d") || icon.equals("10n"))
+								{
+									map.put("tqmc","雨");
+									map.put("tqtp","18");
+								}else if(icon.equals("11d") || icon.equals("11n"))
+								{
+									map.put("tqmc","雷雨");
+									map.put("tqtp","15");
+								}else if(icon.equals("13d") || icon.equals("13n"))
+								{
+									map.put("tqmc","雪");
+									map.put("tqtp","19");
+								}else if(icon.equals("50d") || icon.equals("50n"))
+								{
+									map.put("tqmc","雾");
+									map.put("tqtp","32");
+								}else
+								{
+									map.put("description","晴");
+									map.put("tqtp","01");
+								}
+
+							}
+						}
+
+						lsmap.add(map);
+					}
+
+				}
+			}
+
+		}
+
+		result.put("ls",lsmap);
+		return  result;
+	}
+
+
+}

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

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

+ 53 - 10
src/main/java/com/gyee/frame/service/websocket/AgcService.java

@@ -123,14 +123,51 @@ public class AgcService {
                             data = ednaApiUtil.getRealData(ai);
                             data = ednaApiUtil.getRealData(ai);
                             if (data != null) {
                             if (data != null) {
 
 
-                                if(i==0)
-                                {
-                                    double  llgl = new BigDecimal(data.getPointValueInDouble()).divide(new BigDecimal(10000), 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
-                                    resultmap.put( agcPoints[i],llgl);
-                                }else
-                                {
+                                if(i==0) {
+                                    if (wp.getId().equals("MHS_FDC") || wp.getId().equals("NSS_FDC") || wp.getId().equals("XS_FDC")){
+                                        double  llgl = new BigDecimal(data.getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_UP).doubleValue();
+                                        resultmap.put( agcPoints[i],llgl);
+                                    }else{
+                                        resultmap.put( agcPoints[i],
+                                                MathUtil.decimal(data.getPointValueInDouble(), 2));
+                                    }
+                                }else if(i==2){
+                                    if (wp.getId().equals("SBQ_FDC")){
+                                        double  llgl = new BigDecimal(data.getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_UP).doubleValue();
+                                        resultmap.put( agcPoints[i],llgl);
+                                    }else{
+                                        resultmap.put( agcPoints[i],
+                                                MathUtil.decimal(data.getPointValueInDouble(), 2));
+                                    }
+                                }else if(i==4){
+                                    if (wp.getId().equals("MHS_FDC")){
+                                        double  llgl = new BigDecimal(data.getPointValueInDouble()).divide(new BigDecimal(10), 2, RoundingMode.HALF_UP).doubleValue();
+                                        resultmap.put( agcPoints[i],llgl);
+                                    }else if(wp.getId().equals("NSS_FDC")){
+                                        double  llgl = new BigDecimal(data.getPointValueInDouble()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).doubleValue();
+                                        resultmap.put( agcPoints[i],llgl);
+                                    }else{
+                                        resultmap.put( agcPoints[i],
+                                                MathUtil.decimal(data.getPointValueInDouble(), 2));
+                                    }
+                                }
+                                else if(i==5){
+                                    if (wp.getId().equals("MHS_FDC")){
+                                        double  llgl = new BigDecimal(data.getPointValueInDouble()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).doubleValue();
+                                        resultmap.put( agcPoints[i],llgl);
+                                    }else if(wp.getId().equals("NSS_FDC")){
+                                        double  llgl = new BigDecimal(data.getPointValueInDouble()).divide(new BigDecimal(10), 2, RoundingMode.HALF_UP).doubleValue();
+                                        resultmap.put( agcPoints[i],llgl);
+                                    }else{
+                                        resultmap.put( agcPoints[i],
+                                                MathUtil.decimal(data.getPointValueInDouble(), 2));
+                                    }
+                                }
+                                else {
                                     resultmap.put( agcPoints[i],
                                     resultmap.put( agcPoints[i],
                                             MathUtil.decimal(data.getPointValueInDouble(), 2));
                                             MathUtil.decimal(data.getPointValueInDouble(), 2));
+
+
                                 }
                                 }
 
 
 
 
@@ -190,7 +227,7 @@ public class AgcService {
                 tempmap2.put("ZZSGL", MathUtil.decimal(xlllgl/1000,2));
                 tempmap2.put("ZZSGL", MathUtil.decimal(xlllgl/1000,2));
 
 
                 tempmap.put("SSZGL", MathUtil.decimal(sjgl,2));
                 tempmap.put("SSZGL", MathUtil.decimal(sjgl,2));
-                tempmap.put("ZZSGL", MathUtil.decimal(nwllgl,2));
+                tempmap.put("ZZSGL", MathUtil.decimal(nwllgl/1000,2));
                 tempmap.put("AGC001", MathUtil.decimal(nwcxgl,2));
                 tempmap.put("AGC001", MathUtil.decimal(nwcxgl,2));
                 tempmap.put("AGC002", MathUtil.decimal(nwxdzl,2));
                 tempmap.put("AGC002", MathUtil.decimal(nwxdzl,2));
                 tempmap.put("AGC003", MathUtil.decimal(nwygsx,2));
                 tempmap.put("AGC003", MathUtil.decimal(nwygsx,2));
@@ -245,7 +282,7 @@ public class AgcService {
                 double sjgl = ednaApiUtil.getRealData("QSFCJSFW.NX_GD_QSF_FJ_P3_XXX_XXX_CI0134").getPointValueInDouble();
                 double sjgl = ednaApiUtil.getRealData("QSFCJSFW.NX_GD_QSF_FJ_P3_XXX_XXX_CI0134").getPointValueInDouble();
                 tempmap.put("SSZGL", MathUtil.decimal(sjgl,2));
                 tempmap.put("SSZGL", MathUtil.decimal(sjgl,2));
 
 
-                tempmap.put("ZZSGL", MathUtil.decimal(slllgl, 2));
+                tempmap.put("ZZSGL", MathUtil.decimal(slllgl/1000, 2));
                 tempmap.put("AGC001", MathUtil.decimal(slcxgl, 2));
                 tempmap.put("AGC001", MathUtil.decimal(slcxgl, 2));
                 tempmap.put("AGC002", MathUtil.decimal(slxdzl, 2));
                 tempmap.put("AGC002", MathUtil.decimal(slxdzl, 2));
                 tempmap.put("AGC003", MathUtil.decimal(slygsx, 2));
                 tempmap.put("AGC003", MathUtil.decimal(slygsx, 2));
@@ -403,8 +440,14 @@ public class AgcService {
                     if (i < xdglls.size() && StringUtils.notEmp(xdglls.get(i).getPointTime())) {
                     if (i < xdglls.size() && StringUtils.notEmp(xdglls.get(i).getPointTime())) {
 
 
                         if (vos.get(i).getTime() <= new Date().getTime()) {
                         if (vos.get(i).getTime() <= new Date().getTime()) {
-                            temp1 = xdglls.get(i).getPointValueInDouble();
-                            vos.get(i).setXdzl(StringUtils.round(temp1, 2));// 限电功率
+                            if (wp.getId().equals("SBQ_FDC")){
+                                temp1 = xdglls.get(i).getPointValueInDouble()/1000;
+                                vos.get(i).setXdzl(StringUtils.round(temp1, 2));// 限电功率
+                            }else {
+                                temp1 = xdglls.get(i).getPointValueInDouble();
+                                vos.get(i).setXdzl(StringUtils.round(temp1, 2));// 限电功率
+                            }
+
                         } else {
                         } else {
                             vos.get(i).setXdzl(0d);// 限电功率
                             vos.get(i).setXdzl(0d);// 限电功率
                         }
                         }

+ 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());
                     Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
                     jczbmap.put("xdts", xdts);
                     jczbmap.put("xdts", xdts);
 
 
-
-
+                    jczbmap.put("jrts", djts+yxts+gzts+lxts+whts+xdts);
                 } else {
                 } else {
                     //实时风速
                     //实时风速
                     jczbmap.put("ssfs", 0.0);
                     jczbmap.put("ssfs", 0.0);
@@ -204,6 +203,7 @@ public class MatrixPushByWpService {
                     jczbmap.put("whts", 0.0);
                     jczbmap.put("whts", 0.0);
                     //限电台数
                     //限电台数
                     jczbmap.put("xdts", 0.0);
                     jczbmap.put("xdts", 0.0);
+                    jczbmap.put("jrts", 0.0);
                 }
                 }
 
 
                 Calendar c = Calendar.getInstance();
                 Calendar c = Calendar.getInstance();
@@ -373,19 +373,19 @@ public class MatrixPushByWpService {
 
 
 
 
                 List<String> jczbls = new ArrayList<>();
                 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.AGC002).getCode());
                 //待机台数
                 //待机台数
                 jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS).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()) {
                 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);
                     jczbmap.put("djts", djts);
                     //运行台数
                     //运行台数
-                    Double yxts = MathUtil.twoBit(jczblist.get(8).getPointValueInDouble());
+                    Double yxts = MathUtil.twoBit(jczblist.get(1).getPointValueInDouble());
                     jczbmap.put("yxts", yxts);
                     jczbmap.put("yxts", yxts);
                     //故障台数
                     //故障台数
-                    Double gzts = MathUtil.twoBit(jczblist.get(9).getPointValueInDouble());
+                    Double gzts = MathUtil.twoBit(jczblist.get(2).getPointValueInDouble());
                     jczbmap.put("gzts", gzts);
                     jczbmap.put("gzts", gzts);
                     //离线台数
                     //离线台数
-                    Double lxts = MathUtil.twoBit(jczblist.get(10).getPointValueInDouble());
+                    Double lxts = MathUtil.twoBit(jczblist.get(3).getPointValueInDouble());
                     jczbmap.put("lxts", lxts);
                     jczbmap.put("lxts", lxts);
                     //维护台数
                     //维护台数
-                    Double whts = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
+                    Double whts = MathUtil.twoBit(jczblist.get(4).getPointValueInDouble());
                     jczbmap.put("whts", whts);
                     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("xdts", xdts);
 
 
-
+                    jczbmap.put("jrts", djts+yxts+gzts+lxts+whts+xdts);
 
 
                 } else {
                 } 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);
                     jczbmap.put("djts", 0.0);
                     //运行台数
                     //运行台数
@@ -471,6 +471,8 @@ public class MatrixPushByWpService {
                     jczbmap.put("whts", 0.0);
                     jczbmap.put("whts", 0.0);
                     //限电台数
                     //限电台数
                     jczbmap.put("xdts", 0.0);
                     jczbmap.put("xdts", 0.0);
+
+                    jczbmap.put("jrts", 0.0);
                 }
                 }
 
 
 
 
@@ -481,239 +483,239 @@ public class MatrixPushByWpService {
                 fczbmap.put("jczbmap",jczbmap);
                 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<>();
                 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.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());
                         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.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());
                         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);
                         //vomap.put(wt.getId(),vo);
                         vos.add(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/mybatis-generator.xml

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

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

@@ -157,7 +157,7 @@
     yeartjsj, dayLYXS, monthLYXS, yearLYXS, dayNHYD, monthNHYD, yearNHYD, daySBKLYL, 
     yeartjsj, dayLYXS, monthLYXS, yearLYXS, dayNHYD, monthNHYD, yearNHYD, daySBKLYL, 
     monthSBKLYL, yearSBKLYL, dayDXKYXS, monthDXKYXS, yearDXKYXS, dayyxfss, monthyxfss, 
     monthSBKLYL, yearSBKLYL, dayDXKYXS, monthDXKYXS, yearDXKYXS, dayyxfss, monthyxfss, 
     yearyxfss, dayxfqr, monthxfqr, yearxfqr, dayjfpl, monthjfpl, yearjfpl, dayglyzxxs, 
     yearyxfss, dayxfqr, monthxfqr, yearxfqr, dayjfpl, monthjfpl, yearjfpl, dayglyzxxs, 
-    monthglyzxxs, yearglyzxxs, type, Rank, Level, year, month
+    monthglyzxxs, yearglyzxxs, type, Rank, "LEVEL", year, month
   </sql>
   </sql>
   <select id="selectByExample" parameterType="com.gyee.frame.model.auto.Windturbineinfodaytop2Example" resultMap="BaseResultMap">
   <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.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.benchmarking.BenchmarkingController;
 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 com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
@@ -35,6 +35,8 @@ public class BenchmarkingTest {
 
 
         String wpid="MHS_FDC";
         String wpid="MHS_FDC";
 
 
+//        Windturbineinfodaytop3Service windturbineinfodaytop3Service= SpringUtils.getBean("windturbineinfodaytop3Service");
+
         BenchmarkingController benchmarkingController= SpringUtils.getBean("benchmarkingController");
         BenchmarkingController benchmarkingController= SpringUtils.getBean("benchmarkingController");
 //
 //
 //        AjaxResult ajaxResult = dayBenchmarkingController.gadaylist(wpid,"2021-01-01");
 //        AjaxResult ajaxResult = dayBenchmarkingController.gadaylist(wpid,"2021-01-01");
@@ -45,10 +47,10 @@ public class BenchmarkingTest {
         tablepar.setPageNum(1);
         tablepar.setPageNum(1);
         tablepar.setPageSize(10);
         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());
             System.out.println(wtd.getWindturbineid()+"----------------"+wtd.getDayfdl());
         }
         }

+ 20 - 18
src/test/java/test/GoodnessTest.java

@@ -1,17 +1,19 @@
 package test;
 package test;
 
 
-import com.github.pagehelper.PageInfo;
 import com.gyee.SpringbootStart;
 import com.gyee.SpringbootStart;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.goodness.WindturbineDetailLineChartController;
 import com.gyee.frame.controller.goodness.WindturbineDetailLineChartController;
-import com.gyee.frame.model.auto.Brownoutsevent2;
+import com.gyee.frame.controller.goodness.WindturbineGoodnessDetailController;
+import com.gyee.frame.controller.goodness.WindturbinegoodnessController;
+import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
 
 
 import java.util.Calendar;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.Date;
+import java.util.List;
 
 
 public class GoodnessTest {
 public class GoodnessTest {
 
 
@@ -36,9 +38,9 @@ public class GoodnessTest {
         String wpid = "MHS_FDC";
         String wpid = "MHS_FDC";
         String wtid = "MG01_02";
         String wtid = "MG01_02";
 
 
-//        WindturbinegoodnessController windturbinegoodnessController= SpringUtils.getBean("windturbinegoodnessController");
+        WindturbinegoodnessController windturbinegoodnessController= SpringUtils.getBean("windturbinegoodnessController");
         WindturbineDetailLineChartController windturbineDetailLineChartController = SpringUtils.getBean("windturbineDetailLineChartController");
         WindturbineDetailLineChartController windturbineDetailLineChartController = SpringUtils.getBean("windturbineDetailLineChartController");
-
+        WindturbineGoodnessDetailController windturbineGoodnessDetailController= SpringUtils.getBean("windturbineGoodnessDetailController");
 ////
 ////
 //
 //
 //        AjaxResult ajaxResult = dayBenchmarkingController.gadaylist(wpid,"2021-01-01");
 //        AjaxResult ajaxResult = dayBenchmarkingController.gadaylist(wpid,"2021-01-01");
@@ -95,25 +97,25 @@ public class GoodnessTest {
 //            System.out.println(wtd.getWarnDesc()+"----------------"+wtd.getStartTime()+"----------------"+wtd.getStopTime());
 //            System.out.println(wtd.getWarnDesc()+"----------------"+wtd.getStartTime()+"----------------"+wtd.getStopTime());
 //        }
 //        }
 //
 //
-        AjaxResult ajaxResult3 =windturbineDetailLineChartController.xdjllist(tablepar,"MG01_07","2021-07-10");
-
-        PageInfo<Brownoutsevent2> test3=(PageInfo<Brownoutsevent2>)ajaxResult3.get("data");
-
-        for(Brownoutsevent2 wtd:test3.getList())
-        {
-            System.out.println(wtd.getLimitload()+"----------------"+wtd.getStoptime()+"----------------"+wtd.getLosspower());
-        }
+//        AjaxResult ajaxResult3 =windturbineDetailLineChartController.xdjllist(tablepar,"MG01_07","2021-07-10");
 //
 //
+//        PageInfo<Brownoutsevent2> test3=(PageInfo<Brownoutsevent2>)ajaxResult3.get("data");
 //
 //
+//        for(Brownoutsevent2 wtd:test3.getList())
+//        {
+//            System.out.println(wtd.getLimitload()+"----------------"+wtd.getStoptime()+"----------------"+wtd.getLosspower());
+//        }
 //
 //
-//        AjaxResult ajaxResult4 =windturbineGoodnessDetailController.glchat(wtid,"2021-01-01");
 //
 //
-//        List<DataVo> test4=(List<DataVo> )ajaxResult4.get("data");
 //
 //
-//        for(DataVo wtd:test4)
-//        {
-//            System.out.println(wtd.getValue1()+"----------------"+wtd.getName()+"----------------"+wtd.getName());
-//        }
+        AjaxResult ajaxResult4 =windturbineGoodnessDetailController.glchat(wtid,"2021-07-01");
+
+        List<DataVo> test4=(List<DataVo> )ajaxResult4.get("data");
+
+        for(DataVo wtd:test4)
+        {
+            System.out.println(wtd.getValue1()+"----------------"+wtd.getName()+"----------------"+wtd.getName());
+        }
 //
 //
 //        AjaxResult ajaxResult5 =windturbineGoodnessDetailController.fjfzy(wtid,"2021-01-01");
 //        AjaxResult ajaxResult5 =windturbineGoodnessDetailController.fjfzy(wtid,"2021-01-01");
 //
 //

+ 21 - 14
src/test/java/test/HealthTest.java

@@ -4,6 +4,7 @@ import com.gyee.SpringbootStart;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.health.HealthMainController;
 import com.gyee.frame.controller.health.HealthMainController;
 import com.gyee.frame.controller.health.HealthSubController;
 import com.gyee.frame.controller.health.HealthSubController;
+import com.gyee.frame.controller.health.WindTurbineHealthListController;
 import lombok.SneakyThrows;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
 
 
@@ -31,20 +32,22 @@ public class HealthTest {
 
 
         Date date = c.getTime();
         Date date = c.getTime();
 
 
-        String wtid="MG01_01";
+        String wtid="MG01_07";
         HealthMainController healthMainController= SpringUtils.getBean("healthMainController");
         HealthMainController healthMainController= SpringUtils.getBean("healthMainController");
 
 
         HealthSubController healthSubController= SpringUtils.getBean("healthSubController");
         HealthSubController healthSubController= SpringUtils.getBean("healthSubController");
+
+        WindTurbineHealthListController windTurbineHealthListController= SpringUtils.getBean("windTurbineHealthListController");
 //        Map<String, Object> map =healthMainController.findAllMap();
 //        Map<String, Object> map =healthMainController.findAllMap();
 ////
 ////
 ////
 ////
 //        System.out.println(map);
 //        System.out.println(map);
 //
 //
 //        Map<String, Object> map1 =healthMainController.findWpMap("MHS_FDC");
 //        Map<String, Object> map1 =healthMainController.findWpMap("MHS_FDC");
-
-//        Map<String, Object> map =healthMainController.findHealthMatrixMap();
 //
 //
-//       System.out.println(map);
+////        Map<String, Object> map =healthMainController.findHealthMatrixMap();
+////
+//       System.out.println(map1);
 //
 //
 //
 //
 //        Map<String, Object> map =healthMainController.findWpMap("MHS_FDC");
 //        Map<String, Object> map =healthMainController.findWpMap("MHS_FDC");
@@ -58,14 +61,14 @@ public class HealthTest {
 //        System.out.println(map);
 //        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());
 //        System.out.println(map1.size());
 
 
 
 
-//        Map<String, Object> map1 =healthSubController.getWtMttrandMtbfByBj(wtid);
-//        System.out.println(map1.size());
+        Map<String, Object> map1 =healthSubController.getWtMttrandMtbfByBj(wtid);
+        System.out.println(map1.size());
+
+
+//        AjaxResult ajax=windTurbineHealthListController.windTurbineHealthList("MHS_FDC");
+//        System.out.println(ajax.size());
         System.out.println("***************************************************************************************");
         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.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.leaderboard.LeaderboardController;
 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.auto.Curvefittingmonthmain;
-import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
@@ -14,7 +12,6 @@ import org.springframework.boot.SpringApplication;
 import java.util.Calendar;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
-import java.util.Map;
 
 
 public class LeaderboardTest {
 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");
         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.SpringbootStart;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.weather.WeatherDay5Service;
 import com.gyee.frame.service.weather.WeatherService;
 import com.gyee.frame.service.weather.WeatherService;
 import lombok.SneakyThrows;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
@@ -33,14 +34,14 @@ public class WeatherServiceTest {
         String wtid="MG01_01";
         String wtid="MG01_01";
         WeatherService weatherService= SpringUtils.getBean("weatherService");
         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);
         System.out.println(map1);
 //
 //
 //        Map<String, Object> map =healthMainController.findWpMap("MHS_FDC");
 //        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());
+//        }
+//
+//
+//
+    }
+}