Browse Source

健康管理接口开发修正

shilin 3 years ago
parent
commit
fb20484294
100 changed files with 11307 additions and 1137 deletions
  1. 5 0
      pom.xml
  2. 11 1
      src/main/java/com/gyee/SpringbootStart.java
  3. 77 77
      src/main/java/com/gyee/frame/common/async/config/AsyncConfig.java
  4. 1 5
      src/main/java/com/gyee/frame/common/base/BaseController.java
  5. 79 0
      src/main/java/com/gyee/frame/common/conf/TemperatureConfig.java
  6. 36 0
      src/main/java/com/gyee/frame/common/spring/Constant.java
  7. 336 13
      src/main/java/com/gyee/frame/common/spring/InitialRedis.java
  8. 38 2
      src/main/java/com/gyee/frame/common/spring/InitialRunner.java
  9. 0 30
      src/main/java/com/gyee/frame/common/udp/client/UdpIntegrationClient.java
  10. 0 28
      src/main/java/com/gyee/frame/common/udp/client/UdpIntegrationClientConfig.java
  11. 0 54
      src/main/java/com/gyee/frame/common/udp/client/UdpSimpleClient.java
  12. 0 69
      src/main/java/com/gyee/frame/common/udp/controller/UdpController.java
  13. 0 177
      src/main/java/com/gyee/frame/common/udp/server/UdpServer.java
  14. 0 22
      src/main/java/com/gyee/frame/common/udp/service/BusinessService.java
  15. 0 35
      src/main/java/com/gyee/frame/common/udp/service/impl/BusinessServiceImpl.java
  16. 1 0
      src/main/java/com/gyee/frame/controller/FanStatusQueryExportController/FanStatusQueryExportController.java
  17. 0 71
      src/main/java/com/gyee/frame/controller/admin/QiNiuCloudController.java
  18. 41 0
      src/main/java/com/gyee/frame/controller/health/HealthSubController.java
  19. 2 2
      src/main/java/com/gyee/frame/controller/health/WindTurbineCurveController.java
  20. 6 5
      src/main/java/com/gyee/frame/controller/leaderboard/LeaderboardController.java
  21. 21 21
      src/main/java/com/gyee/frame/controller/monitor/GenreSetPushController.java
  22. 61 37
      src/main/java/com/gyee/frame/controller/scatter/ScatterController.java
  23. 56 0
      src/main/java/com/gyee/frame/controller/scatter/WinddirectionController.java
  24. 95 0
      src/main/java/com/gyee/frame/controller/warn/FaultPlaybackController.java
  25. 89 0
      src/main/java/com/gyee/frame/controller/warn/MainBrownouts2Controller.java
  26. 70 0
      src/main/java/com/gyee/frame/controller/warn/ShutdowneventController.java
  27. 53 0
      src/main/java/com/gyee/frame/controller/warn/TemperatureController.java
  28. 96 0
      src/main/java/com/gyee/frame/mapper/auto/MainBrownouts2Mapper.java
  29. 97 0
      src/main/java/com/gyee/frame/mapper/auto/TaosMapMapper.java
  30. 3 4
      src/main/java/com/gyee/frame/mapper/auto/WarningInfoDayMapper.java
  31. 65 0
      src/main/java/com/gyee/frame/mapper/auto/WindTurbineTestingPointaiyjMapper.java
  32. 443 0
      src/main/java/com/gyee/frame/model/auto/MainBrownouts2.java
  33. 1144 0
      src/main/java/com/gyee/frame/model/auto/MainBrownouts2Example.java
  34. 112 0
      src/main/java/com/gyee/frame/model/auto/TaosMap.java
  35. 502 0
      src/main/java/com/gyee/frame/model/auto/TaosMapExample.java
  36. 607 0
      src/main/java/com/gyee/frame/model/auto/WindTurbineTestingPointaiyj.java
  37. 1523 0
      src/main/java/com/gyee/frame/model/auto/WindTurbineTestingPointaiyjExample.java
  38. 37 28
      src/main/java/com/gyee/frame/model/custom/DataVo.java
  39. 115 0
      src/main/java/com/gyee/frame/model/custom/MainBrownoutsVo.java
  40. 56 0
      src/main/java/com/gyee/frame/model/custom/PointVo.java
  41. 64 0
      src/main/java/com/gyee/frame/model/custom/TemperatureVo.java
  42. 62 0
      src/main/java/com/gyee/frame/model/custom/ValueObjVo.java
  43. 60 1
      src/main/java/com/gyee/frame/service/Brownoutsevent2Service.java
  44. 665 0
      src/main/java/com/gyee/frame/service/FaultPlaybackService.java
  45. 184 0
      src/main/java/com/gyee/frame/service/MainBrownouts2Service.java
  46. 0 65
      src/main/java/com/gyee/frame/service/QiNiuCloudService.java
  47. 80 0
      src/main/java/com/gyee/frame/service/ShutdowneventService.java
  48. 113 0
      src/main/java/com/gyee/frame/service/TaosMapService.java
  49. 7 4
      src/main/java/com/gyee/frame/service/WarningInfoDayService.java
  50. 17 0
      src/main/java/com/gyee/frame/service/WindTurbineTestingPointDiService.java
  51. 107 0
      src/main/java/com/gyee/frame/service/WindTurbineTestingPointaiyjService.java
  52. 71 0
      src/main/java/com/gyee/frame/service/WinddirectionService.java
  53. 2 2
      src/main/java/com/gyee/frame/service/goodness/WindturbinegoodnessService.java
  54. 2 6
      src/main/java/com/gyee/frame/service/health/HealthMainService.java
  55. 2 2
      src/main/java/com/gyee/frame/service/health/HealthOperationService.java
  56. 737 7
      src/main/java/com/gyee/frame/service/health/HealthSubService.java
  57. 2 2
      src/main/java/com/gyee/frame/service/health/LossPowerRateHealthService.java
  58. 86 84
      src/main/java/com/gyee/frame/service/health/WindTurbineHealthListService.java
  59. 22 12
      src/main/java/com/gyee/frame/service/leaderboard/LeaderboardService.java
  60. 5 6
      src/main/java/com/gyee/frame/service/recommen/RecommenService.java
  61. 162 0
      src/main/java/com/gyee/frame/service/warn/TemperatureService.java
  62. 13 0
      src/main/java/com/gyee/frame/service/weather/WeatherService.java
  63. 2 2
      src/main/java/com/gyee/frame/service/websocket/BraceletService.java
  64. 2 2
      src/main/java/com/gyee/frame/service/websocket/CftInfoPushService.java
  65. 6 6
      src/main/java/com/gyee/frame/service/websocket/GeneralAppearancePushService.java
  66. 2 2
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailLnService.java
  67. 2 2
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailPjService.java
  68. 2 2
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailService.java
  69. 2 2
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailWpService.java
  70. 131 114
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java
  71. 2 2
      src/main/java/com/gyee/frame/service/websocket/MatrixDetialGfPushService.java
  72. 47 35
      src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java
  73. 2 6
      src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java
  74. 2 2
      src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java
  75. 2 2
      src/main/java/com/gyee/frame/service/websocket/MatrixQfPushService.java
  76. 2 2
      src/main/java/com/gyee/frame/service/websocket/PowerFirstPushService.java
  77. 15 15
      src/main/java/com/gyee/frame/service/websocket/RealPowerPushService.java
  78. 7 3
      src/main/java/com/gyee/frame/service/websocket/WpInfoPushService.java
  79. 2 6
      src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java
  80. 2 2
      src/main/java/com/gyee/frame/service/websocket/WtWarnPushService.java
  81. 8 7
      src/main/java/com/gyee/frame/util/RealTimeDataBaseFactory.java
  82. 54 0
      src/main/java/com/gyee/frame/util/taos/ApiTaos.java
  83. 1274 0
      src/main/java/com/gyee/frame/util/taos/TaosUtil.java
  84. 10 11
      src/main/resources/application.yml
  85. 1 1
      src/main/resources/mybatis-generator.xml
  86. 398 0
      src/main/resources/mybatis/auto/MainBrownouts2Mapper.xml
  87. 241 0
      src/main/resources/mybatis/auto/TaosMapMapper.xml
  88. 3 3
      src/main/resources/mybatis/auto/WarningInfoDayMapper.xml
  89. 374 0
      src/main/resources/mybatis/auto/WindTurbineTestingPointaiyjMapper.xml
  90. 93 0
      src/test/java/test/FaultPlaybackControllerTest.java
  91. 2 4
      src/test/java/test/GenreSetPushDetialTest.java
  92. 1 1
      src/test/java/test/GenreSetPushTest.java
  93. 8 4
      src/test/java/test/HealthTest.java
  94. 15 9
      src/test/java/test/LeaderboardTest.java
  95. 104 0
      src/test/java/test/MainBrownouts2ControllerTest.java
  96. 4 3
      src/test/java/test/ScatterTest.java
  97. 39 13
      src/test/java/test/ShutdowneventServiceTest.java
  98. 100 0
      src/test/java/test/TemperatureControllerTest.java
  99. 5 2
      src/test/java/test/WindTurbineHealthTest.java
  100. 0 0
      src/test/java/test/UDPTest.java

+ 5 - 0
pom.xml

@@ -114,6 +114,11 @@
 		<artifactId>sqljdbc4</artifactId>
 		<version>4.0</version>
 		</dependency>
+		<dependency>
+			<groupId>com.taosdata.jdbc</groupId>
+			<artifactId>taos-jdbcdriver</artifactId>
+			<version>2.0.20</version>
+		</dependency>
 		<!-- mysql驱动8.0
 		 <dependency> 
 		 	<groupId>mysql</groupId> 

+ 11 - 1
src/main/java/com/gyee/SpringbootStart.java

@@ -1,5 +1,6 @@
 package com.gyee;
 
+import com.gyee.frame.common.spring.InitialRedis;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
@@ -13,9 +14,18 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 @SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
 public class SpringbootStart {
 
-    public static void main(String[] args) {
+    public static void main(String[] args) throws Exception {
 
         SpringApplication.run(SpringbootStart.class, args);
 
+
+        InitialRedis initialRedis=new InitialRedis();
+//        System.out.println("初始化开始!");
+//        initialRedis.intialWindturbinepowercurvefitting();
+//        initialRedis.intialWpScatter();
+//        initialRedis.intialPjScatter();
+//        initialRedis.intialLnScatter();
+//        initialRedis.intialWtScatter();
+//        System.out.println("初始化完成!");
     }
 }

+ 77 - 77
src/main/java/com/gyee/frame/common/async/config/AsyncConfig.java

@@ -1,77 +1,77 @@
-package com.gyee.frame.common.async.config;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.annotation.AsyncConfigurer;
-import org.springframework.scheduling.annotation.EnableAsync;
-
-import java.lang.reflect.Method;
-import java.util.Arrays;
-
-/**
- * AsyncConfig
- *
- * @author wliduo[i@dolyw.com]
- * @date 2020/5/19 17:58
- */
-@Configuration
-@EnableAsync
-public class AsyncConfig implements AsyncConfigurer {
-
-    /**
-     * logger
-     */
-    private static final Logger logger = LoggerFactory.getLogger(AsyncConfig.class);
-
-    /**
-     * 这里不实现了,使用 ThreadPoolConfig 里的线程池即可
-     *
-     * @param
-     * @return java.util.concurrent.Executor
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/19 18:00
-     */
-    /*@Override
-    public Executor getAsyncExecutor() {
-        return null;
-    }*/
-
-    /**
-     * 只能捕获无返回值的异步方法,有返回值的被主线程处理
-     *
-     * @param
-     * @return org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/20 10:16
-     */
-    @Override
-    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
-        return new CustomAsyncExceptionHandler();
-    }
-
-    /***
-     * 处理异步方法中未捕获的异常
-     *
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/19 19:16
-     */
-    class CustomAsyncExceptionHandler implements AsyncUncaughtExceptionHandler {
-
-        @Override
-        public void handleUncaughtException(Throwable throwable, Method method, Object... obj) {
-            logger.info("Exception message - {}", throwable.getMessage());
-            logger.info("Method name - {}", method.getName());
-            logger.info("Parameter values - {}", Arrays.toString(obj));
-            if (throwable instanceof Exception) {
-                Exception exception = (Exception) throwable;
-                logger.info("exception:{}", exception.getMessage());
-            }
-            throwable.printStackTrace();
-        }
-
-    }
-}
+//package com.gyee.frame.common.async.config;
+//
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.scheduling.annotation.AsyncConfigurer;
+//import org.springframework.scheduling.annotation.EnableAsync;
+//
+//import java.lang.reflect.Method;
+//import java.util.Arrays;
+//
+///**
+// * AsyncConfig
+// *
+// * @author wliduo[i@dolyw.com]
+// * @date 2020/5/19 17:58
+// */
+//@Configuration
+//@EnableAsync
+//public class AsyncConfig implements AsyncConfigurer {
+//
+//    /**
+//     * logger
+//     */
+//    private static final Logger logger = LoggerFactory.getLogger(AsyncConfig.class);
+//
+//    /**
+//     * 这里不实现了,使用 ThreadPoolConfig 里的线程池即可
+//     *
+//     * @param
+//     * @return java.util.concurrent.Executor
+//     * @throws
+//     * @author wliduo[i@dolyw.com]
+//     * @date 2020/5/19 18:00
+//     */
+//    /*@Override
+//    public Executor getAsyncExecutor() {
+//        return null;
+//    }*/
+//
+//    /**
+//     * 只能捕获无返回值的异步方法,有返回值的被主线程处理
+//     *
+//     * @param
+//     * @return org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler
+//     * @throws
+//     * @author wliduo[i@dolyw.com]
+//     * @date 2020/5/20 10:16
+//     */
+//    @Override
+//    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
+//        return new CustomAsyncExceptionHandler();
+//    }
+//
+//    /***
+//     * 处理异步方法中未捕获的异常
+//     *
+//     * @author wliduo[i@dolyw.com]
+//     * @date 2020/5/19 19:16
+//     */
+//    class CustomAsyncExceptionHandler implements AsyncUncaughtExceptionHandler {
+//
+//        @Override
+//        public void handleUncaughtException(Throwable throwable, Method method, Object... obj) {
+//            logger.info("Exception message - {}", throwable.getMessage());
+//            logger.info("Method name - {}", method.getName());
+//            logger.info("Parameter values - {}", Arrays.toString(obj));
+//            if (throwable instanceof Exception) {
+//                Exception exception = (Exception) throwable;
+//                logger.info("exception:{}", exception.getMessage());
+//            }
+//            throwable.printStackTrace();
+//        }
+//
+//    }
+//}

+ 1 - 5
src/main/java/com/gyee/frame/common/base/BaseController.java

@@ -4,13 +4,13 @@ import cn.hutool.core.util.StrUtil;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.model.custom.TitleVo;
 import com.gyee.frame.service.*;
-import javax.annotation.Resource;
 import org.springframework.beans.propertyeditors.CustomDateEditor;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.WebDataBinder;
 import org.springframework.web.bind.annotation.InitBinder;
 
+import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
@@ -63,9 +63,6 @@ public class BaseController
 	@Resource
 	public SysNoticeService sysNoticeService;
 
-	/*文件上传云库*/
-    @Resource
-    public QiNiuCloudService qiNiuCloudService;
     /**
      * 将前台传递过来的日期格式的字符串,自动转化为Date类型
      */
@@ -149,7 +146,6 @@ public class BaseController
     
     /**
      * 设置标题通用方法
-     * @param model
      */
     public void setTitle(ModelMap map,TitleVo titleVo){
     	//标题

+ 79 - 0
src/main/java/com/gyee/frame/common/conf/TemperatureConfig.java

@@ -0,0 +1,79 @@
+package com.gyee.frame.common.conf;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * 预警配置
+ */
+@Component
+@ConfigurationProperties(prefix = "temperature")
+public class TemperatureConfig {
+
+
+    private static List<String> yyz;
+    private static List<String> clx;
+    private static List<String> fdj;
+    private static List<String> bj;
+    private static List<String> qt;
+    private static List<String> zz;
+    private static List<String> zd;
+
+    public static List<String> getYyz() {
+        return yyz;
+    }
+
+    public  void setYyz(List<String> yyz) {
+        this.yyz = yyz;
+    }
+
+    public static List<String> getClx() {
+        return clx;
+    }
+
+    public  void setClx(List<String> clx) {
+        this.clx = clx;
+    }
+
+    public static List<String> getFdj() {
+        return fdj;
+    }
+
+    public  void setFdj(List<String> fdj) {
+        this.fdj = fdj;
+    }
+
+    public static List<String> getBj() {
+        return bj;
+    }
+
+    public  void setBj(List<String> bj) {
+        this.bj = bj;
+    }
+
+    public static List<String> getQt() {
+        return qt;
+    }
+
+    public  void setQt(List<String> qt) {
+        this.qt = qt;
+    }
+
+    public static List<String> getZz() {
+        return zz;
+    }
+
+    public  void setZz(List<String> zz) {
+        this.zz = zz;
+    }
+
+    public  static List<String> getZd() {
+        return zd;
+    }
+
+    public  void setZd(List<String> zd) {
+        this.zd = zd;
+    }
+}

+ 36 - 0
src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -537,5 +537,41 @@ public class Constant {
 	public static final String TPOINT_WT_LQSYL2 = "DI248";//冷却水压力ok
 
 
+
+
 /********************************************机舱*********************************************************************/
+
+public static final String TPOINT_WT_60FX = "AI011";// 风机60秒风向
+	public static final String TPOINT_WT_60PJFS = "AI024";// 风机60秒平均风速
+	public static final String TPOINT_WT_1MPJJJY = "AI032";// 1秒平均桨距叶片位置
+	public static final String TPOINT_WT_CLXRHYLW = "AI044";// 齿轮箱润滑油滤网出口压力
+	public static final String TPOINT_WT_DWGL = "AI065";// 电网功率
+	public static final String TPOINT_WT_DWWGGL = "AI066";// 电网无功功率
+	public static final String TPOINT_WT_TDGNWD = "AI070";// 塔顶柜温度
+	public static final String TPOINT_WT_YLCZZWD = "AI071";// 叶轮侧主轴轴承温度
+	public static final String TPOINT_WT_CLXCZZWD = "AI072";// 齿轮箱侧主轴轴承温度
+	public static final String TPOINT_WT_FDJZGZ = "DI236";// 发电机总故障
+	public static final String TPOINT_WT_CLXZGZ = "DI260";// 齿轮箱总故障
+	public static final String TPOINT_WT_BJZGZ = "DI630";// 变桨温度总故障
+
+	public static final String TPOINT_WT_BJLGWD1 = "AI263";// 变桨1轮毂温度
+	public static final String TPOINT_WT_BJLGWD2 = "AI264";// 变桨2轮毂温度
+	public static final String TPOINT_WT_BJLGWD3 = "AI265";// 变桨3轮毂温度
+	public static final String TPOINT_WT_BPQDJZS = "AI128";// 变频器电机转速
+	public static final String TPOINT_WT_BPQGL = "AI130";// 变频器功率
+	public static final String TPOINT_WT_BPQWGGL = "AI131";// 变频器无功功率
+
+	public static final String TPOINT_WT_DWZWD = "AI038";// 齿轮箱轴1温度
+	public static final String TPOINT_WT_GWZWD = "AI039";// 齿轮箱轴2温度
+
+	public static final String TPOINT_WT_DRQWD1 = "AI113";// 电容器温度1
+	public static final String TPOINT_WT_DRQWD2 = "AI114";// 电容器温度2
+	public static final String TPOINT_WT_DRQWD3 = "AI115";// 电容器温度3
+	public static final String TPOINT_WT_BLQWD = "AI239";// 变桨变流器温度
+	public static final String TPOINT_WT_BLQWD2 = "AI240";// 变频器温度2
+	public static final String TPOINT_WT_BLQWD3 = "AI241";// 变频器温度3
+	public static final String TPOINT_WT_DJWD = "AI242";// 伺服电机温度
+	public static final String TPOINT_WT_DJWD2 = "AI243";// 电机温度2
+	public static final String TPOINT_WT_DJWD3 = "AI244";// 电机温度3
+
 }

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

@@ -1,24 +1,28 @@
 package com.gyee.frame.common.spring;
 
 import com.alibaba.fastjson.JSON;
-import com.gyee.SpringbootStart;
 import com.gyee.frame.common.cache.IGlobalCache;
-import com.gyee.frame.model.auto.Windturbinepowercurvefitting;
-import com.gyee.frame.model.auto.WindturbinepowercurvefittingExample;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.service.WindPowerstationTestingPointService;
+import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindturbinepowercurvefittingService;
-import org.springframework.boot.SpringApplication;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 
+import java.text.DecimalFormat;
+import java.util.*;
 
 
 public  class InitialRedis {
 
     public static Map<String, Map<Double, Windturbinepowercurvefitting>> wpcmap = new HashMap<String, Map<Double, Windturbinepowercurvefitting>>();
 
-    public  void intial() throws Exception {
+
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+
+    public  void intialWindturbinepowercurvefitting() throws Exception {
 
 
         WindturbinepowercurvefittingService windturbinepowercurvefittingService= SpringUtils.getBean("windturbinepowercurvefittingService");
@@ -44,11 +48,330 @@ public  class InitialRedis {
         globalCache.set("wpcmap", JSON.toJSONString(wpcmap));
     }
 
-    public static void main(String[]args) throws Exception {
 
-        SpringApplication.run(SpringbootStart.class, args);
+    public  void intialWpScatter() throws Exception {
+
+
+
+        WindPowerstationTestingPointService windPowerstationTestingPointService= SpringUtils.getBean("windPowerstationTestingPointService");
+        WindTurbineTestingPointAiService windTurbineTestingPointAiService= SpringUtils.getBean("windTurbineTestingPointAiService");
+        IGlobalCache globalCache= SpringUtils.getBean("globalCache");
+
+
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        int month=cal.get(Calendar.MONTH)+1;
+
+
+        cal.set(Calendar.MONTH, 0);
+
+        for(int j=0;j<month;j++)
+        {
+            List<List<Double>> vos = new ArrayList<List<Double>>();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+            Date beginDate = cal.getTime();
+            Date endDate =null;
+            if(month-1==cal.get(Calendar.MONTH))
+            {
+                cal = Calendar.getInstance();
+               //cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                endDate = cal.getTime();
+            }else
+            {
+                cal.add(Calendar.MONTH,1);;
+                endDate = cal.getTime();
+            }
+
+
+            for(Windpowerstation wp:InitialRunner.wpls)
+            {
+                String wpId=wp.getId();
+                WindPowerStationTestingPoint2  gl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
+                WindPowerStationTestingPoint2  fs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 600 ;
+                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);
+
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+
+                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);
+                    }
+                }
+
+               // cal.add(Calendar.MONTH,1);
+                StringBuilder sb=new StringBuilder();
+                sb.append("scatter_").append(wpId).append("_").append(month);
+                globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
+                System.out.println(String.valueOf(sb.append("完成")));
+            }
+        }
+
+
+
+    }
+
+
+
+    public  void intialPjScatter() throws Exception {
+
+
+
+        WindPowerstationTestingPointService windPowerstationTestingPointService= SpringUtils.getBean("windPowerstationTestingPointService");
+        WindTurbineTestingPointAiService windTurbineTestingPointAiService= SpringUtils.getBean("windTurbineTestingPointAiService");
+        IGlobalCache globalCache= SpringUtils.getBean("globalCache");
+
+
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        int month=cal.get(Calendar.MONTH)+1;
+
+
+        cal.set(Calendar.MONTH, 0);
+
+        for(int j=0;j<month;j++)
+        {
+            List<List<Double>> vos = new ArrayList<List<Double>>();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+            Date beginDate = cal.getTime();
+            Date endDate =null;
+            if(month-1==cal.get(Calendar.MONTH))
+            {
+                cal = Calendar.getInstance();
+                //cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                endDate = cal.getTime();
+            }else
+            {
+                cal.add(Calendar.MONTH,1);;
+                endDate = cal.getTime();
+            }
+
+
+            for(Project pj:InitialRunner.pjls)
+            {
+                String wpId=pj.getId();
+                WindPowerStationTestingPoint2  gl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
+                WindPowerStationTestingPoint2  fs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 600 ;
+                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);
+
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+
+                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);
+                    }
+                }
+
+                // cal.add(Calendar.MONTH,1);
+                StringBuilder sb=new StringBuilder();
+                sb.append("scatter_").append(wpId).append("_").append(month);
+                globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
+                System.out.println(String.valueOf(sb.append("完成")));
+            }
+        }
+
+
+
+    }
+
+
+
+    public  void intialLnScatter() throws Exception {
+
+
+
+        WindPowerstationTestingPointService windPowerstationTestingPointService= SpringUtils.getBean("windPowerstationTestingPointService");
+        WindTurbineTestingPointAiService windTurbineTestingPointAiService= SpringUtils.getBean("windTurbineTestingPointAiService");
+        IGlobalCache globalCache= SpringUtils.getBean("globalCache");
+
+
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        int month=cal.get(Calendar.MONTH)+1;
+
+
+        cal.set(Calendar.MONTH, 0);
+
+        for(int j=0;j<month;j++)
+        {
+            List<List<Double>> vos = new ArrayList<List<Double>>();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+            Date beginDate = cal.getTime();
+            Date endDate =null;
+            if(month-1==cal.get(Calendar.MONTH))
+            {
+                cal = Calendar.getInstance();
+                //cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                endDate = cal.getTime();
+            }else
+            {
+                cal.add(Calendar.MONTH,1);;
+                endDate = cal.getTime();
+            }
+
+
+            for(Line wp:InitialRunner.linels)
+            {
+                String wpId=wp.getId();
+                WindPowerStationTestingPoint2  gl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
+                WindPowerStationTestingPoint2  fs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 600 ;
+                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);
+
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+
+                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);
+                    }
+                }
+
+                // cal.add(Calendar.MONTH,1);
+                StringBuilder sb=new StringBuilder();
+                sb.append("scatter_").append(wpId).append("_").append(month);
+                globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
+                System.out.println(String.valueOf(sb.append("完成")));
+            }
+        }
+
+
+
+    }
+
+
+    public  void intialWtScatter() throws Exception {
+
+
+        WindTurbineTestingPointAiService windTurbineTestingPointAiService= SpringUtils.getBean("windTurbineTestingPointAiService");
+        IGlobalCache globalCache= SpringUtils.getBean("globalCache");
+
+
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        int month=cal.get(Calendar.MONTH)+1;
+
+
+        cal.set(Calendar.MONTH, 0);
+
+
+            List<List<Double>> vos = new ArrayList<List<Double>>();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+            Date beginDate = cal.getTime();
+            Date endDate =null;
+            if(month-1==cal.get(Calendar.MONTH))
+            {
+                cal = Calendar.getInstance();
+                //cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                endDate = cal.getTime();
+            }else
+            {
+                cal.add(Calendar.MONTH,1);;
+                endDate = cal.getTime();
+            }
+
+
+            for(Windturbine wt:InitialRunner.wtls)
+            {
+                String wpId=wt.getId();
+                WindTurbineTestingPointAi2  gl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wpId, Constant.TPOINT_WT_FJGL);
+                WindTurbineTestingPointAi2  fs = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wpId, Constant.TPOINT_WT_FJSSFS);
+
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 600 ;
+                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);
+
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+
+
+                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);
+                    }
+                }
+
+                // cal.add(Calendar.MONTH,1);
+                StringBuilder sb=new StringBuilder();
+                sb.append("scatter_").append(wpId).append("_").append(month);
+                globalCache.set(String.valueOf(sb), JSON.toJSONString(vos));
+                System.out.println(String.valueOf(sb.append("完成")));
+            }
+
+
+
+
+    }
+
+    public static void main(String[]args) throws Exception {
 
-        InitialRedis initialRedis=new InitialRedis();
-        initialRedis.intial();
+//        SpringApplication.run(SpringbootStart.class, args);
+//
+//        InitialRedis initialRedis=new InitialRedis();
+//        //初始化风机拟合功率
+//      // initialRedis.intialWindturbinepowercurvefitting();
+//
+//        //初始化场站没有散点图
+//        initialRedis.intialWpScatter();
     }
 }

+ 38 - 2
src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -54,6 +54,10 @@ public class InitialRunner implements CommandLineRunner {
     private IGlobalCache globalCache;
     @Resource
     private StoptypeService stoptypeService;
+//    @Resource
+//    private TaosMapService taosMapService;
+    @Resource
+    private WindTurbineTestingPointaiyjService windTurbineTestingPointaiyjService;
 
     public static List<Windpowerstation> wpallls = new ArrayList<Windpowerstation>(); // 风电场LIST集合(包含光电电)
     public static List<Project> pjallls = new ArrayList<Project>(); //项目LIST集合(包含光电电)
@@ -94,12 +98,14 @@ public class InitialRunner implements CommandLineRunner {
     public static Map<String, Map<Double, Windturbinepowercurvefitting>> wpcmap = new HashMap<String, Map<Double, Windturbinepowercurvefitting>>();
     public static Map<String, Equipmentmodel> mlmap = new HashMap<String, Equipmentmodel>();// 风电机模型
     public static Map<String, Map<String, ModelPower>> modelPowermap = new HashMap<String, Map<String, ModelPower>>();// 风电机类型对应功率表
-
-
+    public static Map<String, String> taosmap = new HashMap<String, String>(); // Taos映射
+    public static Map<String, Map<String, WindTurbineTestingPointaiyj>> wtpAiyjmap = new HashMap<String, Map<String, WindTurbineTestingPointaiyj>>();// 风电机测点AI表--针对风机预警
     public static Map<String, Map<String, Object>> appendYcglMap = new HashMap<String, Map<String, Object>>();// 预测功率追加
 
     Map<String, Object> ycmap = new HashMap<>();
 
+
+
     @Override
     public void run(String... args) throws Exception {
         System.out.println(">>>>>>>>>>>>>>>服务启动执行,换成测点关联数据 <<<<<<<<<<<<<");
@@ -115,6 +121,18 @@ public class InitialRunner implements CommandLineRunner {
 
         appendYcglMap.put("QS_FDC", ycmap);
 
+
+
+//        List<TaosMap> taosls=taosMapService.findTaosMap();
+//        if(!taosls.isEmpty())
+//        {
+//            for(TaosMap taos:taosls)
+//            {
+//                taosmap.put(taos.getStablesid(), taos.getDatabaseid());
+//            }
+//
+//        }
+
 //        List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
 //
 //        if(!quartzJobs.isEmpty())
@@ -126,6 +144,24 @@ public class InitialRunner implements CommandLineRunner {
 //
 //        }
 
+
+        List<WindTurbineTestingPointaiyj> list = windTurbineTestingPointaiyjService.findAll();
+
+        Map<String, WindTurbineTestingPointaiyj> yjmap = null;
+
+        if (list != null && !list.isEmpty()) {
+            for (WindTurbineTestingPointaiyj mp : list) {
+                if (wtpAiyjmap.containsKey(mp.getWindturbineid())) {
+                    yjmap = wtpAiyjmap.get(mp.getWindturbineid());
+                    yjmap.put(mp.getUniformcode(), mp);
+                } else {
+                    yjmap = new HashMap<String, WindTurbineTestingPointaiyj>();
+                    yjmap.put(mp.getUniformcode(), mp);
+                    wtpAiyjmap.put(mp.getWindturbineid(), yjmap);
+                }
+            }
+        }
+
         String wpString = JSON.toJSONString(globalCache.get("WP"));
         wpPointmap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>() {
         });

+ 0 - 30
src/main/java/com/gyee/frame/common/udp/client/UdpIntegrationClient.java

@@ -1,30 +0,0 @@
-package com.gyee.frame.common.udp.client;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.integration.ip.udp.UnicastSendingMessageHandler;
-import org.springframework.integration.support.MessageBuilder;
-import org.springframework.stereotype.Service;
-
-/**
- * Integration发送方式
- *
- * @author wliduo[i@dolyw.com]
- * @date 2020/5/20 15:53
- */
-@Service
-public class UdpIntegrationClient {
-
-    private final static Logger logger = LoggerFactory.getLogger(UdpIntegrationClient.class);
-
-    @Autowired
-    private UnicastSendingMessageHandler unicastSendingMessageHandler;
-
-    public void sendMessage(String message) {
-        logger.info("发送UDP: {}", message);
-        unicastSendingMessageHandler.handleMessage(MessageBuilder.withPayload(message).build());
-        logger.info("发送成功");
-    }
-
-}

+ 0 - 28
src/main/java/com/gyee/frame/common/udp/client/UdpIntegrationClientConfig.java

@@ -1,28 +0,0 @@
-package com.gyee.frame.common.udp.client;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.integration.annotation.ServiceActivator;
-import org.springframework.integration.ip.udp.UnicastSendingMessageHandler;
-
-/**
- * IntegrationClientConfig
- *
- * @author wliduo[i@dolyw.com]
- * @date 2020/5/20 15:59
- */
-@Configuration
-public class UdpIntegrationClientConfig {
-
-    @Value("${udp.port}")
-    private Integer udpPort;
-
-    @Bean
-    @ServiceActivator(inputChannel = "udpOut")
-    public UnicastSendingMessageHandler unicastSendingMessageHandler() {
-        UnicastSendingMessageHandler unicastSendingMessageHandler = new UnicastSendingMessageHandler("localhost", udpPort);
-        return unicastSendingMessageHandler;
-    }
-
-}

+ 0 - 54
src/main/java/com/gyee/frame/common/udp/client/UdpSimpleClient.java

@@ -1,54 +0,0 @@
-package com.gyee.frame.common.udp.client;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetSocketAddress;
-
-/**
- * 默认发送方式
- *
- * @author wliduo[i@dolyw.com]
- * @date 2020/5/20 15:53
- */
-@Service
-public class UdpSimpleClient {
-
-    private final static Logger logger = LoggerFactory.getLogger(UdpSimpleClient.class);
-
-    @Value("${udp.port}")
-    private Integer udpPort;
-
-    public void sendMessage(String message) {
-        logger.info("发送UDP: {}", message);
-        InetSocketAddress inetSocketAddress = new InetSocketAddress("192.168.10.30", 12025);
-        byte[] udpMessage = message.getBytes();
-        DatagramPacket datagramPacket = null;
-        try (DatagramSocket datagramSocket = new DatagramSocket()) {
-            datagramPacket = new DatagramPacket(udpMessage, udpMessage.length, inetSocketAddress);
-            datagramSocket.send(datagramPacket);
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-        logger.info("发送成功");
-    }
-
-    public void sendMessagetest(String message) {
-        logger.info("发送UDP: {}", message);
-        InetSocketAddress inetSocketAddress = new InetSocketAddress("192.168.10.23", 12025);
-        byte[] udpMessage = message.getBytes();
-        DatagramPacket datagramPacket = null;
-        try (DatagramSocket datagramSocket = new DatagramSocket()) {
-            datagramPacket = new DatagramPacket(udpMessage, udpMessage.length, inetSocketAddress);
-            datagramSocket.send(datagramPacket);
-        } catch (IOException e) {
-            logger.error(e.getMessage(), e);
-        }
-        logger.info("发送成功");
-    }
-}

+ 0 - 69
src/main/java/com/gyee/frame/common/udp/controller/UdpController.java

@@ -1,69 +0,0 @@
-package com.gyee.frame.common.udp.controller;
-
-
-import com.gyee.frame.common.udp.client.UdpIntegrationClient;
-import com.gyee.frame.common.udp.client.UdpSimpleClient;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * UdpController
- *
- * @author wliduo[i@dolyw.com]
- * @date 2020/5/19 14:46
- */
-@RestController
-@RequestMapping("/udp")
-public class UdpController {
-
-    /**
-     * logger
-     */
-    private final static Logger logger = LoggerFactory.getLogger(UdpController.class);
-
-    @Autowired
-    private UdpSimpleClient udpSimpleClient;
-
-    @Autowired
-    private UdpIntegrationClient udpIntegrationClient;
-
-
-
-    /**
-     * UdpSimpleClient发送
-     *
-     * @param
-     * @return java.lang.String
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/20 16:35
-     */
-    @GetMapping("/send1")
-    public String send1() throws Exception {
-        udpSimpleClient.sendMessage("aA");
-        return "send1 success";
-    }
-
-    /**
-     * UdpIntegrationClient发送
-     *
-     * @param
-     * @return java.lang.String
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/20 10:15
-     */
-    @GetMapping("/send2")
-    public String send2() throws Exception {
-        udpIntegrationClient.sendMessage("bB");
-        return "send2 success";
-    }
-
-
-
-
-}

+ 0 - 177
src/main/java/com/gyee/frame/common/udp/server/UdpServer.java

@@ -1,177 +0,0 @@
-package com.gyee.frame.common.udp.server;
-
-
-import com.gyee.frame.common.udp.service.BusinessService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.integration.annotation.Filter;
-import org.springframework.integration.annotation.Router;
-import org.springframework.integration.annotation.ServiceActivator;
-import org.springframework.integration.annotation.Transformer;
-import org.springframework.integration.dsl.IntegrationFlow;
-import org.springframework.integration.dsl.IntegrationFlows;
-import org.springframework.integration.ip.dsl.Udp;
-import org.springframework.messaging.handler.annotation.Headers;
-import org.springframework.messaging.handler.annotation.Payload;
-
-import javax.annotation.Resource;
-import java.util.Map;
-
-/**
- * UDP消息接收服务
- *
- * @author wliduo[i@dolyw.com]
- * @date 2020/5/20 14:16
- */
-@Configuration
-public class UdpServer {
-
-    private static final Logger logger = LoggerFactory.getLogger(UdpServer.class);
-
-    @Value("${udp.port}")
-    private Integer udpPort;
-
-    @Resource
-    private BusinessService businessService;
-
-    /**
-     * UDP消息接收服务写法一
-     * https://docs.spring.io/spring-integration/reference/html/ip.html#inbound-udp-adapters-java-configuration
-     *
-     * @param
-     * @return org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/14 11:00
-     */
-//    @Bean
-//    public UnicastReceivingChannelAdapter unicastReceivingChannelAdapter() {
-//        // 实例化一个UDP消息接收服务
-//        UnicastReceivingChannelAdapter unicastReceivingChannelAdapter = new UnicastReceivingChannelAdapter(udpPort);
-//        // unicastReceivingChannelAdapter.setOutputChannel(new DirectChannel());
-//        unicastReceivingChannelAdapter.setOutputChannelName("udpChannel");
-//        logger.info("UDP服务启动成功,端口号为: {}", udpPort);
-//        return unicastReceivingChannelAdapter;
-//    }
-
-    /**
-     * UDP消息接收服务写法二
-     * https://docs.spring.io/spring-integration/reference/html/ip.html#inbound-udp-adapters-java-dsl-configuration
-     *
-     * @param
-     * @return org.springframework.integration.dsl.IntegrationFlow
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/20 16:08
-     */
-    @Bean
-    public IntegrationFlow integrationFlow() {
-        logger.info("UDP服务启动成功,端口号为: {}", udpPort);
-        return IntegrationFlows.from(Udp.inboundAdapter(udpPort)).channel("udpChannel").get();
-    }
-
-    /**
-     * 转换器
-     *
-     * @param payload
-	 * @param headers
-     * @return java.lang.String
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/20 15:30
-     */
-    @Transformer(inputChannel = "udpChannel", outputChannel = "udpFilter")
-    public String transformer(@Payload byte[] payload, @Headers Map<String, Object> headers) {
-        String message = new String(payload);
-        // 转换为大写
-        // message = message.toUpperCase();
-        // 向客户端响应,还不知道怎么写
-        return message;
-    }
-
-    /**
-     * 过滤器
-     *
-     * @param message
-	 * @param headers
-     * @return boolean
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/20 15:30
-     */
-    @Filter(inputChannel = "udpFilter", outputChannel = "udpRouter")
-    public boolean filter(String message, @Headers Map<String, Object> headers) {
-        // 获取来源Id
-        String id = headers.get("id").toString();
-        // 获取来源IP,可以进行IP过滤
-        String ip = headers.get("ip_address").toString();
-        // 获取来源Port
-        String port = headers.get("ip_port").toString();
-        // 信息数据过滤
-        /*if (message.indexOf("-") < 0) {
-            // 没有-的数据会被过滤
-            return false;
-        }*/
-        return true;
-    }
-
-    /**
-     * 路由分发处理器
-     *
-     * @param message
-	 * @param headers
-     * @return java.lang.String
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/20 15:35
-     */
-    @Router(inputChannel = "udpRouter")
-    public String router(String message, @Headers Map<String, Object> headers) {
-        // 获取来源Id
-        String id = headers.get("id").toString();
-        // 获取来源IP,可以进行IP过滤
-        String ip = headers.get("ip_address").toString();
-        // 获取来源Port
-        String port = headers.get("ip_port").toString();
-        // 筛选,走那个处理器
-        if (false) {
-            return "udpHandle2";
-        }
-        return "udpHandle1";
-    }
-
-    /**
-     * 最终处理器1
-     *
-     * @param message
-     * @return void
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/20 15:12
-     */
-    @ServiceActivator(inputChannel = "udpHandle1")
-    public void udpMessageHandle(String message, @Headers Map<String, Object> headers) throws Exception {
-        // 可以进行异步处理
-        businessService.udpHandleMethod(message);
-        logger.info("UDP1:" + message);
-    }
-
-    /**
-     * 最终处理器2
-     *
-     * @param message
-     * @return void
-     * @throws
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/14 11:02
-     */
-    @ServiceActivator(inputChannel = "udpHandle2")
-    public void udpMessageHandle2(String message, @Headers Map<String, Object> headers) throws Exception {
-        logger.info("UDP2:" + message);
-    }
-
-
-}

+ 0 - 22
src/main/java/com/gyee/frame/common/udp/service/BusinessService.java

@@ -1,22 +0,0 @@
-package com.gyee.frame.common.udp.service;
-
-/**
- * BusinessService
- *
- * @author wliduo[i@dolyw.com]
- * @date 2020/5/20 11:57
- */
-public interface BusinessService {
-
-    /**
-     * UDP消息处理方法
-     *
-     * @param message
-     * @return void
-     * @throws Exception e
-     * @author wliduo[i@dolyw.com]
-     * @date 2020/5/20 11:57
-     */
-    void udpHandleMethod(String message) throws Exception;
-
-}

+ 0 - 35
src/main/java/com/gyee/frame/common/udp/service/impl/BusinessServiceImpl.java

@@ -1,35 +0,0 @@
-package com.gyee.frame.common.udp.service.impl;
-
-
-import com.gyee.frame.common.udp.client.UdpSimpleClient;
-import com.gyee.frame.common.udp.service.BusinessService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * BusinessServiceImpl
- *
- * @author wliduo[i@dolyw.com]
- * @date 2020/5/20 11:59
- */
-@Service
-public class BusinessServiceImpl implements BusinessService {
-
-    private static final Logger logger = LoggerFactory.getLogger(BusinessServiceImpl.class);
-    @Autowired
-    private UdpSimpleClient udpSimpleClient;
-    @Override
-   // @Async("threadPoolTaskExecutor")
-    public void udpHandleMethod(String message) throws Exception {
-        logger.info("业务开始处理");
-        System.out.println(message);
-
-
-
-        udpSimpleClient.sendMessage("中文测试!");
-        Thread.sleep(1000);
-        logger.info("业务处理完成");
-    }
-}

+ 1 - 0
src/main/java/com/gyee/frame/controller/FanStatusQueryExportController/FanStatusQueryExportController.java

@@ -27,6 +27,7 @@ public class FanStatusQueryExportController {
     //根据风机id和风机状态
     @CrossOrigin(origins  = "*",maxAge = 3600)
     @PostMapping("/FjStatus")
+
     @ResponseBody
     public List<Map<String, Object>> getFjStatus( @RequestBody Map<String, Object> map){
 

+ 0 - 71
src/main/java/com/gyee/frame/controller/admin/QiNiuCloudController.java

@@ -1,71 +0,0 @@
-package com.gyee.frame.controller.admin;
-
-import com.gyee.frame.common.base.BaseController;
-import com.gyee.frame.common.domain.AjaxResult;
-import com.gyee.frame.model.custom.TitleVo;
-import com.gyee.frame.service.QiNiuCloudService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import javax.annotation.Resource;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import java.io.IOException;
-
-/**
- * 七牛文件上传controller
- * @Author QQ1057718016
- * @Data 2019/11/13
- * @Version 1.0
- **/
-@Api(value = "七牛文件上传")
-@Controller
-@RequestMapping("/QiNiuCloudController")
-public class QiNiuCloudController extends BaseController {
-
-    @Resource
-    private QiNiuCloudService qiNiuCloudService;
-
-    //跳转页面参数
-    private String prefix = "admin/qiniu_cloud";
-
-   /**
-    * 文件上传云库展示页面
-    * @param model
-    * @return
-    * @Author QQ1057718016
-    * @Date 2019年11月20日 下午10:19:55
-    */
-    @ApiOperation(value = "分页跳转", notes = "分页跳转")
-    @GetMapping("/view")
-    @RequiresPermissions("system:qiniucloud:view")
-    public String view(ModelMap model)
-    {
-        String str="图片上传云库";
-        setTitle(model, new TitleVo("列表", str+"管理", true,"欢迎进入"+str+"页面", true, false));
-        return prefix + "/list";
-    }
-
-    /**
-     * 七牛文件上传
-     * @param uploadFile
-     * @return
-     * @Author QQ1057718016
-     * @Date 2019年11月20日 下午10:08:10
-     */
-    //@Log(title = "七牛文件上传", action = "1")
-  	@ApiOperation(value = "七牛文件上传", notes = "七牛文件上传")
-    @PostMapping("/uploadToQiNiu")
-    @ResponseBody
-    public AjaxResult upload(@RequestParam("file")MultipartFile uploadFile){
-        try {
-            return qiNiuCloudService.uploadToQiNiu(uploadFile);
-        } catch (IOException e){
-        	e.printStackTrace();
-           return AjaxResult.error(e.getMessage());
-        }
-    }
-}

+ 41 - 0
src/main/java/com/gyee/frame/controller/health/HealthSubController.java

@@ -416,6 +416,7 @@ public class HealthSubController {
         }
 
     }
+/**************************************************************************************************************************************************/
 
     @PostMapping("/hsFjValueIndex")
     @ResponseBody
@@ -480,4 +481,44 @@ public class HealthSubController {
     }
 
 
+    @PostMapping("/hsFjValueIndexByPart")
+    @ResponseBody
+    @ApiOperation(value = "获取风机健康部件曲线图", notes = "获取风机健康部件曲线图")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "type", value = "部件类型", required = true, dataType = "string", paramType = "query")
+    })
+    public AjaxResult hsFjValueIndexByPart(String wtId,String type) throws Exception {
+
+        Map<String, Object> result = new HashMap<String, Object>();
+        ActivityVo vo=new ActivityVo();
+
+        if(StringUtils.notEmp(wtId) && StringUtils.notEmp(type))
+        {
+            if (type.equals("1")) {
+                vo = healthSubService.getWTChart(wtId);
+            } else if (type.equals("2")) {
+                vo = healthSubService.getClxChart(wtId);
+            } else if (type.equals("3")) {
+                vo = healthSubService.getFdjChart(wtId);
+            } else if (type.equals("4")) {
+                vo = healthSubService.getKzysChart(wtId);
+            } else if (type.equals("5")) {
+                vo = healthSubService.getJcxtChart(wtId);
+            }
+
+            result.put(wtId, healthSubService.getrealValue(wtId, type));
+        }
+
+
+        result.put("activity", vo);
+
+        if (null!=vo) {
+            return AjaxResult.successData(AjaxStatus.success.code, vo);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vo);
+        }
+
+    }
+
 }

+ 2 - 2
src/main/java/com/gyee/frame/controller/health/WindTurbineCurveController.java

@@ -13,8 +13,8 @@ import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindturbinecurvefittingmonthService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -42,7 +42,7 @@ public class WindTurbineCurveController {
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
     /**单机区间曲线偏差率**/
     @PostMapping("/windTurbineCurveList")
     @ResponseBody

+ 6 - 5
src/main/java/com/gyee/frame/controller/leaderboard/LeaderboardController.java

@@ -300,11 +300,12 @@ public class LeaderboardController {
     @ApiOperation(value = "查询负荷率排行榜列表", notes = "查询负荷率排行榜列表")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "type", value = "类型 0:风场,1:项目,2:线路,3:风机,", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
 
-    public AjaxResult loadfactortoplist(Tablepar tablepar, String wpId, String beginDate, String endDate) {
+    public AjaxResult loadfactortoplist(Tablepar tablepar,String type, String wpId, String beginDate, String endDate) {
 
 
         Date beginDate_d=null;
@@ -317,9 +318,9 @@ public class LeaderboardController {
         {
             endDate_d= DateUtils.parseDate(endDate);
         }
-        List<StatisticalAnalysisTopVo> vos= leaderboardService.loadfactortoplist( wpId, beginDate_d, endDate_d);
+        List<StatisticalAnalysisTopVo> vos= leaderboardService.loadfactortoplist(type, wpId, beginDate_d, endDate_d);
 
-        if (tablepar.getOrderByColumn().equals("power")) {
+        if (null!=tablepar.getOrderByColumn() && tablepar.getOrderByColumn().equals("power")) {
             if (tablepar.getIsAsc().equals("asc")) {
                 Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
                     public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
@@ -336,7 +337,7 @@ public class LeaderboardController {
 
                 });
             }
-        } else if (tablepar.getOrderByColumn().equals("speed")) {
+        } else if (null!=tablepar.getOrderByColumn() &&tablepar.getOrderByColumn().equals("speed")) {
             if (tablepar.getIsAsc().equals("asc")) {
                 Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
                     public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {
@@ -353,7 +354,7 @@ public class LeaderboardController {
 
                 });
             }
-        } else if (tablepar.getOrderByColumn().equals("generatingcapacity")) {
+        } else if (null!=tablepar.getOrderByColumn() &&tablepar.getOrderByColumn().equals("generatingcapacity")) {
             if (tablepar.getIsAsc().equals("asc")) {
                 Collections.sort(vos, new Comparator<StatisticalAnalysisTopVo>() {
                     public int compare(StatisticalAnalysisTopVo arg0, StatisticalAnalysisTopVo arg1) {

+ 21 - 21
src/main/java/com/gyee/frame/controller/monitor/GenreSetPushController.java

@@ -257,25 +257,25 @@ public class GenreSetPushController {
     }
 
 
-    @PostMapping("/tooltipAjax")
-    @ResponseBody
-    @ApiOperation(value = "场站悬停功能", notes = "场站悬停功能")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "wpId", value = "场站编号", required = true, dataType = "string", paramType = "query")})
-
-    public AjaxResult tooltipAjax(String wpId) throws Exception {
-
-
-        Map<String, Double> retValue = new HashMap<String, Double>();
-        if (StringUtils.notEmp(wpId) ) {
-            retValue = genreSetPushService.tooltipAjax(wpId);
-        }
-
-        if (null!=retValue){
-            return AjaxResult.successData(AjaxStatus.success.code, retValue);
-        } else {
-            return AjaxResult.successData(AjaxStatus.error.code, retValue);
-        }
-
-    }
+//    @PostMapping("/tooltipAjax")
+//    @ResponseBody
+//    @ApiOperation(value = "场站悬停功能", notes = "场站悬停功能")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "wpId", value = "场站编号", required = true, dataType = "string", paramType = "query")})
+//
+//    public AjaxResult tooltipAjax(String wpId) throws Exception {
+//
+//
+//        Map<String, Double> retValue = new HashMap<String, Double>();
+//        if (StringUtils.notEmp(wpId) ) {
+//            retValue = genreSetPushService.tooltipAjax(wpId);
+//        }
+//
+//        if (null!=retValue){
+//            return AjaxResult.successData(AjaxStatus.success.code, retValue);
+//        } else {
+//            return AjaxResult.successData(AjaxStatus.error.code, retValue);
+//        }
+//
+//    }
 }

+ 61 - 37
src/main/java/com/gyee/frame/controller/scatter/ScatterController.java

@@ -1,5 +1,8 @@
 package com.gyee.frame.controller.scatter;
 
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.gyee.frame.common.cache.IGlobalCache;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.Constant;
@@ -12,8 +15,8 @@ import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindturbinecurvefittingmonthService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -29,7 +32,7 @@ import java.util.*;
 
 @Controller
 @RequestMapping("/scatter")
-@Api(value = "风场、项目、线路功率风速散点图",tags =  "风场、项目、线路功率风速散点图")
+@Api(value = "风场、项目、线路功率风速散点图", tags = "风场、项目、线路功率风速散点图")
 public class ScatterController {
 
     @Resource
@@ -40,9 +43,9 @@ public class ScatterController {
 
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
-
-
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    @Resource
+    IGlobalCache globalCache;
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
     /**
      * @throws
@@ -69,53 +72,74 @@ public class ScatterController {
             cal.set(Calendar.MINUTE, 0);
             cal.set(Calendar.SECOND, 0);
 
-            cal.set(Calendar.YEAR, Integer.valueOf(year));
-            cal.set(Calendar.MONTH, Integer.valueOf(month) - 1);
-            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
-            Date beginDate = cal.getTime();
-            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
-            Date endDate = cal.getTime();
+            int years = cal.get((Calendar.YEAR));
+            int months = cal.get((Calendar.MONTH));
+
+            if (years == Integer.valueOf(year) && months <= (Integer.valueOf(month) - 1)) {
+                StringBuilder sb = new StringBuilder();
+                if (StringUtils.notEmp(wpId)) {
+                    sb.append("scatter_").append(wpId).append("_").append(months);
+                } else if (StringUtils.notEmp(pjId)) {
+                    sb.append("scatter_").append(pjId).append("_").append(months);
+                } else if (StringUtils.notEmp(lnId)) {
+                    sb.append("scatter_").append(lnId).append("_").append(months);
+                }
 
 
-            WindPowerStationTestingPoint2 gl = null;
-            WindPowerStationTestingPoint2 fs = null;
+                String scatter = (String) (globalCache.get(String.valueOf(sb)));
+                vos = JSONObject.parseObject(scatter, new TypeReference<List<List<Double>>>() {
+                });
 
-            if (StringUtils.notEmp(wpId)) {
-                gl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
-                fs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
-            } else if (StringUtils.notEmp(pjId)) {
-                gl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(pjId, Constant.TPOINT_WP_SJGL);
-                fs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+            } else {
+                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();
 
-            } else if (StringUtils.notEmp(lnId)) {
-                gl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(lnId, Constant.TPOINT_WP_SJGL);
-                fs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
-            }
 
+                WindPowerStationTestingPoint2 gl = null;
+                WindPowerStationTestingPoint2 fs = null;
 
-            int daynum = DateUtils.daysDiff(beginDate, endDate);
-            long pried = 60 * 10;
-            long count = 6 * 24 * daynum;
+                if (StringUtils.notEmp(wpId)) {
+                    gl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
+                    fs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+                } else if (StringUtils.notEmp(pjId)) {
+                    gl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(pjId, Constant.TPOINT_WP_SJGL);
+                    fs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
 
-            DecimalFormat dcmFmt = new DecimalFormat("0.00");
-            List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+                } else if (StringUtils.notEmp(lnId)) {
+                    gl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(lnId, Constant.TPOINT_WP_SJGL);
+                    fs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+                }
 
-            List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
 
+                int daynum = DateUtils.daysDiff(beginDate, endDate);
+                long pried = 60 * 10;
+                long count = 6 * 24 * daynum;
 
-            if (!gls.isEmpty() && !fss.isEmpty()) {
-                for (int i = 0; i < fss.size(); i++) {
+                DecimalFormat dcmFmt = new DecimalFormat("0.00");
+                List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
 
-                    List<Double> ds = new ArrayList<Double>();
+                List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
 
-                    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);
+
+                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);
+                    }
                 }
             }
 
+
         }
 
         if (null != vos) {

+ 56 - 0
src/main/java/com/gyee/frame/controller/scatter/WinddirectionController.java

@@ -0,0 +1,56 @@
+package com.gyee.frame.controller.scatter;
+
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.custom.DataVo;
+import com.gyee.frame.service.WinddirectionService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+@Controller
+@RequestMapping("/winddirection")
+@Api(value = "风向图表", tags = "风向图表")
+public class WinddirectionController {
+
+    @Resource
+    private WinddirectionService winddirectionService;
+
+
+    @PostMapping("/getWinddirection")
+    @ResponseBody
+    @ApiOperation(value = "风向图表", notes = "风向图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult getWinddirection(String wpId, String recorddate) throws Exception {
+
+        List<DataVo> vos = new ArrayList<DataVo>();
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate)) {
+
+             vos =winddirectionService.winddirectionAjax(wpId,DateUtils.parseStrtoDate(recorddate));
+
+        }
+
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+
+    }
+
+
+}

+ 95 - 0
src/main/java/com/gyee/frame/controller/warn/FaultPlaybackController.java

@@ -0,0 +1,95 @@
+package com.gyee.frame.controller.warn;
+
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.custom.PointVo;
+import com.gyee.frame.service.FaultPlaybackService;
+import com.gyee.frame.util.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Controller
+@RequestMapping("/fault")
+@Api(value = "停机故障回溯", tags = "停机故障回溯")
+public class FaultPlaybackController {
+
+    private static final String format = "yyyy-MM-dd HH:mm";
+    @Resource
+    private FaultPlaybackService faultPlaybackService;
+
+
+//    <option value="0">风机</option>
+//				<option value="1">齿轮箱</option>
+//				<option value="2">发电机</option>
+//				<option value="3">变桨</option>
+//
+//    				<option value="0">所有测点</option>
+//				<option value="1">遥测测点</option>
+//				<option value="2">遥信测点</option>
+    @PostMapping("/queryPointVos")
+    @ResponseBody
+    @ApiOperation(value = "停机故障回溯查询", notes = "停机故障回溯查询")
+    @ApiImplicitParams({
+
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "bjtype", value = "部件类型", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "cdtype", value = "测点类型", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult queryPointVos(String wtId, String bjtype, String cdtype) throws Exception {
+
+        List<PointVo> result=new ArrayList<>();
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(bjtype) && StringUtils.notEmp(cdtype)) {
+
+            result=faultPlaybackService.queryPointVos( wtId, Integer.valueOf(bjtype), Integer.valueOf(cdtype));
+
+        }
+        if (null != result) {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        }
+
+    }
+    @PostMapping("/getFaultPlayback")
+    @ResponseBody
+    @ApiOperation(value = "停机故障回溯查询", notes = "停机故障回溯查询")
+    @ApiImplicitParams({
+
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "pointids", value = "测点", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "stopTime", value = "测点类型", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult getFaultPlayback(String wtId, String pointids, String stopTime) throws Exception {
+
+        Map<String, Object> map=new HashMap<>();
+
+        if(StringUtils.notEmp(wtId) && StringUtils.notEmp(pointids) && StringUtils.notEmp(stopTime))
+        {
+            SimpleDateFormat df =new SimpleDateFormat(format);
+            String[] ids=pointids.split(",");
+
+            map=faultPlaybackService.getDataValue(wtId, ids, df.parse(stopTime));
+        }
+
+        if (null != map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        }
+
+    }
+
+}

+ 89 - 0
src/main/java/com/gyee/frame/controller/warn/MainBrownouts2Controller.java

@@ -0,0 +1,89 @@
+package com.gyee.frame.controller.warn;
+
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.Brownoutsevent2;
+import com.gyee.frame.model.auto.MainBrownouts2;
+import com.gyee.frame.model.custom.MainBrownoutsVo;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.service.Brownoutsevent2Service;
+import com.gyee.frame.service.MainBrownouts2Service;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Controller
+@RequestMapping("/brownouts")
+@Api(value = "限电事件", tags = "限电事件")
+public class MainBrownouts2Controller {
+
+    @Resource
+    private MainBrownouts2Service mhutdowneventService;
+    @Resource
+    private Brownoutsevent2Service brownoutsevent2Service;
+
+
+    @PostMapping("/getBrownoutsList")
+    @ResponseBody
+    @ApiOperation(value = "限电事件查询", notes = "限电事件查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tablepar", value = "分页控件", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult getBrownoutsList(Tablepar tablepar, String wpId, String beginDate, String endDate) throws Exception {
+
+        PageInfo<MainBrownoutsVo> result=new PageInfo<>() ;
+        if (StringUtils.notEmp(tablepar) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+            result=mhutdowneventService.getMainBrownouts2(tablepar, wpId, DateUtils.parseDate(beginDate), DateUtils.parseDate(endDate));
+
+        }
+        if (null != result) {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        }
+
+    }
+
+    @PostMapping("/getBrownouts")
+    @ResponseBody
+    @ApiOperation(value = "限电详细事件查询", notes = "限电详细事件查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mainId", value = "主表编号", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult getBrownouts(String mainId) throws Exception {
+
+        Map<String,Object> map= new HashMap<>();
+        if (StringUtils.notEmp(mainId) ) {
+
+            MainBrownouts2 main=mhutdowneventService.selectByPrimaryKey(mainId);
+            List<Brownoutsevent2> list=brownoutsevent2Service.getBrownoutsevent2List(mainId);
+            map.put("main",main);
+            map.put("list",list);
+
+        }
+        if (null != map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+}

+ 70 - 0
src/main/java/com/gyee/frame/controller/warn/ShutdowneventController.java

@@ -0,0 +1,70 @@
+package com.gyee.frame.controller.warn;
+
+import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.custom.ShutdowneventVo;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.service.ShutdowneventService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+
+@Controller
+@RequestMapping("/event")
+@Api(value = "停机事件", tags = "停机事件")
+public class ShutdowneventController {
+
+    @Resource
+    private ShutdowneventService shutdowneventService;
+
+
+    /**
+     *
+     * @param tablepar
+     * @param wpId
+     * @param wtId
+     * @param beginDate
+     * @param endDate
+     * @param type
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/getShutdownevent")
+    @ResponseBody
+    @ApiOperation(value = "停机事件查询", notes = "停机事件查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tablepar", value = "分页控件", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = false, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "type", value = "类型", required = false, dataType = "string", paramType = "query")})
+
+    public AjaxResult getShutdownevent(Tablepar tablepar, String wpId, String wtId, String beginDate, String endDate, String type) throws Exception {
+
+        PageInfo<ShutdowneventVo> result=new PageInfo<>() ;
+        if (StringUtils.notEmp(tablepar) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+            result=shutdowneventService.getShutdownevent(tablepar, wpId, wtId, DateUtils.parseDate(beginDate), DateUtils.parseDate(endDate), type);
+
+        }
+        if (null != result) {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        }
+
+    }
+
+
+}

+ 53 - 0
src/main/java/com/gyee/frame/controller/warn/TemperatureController.java

@@ -0,0 +1,53 @@
+package com.gyee.frame.controller.warn;
+
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.custom.TemperatureVo;
+import com.gyee.frame.service.warn.TemperatureService;
+import com.gyee.frame.util.StringUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+@Controller
+@RequestMapping("/temperature")
+@Api(value = "预警事件", tags = "预警事件")
+public class TemperatureController {
+
+    @Resource
+    private TemperatureService temperatureService;
+
+    @PostMapping("/getTemperatureList")
+    @ResponseBody
+    @ApiOperation(value = "预警事件查询 type yyz 液压站,clx 齿轮箱,fdj 发电机,bj 变桨,qt 其他,zz 主轴,zd 震动", notes = "预警事件查询")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "type", value = "类型", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult getTemperatureList(String wpId, String type) throws Exception {
+
+        List<List<TemperatureVo>>result=new ArrayList<>();
+
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(type) ) {
+
+            result=temperatureService.temperatureQuery(wpId,type);
+        }
+        if (null != result) {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        }
+
+    }
+
+
+}

+ 96 - 0
src/main/java/com/gyee/frame/mapper/auto/MainBrownouts2Mapper.java

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

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

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

+ 3 - 4
src/main/java/com/gyee/frame/mapper/auto/WarningInfoDayMapper.java

@@ -5,7 +5,6 @@ import com.gyee.frame.model.auto.WarningInfoDayExample;
 import com.gyee.frame.model.custom.SawVo;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.Date;
 import java.util.List;
 
 public interface WarningInfoDayMapper {
@@ -97,10 +96,10 @@ public interface WarningInfoDayMapper {
      */
     int updateByPrimaryKey(WarningInfoDay record);
 
-    List<SawVo> getWarningInfoDayByWarningid(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate, @Param("order") String order);
+    List<SawVo> getWarningInfoDayByWarningid(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("order") String order);
 
-    List<SawVo> getWarningInfoDayByWarningClassify(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate, @Param("order") String order);
+    List<SawVo> getWarningInfoDayByWarningClassify(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("order") String order);
 
-    List<SawVo> getWarningInfoDayByManufacturer(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate, @Param("order") String order);
+    List<SawVo> getWarningInfoDayByManufacturer(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("order") String order);
 
 }

+ 65 - 0
src/main/java/com/gyee/frame/mapper/auto/WindTurbineTestingPointaiyjMapper.java

@@ -0,0 +1,65 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.WindTurbineTestingPointaiyj;
+import com.gyee.frame.model.auto.WindTurbineTestingPointaiyjExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface WindTurbineTestingPointaiyjMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTAIYJ
+     *
+     * @mbg.generated
+     */
+    long countByExample(WindTurbineTestingPointaiyjExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTAIYJ
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(WindTurbineTestingPointaiyjExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTAIYJ
+     *
+     * @mbg.generated
+     */
+    int insert(WindTurbineTestingPointaiyj record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTAIYJ
+     *
+     * @mbg.generated
+     */
+    int insertSelective(WindTurbineTestingPointaiyj record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTAIYJ
+     *
+     * @mbg.generated
+     */
+    List<WindTurbineTestingPointaiyj> selectByExample(WindTurbineTestingPointaiyjExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTAIYJ
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") WindTurbineTestingPointaiyj record, @Param("example") WindTurbineTestingPointaiyjExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTAIYJ
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") WindTurbineTestingPointaiyj record, @Param("example") WindTurbineTestingPointaiyjExample example);
+}

+ 443 - 0
src/main/java/com/gyee/frame/model/auto/MainBrownouts2.java

@@ -0,0 +1,443 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MainBrownouts2 implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.ID
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.STOPTIME
+     *
+     * @mbg.generated
+     */
+    private Date stoptime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.STARTTIME
+     *
+     * @mbg.generated
+     */
+    private Date starttime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.STOPTYPEID
+     *
+     * @mbg.generated
+     */
+    private String stoptypeid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.DESCRIPTION
+     *
+     * @mbg.generated
+     */
+    private String description;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.LIMITLOAD
+     *
+     * @mbg.generated
+     */
+    private Double limitload;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.BROWNOUTSDIRECTIVE
+     *
+     * @mbg.generated
+     */
+    private String brownoutsdirective;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.WINDSPEED
+     *
+     * @mbg.generated
+     */
+    private Double windspeed;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.THISLOAD
+     *
+     * @mbg.generated
+     */
+    private Double thisload;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    private String windpowerstationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.WPNAME
+     *
+     * @mbg.generated
+     */
+    private String wpname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.LOSSPOWER
+     *
+     * @mbg.generated
+     */
+    private Double losspower;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINBROWNOUTS2.STOPHOURS
+     *
+     * @mbg.generated
+     */
+    private Double stophours;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table MAINBROWNOUTS2
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.ID
+     *
+     * @return the value of MAINBROWNOUTS2.ID
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.ID
+     *
+     * @param id the value for MAINBROWNOUTS2.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.STOPTIME
+     *
+     * @return the value of MAINBROWNOUTS2.STOPTIME
+     *
+     * @mbg.generated
+     */
+    public Date getStoptime() {
+        return stoptime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.STOPTIME
+     *
+     * @param stoptime the value for MAINBROWNOUTS2.STOPTIME
+     *
+     * @mbg.generated
+     */
+    public void setStoptime(Date stoptime) {
+        this.stoptime = stoptime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.STARTTIME
+     *
+     * @return the value of MAINBROWNOUTS2.STARTTIME
+     *
+     * @mbg.generated
+     */
+    public Date getStarttime() {
+        return starttime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.STARTTIME
+     *
+     * @param starttime the value for MAINBROWNOUTS2.STARTTIME
+     *
+     * @mbg.generated
+     */
+    public void setStarttime(Date starttime) {
+        this.starttime = starttime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.STOPTYPEID
+     *
+     * @return the value of MAINBROWNOUTS2.STOPTYPEID
+     *
+     * @mbg.generated
+     */
+    public String getStoptypeid() {
+        return stoptypeid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.STOPTYPEID
+     *
+     * @param stoptypeid the value for MAINBROWNOUTS2.STOPTYPEID
+     *
+     * @mbg.generated
+     */
+    public void setStoptypeid(String stoptypeid) {
+        this.stoptypeid = stoptypeid == null ? null : stoptypeid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.DESCRIPTION
+     *
+     * @return the value of MAINBROWNOUTS2.DESCRIPTION
+     *
+     * @mbg.generated
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.DESCRIPTION
+     *
+     * @param description the value for MAINBROWNOUTS2.DESCRIPTION
+     *
+     * @mbg.generated
+     */
+    public void setDescription(String description) {
+        this.description = description == null ? null : description.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.LIMITLOAD
+     *
+     * @return the value of MAINBROWNOUTS2.LIMITLOAD
+     *
+     * @mbg.generated
+     */
+    public Double getLimitload() {
+        return limitload;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.LIMITLOAD
+     *
+     * @param limitload the value for MAINBROWNOUTS2.LIMITLOAD
+     *
+     * @mbg.generated
+     */
+    public void setLimitload(Double limitload) {
+        this.limitload = limitload;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.BROWNOUTSDIRECTIVE
+     *
+     * @return the value of MAINBROWNOUTS2.BROWNOUTSDIRECTIVE
+     *
+     * @mbg.generated
+     */
+    public String getBrownoutsdirective() {
+        return brownoutsdirective;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.BROWNOUTSDIRECTIVE
+     *
+     * @param brownoutsdirective the value for MAINBROWNOUTS2.BROWNOUTSDIRECTIVE
+     *
+     * @mbg.generated
+     */
+    public void setBrownoutsdirective(String brownoutsdirective) {
+        this.brownoutsdirective = brownoutsdirective == null ? null : brownoutsdirective.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.WINDSPEED
+     *
+     * @return the value of MAINBROWNOUTS2.WINDSPEED
+     *
+     * @mbg.generated
+     */
+    public Double getWindspeed() {
+        return windspeed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.WINDSPEED
+     *
+     * @param windspeed the value for MAINBROWNOUTS2.WINDSPEED
+     *
+     * @mbg.generated
+     */
+    public void setWindspeed(Double windspeed) {
+        this.windspeed = windspeed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.THISLOAD
+     *
+     * @return the value of MAINBROWNOUTS2.THISLOAD
+     *
+     * @mbg.generated
+     */
+    public Double getThisload() {
+        return thisload;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.THISLOAD
+     *
+     * @param thisload the value for MAINBROWNOUTS2.THISLOAD
+     *
+     * @mbg.generated
+     */
+    public void setThisload(Double thisload) {
+        this.thisload = thisload;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.WINDPOWERSTATIONID
+     *
+     * @return the value of MAINBROWNOUTS2.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    public String getWindpowerstationid() {
+        return windpowerstationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.WINDPOWERSTATIONID
+     *
+     * @param windpowerstationid the value for MAINBROWNOUTS2.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    public void setWindpowerstationid(String windpowerstationid) {
+        this.windpowerstationid = windpowerstationid == null ? null : windpowerstationid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.WPNAME
+     *
+     * @return the value of MAINBROWNOUTS2.WPNAME
+     *
+     * @mbg.generated
+     */
+    public String getWpname() {
+        return wpname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.WPNAME
+     *
+     * @param wpname the value for MAINBROWNOUTS2.WPNAME
+     *
+     * @mbg.generated
+     */
+    public void setWpname(String wpname) {
+        this.wpname = wpname == null ? null : wpname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.LOSSPOWER
+     *
+     * @return the value of MAINBROWNOUTS2.LOSSPOWER
+     *
+     * @mbg.generated
+     */
+    public Double getLosspower() {
+        return losspower;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.LOSSPOWER
+     *
+     * @param losspower the value for MAINBROWNOUTS2.LOSSPOWER
+     *
+     * @mbg.generated
+     */
+    public void setLosspower(Double losspower) {
+        this.losspower = losspower;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINBROWNOUTS2.STOPHOURS
+     *
+     * @return the value of MAINBROWNOUTS2.STOPHOURS
+     *
+     * @mbg.generated
+     */
+    public Double getStophours() {
+        return stophours;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINBROWNOUTS2.STOPHOURS
+     *
+     * @param stophours the value for MAINBROWNOUTS2.STOPHOURS
+     *
+     * @mbg.generated
+     */
+    public void setStophours(Double stophours) {
+        this.stophours = stophours;
+    }
+}

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


+ 112 - 0
src/main/java/com/gyee/frame/model/auto/TaosMap.java

@@ -0,0 +1,112 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+
+public class TaosMap implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column TAOSMAP.ID
+     *
+     * @mbg.generated
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column TAOSMAP.STABLESID
+     *
+     * @mbg.generated
+     */
+    private String stablesid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column TAOSMAP.DATABASEID
+     *
+     * @mbg.generated
+     */
+    private String databaseid;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column TAOSMAP.ID
+     *
+     * @return the value of TAOSMAP.ID
+     *
+     * @mbg.generated
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column TAOSMAP.ID
+     *
+     * @param id the value for TAOSMAP.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column TAOSMAP.STABLESID
+     *
+     * @return the value of TAOSMAP.STABLESID
+     *
+     * @mbg.generated
+     */
+    public String getStablesid() {
+        return stablesid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column TAOSMAP.STABLESID
+     *
+     * @param stablesid the value for TAOSMAP.STABLESID
+     *
+     * @mbg.generated
+     */
+    public void setStablesid(String stablesid) {
+        this.stablesid = stablesid == null ? null : stablesid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column TAOSMAP.DATABASEID
+     *
+     * @return the value of TAOSMAP.DATABASEID
+     *
+     * @mbg.generated
+     */
+    public String getDatabaseid() {
+        return databaseid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column TAOSMAP.DATABASEID
+     *
+     * @param databaseid the value for TAOSMAP.DATABASEID
+     *
+     * @mbg.generated
+     */
+    public void setDatabaseid(String databaseid) {
+        this.databaseid = databaseid == null ? null : databaseid.trim();
+    }
+}

+ 502 - 0
src/main/java/com/gyee/frame/model/auto/TaosMapExample.java

@@ -0,0 +1,502 @@
+package com.gyee.frame.model.auto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TaosMapExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public TaosMapExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("ID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("ID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Integer value) {
+            addCriterion("ID =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("ID <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("ID >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("ID >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("ID <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("ID <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("ID in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("ID not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("ID between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("ID not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidIsNull() {
+            addCriterion("STABLESID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidIsNotNull() {
+            addCriterion("STABLESID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidEqualTo(String value) {
+            addCriterion("STABLESID =", value, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidNotEqualTo(String value) {
+            addCriterion("STABLESID <>", value, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidGreaterThan(String value) {
+            addCriterion("STABLESID >", value, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidGreaterThanOrEqualTo(String value) {
+            addCriterion("STABLESID >=", value, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidLessThan(String value) {
+            addCriterion("STABLESID <", value, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidLessThanOrEqualTo(String value) {
+            addCriterion("STABLESID <=", value, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidLike(String value) {
+            addCriterion("STABLESID like", value, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidNotLike(String value) {
+            addCriterion("STABLESID not like", value, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidIn(List<String> values) {
+            addCriterion("STABLESID in", values, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidNotIn(List<String> values) {
+            addCriterion("STABLESID not in", values, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidBetween(String value1, String value2) {
+            addCriterion("STABLESID between", value1, value2, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStablesidNotBetween(String value1, String value2) {
+            addCriterion("STABLESID not between", value1, value2, "stablesid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidIsNull() {
+            addCriterion("DATABASEID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidIsNotNull() {
+            addCriterion("DATABASEID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidEqualTo(String value) {
+            addCriterion("DATABASEID =", value, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidNotEqualTo(String value) {
+            addCriterion("DATABASEID <>", value, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidGreaterThan(String value) {
+            addCriterion("DATABASEID >", value, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidGreaterThanOrEqualTo(String value) {
+            addCriterion("DATABASEID >=", value, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidLessThan(String value) {
+            addCriterion("DATABASEID <", value, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidLessThanOrEqualTo(String value) {
+            addCriterion("DATABASEID <=", value, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidLike(String value) {
+            addCriterion("DATABASEID like", value, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidNotLike(String value) {
+            addCriterion("DATABASEID not like", value, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidIn(List<String> values) {
+            addCriterion("DATABASEID in", values, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidNotIn(List<String> values) {
+            addCriterion("DATABASEID not in", values, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidBetween(String value1, String value2) {
+            addCriterion("DATABASEID between", value1, value2, "databaseid");
+            return (Criteria) this;
+        }
+
+        public Criteria andDatabaseidNotBetween(String value1, String value2) {
+            addCriterion("DATABASEID not between", value1, value2, "databaseid");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated do_not_delete_during_merge
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table TAOSMAP
+     *
+     * @mbg.generated
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 607 - 0
src/main/java/com/gyee/frame/model/auto/WindTurbineTestingPointaiyj.java

@@ -0,0 +1,607 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+
+public class WindTurbineTestingPointaiyj implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.ID
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.CODE
+     *
+     * @mbg.generated
+     */
+    private String code;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.NAME
+     *
+     * @mbg.generated
+     */
+    private String name;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.MODEL
+     *
+     * @mbg.generated
+     */
+    private String model;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.VALUEUNIT
+     *
+     * @mbg.generated
+     */
+    private String valueunit;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.ENGLISHNAME
+     *
+     * @mbg.generated
+     */
+    private String englishname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.TYPEID
+     *
+     * @mbg.generated
+     */
+    private String typeid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.MODELID
+     *
+     * @mbg.generated
+     */
+    private String modelid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.MAXVAL
+     *
+     * @mbg.generated
+     */
+    private Double maxval;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.MINVAL
+     *
+     * @mbg.generated
+     */
+    private Double minval;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.REASONABLEMAXVAL
+     *
+     * @mbg.generated
+     */
+    private Double reasonablemaxval;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.REASONABLEMINVAL
+     *
+     * @mbg.generated
+     */
+    private Double reasonableminval;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    private String windturbineid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    private String uniformcode;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.SHORTID
+     *
+     * @mbg.generated
+     */
+    private String shortid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.LONGID
+     *
+     * @mbg.generated
+     */
+    private String longid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    private String windpowerstationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTAIYJ.REALTIMEID
+     *
+     * @mbg.generated
+     */
+    private String realtimeid;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WINDTURBINETESTINGPOINTAIYJ
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.ID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.ID
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.ID
+     *
+     * @param id the value for WINDTURBINETESTINGPOINTAIYJ.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.CODE
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.CODE
+     *
+     * @mbg.generated
+     */
+    public String getCode() {
+        return code;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.CODE
+     *
+     * @param code the value for WINDTURBINETESTINGPOINTAIYJ.CODE
+     *
+     * @mbg.generated
+     */
+    public void setCode(String code) {
+        this.code = code == null ? null : code.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.NAME
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.NAME
+     *
+     * @mbg.generated
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.NAME
+     *
+     * @param name the value for WINDTURBINETESTINGPOINTAIYJ.NAME
+     *
+     * @mbg.generated
+     */
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.MODEL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.MODEL
+     *
+     * @mbg.generated
+     */
+    public String getModel() {
+        return model;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.MODEL
+     *
+     * @param model the value for WINDTURBINETESTINGPOINTAIYJ.MODEL
+     *
+     * @mbg.generated
+     */
+    public void setModel(String model) {
+        this.model = model == null ? null : model.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.VALUEUNIT
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.VALUEUNIT
+     *
+     * @mbg.generated
+     */
+    public String getValueunit() {
+        return valueunit;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.VALUEUNIT
+     *
+     * @param valueunit the value for WINDTURBINETESTINGPOINTAIYJ.VALUEUNIT
+     *
+     * @mbg.generated
+     */
+    public void setValueunit(String valueunit) {
+        this.valueunit = valueunit == null ? null : valueunit.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.ENGLISHNAME
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.ENGLISHNAME
+     *
+     * @mbg.generated
+     */
+    public String getEnglishname() {
+        return englishname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.ENGLISHNAME
+     *
+     * @param englishname the value for WINDTURBINETESTINGPOINTAIYJ.ENGLISHNAME
+     *
+     * @mbg.generated
+     */
+    public void setEnglishname(String englishname) {
+        this.englishname = englishname == null ? null : englishname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.TYPEID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.TYPEID
+     *
+     * @mbg.generated
+     */
+    public String getTypeid() {
+        return typeid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.TYPEID
+     *
+     * @param typeid the value for WINDTURBINETESTINGPOINTAIYJ.TYPEID
+     *
+     * @mbg.generated
+     */
+    public void setTypeid(String typeid) {
+        this.typeid = typeid == null ? null : typeid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.MODELID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.MODELID
+     *
+     * @mbg.generated
+     */
+    public String getModelid() {
+        return modelid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.MODELID
+     *
+     * @param modelid the value for WINDTURBINETESTINGPOINTAIYJ.MODELID
+     *
+     * @mbg.generated
+     */
+    public void setModelid(String modelid) {
+        this.modelid = modelid == null ? null : modelid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.MAXVAL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.MAXVAL
+     *
+     * @mbg.generated
+     */
+    public Double getMaxval() {
+        return maxval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.MAXVAL
+     *
+     * @param maxval the value for WINDTURBINETESTINGPOINTAIYJ.MAXVAL
+     *
+     * @mbg.generated
+     */
+    public void setMaxval(Double maxval) {
+        this.maxval = maxval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.MINVAL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.MINVAL
+     *
+     * @mbg.generated
+     */
+    public Double getMinval() {
+        return minval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.MINVAL
+     *
+     * @param minval the value for WINDTURBINETESTINGPOINTAIYJ.MINVAL
+     *
+     * @mbg.generated
+     */
+    public void setMinval(Double minval) {
+        this.minval = minval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.REASONABLEMAXVAL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.REASONABLEMAXVAL
+     *
+     * @mbg.generated
+     */
+    public Double getReasonablemaxval() {
+        return reasonablemaxval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.REASONABLEMAXVAL
+     *
+     * @param reasonablemaxval the value for WINDTURBINETESTINGPOINTAIYJ.REASONABLEMAXVAL
+     *
+     * @mbg.generated
+     */
+    public void setReasonablemaxval(Double reasonablemaxval) {
+        this.reasonablemaxval = reasonablemaxval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.REASONABLEMINVAL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.REASONABLEMINVAL
+     *
+     * @mbg.generated
+     */
+    public Double getReasonableminval() {
+        return reasonableminval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.REASONABLEMINVAL
+     *
+     * @param reasonableminval the value for WINDTURBINETESTINGPOINTAIYJ.REASONABLEMINVAL
+     *
+     * @mbg.generated
+     */
+    public void setReasonableminval(Double reasonableminval) {
+        this.reasonableminval = reasonableminval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.WINDTURBINEID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    public String getWindturbineid() {
+        return windturbineid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.WINDTURBINEID
+     *
+     * @param windturbineid the value for WINDTURBINETESTINGPOINTAIYJ.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    public void setWindturbineid(String windturbineid) {
+        this.windturbineid = windturbineid == null ? null : windturbineid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.UNIFORMCODE
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public String getUniformcode() {
+        return uniformcode;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.UNIFORMCODE
+     *
+     * @param uniformcode the value for WINDTURBINETESTINGPOINTAIYJ.UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public void setUniformcode(String uniformcode) {
+        this.uniformcode = uniformcode == null ? null : uniformcode.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.SHORTID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.SHORTID
+     *
+     * @mbg.generated
+     */
+    public String getShortid() {
+        return shortid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.SHORTID
+     *
+     * @param shortid the value for WINDTURBINETESTINGPOINTAIYJ.SHORTID
+     *
+     * @mbg.generated
+     */
+    public void setShortid(String shortid) {
+        this.shortid = shortid == null ? null : shortid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.LONGID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.LONGID
+     *
+     * @mbg.generated
+     */
+    public String getLongid() {
+        return longid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.LONGID
+     *
+     * @param longid the value for WINDTURBINETESTINGPOINTAIYJ.LONGID
+     *
+     * @mbg.generated
+     */
+    public void setLongid(String longid) {
+        this.longid = longid == null ? null : longid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.WINDPOWERSTATIONID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    public String getWindpowerstationid() {
+        return windpowerstationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.WINDPOWERSTATIONID
+     *
+     * @param windpowerstationid the value for WINDTURBINETESTINGPOINTAIYJ.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    public void setWindpowerstationid(String windpowerstationid) {
+        this.windpowerstationid = windpowerstationid == null ? null : windpowerstationid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTAIYJ.REALTIMEID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTAIYJ.REALTIMEID
+     *
+     * @mbg.generated
+     */
+    public String getRealtimeid() {
+        return realtimeid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTAIYJ.REALTIMEID
+     *
+     * @param realtimeid the value for WINDTURBINETESTINGPOINTAIYJ.REALTIMEID
+     *
+     * @mbg.generated
+     */
+    public void setRealtimeid(String realtimeid) {
+        this.realtimeid = realtimeid == null ? null : realtimeid.trim();
+    }
+}

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


+ 37 - 28
src/main/java/com/gyee/frame/model/custom/DataVo.java

@@ -13,6 +13,7 @@ package com.gyee.frame.model.custom;
 
 public class DataVo {
 
+
     private Long time;
     private String timestr;
     private Double value1;
@@ -32,13 +33,13 @@ public class DataVo {
     private Double value8;
 
     private Double value9;
-    
+
     private Double value10;
-    
+
     private Double value11;
-    
+
     private Double value12;
-    
+
     private Double value13;
 
     private Double speed;
@@ -70,7 +71,15 @@ public class DataVo {
 
     private String value;
 
+    private ValueObjVo valueObjVo;
+
+    public ValueObjVo getValueObjVo() {
+        return valueObjVo;
+    }
 
+    public void setValueObjVo(ValueObjVo valueObjVo) {
+        this.valueObjVo = valueObjVo;
+    }
 
     public String getValue() {
         return value;
@@ -320,36 +329,36 @@ public class DataVo {
         this.value9 = value9;
     }
 
-	public Double getValue10() {
-		return value10;
-	}
+    public Double getValue10() {
+        return value10;
+    }
 
-	public void setValue10(Double value10) {
-		this.value10 = value10;
-	}
+    public void setValue10(Double value10) {
+        this.value10 = value10;
+    }
 
-	public Double getValue11() {
-		return value11;
-	}
+    public Double getValue11() {
+        return value11;
+    }
 
-	public void setValue11(Double value11) {
-		this.value11 = value11;
-	}
+    public void setValue11(Double value11) {
+        this.value11 = value11;
+    }
 
-	public Double getValue12() {
-		return value12;
-	}
+    public Double getValue12() {
+        return value12;
+    }
 
-	public void setValue12(Double value12) {
-		this.value12 = value12;
-	}
+    public void setValue12(Double value12) {
+        this.value12 = value12;
+    }
 
-	public Double getValue13() {
-		return value13;
-	}
+    public Double getValue13() {
+        return value13;
+    }
 
-	public void setValue13(Double value13) {
-		this.value13 = value13;
-	}
+    public void setValue13(Double value13) {
+        this.value13 = value13;
+    }
 
 }

+ 115 - 0
src/main/java/com/gyee/frame/model/custom/MainBrownoutsVo.java

@@ -0,0 +1,115 @@
+/**
+ * <p>文件名:	MainBrownouts.java</p>
+ * <p>版权:  </p>
+ * <p>公司:	company Co., Ltd.</p>
+ * <p>项目名:lnly</p>
+ * <p>作者:	刘厦(liusha.information@gmail.com)</p>
+ */
+package com.gyee.frame.model.custom;
+
+import java.util.Date;
+
+public class MainBrownoutsVo {
+	
+	private String id;
+	
+	private Date startTime;
+	
+	private Date stopTime;
+	
+	private String stopTypeId;
+	
+	private String description;
+	
+	private String windPowerStationId;
+	
+	private String wpName;
+	private Double stopHours;
+	private String wts;
+	
+	
+	public Double getStopHours() {
+		return stopHours;
+	}
+
+	public void setStopHours(Double stopHours) {
+		this.stopHours = stopHours;
+	}
+
+	private Double lossPower;
+
+	public Double getLossPower() {
+		return lossPower;
+	}
+
+	public void setLossPower(Double lossPower) {
+		this.lossPower = lossPower;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public Date getStartTime() {
+		return startTime;
+	}
+
+	public void setStartTime(Date startTime) {
+		this.startTime = startTime;
+	}
+
+	public Date getStopTime() {
+		return stopTime;
+	}
+
+	public void setStopTime(Date stopTime) {
+		this.stopTime = stopTime;
+	}
+
+	public String getStopTypeId() {
+		return stopTypeId;
+	}
+
+	public void setStopTypeId(String stopTypeId) {
+		this.stopTypeId = stopTypeId;
+	}
+
+	public String getDescription() {
+		return description;
+	}
+
+	public void setDescription(String description) {
+		this.description = description;
+	}
+
+	public String getWindPowerStationId() {
+		return windPowerStationId;
+	}
+
+	public void setWindPowerStationId(String windPowerStationId) {
+		this.windPowerStationId = windPowerStationId;
+	}
+
+	public String getWpName() {
+		return wpName;
+	}
+
+	public void setWpName(String wpName) {
+		this.wpName = wpName;
+	}
+
+	public String getWts() {
+		return wts;
+	}
+
+	public void setWts(String wts) {
+		this.wts = wts;
+	}
+	
+	
+
+}

+ 56 - 0
src/main/java/com/gyee/frame/model/custom/PointVo.java

@@ -0,0 +1,56 @@
+package com.gyee.frame.model.custom;
+
+public class PointVo {
+
+	private String id;
+	private String code;
+	private String name;
+	private String modelid;
+	private String windturbineid;
+	private String uniformcode;
+	private String windpowerstationid;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getCode() {
+		return code;
+	}
+	public void setCode(String code) {
+		this.code = code;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getModelid() {
+		return modelid;
+	}
+	public void setModelid(String modelid) {
+		this.modelid = modelid;
+	}
+	public String getWindturbineid() {
+		return windturbineid;
+	}
+	public void setWindturbineid(String windturbineid) {
+		this.windturbineid = windturbineid;
+	}
+	public String getUniformcode() {
+		return uniformcode;
+	}
+	public void setUniformcode(String uniformcode) {
+		this.uniformcode = uniformcode;
+	}
+	public String getWindpowerstationid() {
+		return windpowerstationid;
+	}
+	public void setWindpowerstationid(String windpowerstationid) {
+		this.windpowerstationid = windpowerstationid;
+	}
+	
+	
+}

+ 64 - 0
src/main/java/com/gyee/frame/model/custom/TemperatureVo.java

@@ -0,0 +1,64 @@
+package com.gyee.frame.model.custom;
+
+public class TemperatureVo {
+	private String id;
+	private String name;
+	private Double value;
+	private Double maxValue;
+	private Double miValue;
+	private Double reasonableMaxVal;
+	private Double reasonableMinVal;
+	private String color;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getColor() {
+		return color;
+	}
+	public void setColor(String color) {
+		this.color = color;
+	}
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public Double getValue() {
+		return value;
+	}
+	public void setValue(Double value) {
+		this.value = value;
+	}
+	public Double getMaxValue() {
+		return maxValue;
+	}
+	public void setMaxValue(Double maxValue) {
+		this.maxValue = maxValue;
+	}
+	public Double getMiValue() {
+		return miValue;
+	}
+	public void setMiValue(Double miValue) {
+		this.miValue = miValue;
+	}
+	public Double getReasonableMaxVal() {
+		return reasonableMaxVal;
+	}
+	public void setReasonableMaxVal(Double reasonableMaxVal) {
+		this.reasonableMaxVal = reasonableMaxVal;
+	}
+	public Double getReasonableMinVal() {
+		return reasonableMinVal;
+	}
+	public void setReasonableMinVal(Double reasonableMinVal) {
+		this.reasonableMinVal = reasonableMinVal;
+	}
+	
+}

+ 62 - 0
src/main/java/com/gyee/frame/model/custom/ValueObjVo.java

@@ -0,0 +1,62 @@
+/** 
+ * Project Name:nxfd2 
+ * File Name:Value.java 
+ * Package Name:com.hcks.cmfds.vo 
+ * Date:2016-7-12下午04:16:42 
+ * Copyright (c) 2016, chenzhou1025@126.com All Rights Reserved. 
+ * 
+ */
+
+package com.gyee.frame.model.custom;
+
+/**
+ * ClassName:Value <br/>
+ * Function: TODO ADD FUNCTION. <br/>
+ * Reason: TODO ADD REASON. <br/>
+ * Date: 2016-7-12 下午04:16:42 <br/>
+ * 
+ * @author 石林
+ * @version
+ * @since JDK 1.6
+ * @see
+ */
+public class ValueObjVo {
+
+    private Double value;
+    private String symbol;
+    private Integer symbolSize;
+    private Double symbolRotate;
+
+    public Double getValue() {
+        return value;
+    }
+
+    public void setValue(Double value) {
+        this.value = value;
+    }
+
+    public String getSymbol() {
+        return symbol;
+    }
+
+    public void setSymbol(String symbol) {
+        this.symbol = symbol;
+    }
+
+    public Integer getSymbolSize() {
+        return symbolSize;
+    }
+
+    public void setSymbolSize(Integer symbolSize) {
+        this.symbolSize = symbolSize;
+    }
+
+    public Double getSymbolRotate() {
+        return symbolRotate;
+    }
+
+    public void setSymbolRotate(Double symbolRotate) {
+        this.symbolRotate = symbolRotate;
+    }
+
+}

+ 60 - 1
src/main/java/com/gyee/frame/service/Brownoutsevent2Service.java

@@ -97,7 +97,7 @@ public class Brownoutsevent2Service implements BaseService<Brownoutsevent2, Brow
 	}
 
 
-	public PageInfo<Brownoutsevent2> getBrownoutsevent2List(Tablepar tablepar, String wtId, Date beginDate, Date endDate) {
+	public PageInfo<Brownoutsevent2> getBrownoutsevent2ListById(Tablepar tablepar, String wtId, Date beginDate, Date endDate) {
 
 		Brownoutsevent2Example example = new Brownoutsevent2Example();
 
@@ -137,4 +137,63 @@ public class Brownoutsevent2Service implements BaseService<Brownoutsevent2, Brow
 		return pageInfo;
 	}
 
+
+	public PageInfo<Brownoutsevent2> getBrownoutsevent2List(Tablepar tablepar, String wpId, Date beginDate, Date endDate) {
+
+		Brownoutsevent2Example example = new Brownoutsevent2Example();
+
+		if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
+		{
+			StringBuilder sb=new StringBuilder();
+			sb.append(" ").append(tablepar.getOrderByColumn());
+			if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
+			{
+				sb.append(" ").append(tablepar.getIsAsc());
+			}else
+			{
+				sb.append(" asc ");
+			}
+			example.setOrderByClause(String.valueOf(sb));
+		}else {
+			example.setOrderByClause("windturbineid ASC");
+		}
+
+
+		PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+
+		Brownoutsevent2Example.Criteria criteria = example.createCriteria();
+		if (StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+			criteria.andStoptimeGreaterThanOrEqualTo(beginDate).andStoptimeLessThan(endDate);
+		}
+
+		if (StringUtils.notEmp(wpId)) {
+			criteria.andWindpowerstationidEqualTo(wpId);
+		}
+
+		List<Brownoutsevent2> list = brownoutsevent2Mapper.selectByExample(example);
+
+		PageInfo<Brownoutsevent2> pageInfo = new PageInfo<Brownoutsevent2>(list);
+
+		return pageInfo;
+	}
+
+	public List<Brownoutsevent2> getBrownoutsevent2List(String mainId) {
+
+		Brownoutsevent2Example example = new Brownoutsevent2Example();
+
+
+		Brownoutsevent2Example.Criteria criteria = example.createCriteria();
+		if(StringUtils.notEmp(mainId))
+		{
+			criteria.andMainidEqualTo(mainId);
+		}
+		List<Brownoutsevent2> list = brownoutsevent2Mapper.selectByExample(example);
+
+
+
+		return list;
+	}
+
+
 }

+ 665 - 0
src/main/java/com/gyee/frame/service/FaultPlaybackService.java

@@ -0,0 +1,665 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.model.auto.WindTurbineTestingPointAi2;
+import com.gyee.frame.model.auto.WindTurbineTestingPointDi2;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.model.custom.PointVo;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@Service
+public class FaultPlaybackService  {
+
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+    @Resource
+    private WindTurbineTestingPointDiService windTurbineTestingPointDiService;
+
+
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+
+    private String SIMPLE_DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
+
+    public Map<String, Object> getDataValue(String wtId, String[] pointids, Date stopTime) throws Exception {
+
+        Map<String, Object> resultmap = new HashMap<>();
+
+        Map<String, Object> namemap = new HashMap<>();
+
+        Map<String, Object> timemap = new HashMap<>();
+
+        Map<String, Object> datamap = new HashMap<>();
+
+        SimpleDateFormat df = new SimpleDateFormat(SIMPLE_DATETIME_FORMAT);
+
+
+        String[][] points = new String[pointids.length][20];
+
+
+        Map<String, WindTurbineTestingPointDi2> dimap = queryWindTurbineTestingPointDisByWtId(wtId);
+
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(stopTime);
+        cal.set(Calendar.SECOND, 0);
+        cal.add(Calendar.MINUTE, -10);
+
+        Date beginDate = cal.getTime();
+        cal.add(Calendar.MINUTE, 12);
+        Date endDate = cal.getTime();
+
+        int length=36;//原来720
+        String[] datetime = new String[length];
+
+        for (int i = 0; i < pointids.length; i++) {
+
+
+                if (dimap.containsKey(pointids[i])) {
+
+                    WindTurbineTestingPointDi2 di = dimap.get(pointids[i]);
+                    String[] value = new String[length];
+                    if (null != di) {
+
+                        List<PointData> ails = realApiUtil.getHistoryDatasSnap(di.getId(), beginDate.getTime() / 1000, endDate.getTime() / 1000, (long)length, 20L);
+                        if(ails.size()==1){
+                            for(int i1=0;i1<length;i1++){
+                                ails.add(ails.get(0));
+                            }
+                        }
+                        if (!ails.isEmpty()) {
+                            for (int j = 0; j < length; j++) {
+                                cal.setTimeInMillis(ails.get(j).getPointTime() * 1000);
+                                SimpleDateFormat df1 =new SimpleDateFormat("yyyy-MM-dd HH-mm");
+
+                                datetime[j] = df1.format(cal.getTime());
+                                value[j] = String.valueOf(StringUtils.round(ails.get(j).getPointValueInDouble(), 2));
+                            }
+                        }
+                        namemap.put(pointids[i], di.getName());
+                        timemap.put("datetime", datetime);
+                        points[i]=value;
+                    }
+                }else
+                {
+                    WindTurbineTestingPointAi2 ai =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, pointids[i]);
+                    String[] value = new String[length];
+                    if (null != ai) {
+
+                        List<PointData> ails = realApiUtil.getHistoryDatasSnap(ai, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long)length, 20L);
+
+                        if (!ails.isEmpty()) {
+                            for (int j = 0; j < length; j++) {
+                                SimpleDateFormat df1 =new SimpleDateFormat("yyyy-MM-dd HH-mm");
+
+                                cal.setTimeInMillis(ails.get(j).getPointTime() * 1000);
+                                datetime[j] = df1.format(cal.getTime());
+                                value[j] = String.valueOf(StringUtils.round(ails.get(j).getPointValueInDouble(), 2));
+                            }
+                        }
+                        namemap.put(pointids[i], ai.getName());
+                        timemap.put("datetime", datetime);
+                        points[i]=value;
+                    }
+                }
+
+            datamap.put(pointids[i], points[i]);
+
+        }
+
+        resultmap.put("datas", datamap);
+        resultmap.put("datetime", timemap.get("datetime"));
+        resultmap.put("names", namemap);
+
+        return resultmap;
+    }
+    // AI001 机舱震动X方向
+    // AI002 机舱震动y方向
+    // AI003 机舱震动最大偏移值
+    // AI006 风速2
+    // AI008 风向1
+    // AI010 25秒风向
+    // AI011 60秒风向
+    // AI012 转速
+    // AI015 转速2
+    // AI016 转子位置
+    // AI018 主系统液压
+    // AI019 转子刹车系统液压
+    // AI024 60秒钟平均风速
+    // AI025 10分钟平均风速
+    // AI026 60s平均风向1
+    // AI027 60s平均风向2
+    // AI029 25s平均风向2
+    // AI030 10分钟平均桨距叶片位置
+    // AI031 10秒平均桨距叶片位置
+    // AI032 1秒平均桨距叶片位置
+    // AI034 偏航位置
+    // AI037 服务控制变桨位置设定值
+    // AI038 齿轮箱输入轴1温度
+    // AI039 齿轮箱输出轴2温度
+    // AI040 齿轮箱入口油温
+    // AI041 齿轮箱油温
+    // AI042 齿轮箱冷却水温度
+    // AI043 齿轮箱润滑油滤网入口压力
+    // AI044 齿轮箱润滑油滤网出口压力
+    // AI045 发电机U1绕组温度
+    // AI046 发电机U2绕组温度
+    // AI047 发电机V1绕组温度
+    // AI048 发电机V2绕组温度
+    // AI049 发电机W1绕组温度
+    // AI050 发电机W2绕组温度
+    // AI051 控制器桨距转速限值
+    // AI052 发电机轴承a温度
+    // AI054 发电机冷却风温度
+    // AI055 发电机滑环温度
+    // AI056 机舱外温度
+    // AI057 机舱温度
+    // AI058 绕组电压1
+    // AI059 绕组电压2
+    // AI060 绕组电压3
+    // AI061 绕组电流1
+    // AI062 绕组电流2
+    // AI063 绕组电流3
+    // AI064 发电量
+    // AI065 电网功率
+    // AI067 功率因数
+    // AI069 塔底柜温度
+    // AI070 塔顶柜温度
+    // AI071 叶轮侧主轴轴承温度
+    // AI072 齿轮箱侧主轴轴承温度
+    // AI086 叶片2位置
+    // AI087 叶片3位置
+    // AI088 变桨叶片1位置冗余值
+    // AI120 桨距角给定值
+    // AI121 控制器转矩设定值
+    // AI225 pitch_Atech_SG1_error_code_2
+    // AI227 pitch_Atech_SG2_error_code_1
+    // AI229 pitch_Atech_SG2_error_code_3
+    // AI234 塔底柜温度2
+    // AI235 塔底柜温度3
+    // AI113 电容器温度1
+    // AI114 电容器温度2
+    // AI115 电容器温度3
+    // AI237 电容器电压2
+    // AI238 电容器电压3
+    // AI240 变频器温度2
+    // AI241 变频器温度3
+    // AI243 电机温度2
+    // AI244 电机温度3
+    // AI246 供电电流2
+    // AI249 桨距角2
+    // AI250 桨距角3
+    // AI251 变桨目标位置1
+    // AI253 变桨目标位置3
+    // AI260 变桨1#电机电流
+    // AI261 变桨2#电机电流
+    // AI263 变桨1轮毂温度
+    // AI264 变桨2轮毂温度
+    // AI128 变频器电机转速
+    // AI130 变频器功率
+    // AI131 变频器无功功率
+    // AI132 变频器转矩设定值
+    // AI133 变频器发电机转矩
+    // AI135 无功功率设定值
+    // AI139 停泵压力
+    // AI140 主压力最低限
+    // AI141 转子刹车压力最低限
+    // AI142 系统压力最大限
+    // AI144 偏航角度限值
+    // DI013 维护开关动作
+    // DI020 转换器复位
+    // DI759 润滑反馈状态1
+    // DI764 变桨1紧急请求
+    // DI043 发电机条件满足
+    // DI051 控制停机
+    // DI060 禁止偏航
+    // DI075 启动空冷风扇1
+    // DI099 机舱柜急停
+    // DI101 复位安全系统
+    // DI113 右偏航动作
+    // DI178 LCL温度故障
+    // DI189 变流器状态类故障
+    // DI200 变流器DDCS通讯故障
+    // DI263 齿轮箱油温超限故障
+    // DI322 UPS使用故障
+    // DI326 通讯站点电压类故障
+    // DI350 风速仪传感器2故障
+    // DI352 风向标传感器2故障
+    // DI384 安全链总故障
+    // DI657 变桨桨叶1的95°限位开关动作
+    // DI661 变桨处于手动操作模式
+
+    public List<PointVo> queryPointVos(String wtId, int bjlx, int cdlx) {
+
+        List<PointVo> ls = new ArrayList<>();
+
+        if (StringUtils.notEmp(wtId)) {
+
+            if (bjlx == 0) {
+                List<WindTurbineTestingPointAi2> ails = queryWindTurbineTestingPointAis(wtId);
+
+                if ((cdlx == 0 || cdlx == 1) && !ails.isEmpty()) {
+                    for (WindTurbineTestingPointAi2 ai : ails) {
+                        PointVo vo = new PointVo();
+                        vo.setId(ai.getId());
+                        vo.setCode(ai.getCode());
+                        vo.setModelid(ai.getModelid());
+                        vo.setName(ai.getName());
+                        vo.setUniformcode(ai.getUniformcode());
+                        vo.setWindpowerstationid(ai.getWindpowerstationid());
+                        vo.setWindturbineid(ai.getWindturbineid());
+
+                        ls.add(vo);
+                    }
+                }
+
+                List<WindTurbineTestingPointDi2> dils = queryWindTurbineTestingPointDis(wtId);
+
+                if ((cdlx == 0 || cdlx == 2) && !dils.isEmpty()) {
+                    for (WindTurbineTestingPointDi2 di : dils) {
+                        PointVo vo = new PointVo();
+                        vo.setId(di.getId());
+                        vo.setCode(di.getCode());
+                        vo.setModelid(di.getModelid());
+                        vo.setName(di.getName());
+                        vo.setUniformcode(di.getUniformcode());
+                        vo.setWindpowerstationid(di.getWindpowerstationid());
+                        vo.setWindturbineid(di.getWindturbineid());
+
+                        ls.add(vo);
+                    }
+                }
+            } else {
+                List<WindTurbineTestingPointAi2> ails = queryWindTurbineTestingPointAisByPart(wtId, bjlx);
+                if ((cdlx == 0 || cdlx == 1) && !ails.isEmpty()) {
+                    for (WindTurbineTestingPointAi2 ai : ails) {
+                        PointVo vo = new PointVo();
+                        vo.setId(ai.getId());
+                        vo.setCode(ai.getCode());
+                        vo.setModelid(ai.getModelid());
+                        vo.setName(ai.getName());
+                        vo.setUniformcode(ai.getUniformcode());
+                        vo.setWindpowerstationid(ai.getWindpowerstationid());
+                        vo.setWindturbineid(ai.getWindturbineid());
+
+                        ls.add(vo);
+                    }
+                }
+
+                List<WindTurbineTestingPointDi2> dils = queryWindTurbineTestingPointDisByPart(wtId, bjlx);
+
+                if ((cdlx == 0 || cdlx == 2) && !dils.isEmpty()) {
+                    for (WindTurbineTestingPointDi2 di : dils) {
+                        PointVo vo = new PointVo();
+                        vo.setId(di.getId());
+                        vo.setCode(di.getCode());
+                        vo.setModelid(di.getModelid());
+                        vo.setName(di.getName());
+                        vo.setUniformcode(di.getUniformcode());
+                        vo.setWindpowerstationid(di.getWindpowerstationid());
+                        vo.setWindturbineid(di.getWindturbineid());
+
+                        ls.add(vo);
+                    }
+                }
+            }
+
+        }
+        return ls;
+    }
+
+    private List<WindTurbineTestingPointAi2> queryWindTurbineTestingPointAis(String wtId) {
+
+        List<WindTurbineTestingPointAi2> list = new ArrayList<>();
+
+        List<String> uids = new ArrayList<>();
+        uids.add("AI001");
+        uids.add("AI002");
+        uids.add("AI003");
+        uids.add("AI006");
+        uids.add("AI008");
+        uids.add("AI010");
+        uids.add("AI011");
+        uids.add("AI012");
+        uids.add("AI015");
+        uids.add("AI016");
+        uids.add("AI018");
+        uids.add("AI019");
+        uids.add("AI022");
+        uids.add("AI024");
+        uids.add("AI025");
+        uids.add("AI026");
+        uids.add("AI027");
+        uids.add("AI029");
+        uids.add("AI030");
+        uids.add("AI031");
+        uids.add("AI032");
+        uids.add("AI034");
+        uids.add("AI037");
+        uids.add("AI038");
+        uids.add("AI039");
+        uids.add("AI040");
+        uids.add("AI041");
+        uids.add("AI042");
+        uids.add("AI043");
+        uids.add("AI044");
+        uids.add("AI045");
+        uids.add("AI046");
+        uids.add("AI047");
+        uids.add("AI048");
+        uids.add("AI049");
+        uids.add("AI050");
+        uids.add("AI051");
+        uids.add("AI052");
+        uids.add("AI054");
+        uids.add("AI055");
+        uids.add("AI056");
+        uids.add("AI057");
+        uids.add("AI058");
+        uids.add("AI059");
+        uids.add("AI060");
+        uids.add("AI061");
+        uids.add("AI062");
+        uids.add("AI063");
+        uids.add("AI064");
+        uids.add("AI065");
+        uids.add("AI067");
+        uids.add("AI069");
+        uids.add("AI070");
+        uids.add("AI071");
+        uids.add("AI072");
+        uids.add("AI086");
+        uids.add("AI087");
+        uids.add("AI088");
+        uids.add("AI120");
+        uids.add("AI121");
+        uids.add("AI225");
+        uids.add("AI227");
+        uids.add("AI229");
+        uids.add("AI234");
+        uids.add("AI235");
+        uids.add("AI113");
+        uids.add("AI114");
+        uids.add("AI115");
+        uids.add("AI237");
+        uids.add("AI238");
+        uids.add("AI240");
+        uids.add("AI241");
+        uids.add("AI243");
+        uids.add("AI244");
+        uids.add("AI246");
+        uids.add("AI249");
+        uids.add("AI250");
+        uids.add("AI251");
+        uids.add("AI253");
+        uids.add("AI260");
+        uids.add("AI261");
+        uids.add("AI263");
+        uids.add("AI264");
+        uids.add("AI128");
+        uids.add("AI130");
+        uids.add("AI131");
+        uids.add("AI132");
+        uids.add("AI133");
+        uids.add("AI135");
+        uids.add("AI139");
+        uids.add("AI140");
+        uids.add("AI141");
+        uids.add("AI142");
+        uids.add("AI144");
+
+        if (StringUtils.notEmp(wtId)) {
+           for(String str:uids)
+           {
+               WindTurbineTestingPointAi2 ai =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, str);
+               if(StringUtils.notEmp(ai) && StringUtils.notEmp(ai.getId()))
+               {
+                   list.add(ai);
+               }
+           }
+        }
+        return list;
+    }
+
+    private List<WindTurbineTestingPointDi2> queryWindTurbineTestingPointDis(String wtId) {
+
+        List<WindTurbineTestingPointDi2> list = new ArrayList<>();
+
+        List<String> uids = new ArrayList<>();
+        uids.add("DI013");
+        uids.add("DI020");
+        uids.add("DI759");
+        uids.add("DI764");
+        uids.add("DI043");
+        uids.add("DI051");
+        uids.add("DI060");
+        uids.add("DI075");
+        uids.add("DI099");
+        uids.add("DI101");
+        uids.add("DI113");
+        uids.add("DI178");
+        uids.add("DI189");
+        uids.add("DI200");
+        uids.add("DI263");
+        uids.add("DI322");
+        uids.add("DI326");
+        uids.add("DI350");
+        uids.add("DI352");
+        uids.add("DI384");
+        uids.add("DI657");
+        uids.add("DI661");
+
+        if (StringUtils.notEmp(wtId)) {
+
+            list = windTurbineTestingPointDiService.getWindTurbineTestingPointDi2List(wtId,uids);
+        }
+        return list;
+    }
+
+    private List<WindTurbineTestingPointAi2> queryWindTurbineTestingPointAisByPart(String wtId, int bjlx) {
+
+        List<WindTurbineTestingPointAi2> list = new ArrayList<>();
+
+        if (StringUtils.notEmp(wtId)) {
+
+            List<String> codels = new ArrayList<String>();
+
+            codels.add(Constant.TPOINT_WT_FJSSFS);// 风速
+            codels.add(Constant.TPOINT_WT_60FX);// 60秒风向
+            codels.add(Constant.TPOINT_WT_60PJFS);// 风机60秒平均风速
+
+            switch (bjlx) {
+                case 3:// 变桨
+                    codels.add(Constant.TPOINT_WT_1MPJJJY);// 1秒平均桨距叶片位置
+                    codels.add(Constant.TPOINT_WT_PHWZ);// 偏航位置
+                    codels.add(Constant.TPOINT_WT_BJLGWD1);// 变桨1轮毂温度
+                    codels.add(Constant.TPOINT_WT_BJLGWD2);// 变桨2轮毂温度
+                    codels.add(Constant.TPOINT_WT_BJLGWD3);// 变桨3轮毂温度
+                    codels.add(Constant.TPOINT_WT_BPQDJZS);// 变频器电机转速
+                    codels.add(Constant.TPOINT_WT_BPQGL);// 变频器功率
+                    codels.add(Constant.TPOINT_WT_BPQWGGL);// 变频器无功功率
+                    break;
+                case 1:// 齿轮箱
+                    codels.add(Constant.TPOINT_WT_DWZWD);// 齿轮箱轴1温度
+                    codels.add(Constant.TPOINT_WT_GWZWD);// 齿轮箱轴2温度
+                    codels.add(Constant.TPOINT_WT_CLXRKYW);// 齿轮箱入口油温
+                    codels.add(Constant.TPOINT_WT_CLXWD);// 齿轮箱油温
+                    codels.add(Constant.TPOINT_WT_CLXRHYLW);// 齿轮箱润滑油滤网出口压力
+                    codels.add(Constant.TPOINT_WT_YLCZZWD);// 叶轮侧主轴轴承温度
+                    codels.add(Constant.TPOINT_WT_CLXCZZWD);// 齿轮箱侧主轴轴承温度
+                    break;
+                case 2:// 发电机
+                    codels.add(Constant.TPOINT_WT_U1YZWD);// 发电机U1绕组温度
+                    codels.add(Constant.TPOINT_WT_U2YZWD);// 发电机U2绕组温度
+                    codels.add(Constant.TPOINT_WT_V1YZWD);// 发电机V1绕组温度
+                    codels.add(Constant.TPOINT_WT_V2YZWD);// 发电机V2绕组温度
+                    codels.add(Constant.TPOINT_WT_W1YZWD);// 发电机W1绕组温度
+                    codels.add(Constant.TPOINT_WT_W2YZWD);// 发电机W2绕组温度
+                    codels.add(Constant.TPOINT_WT_FDJZCAWD);// 发电机轴承A温度
+                    codels.add(Constant.TPOINT_WT_FDJZCBWD);// 发电机轴承B温度
+                    codels.add(Constant.TPOINT_WT_JCWWD);// 机舱外温度
+                    codels.add(Constant.TPOINT_WT_JCWD);// 机舱温度
+                    codels.add(Constant.TPOINT_WT_U1YZDY);// 绕组电压1
+                    codels.add(Constant.TPOINT_WT_U2YZDY);// 绕组电压2
+                    codels.add(Constant.TPOINT_WT_U3YZDY);// 绕组电压3
+                    codels.add(Constant.TPOINT_WT_U1YZDL);// 绕组电流1
+                    codels.add(Constant.TPOINT_WT_U2YZDL);// 绕组电流2
+                    codels.add(Constant.TPOINT_WT_U3YZDL);// 绕组电流3
+                    codels.add(Constant.TPOINT_WT_DWGL);// 电网功率
+                    codels.add(Constant.TPOINT_WT_DWWGGL);// 电网无功功率
+                    codels.add(Constant.TPOINT_WT_GLYS);// 功率因数
+                    codels.add(Constant.TPOINT_WT_DRQWD1);// 电容器温度1
+                    codels.add(Constant.TPOINT_WT_DRQWD2);// 电容器温度2
+                    codels.add(Constant.TPOINT_WT_DRQWD3);// 电容器温度3
+                    codels.add(Constant.TPOINT_WT_BLQWD);// 变桨变流器温度
+                    codels.add(Constant.TPOINT_WT_BLQWD2);// 变频器温度2
+                    codels.add(Constant.TPOINT_WT_BLQWD3);// 变频器温度3
+                    codels.add(Constant.TPOINT_WT_DJWD);// 伺服电机温度
+                    codels.add(Constant.TPOINT_WT_DJWD2);// 电机温度2
+                    codels.add(Constant.TPOINT_WT_DJWD3);// 电机温度3
+                    break;
+                default:
+                    break;
+            }
+
+            if (StringUtils.notEmp(wtId)) {
+                for(String str:codels)
+                {
+                    WindTurbineTestingPointAi2 ai =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, str);
+                    if(StringUtils.notEmp(ai) && StringUtils.notEmp(ai.getId()))
+                    {
+                        list.add(ai);
+                    }
+                }
+            }
+        }
+        return list;
+    }
+
+    private List<WindTurbineTestingPointDi2> queryWindTurbineTestingPointDisByPart(String wtId, int bjlx) {
+
+        List<WindTurbineTestingPointDi2> list = new ArrayList<>();
+
+        if (StringUtils.notEmp(wtId)) {
+
+            List<String> codels = new ArrayList<String>();
+
+            switch (bjlx) {
+                case 1:// 变桨
+                    codels.add("DI605");// 变桨超级电容类故障
+                    codels.add("DI606");// 变桨超级电容电压高故障
+                    codels.add("DI607");// 变桨桨叶1超级电容电压高故障
+                    codels.add("DI608");// 变桨桨叶2超级电容电压高故障
+                    codels.add("DI609");// 变桨桨叶3超级电容电压高故障
+                    codels.add("DI610");// 变桨超级电容电压低故障
+                    codels.add("DI611");// 变桨桨叶1超级电容电压低故障
+                    codels.add("DI612");// 变桨桨叶2超级电容电压低故障
+                    codels.add("DI613");// 变桨桨叶3超级电容电压低故障
+                    codels.add("DI614");// 变桨超级电容温度高故障
+                    codels.add("DI615");// 变桨桨叶1超级电容温度高故障
+                    codels.add("DI616");// 变桨桨叶2超级电容温度高故障
+                    codels.add("DI617");// 变桨桨叶3超级电容温度高故障
+                    codels.add("DI630");// 变桨温度类故障
+                    codels.add("DI631");// 变桨轴箱温度低故障
+                    codels.add("DI632");// 变桨桨叶1轴箱温度低故障
+                    codels.add("DI633");// 变桨桨叶2轴箱温度低故障
+                    codels.add("DI634");// 变桨桨叶3轴箱温度低故障
+                    codels.add("DI635");// 变桨轴箱温度高故障
+                    codels.add("DI636");// 变桨桨叶1轴箱温度高故障
+                    codels.add("DI637");// 变桨桨叶2轴箱温度高故障
+                    codels.add("DI638");// 变桨桨叶3轴箱温度高故障
+                    codels.add("DI639");// 变桨电机类故障
+                    codels.add("DI640");// 变桨电机温度高故障
+                    codels.add("DI641");// 变桨桨叶1电机温度高故障
+                    codels.add("DI642");// 变桨桨叶2电机温度高故障
+                    codels.add("DI643");// 变桨桨叶3电机温度高故障
+                    break;
+                case 2:// 齿轮箱
+                    codels.add("DI261");// 齿轮箱输入轴1温度故障
+                    codels.add("DI262");// 齿轮箱输出轴2温度故障
+                    codels.add("DI263");// 齿轮箱油温超限故障
+                    codels.add("DI264");// 齿轮箱入口油温超限故障
+                    codels.add("DI265");// 齿轮箱冷却水温度超限故障
+                    codels.add("DI266");// 齿轮箱冷却水压力故障
+                    codels.add("DI270");// 齿轮箱入口和出口油压压差故障
+                    break;
+                case 3:// 发电机
+                    codels.add("DI143");// INU类故障
+                    codels.add("DI144");// 变流器类总故障
+                    codels.add("DI145");// 转子侧变流器故障
+                    codels.add("DI146");// 转子侧变流器电压故障
+                    codels.add("DI147");// 转子侧变流器电流故障
+                    codels.add("DI148");// 转子侧变流器温度故障
+                    codels.add("DI149");// 其它转子侧变流器故障
+                    codels.add("DI150");// INU过温故障
+                    codels.add("DI151");// INU接地故障
+                    codels.add("DI152");// INU启动故障
+                    codels.add("DI153");// INU其它故障
+                    codels.add("DI154");// ISU类故障
+                    codels.add("DI155");// 网侧变流器故障
+                    codels.add("DI156");// 网侧变流器电压故障
+                    codels.add("DI157");// 网侧变流器电流故障
+                    codels.add("DI158");// 网侧变流器温度故障
+                    codels.add("DI159");// 其它网侧变流器故障
+                    codels.add("DI160");// ISU过流
+                    codels.add("DI161");// ISU过温
+                    codels.add("DI166");// 变流器监视类故障
+                    codels.add("DI167");// 线电压过压
+                    codels.add("DI168");// 线电压欠压
+                    codels.add("DI169");// 线电压超频
+                    codels.add("DI170");// 线电压欠频
+                    codels.add("DI171");// 直流母线过压
+                    codels.add("DI172");// 直流母线欠压
+                    codels.add("DI173");// 定子过流
+                    codels.add("DI174");// 转子过流
+                    // codels.add("DI236");//发电机类总故障
+                    codels.add("DI237");// 发电机绕组温度超限类故障
+                    codels.add("DI238");// 发电机U1绕组温度超限故障
+                    codels.add("DI239");// 发电机U2绕组温度超限故障
+                    codels.add("DI240");// 发电机V1绕组温度超限故障
+                    codels.add("DI241");// 发电机V2绕组温度超限故障
+                    codels.add("DI242");// 发电机W1绕组温度超限故障
+                    codels.add("DI243");// 发电机W2绕组温度超限故障
+                    codels.add("DI244");// 发电机轴承类温度超限故障
+                    codels.add("DI245");// 发电机轴承a温度超限故障
+                    codels.add("DI246");// 发电机轴承b温度超限故障
+                    codels.add("DI255");// 发电机过压故障
+                    break;
+                default:
+                    break;
+            }
+
+            if (StringUtils.notEmp(wtId)) {
+
+                list = windTurbineTestingPointDiService.getWindTurbineTestingPointDi2List(wtId,codels);
+            }
+        }
+        return list;
+    }
+
+    private Map<String, WindTurbineTestingPointDi2> queryWindTurbineTestingPointDisByWtId(String wtId) {
+
+        Map<String, WindTurbineTestingPointDi2> map = new HashMap<String, WindTurbineTestingPointDi2>();
+        List<WindTurbineTestingPointDi2> list = new ArrayList<>();
+
+        if (StringUtils.notEmp(wtId)) {
+
+
+            list = windTurbineTestingPointDiService.getWindTurbineTestingPointDi2List(wtId);
+
+            if(!list.isEmpty())
+            {
+                for(WindTurbineTestingPointDi2 di:list)
+                {
+                    map.put(di.getUniformcode(), di);
+                }
+            }
+        }
+        return map;
+    }
+}

+ 184 - 0
src/main/java/com/gyee/frame/service/MainBrownouts2Service.java

@@ -0,0 +1,184 @@
+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.MainBrownouts2Mapper;
+import com.gyee.frame.model.auto.Brownoutsevent2;
+import com.gyee.frame.model.auto.MainBrownouts2;
+import com.gyee.frame.model.auto.MainBrownouts2Example;
+import com.gyee.frame.model.custom.MainBrownoutsVo;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+
+@Service
+public class MainBrownouts2Service implements BaseService<MainBrownouts2, MainBrownouts2Example> {
+	@Resource
+	private MainBrownouts2Mapper mainBrownouts2Mapper;
+	@Resource
+	private Brownoutsevent2Service brownoutsevent2Service;
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			MainBrownouts2Example example=new MainBrownouts2Example();
+			example.createCriteria().andIdIn(lista);
+			return mainBrownouts2Mapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public MainBrownouts2 selectByPrimaryKey(String id) {
+				
+			return mainBrownouts2Mapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(MainBrownouts2 record) {
+		return mainBrownouts2Mapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(MainBrownouts2 record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return mainBrownouts2Mapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(MainBrownouts2 record, MainBrownouts2Example example) {
+		
+		return mainBrownouts2Mapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(MainBrownouts2 record, MainBrownouts2Example example) {
+		
+		return mainBrownouts2Mapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<MainBrownouts2> selectByExample(MainBrownouts2Example example) {
+		
+		return mainBrownouts2Mapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(MainBrownouts2Example example) {
+		
+		return mainBrownouts2Mapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(MainBrownouts2Example example) {
+		
+		return mainBrownouts2Mapper.deleteByExample(example);
+	}
+
+
+
+	public PageInfo<MainBrownoutsVo> getMainBrownouts2(Tablepar tablepar, String wpId, Date beginDate, Date endDate)  {
+
+		PageInfo<MainBrownoutsVo> pageInfo=new PageInfo<>();
+		List<MainBrownouts2> list =new ArrayList<>();
+		MainBrownouts2Example example=new MainBrownouts2Example();
+		String order =null;
+		if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
+		{
+			StringBuilder sb=new StringBuilder();
+			sb.append(" ").append(tablepar.getOrderByColumn());
+			if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
+			{
+				sb.append(" ").append(tablepar.getIsAsc());
+			}else
+			{
+				sb.append(" asc ");
+			}
+			order=String.valueOf(sb);
+		}else {
+			order=" stoptime desc";
+		}
+
+		MainBrownouts2Example.Criteria criteria =example.createCriteria();
+
+		if(StringUtils.isNotEmpty(wpId))
+		{
+			criteria.andWindpowerstationidEqualTo(wpId);
+		}
+
+		criteria.andStoptimeGreaterThanOrEqualTo(beginDate).andStoptimeLessThanOrEqualTo(endDate);
+
+
+		PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+		list= mainBrownouts2Mapper.selectByExample(example);
+		List<MainBrownoutsVo> sdelist=new ArrayList<>();
+
+
+		if(null!=list && !list.isEmpty())
+		{
+			for(MainBrownouts2 sde:list)
+			{
+				MainBrownoutsVo event = new MainBrownoutsVo();
+				event.setId(sde.getId());
+				event.setWindPowerStationId(sde.getWindpowerstationid());
+				event.setWpName(InitialRunner.wpmap.get(sde.getWindpowerstationid()).getName());
+				event.setStartTime(sde.getStarttime());
+				event.setStopTime(sde.getStoptime());
+				event.setStopHours(sde.getStophours());
+				event.setStopTypeId(sde.getStoptypeid());
+				event.setDescription(sde.getDescription());
+				event.setLossPower(sde.getLosspower());
+				List<Brownoutsevent2>  bwls=brownoutsevent2Service.getBrownoutsevent2List(sde.getId());
+				if(!bwls.isEmpty())
+				{
+					StringBuilder sb=new StringBuilder();
+					for(Brownoutsevent2 bw:bwls)
+					{
+						sb.append(bw.getWindturbineid()).append(",");
+					}
+
+					String wts=String.valueOf(sb);
+
+					event.setWts(wts.substring(0,wts.length()-1));
+				}
+
+				sdelist.add(event);
+			}
+
+			pageInfo = new PageInfo<MainBrownoutsVo>(sdelist);
+
+		}
+		return pageInfo;
+
+	}
+
+
+
+
+}

+ 0 - 65
src/main/java/com/gyee/frame/service/QiNiuCloudService.java

@@ -1,65 +0,0 @@
-package com.gyee.frame.service;
-
-import com.gyee.frame.common.domain.AjaxResult;
-import com.google.gson.Gson;
-import com.qiniu.http.Response;
-import com.qiniu.storage.Configuration;
-import com.qiniu.storage.Region;
-import com.qiniu.storage.UploadManager;
-import com.qiniu.storage.model.DefaultPutRet;
-import com.qiniu.util.Auth;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-import java.io.IOException;
-import java.util.UUID;
-
-/**
- * 七牛Service
- * @Author QQ1057718016
- * @Data 2019/11/13
- * @Version 1.0
- **/
-@Service
-public class QiNiuCloudService {
-
-    @Value("${oss.qiniu.accessKey}")
-    private String accessKey;
-
-    @Value("${oss.qiniu.bucket}")
-    private String bucket;
-
-    @Value("${oss.qiniu.secretKey}")
-    private String secretKey;
-
-    @Value("${oss.qiniu.domain}")
-    private String domain;
-
-    public AjaxResult uploadToQiNiu(MultipartFile uploadFile) throws IOException {
-
-        //构造一个带指定 Region 对象的配置类
-        Configuration cfg = new Configuration(Region.huanan());
-        //文件上传管理器
-        UploadManager uploadManager = new UploadManager(cfg);
-        //生成上传凭证,然后准备上传
-        Auth auth = Auth.create(accessKey, secretKey);
-        String upToken = auth.uploadToken(bucket);
-        //给图片重新设定名字
-        String fileName = uploadFile.getOriginalFilename();
-        String suffix = fileName.substring(fileName.lastIndexOf("."));
-        String uuid = UUID.randomUUID().toString().toUpperCase().replace("-", "");
-        fileName = uuid + suffix;
-        //默认不指定key的情况下,以文件内容的hash值作为文件名
-        Response response = uploadManager.put(uploadFile.getBytes(), fileName, upToken);
-        //解析上传成功的结果
-        DefaultPutRet putRet = new Gson().fromJson(response.bodyString(), DefaultPutRet.class);
-        // System.out.println(putRet.key);
-        //System.out.println(putRet.hash);
-        //成功 返回url name
-        
-        return  AjaxResult.success()
-                .put("url", domain + "/" + putRet.key)
-                .put("name", putRet.key);
-        
-    }
-}

+ 80 - 0
src/main/java/com/gyee/frame/service/ShutdowneventService.java

@@ -9,6 +9,7 @@ import com.gyee.frame.mapper.auto.ShutdowneventMapper;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.ShutdowneventVo;
 import com.gyee.frame.model.custom.SimpleVo;
+import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.util.SnowflakeIdWorker;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Service;
@@ -380,4 +381,83 @@ public class ShutdowneventService implements BaseService<Shutdownevent, Shutdown
 		return list;
 
 	}
+
+	public PageInfo<ShutdowneventVo> getShutdownevent(Tablepar tablepar,String wpId,String wtId, Date beginDate, Date endDate,String type)  {
+
+		PageInfo<ShutdowneventVo> pageInfo=new PageInfo<>();
+		List<Shutdownevent> list =new ArrayList<>();
+		ShutdowneventExample example=new ShutdowneventExample();
+		String order =null;
+		if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
+		{
+			StringBuilder sb=new StringBuilder();
+			sb.append(" ").append(tablepar.getOrderByColumn());
+			if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
+			{
+				sb.append(" ").append(tablepar.getIsAsc());
+			}else
+			{
+				sb.append(" asc ");
+			}
+			order=String.valueOf(sb);
+		}else {
+			order=" stoptime desc";
+		}
+
+		ShutdowneventExample.Criteria criteria =example.createCriteria();
+
+		if(StringUtils.isNotEmpty(wpId))
+		{
+			criteria.andWindpowerstationidEqualTo(wpId);
+		}
+		if(StringUtils.isNotEmpty(wtId))
+		{
+			criteria.andWindturbineidEqualTo(wtId);
+		}
+
+		if(StringUtils.isNotEmpty(type))
+		{
+			criteria.andStatuscodeEqualTo(Integer.valueOf(type));
+		}
+		criteria.andStoptimeGreaterThanOrEqualTo(beginDate).andStoptimeLessThanOrEqualTo(endDate);
+
+
+		PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+		list= shutdowneventMapper.selectByExample(example);
+		List<ShutdowneventVo> sdelist=new ArrayList<>();
+
+
+		if(null!=list && !list.isEmpty())
+		{
+			for(Shutdownevent sde:list)
+			{
+				ShutdowneventVo event = new ShutdowneventVo();
+				event.setId(sde.getId());
+
+				event.setWindPowerStationId(sde.getWindpowerstationid());
+				event.setWpName(InitialRunner.wpmap.get(sde.getWindpowerstationid()).getName());
+				event.setWindTurbineId(sde.getWindturbineid());
+				event.setWtName(InitialRunner.wtmap.get(sde.getWindturbineid()).getCode());
+				event.setWarningId(sde.getWarningid());
+
+				if(InitialRunner.stoptypemap.containsKey(sde.getStoptypeid()))
+				{
+					Stoptype stoptype=InitialRunner.stoptypemap.get(sde.getStoptypeid());
+					event.setWarnDesc(stoptype.getName());
+				}
+				event.setStartTime(sde.getStarttime());
+				event.setStopTime(sde.getStoptime());
+				event.setStopHours(sde.getStophours());
+				event.setStopTypeId(sde.getStoptypeid());
+				event.setStatusCode(sde.getStatuscode());
+				sdelist.add(event);
+			}
+
+			pageInfo = new PageInfo<ShutdowneventVo>(sdelist);
+
+		}
+		return pageInfo;
+
+	}
+
 }

+ 113 - 0
src/main/java/com/gyee/frame/service/TaosMapService.java

@@ -0,0 +1,113 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.TaosMapMapper;
+import com.gyee.frame.model.auto.TaosMap;
+import com.gyee.frame.model.auto.TaosMapExample;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 线路 TaosMapService
+ * @Title: TaosMapService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class TaosMapService implements BaseService<TaosMap, TaosMapExample> {
+	@Resource
+	private TaosMapMapper taosMapMapper;
+	
+      	   	      	      	      	      	      	      	      	      	      	
+	
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<Integer> lista=Convert.toIntArrayList(ids);
+			TaosMapExample example=new TaosMapExample();
+			example.createCriteria().andIdIn(lista);
+			return taosMapMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public TaosMap selectByPrimaryKey(String id) {
+				
+			return taosMapMapper.selectByPrimaryKey(Integer.valueOf(id));
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(TaosMap record) {
+		return taosMapMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(TaosMap record) {
+				
+
+				
+		return taosMapMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(TaosMap record, TaosMapExample example) {
+		
+		return taosMapMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(TaosMap record, TaosMapExample example) {
+		
+		return taosMapMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<TaosMap> selectByExample(TaosMapExample example) {
+		
+		return taosMapMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(TaosMapExample example) {
+		
+		return taosMapMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(TaosMapExample example) {
+		
+		return taosMapMapper.deleteByExample(example);
+	}
+
+	public List<TaosMap> findTaosMap() {
+
+		TaosMapExample example=new TaosMapExample();
+		example.setOrderByClause(" id ");
+
+		TaosMapExample.Criteria criteria =example.createCriteria();
+
+
+		List<TaosMap> list= taosMapMapper.selectByExample(example);
+		return list;
+
+	}
+
+}

+ 7 - 4
src/main/java/com/gyee/frame/service/WarningInfoDayService.java

@@ -9,10 +9,11 @@ import com.gyee.frame.mapper.auto.WarningInfoDayMapper;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.SawVo;
 import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
-import javax.annotation.Resource;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.*;
@@ -116,7 +117,7 @@ public class WarningInfoDayService implements BaseService<WarningInfoDay, Warnin
 			order=" frequencyday desc";
 		}
 		PageHelper.startPage(0, 10);
-		list =warningInfoDayMapper.getWarningInfoDayByWarningid(beginDate, endDate,order);
+		list =warningInfoDayMapper.getWarningInfoDayByWarningid(DateUtils.formatDateTime(beginDate),DateUtils.formatDateTime(endDate) ,order);
 		PageInfo<SawVo> pageInfo = new PageInfo<SawVo>(list);
 		return list;
 
@@ -143,7 +144,7 @@ public class WarningInfoDayService implements BaseService<WarningInfoDay, Warnin
 			order=" frequencyday desc";
 		}
 		PageHelper.startPage(0, 10);
-		list =warningInfoDayMapper.getWarningInfoDayByWarningClassify(beginDate, endDate,order);
+		list =warningInfoDayMapper.getWarningInfoDayByWarningClassify(DateUtils.formatDateTime(beginDate),DateUtils.formatDateTime(endDate),order);
 		PageInfo<SawVo> pageInfo = new PageInfo<SawVo>(list);
 		return list;
 
@@ -267,7 +268,7 @@ public class WarningInfoDayService implements BaseService<WarningInfoDay, Warnin
 			order=" frequencyday desc";
 		}
 		PageHelper.startPage(0, 10);
-		list =warningInfoDayMapper.getWarningInfoDayByManufacturer(beginDate, endDate,order);
+		list =warningInfoDayMapper.getWarningInfoDayByManufacturer(DateUtils.formatDateTime(beginDate),DateUtils.formatDateTime(endDate),order);
 		PageInfo<SawVo> pageInfo = new PageInfo<SawVo>(list);
 		return list;
 
@@ -592,4 +593,6 @@ public class WarningInfoDayService implements BaseService<WarningInfoDay, Warnin
 		return list;
 
 	}
+
+
 }

+ 17 - 0
src/main/java/com/gyee/frame/service/WindTurbineTestingPointDiService.java

@@ -174,5 +174,22 @@ public class WindTurbineTestingPointDiService implements BaseService<WindTurbine
 		return list;
 	}
 
+	public List<WindTurbineTestingPointDi2> getWindTurbineTestingPointDi2List(String wtId)  {
 
+		List<WindTurbineTestingPointDi2> list=new ArrayList<>();
+
+
+		if(StringUtils.notEmp(wtId))
+		{
+			WindTurbineTestingPointDi2Example example=new WindTurbineTestingPointDi2Example();
+			example.setOrderByClause("id ASC");
+			example.isDistinct();
+			WindTurbineTestingPointDi2Example.Criteria criteria =example.createCriteria();
+			criteria.andWindturbineidEqualTo(wtId);
+			list= windTurbineTestingPointDi2Mapper.selectByExample(example);
+
+		}
+
+		return list;
+	}
 }

+ 107 - 0
src/main/java/com/gyee/frame/service/WindTurbineTestingPointaiyjService.java

@@ -0,0 +1,107 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.WindTurbineTestingPointaiyjMapper;
+import com.gyee.frame.model.auto.WindTurbineTestingPointaiyj;
+import com.gyee.frame.model.auto.WindTurbineTestingPointaiyjExample;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+
+@Service
+public class WindTurbineTestingPointaiyjService implements BaseService<WindTurbineTestingPointaiyj, WindTurbineTestingPointaiyjExample> {
+	@Resource
+	private WindTurbineTestingPointaiyjMapper windTurbineTestingPointaiyjMapper;
+
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			WindTurbineTestingPointaiyjExample example=new WindTurbineTestingPointaiyjExample();
+			example.createCriteria().andIdIn(lista);
+			return windTurbineTestingPointaiyjMapper.deleteByExample(example);
+			
+				
+	}
+
+	@Override
+	public WindTurbineTestingPointaiyj selectByPrimaryKey(String id) {
+		return null;
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(WindTurbineTestingPointaiyj record) {
+		return 0;
+	}
+
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(WindTurbineTestingPointaiyj record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return windTurbineTestingPointaiyjMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(WindTurbineTestingPointaiyj record, WindTurbineTestingPointaiyjExample example) {
+		
+		return windTurbineTestingPointaiyjMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(WindTurbineTestingPointaiyj record, WindTurbineTestingPointaiyjExample example) {
+		
+		return windTurbineTestingPointaiyjMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<WindTurbineTestingPointaiyj> selectByExample(WindTurbineTestingPointaiyjExample example) {
+		
+		return windTurbineTestingPointaiyjMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WindTurbineTestingPointaiyjExample example) {
+		
+		return windTurbineTestingPointaiyjMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WindTurbineTestingPointaiyjExample example) {
+		
+		return windTurbineTestingPointaiyjMapper.deleteByExample(example);
+	}
+
+
+
+	public List<WindTurbineTestingPointaiyj> findAll()  {
+
+
+		List<WindTurbineTestingPointaiyj> list =new ArrayList<>();
+		WindTurbineTestingPointaiyjExample example=new WindTurbineTestingPointaiyjExample();
+
+		list= windTurbineTestingPointaiyjMapper.selectByExample(example);
+
+		return list;
+
+	}
+
+
+
+
+}

+ 71 - 0
src/main/java/com/gyee/frame/service/WinddirectionService.java

@@ -0,0 +1,71 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.mapper.auto.WindTurbineTestingPointaiyjMapper;
+import com.gyee.frame.model.auto.WindPowerStationTestingPoint2;
+import com.gyee.frame.model.custom.DataVo;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.model.custom.ValueObjVo;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+
+@Service
+public class WinddirectionService {
+	@Resource
+	private WindTurbineTestingPointaiyjMapper windTurbineTestingPointaiyjMapper;
+
+	IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+	@Resource
+	private WindPowerstationTestingPointService windPowerstationTestingPointService;
+
+	public List<DataVo>  winddirectionAjax(String wpId,Date recorddate) throws Exception {
+		List<DataVo> vos = new ArrayList<DataVo>();
+
+		if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate)) {
+
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+			SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+			SimpleDateFormat sfs = new SimpleDateFormat("HH时");
+			Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(recorddate, 1)) + " 00:00:00");
+			Date beginDate = sdfs.parse(sdf.format(recorddate) + " 00:00:00");
+
+			WindPowerStationTestingPoint2 fspoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.FCCFTFS70);
+			WindPowerStationTestingPoint2 fxpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.FCCFTFX70);
+
+			List<PointData> fxls = realApiUtil.getHistoryDatasSnap(fxpoint, beginDate.getTime() / 1000, endDate.getTime() / 1000, 24l, 3600L);
+			List<PointData> fsls = realApiUtil.getHistoryDatasSnap(fspoint, beginDate.getTime() / 1000, endDate.getTime() / 1000, 24l, 3600L);
+
+
+			if (!fsls.isEmpty()) {
+				for (int i = 0; i < fsls.size(); i++) {
+					DataVo vo = new DataVo();
+
+					Date date = new Date(fsls.get(i).getPointTime() * 1000);
+					vo.setTimestr(sfs.format(date));
+					ValueObjVo voobj = new ValueObjVo();
+					voobj.setValue(StringUtils.round(fsls.get(i).getPointValueInDouble(), 2));
+					voobj.setSymbol("arrow");
+					voobj.setSymbolSize(20);
+					voobj.setSymbolRotate(StringUtils.round(fxls.get(i).getPointValueInDouble(), 2));
+
+					vo.setValueObjVo(voobj);
+					vos.add(vo);
+				}
+			}
+		}
+		return vos;
+	}
+
+
+
+}

+ 2 - 2
src/main/java/com/gyee/frame/service/goodness/WindturbinegoodnessService.java

@@ -14,8 +14,8 @@ import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -38,7 +38,7 @@ public class WindturbinegoodnessService {
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
     public PageInfo<Windturbinegoodness> windturbinegoodnessList(Tablepar tablepar, String wpId, String recorddate) {
 

+ 2 - 6
src/main/java/com/gyee/frame/service/health/HealthMainService.java

@@ -6,11 +6,7 @@ import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.*;
 import com.gyee.frame.service.*;
 import com.gyee.frame.service.weather.WeatherService;
-import com.gyee.frame.util.DateUtils;
-import com.gyee.frame.util.IRealTimeDataBaseUtil;
-import com.gyee.frame.util.MathUtil;
-import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
+import com.gyee.frame.util.*;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -39,7 +35,7 @@ public class HealthMainService {
     private final double NUM = 3.6;
     private final double XZNUM = 1.25;
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> findHealthMatrix() throws Exception {

+ 2 - 2
src/main/java/com/gyee/frame/service/health/HealthOperationService.java

@@ -8,7 +8,7 @@ import com.gyee.frame.model.auto.Windpowerstation;
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.service.*;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
-import com.gyee.frame.util.golden.EdosUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -34,7 +34,7 @@ public class HealthOperationService {
     private final int digit = 2;
     private final double NUM = 3.6;
     private final double XZNUM = 1.25;
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
     /**
      * 获得全省各种状态数量

+ 737 - 7
src/main/java/com/gyee/frame/service/health/HealthSubService.java

@@ -5,11 +5,7 @@ import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.*;
 import com.gyee.frame.service.*;
-import com.gyee.frame.util.DateUtils;
-import com.gyee.frame.util.IRealTimeDataBaseUtil;
-import com.gyee.frame.util.MathUtil;
-import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
+import com.gyee.frame.util.*;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -48,7 +44,7 @@ public class HealthSubService {
     private final int digit = 2;
     private final double NUM = 3.6;
     private final double XZNUM = 1.25;
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
     /*********************************************风机明细页面******************************************************/
 
     /**
@@ -787,7 +783,7 @@ public class HealthSubService {
         zzstrs[1] = "液压";
         phstrs[1] = "偏航";
         jcstrs[1] = "机舱";
-        bpqstrs[1] ="变";
+        bpqstrs[1] ="变频器";
 
 
         if (StringUtils.notEmp(wtId)) {
@@ -1229,4 +1225,738 @@ public class HealthSubService {
 
         return mapstatus;
     }
+
+
+
+
+    /************************************************************风机健康状态列表***********************************************************************/
+    public ActivityVo getWTChart(String wtId) throws Exception {
+        ActivityVo vo = new ActivityVo();
+        List<DatasetsVo> datasets = new ArrayList<DatasetsVo>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date currentDate = DateUtils.now();
+        Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(currentDate, 1)) + " 00:00:00");
+        Date beginDate = sdfs.parse(sdf.format(currentDate) + " 00:00:00");
+
+
+
+
+
+        WindTurbineTestingPointAi2 clx = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.CLXJKZT);
+        WindTurbineTestingPointAi2 fdj = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.FDJJKZT);
+        WindTurbineTestingPointAi2 bj = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.BJJKZT);
+        WindTurbineTestingPointAi2 zk = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, Constant.ZKJKZT);
+
+
+        if (null != clx) {
+            List<PointData> clxls = realApiUtil.getHistoryDatasSnap(clx, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            List<Long> xData = new ArrayList<Long>();
+            List<Double> data = new ArrayList<Double>();
+            DatasetsVo dvo = new DatasetsVo();
+            dvo.setUnit("");
+            dvo.setName("齿轮箱");
+            dvo.setType("line");
+            dvo.setValueDecimals(2);
+            datasets.add(dvo);
+            for (int i = 0; i < clxls.size(); i++) {
+
+                xData.add(clxls.get(i).getPointTime() * 1000);
+                // data.add(clxls.get(i).getPointValueInDouble());
+
+                if (clxls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                    data.add(StringUtils.round(clxls.get(i).getPointValueInDouble(), 2));
+                    // data.add(clxls.get(i).getPointValueInDouble());
+                }
+            }
+            dvo.setData(data);
+            vo.setxData(xData);
+        }
+        if (null != fdj) {
+            List<PointData> fdjls = realApiUtil.getHistoryDatasSnap(fdj, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+
+            List<Long> xData = new ArrayList<Long>();
+            List<Double> data = new ArrayList<Double>();
+
+            DatasetsVo dvo = new DatasetsVo();
+            dvo.setUnit("");
+            dvo.setName("发电机");
+            dvo.setType("line");
+            dvo.setValueDecimals(2);
+            datasets.add(dvo);
+            for (int i = 0; i < fdjls.size(); i++) {
+
+                xData.add(fdjls.get(i).getPointTime() * 1000);
+
+                System.out.println(DateUtils.format(new Date(fdjls.get(i).getPointTime() * 1000)));
+                if (fdjls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                    data.add(StringUtils.round(fdjls.get(i).getPointValueInDouble(), 2));
+                    // data.add(fdjls.get(i).getPointValueInDouble());
+                }
+
+            }
+            dvo.setData(data);
+            vo.setxData(xData);
+        }
+
+        if (null != bj) {
+            List<PointData> kzysls = realApiUtil.getHistoryDatasSnap(bj, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+
+            List<Long> xData = new ArrayList<Long>();
+            List<Double> data = new ArrayList<Double>();
+
+            DatasetsVo dvo = new DatasetsVo();
+            dvo.setUnit("");
+            dvo.setName("变桨系统");
+            dvo.setType("line");
+            dvo.setValueDecimals(2);
+            datasets.add(dvo);
+            for (int i = 0; i < kzysls.size(); i++) {
+
+                xData.add(kzysls.get(i).getPointTime() * 1000);
+                // data.add(kzysls.get(i).getPointValueInDouble());
+                if (kzysls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                    data.add(StringUtils.round(kzysls.get(i).getPointValueInDouble(), 2));
+                }
+            }
+            dvo.setData(data);
+            vo.setxData(xData);
+        }
+
+        if (null != zk) {
+            List<PointData> jcxtls = realApiUtil.getHistoryDatasSnap(zk, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+
+            List<Long> xData = new ArrayList<Long>();
+            List<Double> data = new ArrayList<Double>();
+            DatasetsVo dvo = new DatasetsVo();
+            dvo.setUnit("");
+            dvo.setName("主控系统");
+            dvo.setType("line");
+            dvo.setValueDecimals(2);
+            datasets.add(dvo);
+            for (int i = 0; i < jcxtls.size(); i++) {
+
+                xData.add(jcxtls.get(i).getPointTime() * 1000);
+                // data.add(jcxtls.get(i).getPointValueInDouble());
+                if (jcxtls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                    data.add(StringUtils.round(jcxtls.get(i).getPointValueInDouble(), 2));
+                    // data.add(jcxtls.get(i).getPointValueInDouble());
+                }
+            }
+            dvo.setData(data);
+            vo.setxData(xData);
+        }
+        vo.setDatasets(datasets);
+        return vo;
+    }
+
+/************************************************************齿轮箱健康状态列表***********************************************************************/
+    /**
+     * 齿轮箱系统图表
+     *
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public ActivityVo getClxChart(String wtId) throws Exception {
+        ActivityVo vo = new ActivityVo();
+        List<DatasetsVo> datasets = new ArrayList<DatasetsVo>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date currentDate = DateUtils.now();
+        Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(currentDate, 1)) + " 00:00:00");
+        Date beginDate = sdfs.parse(sdf.format(currentDate) + " 00:00:00");
+
+        WindTurbineTestingPointAi2 clxsrzc = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI038");
+        WindTurbineTestingPointAi2 clxsczc = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI039");
+        WindTurbineTestingPointAi2 clxrkyw = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI040");
+        WindTurbineTestingPointAi2 clxyw = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI041");
+
+
+        if (null != clxsrzc && StringUtils.notEmp(clxsrzc.getId())) {
+            List<PointData> clxsrzcls = realApiUtil.getHistoryDatasSnap(clxsrzc, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!clxsrzcls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("齿轮箱输入轴油温(最大值95,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < clxsrzcls.size(); i++) {
+
+                    xData.add(clxsrzcls.get(i).getPointTime() * 1000);
+                    // data.add(clxls.get(i).getPointValueInDouble());
+
+                    if (clxsrzcls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(clxsrzcls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+        if (null != clxsczc  && StringUtils.notEmp(clxsczc.getId())) {
+            List<PointData> clxsczcls = realApiUtil.getHistoryDatasSnap(clxsczc, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!clxsczcls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("齿轮箱输出轴油温(最大值95,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < clxsczcls.size(); i++) {
+
+                    xData.add(clxsczcls.get(i).getPointTime() * 1000);
+
+                    // System.out.println(DateUtils.toDate1(new
+                    // Date(fdjls.get(i).getPointTime() * 1000)));
+                    if (clxsczcls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(clxsczcls.get(i).getPointValueInDouble()));
+                    }
+
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+
+        if (null != clxrkyw  && StringUtils.notEmp(clxrkyw.getId())) {
+            List<PointData> clxrkywls = realApiUtil.getHistoryDatasSnap(clxrkyw, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+
+            if (!clxrkywls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("齿轮箱入口油温(最大值80,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < clxrkywls.size(); i++) {
+
+                    xData.add(clxrkywls.get(i).getPointTime() * 1000);
+                    // data.add(kzysls.get(i).getPointValueInDouble());
+                    if (clxrkywls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(clxrkywls.get(i).getPointValueInDouble()));
+                    }
+                }
+
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+
+        if (null != clxyw  && StringUtils.notEmp(clxyw.getId())) {
+            List<PointData> clxywls = realApiUtil.getHistoryDatasSnap(clxyw, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!clxywls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("齿轮箱油温(最大值80,最佳范围最大值76,最佳范围最小值14,最小值10)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < clxywls.size(); i++) {
+
+                    xData.add(clxywls.get(i).getPointTime() * 1000);
+                    // data.add(kzysls.get(i).getPointValueInDouble());
+                    if (clxywls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(clxywls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+
+        vo.setDatasets(datasets);
+        return vo;
+    }
+/************************************************************发电机健康状态列表***********************************************************************/
+    /**
+     * 发电机系统图表
+     *
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public ActivityVo getFdjChart(String wtId) throws Exception {
+        ActivityVo vo = new ActivityVo();
+        List<DatasetsVo> datasets = new ArrayList<DatasetsVo>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date currentDate = DateUtils.now();
+        Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(currentDate, 1)) + " 00:00:00");
+        Date beginDate = sdfs.parse(sdf.format(currentDate) + " 00:00:00");
+
+
+        WindTurbineTestingPointAi2 fdjzca = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI052");
+        WindTurbineTestingPointAi2 fdjzcb = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI053");
+        WindTurbineTestingPointAi2 fdjrzu = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI045");
+        WindTurbineTestingPointAi2 fdjrzv = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI047");
+        WindTurbineTestingPointAi2 fdjrzw = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI049");
+        WindTurbineTestingPointAi2 fdjlqf = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI054");
+
+
+        if (null != fdjzca  && StringUtils.notEmp(fdjzca.getId())) {
+            List<PointData> fdjzcals = realApiUtil.getHistoryDatasSnap(fdjzca, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!fdjzcals.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("发电机轴承a温度(最大值95,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < fdjzcals.size(); i++) {
+
+                    xData.add(fdjzcals.get(i).getPointTime() * 1000);
+                    // data.add(clxls.get(i).getPointValueInDouble());
+
+                    if (fdjzcals.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(fdjzcals.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+        if (null != fdjzcb  && StringUtils.notEmp(fdjzcb.getId())) {
+            List<PointData> fdjzcbls = realApiUtil.getHistoryDatasSnap(fdjzcb, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!fdjzcbls.isEmpty()) {
+
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("发电机轴承b温度(最大值95,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < fdjzcbls.size(); i++) {
+
+                    xData.add(fdjzcbls.get(i).getPointTime() * 1000);
+
+                    // System.out.println(DateUtils.toDate1(new
+                    // Date(fdjls.get(i).getPointTime() * 1000)));
+                    if (fdjzcbls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(fdjzcbls.get(i).getPointValueInDouble()));
+                    }
+
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+        }
+
+        if (null != fdjrzu  && StringUtils.notEmp(fdjrzu.getId())) {
+            List<PointData> fdjrzuls = realApiUtil.getHistoryDatasSnap(fdjrzu, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!fdjrzuls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("发电机u项绕组温度(最大值150,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < fdjrzuls.size(); i++) {
+
+                    xData.add(fdjrzuls.get(i).getPointTime() * 1000);
+                    // data.add(kzysls.get(i).getPointValueInDouble());
+                    if (fdjrzuls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(fdjrzuls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+
+        if (null != fdjrzv  && StringUtils.notEmp(fdjrzv.getId())) {
+            List<PointData> fdjrzvls = realApiUtil.getHistoryDatasSnap(fdjrzv, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!fdjrzvls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("发电机v项绕组温度(最大值150,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < fdjrzvls.size(); i++) {
+
+                    xData.add(fdjrzvls.get(i).getPointTime() * 1000);
+                    // data.add(jcxtls.get(i).getPointValueInDouble());
+                    if (fdjrzvls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(fdjrzvls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+
+        if (null != fdjrzw  && StringUtils.notEmp(fdjrzw.getId())) {
+            List<PointData> fdjrzwls = realApiUtil.getHistoryDatasSnap(fdjrzw, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!fdjrzwls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("发电机w项绕组温度(最大值150,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < fdjrzwls.size(); i++) {
+
+                    xData.add(fdjrzwls.get(i).getPointTime() * 1000);
+                    // data.add(kzysls.get(i).getPointValueInDouble());
+                    if (fdjrzwls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(fdjrzwls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+
+        if (null != fdjlqf  && StringUtils.notEmp(fdjlqf.getId())) {
+            List<PointData> fdjlqfls = realApiUtil.getHistoryDatasSnap(fdjlqf, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!fdjlqfls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("发电机冷却风温度(最大值70,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < fdjlqfls.size(); i++) {
+
+                    xData.add(fdjlqfls.get(i).getPointTime() * 1000);
+                    // data.add(jcxtls.get(i).getPointValueInDouble());
+                    if (fdjlqfls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(fdjlqfls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+        vo.setDatasets(datasets);
+        return vo;
+    }
+
+
+/************************************************************变桨健康状态列表***********************************************************************/
+    /**
+     * 变桨系统图表
+     *
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public ActivityVo getKzysChart(String wtId) throws Exception {
+        ActivityVo vo = new ActivityVo();
+        List<DatasetsVo> datasets = new ArrayList<DatasetsVo>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date currentDate = DateUtils.now();
+        Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(currentDate, 1)) + " 00:00:00");
+        Date beginDate = sdfs.parse(sdf.format(currentDate) + " 00:00:00");
+
+        WindTurbineTestingPointAi2 bjdrqwd = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI113");
+        WindTurbineTestingPointAi2 bjdrqdy = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI236");
+        WindTurbineTestingPointAi2 bjblwd = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI239");
+        WindTurbineTestingPointAi2 bjdjwd = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI103");
+        WindTurbineTestingPointAi2 bjkzgwd = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI233");
+
+
+        if (null != bjdrqwd  && StringUtils.notEmp(bjdrqwd.getId())) {
+            List<PointData> bjdrqwdls = realApiUtil.getHistoryDatasSnap(bjdrqwd, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!bjdrqwdls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("变桨电容器温度(最大值65,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < bjdrqwdls.size(); i++) {
+
+                    xData.add(bjdrqwdls.get(i).getPointTime() * 1000);
+                    // data.add(clxls.get(i).getPointValueInDouble());
+
+                    if (bjdrqwdls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(bjdrqwdls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+        if (null != bjdrqdy  && StringUtils.notEmp(bjdrqdy.getId())) {
+            List<PointData> bjdrqdyls = realApiUtil.getHistoryDatasSnap(bjdrqdy, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!bjdrqdyls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("变桨电容电压(最大值63,最佳范围最大值60,最佳范围最小值56,最小值53)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < bjdrqdyls.size(); i++) {
+
+                    xData.add(bjdrqdyls.get(i).getPointTime() * 1000);
+
+                    // System.out.println(DateUtils.toDate1(new
+                    // Date(fdjls.get(i).getPointTime() * 1000)));
+                    if (bjdrqdyls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(bjdrqdyls.get(i).getPointValueInDouble()));
+                    }
+
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+
+        if (null != bjblwd  && StringUtils.notEmp(bjblwd.getId())) {
+            List<PointData> bjblwdls = realApiUtil.getHistoryDatasSnap(bjblwd, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!bjblwdls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("变桨变流器温度(最大值75,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < bjblwdls.size(); i++) {
+
+                    xData.add(bjblwdls.get(i).getPointTime() * 1000);
+                    // data.add(kzysls.get(i).getPointValueInDouble());
+                    if (bjblwdls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(bjblwdls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+
+        if (null != bjdjwd  && StringUtils.notEmp(bjdjwd.getId())) {
+            List<PointData> bjdjwdls = realApiUtil.getHistoryDatasSnap(bjdjwd, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!bjdjwdls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("变桨电机温度(最大值135,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < bjdjwdls.size(); i++) {
+
+                    xData.add(bjdjwdls.get(i).getPointTime() * 1000);
+                    // data.add(jcxtls.get(i).getPointValueInDouble());
+                    if (bjdjwdls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(bjdjwdls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+        if (null != bjkzgwd  && StringUtils.notEmp(bjkzgwd.getId())) {
+            List<PointData> bjkzgwdls = realApiUtil.getHistoryDatasSnap(bjkzgwd, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!bjkzgwdls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("变桨控制柜温度(最大值65,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < bjkzgwdls.size(); i++) {
+
+                    xData.add(bjkzgwdls.get(i).getPointTime() * 1000);
+                    // data.add(jcxtls.get(i).getPointValueInDouble());
+                    if (bjkzgwdls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(bjkzgwdls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+        vo.setDatasets(datasets);
+        return vo;
+    }
+/************************************************************主控健康状态列表***********************************************************************/
+    /**
+     * 主控系统图表
+     *
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public ActivityVo getJcxtChart(String wtId) throws Exception {
+        ActivityVo vo = new ActivityVo();
+        List<DatasetsVo> datasets = new ArrayList<DatasetsVo>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        Date currentDate = DateUtils.now();
+        Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(currentDate, 1)) + " 00:00:00");
+        Date beginDate = sdfs.parse(sdf.format(currentDate) + " 00:00:00");
+
+
+        WindTurbineTestingPointAi2 tdgwd = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI069");
+        WindTurbineTestingPointAi2 tdkzgwd = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "AI070");
+
+
+        if (null != tdgwd   && StringUtils.notEmp(tdgwd.getId())) {
+            List<PointData> tdgwdls = realApiUtil.getHistoryDatasSnap(tdgwd, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!tdgwdls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("塔底柜温度(最大值50,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < tdgwdls.size(); i++) {
+
+                    xData.add(tdgwdls.get(i).getPointTime() * 1000);
+                    // data.add(clxls.get(i).getPointValueInDouble());
+
+                    if (tdgwdls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(tdgwdls.get(i).getPointValueInDouble()));
+                    }
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+        if (null != tdkzgwd  && StringUtils.notEmp(tdkzgwd.getId())) {
+            List<PointData> tdkzgwdls = realApiUtil.getHistoryDatasSnap(tdkzgwd, beginDate.getTime() / 1000,
+                    endDate.getTime() / 1000, (long) 96, 900L);
+            if (!tdkzgwdls.isEmpty()) {
+                List<Long> xData = new ArrayList<Long>();
+                List<Double> data = new ArrayList<Double>();
+
+                DatasetsVo dvo = new DatasetsVo();
+                dvo.setUnit("");
+                dvo.setName("塔顶机舱柜温度(最大值75,最小值0)");
+                dvo.setType("line");
+                dvo.setValueDecimals(2);
+                datasets.add(dvo);
+                for (int i = 0; i < tdkzgwdls.size(); i++) {
+
+                    xData.add(tdkzgwdls.get(i).getPointTime() * 1000);
+
+                    // System.out.println(DateUtils.toDate1(new
+                    // Date(fdjls.get(i).getPointTime() * 1000)));
+                    if (tdkzgwdls.get(i).getPointTime() * 1000 <= DateUtils.now().getTime()) {
+                        data.add(MathUtil.twoBit(tdkzgwdls.get(i).getPointValueInDouble()));
+                    }
+
+                }
+                dvo.setData(data);
+                vo.setxData(xData);
+            }
+
+        }
+
+        vo.setDatasets(datasets);
+        return vo;
+    }
+
+
+    public Double getrealValue(String wtId, String type) {
+
+
+        String pointid = null;
+        if (type.equals("1")) {
+            WindTurbineTestingPointAi2 pointAi2 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "JKZT001");
+            pointid = pointAi2.getId();
+        } else if (type.equals("2")) {
+            WindTurbineTestingPointAi2 pointAi2 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "JKZT002");
+            pointid = pointAi2.getId();
+        } else if (type.equals("3")) {
+            WindTurbineTestingPointAi2 pointAi2 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "JKZT003");
+            pointid = pointAi2.getId();
+        } else if (type.equals("4")) {
+            WindTurbineTestingPointAi2 pointAi2 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "JKZT004");
+            pointid = pointAi2.getId();
+        } else if (type.equals("5")) {
+            WindTurbineTestingPointAi2 pointAi2 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, "JKZT005");
+            pointid =pointAi2.getId();
+        }
+
+        try {
+
+            PointData vo = realApiUtil.getRealData(pointid);
+
+            return vo.getPointValueInDouble();
+
+        } catch (Exception e) {
+
+        }
+        return 0.0;
+    }
 }

+ 2 - 2
src/main/java/com/gyee/frame/service/health/LossPowerRateHealthService.java

@@ -12,8 +12,8 @@ import com.gyee.frame.model.custom.TotalNumVo;
 import com.gyee.frame.model.custom.TotalNumsVo;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -29,7 +29,7 @@ public class LossPowerRateHealthService {
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
     private final int digit = 2;
     
     public List<HealthmodelrecordsVo> windTurbineHealthList(String wpId) throws Exception {

+ 86 - 84
src/main/java/com/gyee/frame/service/health/WindTurbineHealthListService.java

@@ -12,8 +12,8 @@ import com.gyee.frame.model.custom.TotalNumVo;
 import com.gyee.frame.model.custom.TotalNumsVo;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -29,7 +29,7 @@ public class WindTurbineHealthListService {
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
     private final int digit = 2;
     
     public List<HealthmodelrecordsVo> windTurbineHealthList(String wpId) throws Exception {
@@ -57,107 +57,109 @@ public class WindTurbineHealthListService {
 
         List<HealthmodelrecordsVo> vos = new ArrayList<HealthmodelrecordsVo>();
         int id = 0;
-        for (Windturbine wt : InitialRunner.wp_wtmap.get(wpId)) {
-            HealthmodelrecordsVo vo = new HealthmodelrecordsVo();
-            vo.setId(id);
-            vo.setRecodedate(beginDate);
-            vo.setWpid(wt.getWindpowerstationid());
-            vo.setWpname(InitialRunner.wpmap.get(wt.getWindpowerstationid()).getName());
-            vo.setWtid(wt.getId());
-            vo.setWtname(wt.getId());
-            vo.setModel(wt.getModelid());
-
-            String[] points = new String[codels.size()];
-
-            for (int i = 0; i < codels.size(); i++) {
-
-                WindTurbineTestingPointAi2 ai =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(),codels.get(i));
-                points[i] = ai.getId();
-            }
-
-            // 获得风机健康状态结果数组
-            DNAVal[] jkvalues = realApiUtil.getRealtimeTagValues(points);
+        if(InitialRunner.wp_wtmap.containsKey(wpId))
+        {
+            for (Windturbine wt : InitialRunner.wp_wtmap.get(wpId)) {
+                HealthmodelrecordsVo vo = new HealthmodelrecordsVo();
+                vo.setId(id);
+                vo.setRecodedate(beginDate);
+                vo.setWpid(wt.getWindpowerstationid());
+                vo.setWpname(InitialRunner.wpmap.get(wt.getWindpowerstationid()).getName());
+                vo.setWtid(wt.getId());
+                vo.setWtname(wt.getId());
+                vo.setModel(wt.getModelid());
+
+                String[] points = new String[codels.size()];
+
+                for (int i = 0; i < codels.size(); i++) {
+
+                    WindTurbineTestingPointAi2 ai =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(),codels.get(i));
+                    points[i] = ai.getId();
+                }
 
-            double score = jkvalues[0].DValue;
-            double clxzt = jkvalues[1].DValue;
-            double fdjzt = jkvalues[2].DValue;
-            double bjzt = jkvalues[3].DValue;
-            double zkzt = jkvalues[4].DValue;
+                // 获得风机健康状态结果数组
+                DNAVal[] jkvalues = realApiUtil.getRealtimeTagValues(points);
 
-            vo.setScore(StringUtils.round(score, 2));
+                double score = jkvalues[0].DValue;
+                double clxzt = jkvalues[1].DValue;
+                double fdjzt = jkvalues[2].DValue;
+                double bjzt = jkvalues[3].DValue;
+                double zkzt = jkvalues[4].DValue;
 
-            vo.setClx(getStateValue(clxzt));
-            vo.setFdj(getStateValue(fdjzt));
-            vo.setBj(getStateValue(bjzt));
-            vo.setZk(getStateValue(zkzt));
+                vo.setScore(StringUtils.round(score, 2));
 
-            vo.setBpq("优");
-            vo.setPh("优");
-            vo.setJc("优");
-            vo.setZz("优");
+                vo.setClx(getStateValue(clxzt));
+                vo.setFdj(getStateValue(fdjzt));
+                vo.setBj(getStateValue(bjzt));
+                vo.setZk(getStateValue(zkzt));
 
-            if(ahmap.containsKey(wt.getId()))
-            {
-                List<String> ahtypels=ahmap.get(wt.getId());
+                vo.setBpq("优");
+                vo.setPh("优");
+                vo.setJc("优");
+                vo.setZz("优");
 
-                if(!ahtypels.isEmpty())
+                if(ahmap.containsKey(wt.getId()))
                 {
-                    for(String type:ahtypels)
+                    List<String> ahtypels=ahmap.get(wt.getId());
+
+                    if(!ahtypels.isEmpty())
                     {
-                        if(altypemap.containsKey(type))
+                        for(String type:ahtypels)
                         {
-                            String typetext=altypemap.get(type);
-
-                            switch (typetext) {
-                                case "CLX":
-                                    vo.setClx("差");
-                                    break;
-                                case "FDJ":
-                                    vo.setFdj("差");
-                                    break;
-                                case "BJ":
-                                    vo.setBj("差");
-                                    break;
-                                case "ZK":
-                                    vo.setZk("差");
-                                    break;
-                                case "PH":
-                                    vo.setPh("差");
-                                    break;
-                                case "JC":
-                                    vo.setJc("差");
-                                    break;
-                                case "ZZ":
-                                    vo.setZz("差");
-                                    break;
-                                default:
-                                    break;
+                            if(altypemap.containsKey(type))
+                            {
+                                String typetext=altypemap.get(type);
+
+                                switch (typetext) {
+                                    case "CLX":
+                                        vo.setClx("差");
+                                        break;
+                                    case "FDJ":
+                                        vo.setFdj("差");
+                                        break;
+                                    case "BJ":
+                                        vo.setBj("差");
+                                        break;
+                                    case "ZK":
+                                        vo.setZk("差");
+                                        break;
+                                    case "PH":
+                                        vo.setPh("差");
+                                        break;
+                                    case "JC":
+                                        vo.setJc("差");
+                                        break;
+                                    case "ZZ":
+                                        vo.setZz("差");
+                                        break;
+                                    default:
+                                        break;
+                                }
                             }
-                        }
 
+                        }
                     }
-                }
 
-            }
+                }
 
-            Integer[] futureHealth = new Integer[4];
-            Random random = new Random();
-            for (int i = 0; i < 12; i++) {
-                futureHealth[i] = random.nextInt(4) + 1;
-            }
-            vo.setFutureHealth(futureHealth);
+                Integer[] futureHealth = new Integer[12];
+                Random random = new Random();
+                for (int i = 0; i < 12; i++) {
+                    futureHealth[i] = random.nextInt(4) + 1;
+                }
+                vo.setFutureHealth(futureHealth);
 
-            int max = 100;
-            int min = 80;
+                int max = 100;
+                int min = 80;
 
-            double zxd = random.nextInt(max) % (max - min + 1) + min;
-            vo.setZxd(StringUtils.round(zxd, 2));
-            vos.add(vo);
-            id++;
+                double zxd = random.nextInt(max) % (max - min + 1) + min;
+                vo.setZxd(StringUtils.round(zxd, 2));
+                vos.add(vo);
+                id++;
+            }
         }
 
 
-
         return vos;
     }
 

+ 22 - 12
src/main/java/com/gyee/frame/service/leaderboard/LeaderboardService.java

@@ -270,30 +270,40 @@ public class LeaderboardService {
         return ls;
     }
 
-    public List<StatisticalAnalysisTopVo> loadfactortoplist(String wpIds, Date beginDate, Date endDate)  {
+    public List<StatisticalAnalysisTopVo> loadfactortoplist(String type,String wpIds, Date beginDate, Date endDate)  {
         List<StatisticalAnalysisTopVo> vos=new ArrayList<>();
 
-        if (StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+        if (StringUtils.notEmp(type) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
             List<String> wpids=new ArrayList<>();
-            if(StringUtils.isNotEmpty(wpIds))
-            {
-                String[] wpid = wpIds.split(",");
 
-                for(String w:wpid)
-                {
-                    wpids.add(w);
-                }
+            if(StringUtils.notEmp(wpids))
+            {
+                wpids.add(wpIds);
             }else
             {
-                for(Windpowerstation wp:InitialRunner.wpls)
+                if(type.equals("-1"))
                 {
-                    if(wp.getId().endsWith("FDC"))
+                    for(Windpowerstation wp:InitialRunner.wpallls)
                     {
-                        wpids.add(wp.getId());
+                        if(wp.getId().endsWith("FDC"))
+                        {
+                            wpids.add(wp.getId());
+                        }
+                    }
+                }else if(type.equals("-2"))
+                {
+                    for(Windpowerstation wp:InitialRunner.wpallls)
+                    {
+                        if(wp.getId().endsWith("GDC"))
+                        {
+                            wpids.add(wp.getId());
+                        }
                     }
                 }
             }
 
+
+
             vos = windturbineinfodayService.getWindturbineinfo(wpids, beginDate, endDate);
 
             if (!vos.isEmpty()) {

+ 5 - 6
src/main/java/com/gyee/frame/service/recommen/RecommenService.java

@@ -6,7 +6,6 @@ import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.*;
 import com.gyee.frame.service.*;
 import com.gyee.frame.util.*;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -55,7 +54,7 @@ public class RecommenService {
 	private final String FD = "-1";
 	private final String GF = "-2";
 
-	IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+	IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 	private long INTERVAL=600;
 
@@ -447,10 +446,10 @@ public class RecommenService {
 				}
 				MainTrackVo vos = wobugeqService.findDuration();
 				if (vos != null) {
-					vo.setRwfppjsc(MathUtil.decimal(vos.getRwfppjsc(), 2));
-					vo.setDdxcpjsc(MathUtil.decimal(vos.getDdxcpjsc(), 2));
-					vo.setQxclpjsc(MathUtil.decimal(vos.getQxclpjsc(), 2));
-					vo.setYspjsc(MathUtil.decimal(vos.getYspjsc(), 2));
+					vo.setRwfppjsc(MathUtil.decimal(vos.getRwfppjsc(), 2));//任务分配平均时长
+					vo.setDdxcpjsc(MathUtil.decimal(vos.getDdxcpjsc(), 2));//到现场平均时长
+					vo.setQxclpjsc(MathUtil.decimal(vos.getQxclpjsc(), 2));//缺陷处理平均时长
+					vo.setYspjsc(MathUtil.decimal(vos.getYspjsc(), 2));//验收平均时长
 				}
 			}
 		}

+ 162 - 0
src/main/java/com/gyee/frame/service/warn/TemperatureService.java

@@ -0,0 +1,162 @@
+package com.gyee.frame.service.warn;
+
+import com.gyee.frame.common.conf.TemperatureConfig;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.WindTurbineTestingPointaiyj;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.model.custom.TemperatureVo;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
+import org.springframework.stereotype.Service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+
+@Service
+public class TemperatureService {
+
+	IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+
+    public List<List<TemperatureVo>> temperatureQuery(String wpId,String type) throws Exception {
+
+		List<List<TemperatureVo>> vos = new ArrayList<List<TemperatureVo>>();
+
+		List<String> codels=new ArrayList<String>();
+		switch(type) {
+			case "bj" :
+				codels= TemperatureConfig.getBj();
+				break;
+			case "yyz" :
+				codels= TemperatureConfig.getYyz();
+				break;
+			case "clx" :
+				codels= TemperatureConfig.getClx();
+				break;
+			case "fdj" :
+				codels= TemperatureConfig.getFdj();
+				break;
+			case "qt" :
+				codels= TemperatureConfig.getQt();
+				break;
+			case "zz" :
+				codels= TemperatureConfig.getZz();
+				break;
+			case "zd" :
+				codels= TemperatureConfig.getZd();
+				break;
+
+			default:
+				break;
+		}
+			if (InitialRunner.wp_wtmap.containsKey(wpId)) {
+				List<Windturbine> ws = InitialRunner.wp_wtmap.get(wpId);
+				for (int i = 0; i < ws.size(); i++) {
+					Windturbine wb = ws.get(i);
+					List<TemperatureVo> retValue = new ArrayList<TemperatureVo>();
+					for (int j = 0; j < codels.size(); j++) {
+						WindTurbineTestingPointaiyj ai = InitialRunner.wtpAiyjmap.get(wb.getId()).get(codels.get(j));
+						if (ai == null) {
+							continue;
+						}
+						String id = ai.getId();
+
+						PointData fs = realApiUtil.getRealData(id);
+						TemperatureVo vo = new TemperatureVo();
+						vo.setId(wb.getId() + codels.get(j));
+						if (wb.getProjectid().equals("XS01_GC") && codels.get(j).equals("AI018")) {
+							vo.setValue(MathUtil.decimal((Double.parseDouble(new DecimalFormat("#.000").format(fs.getPointValueInDouble())) / 100000), 2));
+						} else {
+							vo.setValue(Double.parseDouble(new DecimalFormat("#.000").format(fs.getPointValueInDouble())));
+						}
+
+						vo.setName(ai.getName());
+						vo.setMaxValue(ai.getMaxval());
+						vo.setMiValue(ai.getMinval());
+						vo.setReasonableMaxVal(ai.getReasonablemaxval());
+						vo.setReasonableMinVal(ai.getReasonableminval());
+						vo.setColor("white");
+						changeColor(vo, codels.get(j));
+						retValue.add(vo);
+					}
+					vos.add(retValue);
+				}
+			}
+
+
+
+		return vos;
+    }
+
+	private void setVoField(TemperatureVo vo, String point) {
+		int ai=Integer.parseInt(point.substring(2));
+		switch(ai){
+			case 45:
+			case 46:
+			case 47:
+			case 48:
+			case 49:
+			case 50:
+				vo.setReasonableMaxVal(165d);
+				vo.setReasonableMinVal(120d);
+				vo.setMaxValue(165d);
+				vo.setMiValue(0d);
+				break;
+			case 52:
+			case 53:
+				vo.setReasonableMaxVal(95d);
+				vo.setReasonableMinVal(80d);
+				vo.setMaxValue(95d);
+				vo.setMiValue(0d);
+				break;
+			case 69:
+			case 70:
+				vo.setReasonableMaxVal(55d);
+				vo.setReasonableMinVal(50d);
+				vo.setMaxValue(55d);
+				vo.setMiValue(0d);
+				break;
+			case 39:
+				vo.setReasonableMaxVal(170d);
+				vo.setReasonableMinVal(129d);
+				vo.setMaxValue(170d);
+				vo.setMiValue(125d);
+				break;
+			case 41:
+				vo.setReasonableMaxVal(80d);
+				vo.setReasonableMinVal(70d);
+				vo.setMaxValue(80d);
+				vo.setMiValue(10d);
+				break;
+			case 242:
+			case 243:
+			case 244:
+				vo.setReasonableMaxVal(65d);
+				vo.setReasonableMinVal(55d);
+				vo.setMaxValue(65d);
+				vo.setMiValue(-10d);
+				break;
+		}
+
+	}
+
+
+	private void changeColor(TemperatureVo vo,String point) {
+		if(vo.getMaxValue()==null || vo.getMaxValue()==0d){
+			setVoField(vo,point);
+
+		} else {
+			if (vo.getMaxValue() != null) {
+				if (vo.getValue() > vo.getReasonableMaxVal()) {
+					vo.setColor("yellow");
+				}
+				if (vo.getValue() >= vo.getMaxValue()) {
+					vo.setColor("red");
+				}
+			}
+		}
+	}
+}

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

@@ -57,42 +57,55 @@ public class WeatherService  {
 
 			switch(id) {
 				case "0" :
+					map.put("name","银川");
 					weatherStr = redisUtils.get("NX_QYGS_WEATHER_WEATHER",DATABASE);
 					break;
 				case "-1" :
+					map.put("name","银川");
 					weatherStr = redisUtils.get("NX_QYGS_WEATHER_WEATHER",DATABASE);
 					break;
 				case "-2" :
+					map.put("name","银川");
 					weatherStr = redisUtils.get("NX_QYGS_WEATHER_WEATHER",DATABASE);
 					break;
 				case "MHS_FDC" :
+					map.put("name","麻黄山");
 					weatherStr = redisUtils.get("MHS_FDC_WEATHER_WEATHER",DATABASE);
 					break;
 				case "NSS_FDC" :
+					map.put("name","牛首山");
 					weatherStr = redisUtils.get("NSS_FDC_WEATHER_WEATHER",DATABASE);
 					break;
 				case "QS_FDC" :
+					map.put("name","青山");
 					weatherStr = redisUtils.get("QS_FDC_WEATHER_WEATHER",DATABASE);
 					break;
 				case "SBQ_FDC" :
+					map.put("name","石板泉");
 					weatherStr = redisUtils.get("SBQ_FDC_WEATHER_WEATHER",DATABASE);
 					break;
 				case "XS_FDC" :
+					map.put("name","香山");
 					weatherStr = redisUtils.get("XS_FDC_WEATHER_WEATHER",DATABASE);
 					break;
 				case "DWK_GDC" :
+					map.put("name","大武口");
 					weatherStr = redisUtils.get("DWK_GDC_WEATHER_WEATHER",DATABASE);
 					break;
 				case "PL_GDC" :
+					map.put("name","平罗");
 					weatherStr = redisUtils.get("PL_GDC_WEATHER_WEATHER",DATABASE);
 					break;
 				case "XH_GDC" :
+					map.put("name","宣和");
 					weatherStr = redisUtils.get("XH_GDC_WEATHER_WEATHER",DATABASE);
 					break;
 				case "MCH_GDC" :
+					map.put("name","马场湖");
 					weatherStr = redisUtils.get("MCH_GDC_WEATHER_WEATHER",DATABASE);
 					break;
 				case "HZJ_GDC" :
+					map.put("name","海子井");
 					weatherStr = redisUtils.get("HZJ_GDC_WEATHER_WEATHER",DATABASE);
 					break;
 				default:

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/BraceletService.java

@@ -8,7 +8,7 @@ import com.gyee.frame.model.auto.WindTurbineTestingPointAi2;
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
-import com.gyee.frame.util.golden.EdosUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -22,7 +22,7 @@ public class BraceletService  {
     private WebsocketMessageService websocketMessageService;
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
     public void braceletPushTask(String destination) throws Exception {
 

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/CftInfoPushService.java

@@ -11,8 +11,8 @@ import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.service.WindpowerstationthewindinfoService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -32,7 +32,7 @@ public class CftInfoPushService {
     private WindpowerstationthewindinfoService windpowerstationthewindinfoService;
     @Resource
     private RealPowerPushService realPowerPushService;
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
 

+ 6 - 6
src/main/java/com/gyee/frame/service/websocket/GeneralAppearancePushService.java

@@ -3,8 +3,8 @@ package com.gyee.frame.service.websocket;
 
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.apache.poi.ss.usermodel.*;
 import org.springframework.stereotype.Service;
 import org.springframework.util.ClassUtils;
@@ -20,7 +20,7 @@ import java.util.Map;
 public class GeneralAppearancePushService {
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {
@@ -88,16 +88,16 @@ public class GeneralAppearancePushService {
                 sb.append(staticPath).append("/syz/dwk_zm.xls");
                 break;
             case "PL01_GC":
-                sb.append(staticPath).append("/syz/plyq_gf.xls");
+                sb.append(staticPath).append("/syz/plyq_zm.xls");
                 break;
             case "PL02_GC":
-                sb.append(staticPath).append("/syz/pleq_gf.xls");
+                sb.append(staticPath).append("/syz/pleq_zm.xls");
                 break;
             case "MCH_GDC":
-                sb.append(staticPath).append("/syz/mch_gf.xls");
+                sb.append(staticPath).append("/syz/mch_zm.xls");
                 break;
             case "XH_GDC":
-                sb.append(staticPath).append("/syz/xh_gf.xls");
+                sb.append(staticPath).append("/syz/xh_zm.xls");
                 break;
 
             default:

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailLnService.java

@@ -11,8 +11,8 @@ import com.gyee.frame.service.ProjectPlanService;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -52,7 +52,7 @@ public class GenreSetPushDetailLnService {
     private final String NSLSSDL = "nslssdl";
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailPjService.java

@@ -16,8 +16,8 @@ import com.gyee.frame.service.WindPowerstationTestingPointService;
 import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -64,7 +64,7 @@ public class GenreSetPushDetailPjService {
     private final String NSLSSDL = "nslssdl";
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailService.java

@@ -15,8 +15,8 @@ import com.gyee.frame.service.WindPowerstationTestingPointService;
 import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -65,7 +65,7 @@ public class GenreSetPushDetailService {
     private final String NSLSSDL = "nslssdl";
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailWpService.java

@@ -14,8 +14,8 @@ import com.gyee.frame.service.WindPowerstationTestingPointService;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -60,7 +60,7 @@ public class GenreSetPushDetailWpService {
     private final String NSLSSDL = "nslssdl";
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {

+ 131 - 114
src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java

@@ -11,11 +11,7 @@ import com.gyee.frame.model.custom.MatrixVo;
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.service.*;
 import com.gyee.frame.service.weather.WeatherService;
-import com.gyee.frame.util.DateUtils;
-import com.gyee.frame.util.IRealTimeDataBaseUtil;
-import com.gyee.frame.util.MathUtil;
-import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
+import com.gyee.frame.util.*;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -50,7 +46,7 @@ public class GenreSetPushService {
     private final String GF = "-2";
     private final String DEFAULT_FDC = "MHS_FDC";
     private final double YCFDLXS = 1.08;
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {
@@ -249,14 +245,15 @@ public class GenreSetPushService {
 
 /*************************************************风场指标*************************************************************/
 
-            Map<String, Object> tqmap= weatherService.getWeatherRealInfo(id);
+            Map<String, Object> tqmap = weatherService.getWeatherRealInfo(id);
             map.put("tqmap", tqmap);
 
+            Map<String, Object> xtmap=tooltipAjax();
+            map.put("xtmap", xtmap);
 /*************************************************基础指标*************************************************************/
             Map<String, Object> jczbmap = new HashMap<>();
 
 
-
             if (InitialRunner.wpmap.containsKey(id)) {
                 Windpowerstation wp = InitialRunner.wpmap.get(id);
 
@@ -356,20 +353,22 @@ public class GenreSetPushService {
                 Double jpeyhl = realApiUtil.getRealData(ConstantTR.JPEYHL).getPointValueInDouble();
                 // 节约水
                 Double jys = realApiUtil.getRealData(ConstantTR.JYS).getPointValueInDouble();
-                // 安全天数
-                Double aqts = realApiUtil.getRealData(ConstantTR.AQTS).getPointValueInDouble();
 
                 Double gfsjgl = realApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(GF, Constant.TPOINT_WP_SJGL)).getPointValueInDouble();
 
                 bzgl = bzgl + gfsjgl;
                 yfgl = yfgl + gfsjgl;
-                jczbmap.put("aqts", StringUtils.round(aqts, 2));
+
                 jczbmap.put("jpeyht", StringUtils.round(jpeyht, 2));
                 jczbmap.put("jybm", StringUtils.round(jybm, 2));
                 jczbmap.put("jpeyhl", StringUtils.round(jpeyhl, 2));
                 jczbmap.put("jys", StringUtils.round(jys, 2));
 
             }
+
+            // 安全天数
+            Double aqts = realApiUtil.getRealData(ConstantTR.AQTS).getPointValueInDouble();
+            jczbmap.put("aqts", StringUtils.round(aqts, 2));
             if (bzgl == 0.0) {
                 bzgl = 1.0;
             }
@@ -408,7 +407,7 @@ public class GenreSetPushService {
             //预测发电上限
             if (null != zjrl) {
                 double rfdlsx = zjrl;
-                double yfdlsx = zjrl* daynum;
+                double yfdlsx = zjrl * daynum;
                 jczbmap.put("rfdlsx", MathUtil.twoBit(rfdlsx));
                 jczbmap.put("yfdlsx", MathUtil.twoBit(yfdlsx));
             }
@@ -483,9 +482,9 @@ public class GenreSetPushService {
 
                     List<MatrixVo> vos = new ArrayList<>();
                     List<String> fjzbls = new ArrayList<>();
-                    for (Windturbine wt : wtls) {
-                        //状态
-                        fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
+                        for (Windturbine wt : wtls) {
+                            //状态
+                            fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
 
                     }
 
@@ -930,6 +929,9 @@ public class GenreSetPushService {
                 gxkmap.put("ndxkyss", wd.getYeardxkyxs());
                 gxkmap.put("nsbklyl", wd.getYearsbklyl());
 
+                gxkmap.put("ysbklyl", wd.getMonthsbklyl());
+                gxkmap.put("yzhcydl", wd.getMonthzhcydl());
+
                 gxkmap.put("ndjxs", wd.getYearstoptime());
                 gxkmap.put("nyxxs", wd.getYearruntime());
                 gxkmap.put("ngzxs", wd.getYearfaulttime());
@@ -937,7 +939,10 @@ public class GenreSetPushService {
             } else {
                 gxkmap.put("ndxkyss", 0.0);
                 gxkmap.put("nsbklyl", 0.0);
-                gxkmap.put("nzhcydl", 0.0);
+
+                gxkmap.put("ysbklyl", 0.0);
+                gxkmap.put("yzhcydl", 0.0);
+
 
                 gxkmap.put("ndjxs", 0.0);
                 gxkmap.put("nyxxs", 0.0);
@@ -958,7 +963,7 @@ public class GenreSetPushService {
             Double nfdljh = 0.0;
 
             //Double yfdltemp = jczbmap.get("yfdl");
-            Double nfdl = (Double)jczbmap.get("nfdl");
+            Double nfdl = (Double) jczbmap.get("nfdl");
 
             yfdljh = gxkmap.get("yfdljh");
             nfdljh = gxkmap.get("nfdljh");
@@ -1024,13 +1029,13 @@ public class GenreSetPushService {
         WindPowerStationTestingPoint2 rfdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_RFDL);
         WindPowerStationTestingPoint2 swdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SWDL);
         WindPowerStationTestingPoint2 gwdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_GWDL);
-        //   WindPowerStationTestingPoint2 ssfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_PJFS);
+        WindPowerStationTestingPoint2 ssfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_PJFS);
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
         List<PointData> rfdls = realApiUtil.getHistoryDatasSnap(rfdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
         List<PointData> swdls = realApiUtil.getHistoryDatasSnap(swdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
         List<PointData> gwdls = realApiUtil.getHistoryDatasSnap(gwdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
-        //   List<PointData> ssfss = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
+        List<PointData> ssfss = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
 
         if (!rfdls.isEmpty() && !swdls.isEmpty() && !gwdls.isEmpty()
                 && rfdls.size() == swdls.size() && rfdls.size() == gwdls.size()
@@ -1051,13 +1056,13 @@ public class GenreSetPushService {
                     vo.setValue1(StringUtils.round(rfdls.get(i).getPointValueInDouble(), 2));// 日发电量
                     vo.setValue2(StringUtils.round(swdls.get(i).getPointValueInDouble(), 2));// 上网电量
                     vo.setValue3(StringUtils.round(gwdls.get(i).getPointValueInDouble(), 2));// 购网电量
-                    //  vo.setSpeed(StringUtils.round(ssfss.get(i).getPointValueInDouble(), 2));
+                    vo.setSpeed(StringUtils.round(ssfss.get(i).getPointValueInDouble(), 2));
                 } else {
                     vo.setTimestr("");
                     vo.setValue1(0.0);// 日发电量
                     vo.setValue2(0.0);// 上网电量
                     vo.setValue3(0.0);// 购网电量
-                    //vo.setSpeed(0.0);
+                    vo.setSpeed(0.0);
                 }
 
                 vos.add(vo);
@@ -1072,7 +1077,7 @@ public class GenreSetPushService {
                 vo.setValue1(0.0);// 日发电量
                 vo.setValue2(0.0);// 上网电量
                 vo.setValue3(0.0);// 购网电量
-                // vo.setSpeed(0.0);
+                vo.setSpeed(0.0);
                 vos.add(vo);
                 if (vos.size() == 31) {
                     break;
@@ -1158,108 +1163,120 @@ public class GenreSetPushService {
     }
 
 
-    public Map<String, Double> tooltipAjax(String wpId) throws Exception {
-        Map<String, Double> retValue = new HashMap<String, Double>();
-        if (InitialRunner.wpmap.containsKey(wpId)) {
-            Windpowerstation station = InitialRunner.wpmap.get(wpId);
-            retValue.put("jd", station.getLongitude() == null ? 0 : StringUtils.round(station.getLongitude(), 2));
-            retValue.put("wd", station.getLatitude() == null ? 0 : StringUtils.round(station.getLatitude(), 2));
+    public Map<String, Object> tooltipAjax() throws Exception {
 
-            retValue.put("zjts", StringUtils.round(station.getQuantity(), 0));
-            Map<String, WindPowerStationTestingPoint2> map;
+        Map<String, Object> resultmap = new HashMap<String, Object>();
+        for (Windpowerstation wp : InitialRunner.wpallls) {
 
+            Map<String, Double> retValue = new HashMap<String, Double>();
+            String wpId = wp.getId();
 
-            WindPowerStationTestingPoint2 yxts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_YXTS);
-            WindPowerStationTestingPoint2 djts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS);
-            WindPowerStationTestingPoint2 jxts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_WHTJ);
-            WindPowerStationTestingPoint2 tjts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_GZTJ);
-            WindPowerStationTestingPoint2 lxts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_TXZD);
+            if (InitialRunner.wpmap.containsKey(wpId)) {
+                Windpowerstation station = InitialRunner.wpmap.get(wpId);
+                retValue.put("jd", station.getLongitude() == null ? 0 : StringUtils.round(station.getLongitude(), 2));
+                retValue.put("wd", station.getLatitude() == null ? 0 : StringUtils.round(station.getLatitude(), 2));
 
-            PointData ptValue = realApiUtil.getRealData(yxts);
-            retValue.put("yxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                retValue.put("zjts", StringUtils.round(station.getQuantity(), 0));
+                Map<String, WindPowerStationTestingPoint2> map;
 
-            ptValue = realApiUtil.getRealData(djts);
-            retValue.put("djts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
 
-            ptValue = realApiUtil.getRealData(jxts);
-            retValue.put("jxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-
-            ptValue = realApiUtil.getRealData(tjts);
-            retValue.put("tjts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-
-            ptValue = realApiUtil.getRealData(lxts);
-            retValue.put("lxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-
-            if (wpId.endsWith("GDC")) {
-                WindPowerStationTestingPoint2 wd = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_FCCFTWD);
-
-                if (StringUtils.notEmp(wd)) {
-                    ptValue = realApiUtil.getRealData(wd);
-                    retValue.put("cftwd", StringUtils.round(ptValue.getPointValueInDouble(), 2));
-                } else {
-                    retValue.put("cftwd", 0.0);
+//                WindPowerStationTestingPoint2 yxts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_YXTS);
+//                WindPowerStationTestingPoint2 djts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS);
+//                WindPowerStationTestingPoint2 jxts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_WHTJ);
+//                WindPowerStationTestingPoint2 tjts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_GZTJ);
+//                WindPowerStationTestingPoint2 lxts = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_TXZD);
+//
+//                PointData ptValue = realApiUtil.getRealData(yxts);
+//                retValue.put("yxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+//
+//                ptValue = realApiUtil.getRealData(djts);
+//                retValue.put("djts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+//
+//                ptValue = realApiUtil.getRealData(jxts);
+//                retValue.put("jxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+//
+//                ptValue = realApiUtil.getRealData(tjts);
+//                retValue.put("tjts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+//
+//                ptValue = realApiUtil.getRealData(lxts);
+//                retValue.put("lxts", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+//
+//                if (wpId.endsWith("GDC")) {
+//                    WindPowerStationTestingPoint2 wd = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_FCCFTWD);
+//
+//                    if (StringUtils.notEmp(wd)) {
+//                        ptValue = realApiUtil.getRealData(wd);
+//                        retValue.put("cftwd", StringUtils.round(ptValue.getPointValueInDouble(), 2));
+//                    } else {
+//                        retValue.put("cftwd", 0.0);
+//                    }
+//
+//                }
+                PointData ptValue =null;
+                if (wpId.equals(WpEnum.MHS_FDC.name())) {
+                    ptValue = realApiUtil.getRealData(ConstantTR.MHSFGL_AI000305);
+                    retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                    retValue.put("hb", 1893.0);
+                    ptValue = realApiUtil.getRealData(ConstantTR.JSFW_MHSSFS);
+                    retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                } else if (wpId.equals(WpEnum.NSS_FDC.name())) {
+                    ptValue = realApiUtil.getRealData(ConstantTR.NSSWD);
+                    retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                    retValue.put("hb", 1810.0);
+                    ptValue = realApiUtil.getRealData(ConstantTR.NSSPJFS);
+                    retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                } else if (wpId.equals(WpEnum.QS_FDC.name())) {
+                    ptValue = realApiUtil.getRealData(ConstantTR.QSWD);
+                    retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                    retValue.put("hb", 1573.0);
+                    ptValue = realApiUtil.getRealData(ConstantTR.QSPJFS);
+                    retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+
+                } else if (wpId.equals(WpEnum.SBQ_FDC.name())) {
+                    ptValue = realApiUtil.getRealData(ConstantTR.SBQFGL_AI000305);
+                    retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                    retValue.put("hb", 1357.0);
+                    ptValue = realApiUtil.getRealData(ConstantTR.JSFW_SBSSFS);
+                    retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                } else if (wpId.equals(WpEnum.DWK_GDC.name())) {
+                    ptValue = realApiUtil.getRealData(ConstantTR.DWKWD);
+                    retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                    retValue.put("hb", 1100.0);
+                    ptValue = realApiUtil.getRealData(ConstantTR.DWKPJFS);
+                    retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                } else if (wpId.equals(WpEnum.PL_GDC.name())) {
+                    ptValue = realApiUtil.getRealData(ConstantTR.PLWD);
+                    retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                    retValue.put("hb", 1080.0);
+                    ptValue = realApiUtil.getRealData(ConstantTR.PLPJFS);
+                    retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                } else if (wpId.equals(WpEnum.MCH_GDC.name())) {
+                    ptValue = realApiUtil.getRealData(ConstantTR.MCHWD);
+                    retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                    retValue.put("hb", 1360.0);
+                    ptValue = realApiUtil.getRealData(ConstantTR.MCHPJFS);
+                    retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                } else if (wpId.equals(WpEnum.XH_GDC.name())) {
+                    ptValue = realApiUtil.getRealData(ConstantTR.XHWD);
+                    retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                    retValue.put("hb", 1385.0);
+                    ptValue = realApiUtil.getRealData(ConstantTR.XHPJFS);
+                    retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                } else if (wpId.equals(WpEnum.XS_FDC.name())) {
+                    ptValue = realApiUtil.getRealData(ConstantTR.XSWD);
+                    retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
+                    retValue.put("hb", 2210.0);
+                    ptValue = realApiUtil.getRealData(ConstantTR.XSPJFS);
+                    retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
                 }
 
+                WindPowerStationTestingPoint2 glpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
+                ptValue = realApiUtil.getRealData(glpoint.getCode());
+                retValue.put("gl", StringUtils.round(ptValue.getPointValueInDouble(), 0));
             }
-
-            if (wpId.equals(WpEnum.MHS_FDC.name())) {
-                ptValue = realApiUtil.getRealData(ConstantTR.MHSFGL_AI000305);
-                retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                retValue.put("hb", 1893.0);
-                ptValue = realApiUtil.getRealData(ConstantTR.JSFW_MHSSFS);
-                retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-            } else if (wpId.equals(WpEnum.NSS_FDC.name())) {
-                ptValue = realApiUtil.getRealData(ConstantTR.NSSWD);
-                retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                retValue.put("hb", 1810.0);
-                ptValue = realApiUtil.getRealData(ConstantTR.NSSPJFS);
-                retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-            } else if (wpId.equals(WpEnum.QS_FDC.name())) {
-                ptValue = realApiUtil.getRealData(ConstantTR.QSWD);
-                retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                retValue.put("hb", 1573.0);
-                ptValue = realApiUtil.getRealData(ConstantTR.QSPJFS);
-                retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-
-            } else if (wpId.equals(WpEnum.SBQ_FDC.name())) {
-                ptValue = realApiUtil.getRealData(ConstantTR.SBQFGL_AI000305);
-                retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                retValue.put("hb", 1357.0);
-                ptValue = realApiUtil.getRealData(ConstantTR.JSFW_SBSSFS);
-                retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-            } else if (wpId.equals(WpEnum.DWK_GDC.name())) {
-                ptValue = realApiUtil.getRealData(ConstantTR.DWKWD);
-                retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                retValue.put("hb", 1100.0);
-                ptValue = realApiUtil.getRealData(ConstantTR.DWKPJFS);
-                retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-            } else if (wpId.equals(WpEnum.PL_GDC.name())) {
-                ptValue = realApiUtil.getRealData(ConstantTR.PLWD);
-                retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                retValue.put("hb", 1080.0);
-                ptValue = realApiUtil.getRealData(ConstantTR.PLPJFS);
-                retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-            } else if (wpId.equals(WpEnum.MCH_GDC.name())) {
-                ptValue = realApiUtil.getRealData(ConstantTR.MCHWD);
-                retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                retValue.put("hb", 1360.0);
-                ptValue = realApiUtil.getRealData(ConstantTR.MCHPJFS);
-                retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-            } else if (wpId.equals(WpEnum.XH_GDC.name())) {
-                ptValue = realApiUtil.getRealData(ConstantTR.XHWD);
-                retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                retValue.put("hb", 1385.0);
-                ptValue = realApiUtil.getRealData(ConstantTR.XHPJFS);
-                retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-            } else if (wpId.equals(WpEnum.XS_FDC.name())) {
-                ptValue = realApiUtil.getRealData(ConstantTR.XSWD);
-                retValue.put("dqwd", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-                retValue.put("hb", 2210.0);
-                ptValue = realApiUtil.getRealData(ConstantTR.XSPJFS);
-                retValue.put("ssfs", StringUtils.round(ptValue.getPointValueInDouble(), 0));
-            }
+            resultmap.put(wpId,retValue);
         }
-        return retValue;
+        return resultmap;
     }
 
 

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/MatrixDetialGfPushService.java

@@ -13,8 +13,8 @@ import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -40,7 +40,7 @@ public class MatrixDetialGfPushService {
 
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {

+ 47 - 35
src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java

@@ -3,6 +3,7 @@ package com.gyee.frame.service.websocket;
 
 import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Equipmentmodel;
 import com.gyee.frame.model.auto.Windpowerstation;
 import com.gyee.frame.model.auto.Windturbine;
 import com.gyee.frame.model.custom.MatrixVo;
@@ -13,8 +14,8 @@ import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -39,8 +40,7 @@ public class MatrixDetialPushService {
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
 
 
-
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {
@@ -58,7 +58,6 @@ public class MatrixDetialPushService {
         Map<String, Object> wpmap = new HashMap<String, Object>();
 
 
-
         int fcdjnum = 0;
         int fcsdtjnum = 0;
         int fczcfdnum = 0;
@@ -89,14 +88,14 @@ public class MatrixDetialPushService {
         String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
 
         //        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
-        List<List<MatrixVo>> fjvos=new ArrayList<>();
+        List<List<MatrixVo>> fjvos = new ArrayList<>();
         Map<String, Map<String, Object>> fczbmap = new HashMap<>();
         for (Windpowerstation wp : InitialRunner.wpls) {
 
             Map<String, Object> jczbmap = new HashMap<>();
             jczbmap.put("name", wp.getName());
 
-        /*************************************************风场指标统计*************************************************************/
+            /*************************************************风场指标统计*************************************************************/
 
 
             List<String> jczbls = new ArrayList<>();
@@ -205,13 +204,13 @@ public class MatrixDetialPushService {
                 jczbmap.put("lxnum", lxnum);
 
 
-                double djts=djnum+sdtjnum;
-                double yxts=zcfdnum+qxjclnum;
-                double gzts=gztjnum+cnsltjnum;
-                double lxts=lxnum;
-                double whts=jxtjnum+cnsljxnum;
-                double xdts=xdjclnum+xdtjnum;
-                double slts=dwslnum+hjslnum;
+                double djts = djnum + sdtjnum;
+                double yxts = zcfdnum + qxjclnum;
+                double gzts = gztjnum + cnsltjnum;
+                double lxts = lxnum;
+                double whts = jxtjnum + cnsljxnum;
+                double xdts = xdjclnum + xdtjnum;
+                double slts = dwslnum + hjslnum;
 
                 jczbmap.put("djts", djts);
                 jczbmap.put("yxts", yxts);
@@ -221,7 +220,7 @@ public class MatrixDetialPushService {
                 jczbmap.put("xdts", xdts);
                 jczbmap.put("slts", slts);
 
-                jczbmap.put("jrts",djnum+sdtjnum+zcfdnum+qxjclnum+xdjclnum+xdtjnum+gztjnum+cnsltjnum+jxtjnum+cnsljxnum+dwslnum+hjslnum+lxnum);
+                jczbmap.put("jrts", djnum + sdtjnum + zcfdnum + qxjclnum + xdjclnum + xdtjnum + gztjnum + cnsltjnum + jxtjnum + cnsljxnum + dwslnum + hjslnum + lxnum);
 
                 if (wp.getId().endsWith("FDC")) {
 
@@ -272,7 +271,7 @@ public class MatrixDetialPushService {
                 //AGC有功设定
                 jczbmap.put("agcygsd", 0.0);
                 //待机台数
-                jczbmap.put("djnum",  0.0);
+                jczbmap.put("djnum", 0.0);
                 //手动停机台数
                 jczbmap.put("sdtjts", 0.0);
                 //正常发电台数
@@ -299,21 +298,18 @@ public class MatrixDetialPushService {
                 jczbmap.put("lxnum", 0.0);
             }
 
-            fczbmap.put(wp.getId(),jczbmap);
+            fczbmap.put(wp.getId(), jczbmap);
 /*************************************************风场指标统计*************************************************************/
 
 
-
-
 /*************************************************风机指标统计*************************************************************/
             List<String> fjzbls = new ArrayList<>();
 
-            List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
+            List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
 
             List<MatrixVo> vos = new ArrayList<>();
 
-            for(Windturbine wt:wtls)
-            {
+            for (Windturbine wt : wtls) {
                 //风机状态
                 fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.ZTMX).getId());
                 //风速
@@ -321,6 +317,14 @@ public class MatrixDetialPushService {
                 //功率
                 fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
 
+                //风机转数
+                if (wt.getWindpowerstationid().equals("QS_FDC")) {
+                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.QSTPOINT_WT_FDJZS).getId());
+                } else {
+                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FDJZS).getId());
+                }
+
+
             }
 
             List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
@@ -328,23 +332,33 @@ public class MatrixDetialPushService {
             if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
 
 
-                int step=3;
-                for(int i=0;i<wtls.size();i++)
-                {
-                    Windturbine wt=wtls.get(i);
+                int step = 4;
+                for (int i = 0; i < wtls.size(); i++) {
+                    Windturbine wt = wtls.get(i);
 
-                    MatrixVo vo=new MatrixVo();
+                    MatrixVo vo = new MatrixVo();
                     vo.setWtId(wt.getId());
-                    if(StringUtils.notEmp(wt.getStatus()))
-                    {
-                        String num=wt.getStatus().substring(wt.getStatus().length()-3);
+                    if (StringUtils.notEmp(wt.getStatus())) {
+                        String num = wt.getStatus().substring(wt.getStatus().length() - 3);
                         vo.setWtnum(num);
 
                     }
 
-                    vo.setFjzt(MathUtil.twoBit(fjzblist.get(i*step).getPointValueInDouble()));
-                    vo.setFs(MathUtil.twoBit(fjzblist.get(i*step+1).getPointValueInDouble()));
-                    vo.setGl(MathUtil.twoBit(fjzblist.get(i*step+2).getPointValueInDouble()));
+                    vo.setFjzt(MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble()));
+                    vo.setFs(MathUtil.twoBit(fjzblist.get(i * step + 1).getPointValueInDouble()));
+                    vo.setGl(MathUtil.twoBit(fjzblist.get(i * step + 2).getPointValueInDouble()));
+
+                    //风机转数
+
+                    double fdjzs = MathUtil.twoBit(fjzblist.get(i * step + 3).getPointValueInDouble());
+                    Equipmentmodel model = InitialRunner.mlmap.get(wt.getModelid());
+                    if (model.getPowerproduction() == 2000) {
+                        vo.setFdjzs(fdjzs * 9.55);
+                    } else {
+                        vo.setFdjzs(fdjzs);
+                    }
+
+
                     vo.setWtCode(wt.getCode());
                     vo.setWpId(wt.getWindpowerstationid());
                     vos.add(vo);
@@ -365,7 +379,6 @@ public class MatrixDetialPushService {
 /*******************************************风场、光伏状态数量统计***********************************************************/
 
 
-
         map.put("fcdjnum", fcdjnum);
         map.put("fcsdtjnum", fcsdtjnum);
         map.put("fczcfdnum", fczcfdnum);
@@ -381,8 +394,7 @@ public class MatrixDetialPushService {
         map.put("fclxnum", fclxnum);
 
 
-
-        double fcjrnum = fcdjnum + fcsdtjnum + fczcfdnum + fcqxjclnum + fcxdjclnum + fcxdtjnum+fcgztjnum+fccnsltjnum+fcjxtjnum+fccnsljxnum+fcdwslnum+fchjslnum+fclxnum;
+        double fcjrnum = fcdjnum + fcsdtjnum + fczcfdnum + fcqxjclnum + fcxdjclnum + fcxdtjnum + fcgztjnum + fccnsltjnum + fcjxtjnum + fccnsljxnum + fcdwslnum + fchjslnum + fclxnum;
 
         map.put("fcjrnum", fcjrnum);
 //        map.put("gfdjnum", gfdjnum);

+ 2 - 6
src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java

@@ -7,11 +7,7 @@ import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.MatrixVo;
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.service.*;
-import com.gyee.frame.util.DateUtils;
-import com.gyee.frame.util.IRealTimeDataBaseUtil;
-import com.gyee.frame.util.MathUtil;
-import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
+import com.gyee.frame.util.*;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -35,7 +31,7 @@ public class MatrixPushByWpService {
     private GeneralAppearancePushService generalAppearancePushService;
     @Resource
     private WpMttrAndMtbMonthService wpMttrAndMtbMonthService;
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> findMatrixById(String wpId) throws Exception {

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java

@@ -13,8 +13,8 @@ import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -39,7 +39,7 @@ public class MatrixPushService {
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/MatrixQfPushService.java

@@ -14,8 +14,8 @@ import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -44,7 +44,7 @@ public class MatrixQfPushService {
     private final String GF = "-2";
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/PowerFirstPushService.java

@@ -3,8 +3,8 @@ package com.gyee.frame.service.websocket;
 
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.apache.poi.ss.usermodel.*;
 import org.springframework.stereotype.Service;
 import org.springframework.util.ClassUtils;
@@ -20,7 +20,7 @@ import java.util.Map;
 public class PowerFirstPushService {
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {

+ 15 - 15
src/main/java/com/gyee/frame/service/websocket/RealPowerPushService.java

@@ -12,8 +12,8 @@ import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -39,7 +39,7 @@ public class RealPowerPushService {
     private final String GF = "-2";
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
     public Map<String, Object> genreSetMap() throws Exception {
@@ -128,14 +128,14 @@ public class RealPowerPushService {
 
                 DataVo vo = new DataVo();
 
-                vo.setValue1(0.0);// 应发功率
-                vo.setValue2(0.0);// 实发功率
-                vo.setValue3(0.0);// 理论功率
-                vo.setValue4(0.0);// 预测功率
-                vo.setValue5(0.0);// 保证功率
-                vo.setValue6(0.0);// 平均风速
-                vo.setValue7(0.0);// 72小时预测功率
-                vo.setValue9(0.0);// 最优功率律
+//                vo.setValue1(0.0);// 应发功率
+//                vo.setValue2(0.0);// 实发功率
+//                vo.setValue3(0.0);// 理论功率
+//                vo.setValue4(0.0);// 预测功率
+//                vo.setValue5(0.0);// 保证功率
+//                vo.setValue6(0.0);// 平均风速
+//                vo.setValue7(0.0);// 72小时预测功率
+//                vo.setValue9(0.0);// 最优功率律
 
                 vos.add(vo);
             }
@@ -194,7 +194,7 @@ public class RealPowerPushService {
 
                                         vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
 
-                                        double ycgl = (vos.get(j).getValue4() == null ? vos.get(0).getValue4() : vos.get(j).getValue4()) + (datas.get(j) == null ? datas.get(0).getPointValueInDouble() : datas.get(j).getPointValueInDouble());
+                                        double ycgl = (vos.get(j).getValue4() == null ? 0.0 : vos.get(j).getValue4()) + (datas.get(j) == null ? 0.0 : datas.get(j).getPointValueInDouble());
 
                                         vos.get(j).setValue4(StringUtils.round(ycgl, 2));
 
@@ -236,7 +236,7 @@ public class RealPowerPushService {
 
                                             double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
 
-                                            ycgl = (vos.get(datas.size() + i).getValue4() == null ? vos.get(0).getValue4() : vos.get(datas.size() + i).getValue4()) + ycgl;
+                                            ycgl = (vos.get(datas.size() + i).getValue4() == null ? 0.0 : vos.get(datas.size() + i).getValue4()) + ycgl;
 
                                             vos.get(datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
                                         }
@@ -506,7 +506,7 @@ public class RealPowerPushService {
 
                                         vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
 
-                                        double ycgl = (vos.get(j).getValue4() == null ? vos.get(0).getValue4() : vos.get(j).getValue4()) + (datas.get(j) == null ? datas.get(0).getPointValueInDouble() : datas.get(j).getPointValueInDouble());
+                                        double ycgl = (vos.get(j).getValue4() == null ? 0.0 : vos.get(j).getValue4()) + (datas.get(j) == null ? 0.0 : datas.get(j).getPointValueInDouble());
 
                                         vos.get(j).setValue4(StringUtils.round(ycgl, 2));
 
@@ -549,7 +549,7 @@ public class RealPowerPushService {
 
                                             double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
 
-                                            ycgl = (vos.get(datas.size() + i).getValue4() == null ? vos.get(0).getValue4() : vos.get(datas.size() + i).getValue4()) + ycgl;
+                                            ycgl = (vos.get(datas.size() + i).getValue4() == null ? 0.0 : vos.get(datas.size() + i).getValue4()) + ycgl;
 
                                             vos.get(datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
                                         }
@@ -970,7 +970,7 @@ public class RealPowerPushService {
                                 vos.get(i).setTime(glls.get(i).getPointTime() * 1000);
                                 double temp1 = glls.get(i).getPointValueInDouble();
 
-                                if(type==0)
+                                if(type==0 && (gltype.equals("bzgl") || gltype.equals("yfgl")))
                                 {
                                     temp1 = new BigDecimal(temp1).divide(new BigDecimal(100000), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
 

+ 7 - 3
src/main/java/com/gyee/frame/service/websocket/WpInfoPushService.java

@@ -14,10 +14,11 @@ import com.gyee.frame.service.ProjectPlanService;
 import com.gyee.frame.service.WindPowerstationTestingPointService;
 import com.gyee.frame.service.WindpowerinfodayService;
 import com.gyee.frame.service.WpMttrAndMtbMonthService;
+import com.gyee.frame.service.weather.WeatherService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -42,7 +43,9 @@ public class WpInfoPushService {
     private RealPowerPushService realPowerPushService;
     @Resource
     private WpMttrAndMtbMonthService wpMttrAndMtbMonthService;
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    @Resource
+    private WeatherService weatherService;
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
     private final double YCFDLXS = 1.08;
     String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
 
@@ -1112,7 +1115,8 @@ public class WpInfoPushService {
             jczbmap.put("name", wp.getName());
             jczbmap.put("zjrl", zjrl);
 
-
+            Map<String, Object> tqmap = weatherService.getWeatherRealInfo(id);
+            map.put("tqmap", tqmap);
             List<String> jczbls = new ArrayList<>();
 
             jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_RFDL).getCode());

+ 2 - 6
src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java

@@ -9,11 +9,7 @@ import com.gyee.frame.service.WarningRecordsService;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindTurbineTestingPointDiService;
 import com.gyee.frame.service.WindturbineinfodayService;
-import com.gyee.frame.util.DateUtils;
-import com.gyee.frame.util.IRealTimeDataBaseUtil;
-import com.gyee.frame.util.MathUtil;
-import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
+import com.gyee.frame.util.*;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -31,7 +27,7 @@ public class WtInfoPushService {
     private WindturbineinfodayService windturbineinfodayService;
     @Resource
     private WarningRecordsService warningRecordsService;
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
     String QS_FDC = "QS_FDC";
 

+ 2 - 2
src/main/java/com/gyee/frame/service/websocket/WtWarnPushService.java

@@ -10,8 +10,8 @@ import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.model.custom.ValueVo;
 import com.gyee.frame.service.WindTurbineTestingPointDiService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
 import com.gyee.frame.util.StringUtils;
-import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -25,7 +25,7 @@ public class WtWarnPushService {
     private WindTurbineTestingPointDiService windTurbineTestingPointDiService;
 
 
-    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
     String QS_FDC = "QS_FDC";
 

+ 8 - 7
src/main/java/com/gyee/frame/util/RealTimeDataBaseFactory.java

@@ -1,7 +1,6 @@
 package com.gyee.frame.util;
 
 
-import com.gyee.frame.common.conf.V2Config;
 import com.gyee.frame.util.golden.EdosUtil;
 
 public class RealTimeDataBaseFactory {
@@ -9,13 +8,15 @@ public class RealTimeDataBaseFactory {
 
     public static IRealTimeDataBaseUtil createRealTimeDataBase() {
 
+        return new EdosUtil();
+//        switch (V2Config.getRealtimedataBase()) {
+//
+//            case "golden":
+//                return new EdosUtil();
+//            default:
+//                return new EdosUtil();
+//        }
 
-        switch (V2Config.getRealtimedataBase()) {
 
-            case "golden":
-                return new EdosUtil();
-            default:
-                return new EdosUtil();
-        }
     }
 }

+ 54 - 0
src/main/java/com/gyee/frame/util/taos/ApiTaos.java

@@ -0,0 +1,54 @@
+/** 
+ * Project Name:nxfd2 
+ * File Name:ApiEdos.java 
+ * Package Name:com.hcks.cmfds.util 
+ * Date:2016-7-25下午12:26:14 
+ * Copyright (c) 2016, chenzhou1025@126.com All Rights Reserved. 
+ * 
+ */
+
+package com.gyee.frame.util.taos;
+
+import com.taosdata.jdbc.TSDBDriver;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.util.Properties;
+
+
+public class ApiTaos {
+
+    private static Connection connection = null;
+
+  
+    private ApiTaos() {
+
+    }
+
+    public static Connection getInstance() throws Exception {
+    	
+    	
+
+        if (connection == null) {
+        	
+        	connection = getConn();
+
+        }
+
+        return connection;
+
+    }
+    
+    private static Connection getConn() throws Exception{
+    	  Class.forName("com.taosdata.jdbc.TSDBDriver");
+    	  // Class.forName("com.taosdata.jdbc.rs.RestfulDriver");
+    	  String jdbcUrl = "jdbc:TAOS://cm1:6030/test?user=root&password=taosdata";
+    	  // String jdbcUrl = "jdbc:TAOS-RS://taosdemo.com:6041/test?user=root&password=taosdata";
+    	  Properties connProps = new Properties();
+    	  connProps.setProperty(TSDBDriver.PROPERTY_KEY_CHARSET, "UTF-8");
+    	  connProps.setProperty(TSDBDriver.PROPERTY_KEY_LOCALE, "en_US.UTF-8");
+    	  connProps.setProperty(TSDBDriver.PROPERTY_KEY_TIME_ZONE, "UTC-8");
+    	  Connection conn = DriverManager.getConnection(jdbcUrl, connProps);
+    	  return conn;
+    	}
+}

File diff suppressed because it is too large
+ 1274 - 0
src/main/java/com/gyee/frame/util/taos/TaosUtil.java


+ 10 - 11
src/main/resources/application.yml

@@ -133,15 +133,14 @@ pagehelper:
     reasonable: true
     supportMethodsArguments: true
     params: count=countSql
-#七牛云配置
-oss:
-  qiniu:
-    #对应存储空间的访问域名
-    domain: q0stnsal9.aaa.bbb.com
-    #accessKey密钥
-    accessKey: 5o-rVbYF111C
-    #secretKey秘钥
-    secretKey: C9TETPDFHDj38d
-    #bucket是创建的存储空间名
-    bucket: test-img
+#预警测点配置
+temperature:
+  yyz: AI020,AI018
+  clx: AI041,AI038,AI039,AI040
+  fdj: AI045,AI047,AI049,AI046,AI048,AI050,AI052,AI053
+  bj: AI110,AI111,AI112
+  qt: AI056,AI057,AI069,AI070
+  zz: AI072,AI071
+  zd: AI020,AI018
+
 

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

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

+ 398 - 0
src/main/resources/mybatis/auto/MainBrownouts2Mapper.xml

@@ -0,0 +1,398 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gyee.frame.mapper.auto.MainBrownouts2Mapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.MainBrownouts2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="STOPTIME" jdbcType="TIMESTAMP" property="stoptime" />
+    <result column="STARTTIME" jdbcType="TIMESTAMP" property="starttime" />
+    <result column="STOPTYPEID" jdbcType="VARCHAR" property="stoptypeid" />
+    <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
+    <result column="LIMITLOAD" jdbcType="DECIMAL" property="limitload" />
+    <result column="BROWNOUTSDIRECTIVE" jdbcType="VARCHAR" property="brownoutsdirective" />
+    <result column="WINDSPEED" jdbcType="DECIMAL" property="windspeed" />
+    <result column="THISLOAD" jdbcType="DECIMAL" property="thisload" />
+    <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
+    <result column="WPNAME" jdbcType="VARCHAR" property="wpname" />
+    <result column="LOSSPOWER" jdbcType="DECIMAL" property="losspower" />
+    <result column="STOPHOURS" jdbcType="DECIMAL" property="stophours" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    ID, STOPTIME, STARTTIME, STOPTYPEID, DESCRIPTION, LIMITLOAD, BROWNOUTSDIRECTIVE, 
+    WINDSPEED, THISLOAD, WINDPOWERSTATIONID, WPNAME, LOSSPOWER, STOPHOURS
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.MainBrownouts2Example" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from MAINBROWNOUTS2
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from MAINBROWNOUTS2
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from MAINBROWNOUTS2
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.MainBrownouts2Example">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from MAINBROWNOUTS2
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.MainBrownouts2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into MAINBROWNOUTS2 (ID, STOPTIME, STARTTIME, 
+      STOPTYPEID, DESCRIPTION, LIMITLOAD, 
+      BROWNOUTSDIRECTIVE, WINDSPEED, THISLOAD, 
+      WINDPOWERSTATIONID, WPNAME, LOSSPOWER, 
+      STOPHOURS)
+    values (#{id,jdbcType=VARCHAR}, #{stoptime,jdbcType=TIMESTAMP}, #{starttime,jdbcType=TIMESTAMP}, 
+      #{stoptypeid,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{limitload,jdbcType=DECIMAL}, 
+      #{brownoutsdirective,jdbcType=VARCHAR}, #{windspeed,jdbcType=DECIMAL}, #{thisload,jdbcType=DECIMAL}, 
+      #{windpowerstationid,jdbcType=VARCHAR}, #{wpname,jdbcType=VARCHAR}, #{losspower,jdbcType=DECIMAL}, 
+      #{stophours,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.MainBrownouts2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into MAINBROWNOUTS2
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="stoptime != null">
+        STOPTIME,
+      </if>
+      <if test="starttime != null">
+        STARTTIME,
+      </if>
+      <if test="stoptypeid != null">
+        STOPTYPEID,
+      </if>
+      <if test="description != null">
+        DESCRIPTION,
+      </if>
+      <if test="limitload != null">
+        LIMITLOAD,
+      </if>
+      <if test="brownoutsdirective != null">
+        BROWNOUTSDIRECTIVE,
+      </if>
+      <if test="windspeed != null">
+        WINDSPEED,
+      </if>
+      <if test="thisload != null">
+        THISLOAD,
+      </if>
+      <if test="windpowerstationid != null">
+        WINDPOWERSTATIONID,
+      </if>
+      <if test="wpname != null">
+        WPNAME,
+      </if>
+      <if test="losspower != null">
+        LOSSPOWER,
+      </if>
+      <if test="stophours != null">
+        STOPHOURS,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="stoptime != null">
+        #{stoptime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="starttime != null">
+        #{starttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="stoptypeid != null">
+        #{stoptypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="limitload != null">
+        #{limitload,jdbcType=DECIMAL},
+      </if>
+      <if test="brownoutsdirective != null">
+        #{brownoutsdirective,jdbcType=VARCHAR},
+      </if>
+      <if test="windspeed != null">
+        #{windspeed,jdbcType=DECIMAL},
+      </if>
+      <if test="thisload != null">
+        #{thisload,jdbcType=DECIMAL},
+      </if>
+      <if test="windpowerstationid != null">
+        #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="wpname != null">
+        #{wpname,jdbcType=VARCHAR},
+      </if>
+      <if test="losspower != null">
+        #{losspower,jdbcType=DECIMAL},
+      </if>
+      <if test="stophours != null">
+        #{stophours,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.MainBrownouts2Example" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from MAINBROWNOUTS2
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update MAINBROWNOUTS2
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.stoptime != null">
+        STOPTIME = #{record.stoptime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.starttime != null">
+        STARTTIME = #{record.starttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.stoptypeid != null">
+        STOPTYPEID = #{record.stoptypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.description != null">
+        DESCRIPTION = #{record.description,jdbcType=VARCHAR},
+      </if>
+      <if test="record.limitload != null">
+        LIMITLOAD = #{record.limitload,jdbcType=DECIMAL},
+      </if>
+      <if test="record.brownoutsdirective != null">
+        BROWNOUTSDIRECTIVE = #{record.brownoutsdirective,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windspeed != null">
+        WINDSPEED = #{record.windspeed,jdbcType=DECIMAL},
+      </if>
+      <if test="record.thisload != null">
+        THISLOAD = #{record.thisload,jdbcType=DECIMAL},
+      </if>
+      <if test="record.windpowerstationid != null">
+        WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.wpname != null">
+        WPNAME = #{record.wpname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.losspower != null">
+        LOSSPOWER = #{record.losspower,jdbcType=DECIMAL},
+      </if>
+      <if test="record.stophours != null">
+        STOPHOURS = #{record.stophours,jdbcType=DECIMAL},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update MAINBROWNOUTS2
+    set ID = #{record.id,jdbcType=VARCHAR},
+      STOPTIME = #{record.stoptime,jdbcType=TIMESTAMP},
+      STARTTIME = #{record.starttime,jdbcType=TIMESTAMP},
+      STOPTYPEID = #{record.stoptypeid,jdbcType=VARCHAR},
+      DESCRIPTION = #{record.description,jdbcType=VARCHAR},
+      LIMITLOAD = #{record.limitload,jdbcType=DECIMAL},
+      BROWNOUTSDIRECTIVE = #{record.brownoutsdirective,jdbcType=VARCHAR},
+      WINDSPEED = #{record.windspeed,jdbcType=DECIMAL},
+      THISLOAD = #{record.thisload,jdbcType=DECIMAL},
+      WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      WPNAME = #{record.wpname,jdbcType=VARCHAR},
+      LOSSPOWER = #{record.losspower,jdbcType=DECIMAL},
+      STOPHOURS = #{record.stophours,jdbcType=DECIMAL}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.MainBrownouts2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update MAINBROWNOUTS2
+    <set>
+      <if test="stoptime != null">
+        STOPTIME = #{stoptime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="starttime != null">
+        STARTTIME = #{starttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="stoptypeid != null">
+        STOPTYPEID = #{stoptypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        DESCRIPTION = #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="limitload != null">
+        LIMITLOAD = #{limitload,jdbcType=DECIMAL},
+      </if>
+      <if test="brownoutsdirective != null">
+        BROWNOUTSDIRECTIVE = #{brownoutsdirective,jdbcType=VARCHAR},
+      </if>
+      <if test="windspeed != null">
+        WINDSPEED = #{windspeed,jdbcType=DECIMAL},
+      </if>
+      <if test="thisload != null">
+        THISLOAD = #{thisload,jdbcType=DECIMAL},
+      </if>
+      <if test="windpowerstationid != null">
+        WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="wpname != null">
+        WPNAME = #{wpname,jdbcType=VARCHAR},
+      </if>
+      <if test="losspower != null">
+        LOSSPOWER = #{losspower,jdbcType=DECIMAL},
+      </if>
+      <if test="stophours != null">
+        STOPHOURS = #{stophours,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.MainBrownouts2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update MAINBROWNOUTS2
+    set STOPTIME = #{stoptime,jdbcType=TIMESTAMP},
+      STARTTIME = #{starttime,jdbcType=TIMESTAMP},
+      STOPTYPEID = #{stoptypeid,jdbcType=VARCHAR},
+      DESCRIPTION = #{description,jdbcType=VARCHAR},
+      LIMITLOAD = #{limitload,jdbcType=DECIMAL},
+      BROWNOUTSDIRECTIVE = #{brownoutsdirective,jdbcType=VARCHAR},
+      WINDSPEED = #{windspeed,jdbcType=DECIMAL},
+      THISLOAD = #{thisload,jdbcType=DECIMAL},
+      WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
+      WPNAME = #{wpname,jdbcType=VARCHAR},
+      LOSSPOWER = #{losspower,jdbcType=DECIMAL},
+      STOPHOURS = #{stophours,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 241 - 0
src/main/resources/mybatis/auto/TaosMapMapper.xml

@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gyee.frame.mapper.auto.TaosMapMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.TaosMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="STABLESID" jdbcType="VARCHAR" property="stablesid" />
+    <result column="DATABASEID" jdbcType="VARCHAR" property="databaseid" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    ID, STABLESID, DATABASEID
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.TaosMapExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from TAOSMAP
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from TAOSMAP
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from TAOSMAP
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.TaosMapExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from TAOSMAP
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.TaosMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into TAOSMAP (ID, STABLESID, DATABASEID
+      )
+    values (#{id,jdbcType=DECIMAL}, #{stablesid,jdbcType=VARCHAR}, #{databaseid,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.TaosMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into TAOSMAP
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="stablesid != null">
+        STABLESID,
+      </if>
+      <if test="databaseid != null">
+        DATABASEID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="stablesid != null">
+        #{stablesid,jdbcType=VARCHAR},
+      </if>
+      <if test="databaseid != null">
+        #{databaseid,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.TaosMapExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from TAOSMAP
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update TAOSMAP
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.stablesid != null">
+        STABLESID = #{record.stablesid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.databaseid != null">
+        DATABASEID = #{record.databaseid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update TAOSMAP
+    set ID = #{record.id,jdbcType=DECIMAL},
+      STABLESID = #{record.stablesid,jdbcType=VARCHAR},
+      DATABASEID = #{record.databaseid,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.TaosMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update TAOSMAP
+    <set>
+      <if test="stablesid != null">
+        STABLESID = #{stablesid,jdbcType=VARCHAR},
+      </if>
+      <if test="databaseid != null">
+        DATABASEID = #{databaseid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.TaosMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update TAOSMAP
+    set STABLESID = #{stablesid,jdbcType=VARCHAR},
+      DATABASEID = #{databaseid,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+</mapper>

+ 3 - 3
src/main/resources/mybatis/auto/WarningInfoDayMapper.xml

@@ -405,7 +405,7 @@
     WarningInfoDay.modelid = equipmentmodel.id
     AND WarningInfoDay.modelId = equipmentmodel.id  WHERE (
 
-    WarningInfoDay.recordDate>= #{beginDate} AND WarningInfoDay.recordDate &lt; #{endDate}
+    WarningInfoDay.recordDate>= to_date('${beginDate}','YYYY-MM-DD HH24:MI:SS') and WarningInfoDay.recordDate &lt; to_date('${endDate}','YYYY-MM-DD HH24:MI:SS')
     )
     GROUP BY Warning2.chineseText, WarningInfoDay.warningId, equipmentmodel.name  order by  ${order}
   </select>
@@ -414,7 +414,7 @@
 
     SELECT    SUM(WarningInfoDay.frequencyDay) AS frequencyday, SUM(WarningInfoDay.totalhoursDay) AS totalhoursday, WarningClassify.name
     FROM (SELECT  * FROM WarningInfoDay WHERE
-    WarningInfoDay.recordDate>= #{beginDate} AND WarningInfoDay.recordDate &lt; #{endDate} )
+       WarningInfoDay.recordDate>= to_date('${beginDate}','YYYY-MM-DD HH24:MI:SS') and WarningInfoDay.recordDate &lt; to_date('${endDate}','YYYY-MM-DD HH24:MI:SS'))
     WarningInfoDay LEFT JOIN Warning2 ON WarningInfoDay.warningId = Warning2.id LEFT JOIN WarningClassify ON Warning2.warningClassifyId = WarningClassify.id
     GROUP BY WarningClassify.name  order by  ${order}
 
@@ -423,7 +423,7 @@
   <select id="getWarningInfoDayByManufacturer"  resultType="com.gyee.frame.model.custom.SawVo">
     SELECT    WarningInfoDay.manufacturerId, SUM(WarningInfoDay.frequencyDay) AS frequencyday, SUM(WarningInfoDay.totalhoursDay) AS totalhoursday, Manufacturer.name
      FROM  WarningInfoDay INNER JOIN Manufacturer ON WarningInfoDay.manufacturerId = Manufacturer.id WHERE
-    WarningInfoDay.recordDate>= #{beginDate} AND WarningInfoDay.recordDate &lt; #{endDate}
+    WarningInfoDay.recordDate>= to_date('${beginDate}','YYYY-MM-DD HH24:MI:SS') and WarningInfoDay.recordDate &lt; to_date('${endDate}','YYYY-MM-DD HH24:MI:SS')
     GROUP BY WarningInfoDay.manufacturerId, Manufacturer.name  order by  ${order}
 
 

+ 374 - 0
src/main/resources/mybatis/auto/WindTurbineTestingPointaiyjMapper.xml

@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gyee.frame.mapper.auto.WindTurbineTestingPointaiyjMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.WindTurbineTestingPointaiyj">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <result column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="CODE" jdbcType="VARCHAR" property="code" />
+    <result column="NAME" jdbcType="VARCHAR" property="name" />
+    <result column="MODEL" jdbcType="VARCHAR" property="model" />
+    <result column="VALUEUNIT" jdbcType="VARCHAR" property="valueunit" />
+    <result column="ENGLISHNAME" jdbcType="VARCHAR" property="englishname" />
+    <result column="TYPEID" jdbcType="VARCHAR" property="typeid" />
+    <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
+    <result column="MAXVAL" jdbcType="DECIMAL" property="maxval" />
+    <result column="MINVAL" jdbcType="DECIMAL" property="minval" />
+    <result column="REASONABLEMAXVAL" jdbcType="DECIMAL" property="reasonablemaxval" />
+    <result column="REASONABLEMINVAL" jdbcType="DECIMAL" property="reasonableminval" />
+    <result column="WINDTURBINEID" jdbcType="VARCHAR" property="windturbineid" />
+    <result column="UNIFORMCODE" jdbcType="VARCHAR" property="uniformcode" />
+    <result column="SHORTID" jdbcType="VARCHAR" property="shortid" />
+    <result column="LONGID" jdbcType="VARCHAR" property="longid" />
+    <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
+    <result column="REALTIMEID" jdbcType="VARCHAR" property="realtimeid" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    ID, CODE, NAME, MODEL, VALUEUNIT, ENGLISHNAME, TYPEID, MODELID, MAXVAL, MINVAL, REASONABLEMAXVAL, 
+    REASONABLEMINVAL, WINDTURBINEID, UNIFORMCODE, SHORTID, LONGID, WINDPOWERSTATIONID, 
+    REALTIMEID
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointaiyjExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from WINDTURBINETESTINGPOINTAIYJ
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointaiyjExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from WINDTURBINETESTINGPOINTAIYJ
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointaiyj">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WINDTURBINETESTINGPOINTAIYJ (ID, CODE, NAME, 
+      MODEL, VALUEUNIT, ENGLISHNAME, 
+      TYPEID, MODELID, MAXVAL, 
+      MINVAL, REASONABLEMAXVAL, REASONABLEMINVAL, 
+      WINDTURBINEID, UNIFORMCODE, SHORTID, 
+      LONGID, WINDPOWERSTATIONID, REALTIMEID
+      )
+    values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{model,jdbcType=VARCHAR}, #{valueunit,jdbcType=VARCHAR}, #{englishname,jdbcType=VARCHAR}, 
+      #{typeid,jdbcType=VARCHAR}, #{modelid,jdbcType=VARCHAR}, #{maxval,jdbcType=DECIMAL}, 
+      #{minval,jdbcType=DECIMAL}, #{reasonablemaxval,jdbcType=DECIMAL}, #{reasonableminval,jdbcType=DECIMAL}, 
+      #{windturbineid,jdbcType=VARCHAR}, #{uniformcode,jdbcType=VARCHAR}, #{shortid,jdbcType=VARCHAR}, 
+      #{longid,jdbcType=VARCHAR}, #{windpowerstationid,jdbcType=VARCHAR}, #{realtimeid,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointaiyj">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WINDTURBINETESTINGPOINTAIYJ
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="code != null">
+        CODE,
+      </if>
+      <if test="name != null">
+        NAME,
+      </if>
+      <if test="model != null">
+        MODEL,
+      </if>
+      <if test="valueunit != null">
+        VALUEUNIT,
+      </if>
+      <if test="englishname != null">
+        ENGLISHNAME,
+      </if>
+      <if test="typeid != null">
+        TYPEID,
+      </if>
+      <if test="modelid != null">
+        MODELID,
+      </if>
+      <if test="maxval != null">
+        MAXVAL,
+      </if>
+      <if test="minval != null">
+        MINVAL,
+      </if>
+      <if test="reasonablemaxval != null">
+        REASONABLEMAXVAL,
+      </if>
+      <if test="reasonableminval != null">
+        REASONABLEMINVAL,
+      </if>
+      <if test="windturbineid != null">
+        WINDTURBINEID,
+      </if>
+      <if test="uniformcode != null">
+        UNIFORMCODE,
+      </if>
+      <if test="shortid != null">
+        SHORTID,
+      </if>
+      <if test="longid != null">
+        LONGID,
+      </if>
+      <if test="windpowerstationid != null">
+        WINDPOWERSTATIONID,
+      </if>
+      <if test="realtimeid != null">
+        REALTIMEID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="code != null">
+        #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="model != null">
+        #{model,jdbcType=VARCHAR},
+      </if>
+      <if test="valueunit != null">
+        #{valueunit,jdbcType=VARCHAR},
+      </if>
+      <if test="englishname != null">
+        #{englishname,jdbcType=VARCHAR},
+      </if>
+      <if test="typeid != null">
+        #{typeid,jdbcType=VARCHAR},
+      </if>
+      <if test="modelid != null">
+        #{modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="maxval != null">
+        #{maxval,jdbcType=DECIMAL},
+      </if>
+      <if test="minval != null">
+        #{minval,jdbcType=DECIMAL},
+      </if>
+      <if test="reasonablemaxval != null">
+        #{reasonablemaxval,jdbcType=DECIMAL},
+      </if>
+      <if test="reasonableminval != null">
+        #{reasonableminval,jdbcType=DECIMAL},
+      </if>
+      <if test="windturbineid != null">
+        #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="uniformcode != null">
+        #{uniformcode,jdbcType=VARCHAR},
+      </if>
+      <if test="shortid != null">
+        #{shortid,jdbcType=VARCHAR},
+      </if>
+      <if test="longid != null">
+        #{longid,jdbcType=VARCHAR},
+      </if>
+      <if test="windpowerstationid != null">
+        #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="realtimeid != null">
+        #{realtimeid,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointaiyjExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from WINDTURBINETESTINGPOINTAIYJ
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WINDTURBINETESTINGPOINTAIYJ
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.code != null">
+        CODE = #{record.code,jdbcType=VARCHAR},
+      </if>
+      <if test="record.name != null">
+        NAME = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.model != null">
+        MODEL = #{record.model,jdbcType=VARCHAR},
+      </if>
+      <if test="record.valueunit != null">
+        VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
+      </if>
+      <if test="record.englishname != null">
+        ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.typeid != null">
+        TYPEID = #{record.typeid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.modelid != null">
+        MODELID = #{record.modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.maxval != null">
+        MAXVAL = #{record.maxval,jdbcType=DECIMAL},
+      </if>
+      <if test="record.minval != null">
+        MINVAL = #{record.minval,jdbcType=DECIMAL},
+      </if>
+      <if test="record.reasonablemaxval != null">
+        REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
+      </if>
+      <if test="record.reasonableminval != null">
+        REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
+      </if>
+      <if test="record.windturbineid != null">
+        WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.uniformcode != null">
+        UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.shortid != null">
+        SHORTID = #{record.shortid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.longid != null">
+        LONGID = #{record.longid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windpowerstationid != null">
+        WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.realtimeid != null">
+        REALTIMEID = #{record.realtimeid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WINDTURBINETESTINGPOINTAIYJ
+    set ID = #{record.id,jdbcType=VARCHAR},
+      CODE = #{record.code,jdbcType=VARCHAR},
+      NAME = #{record.name,jdbcType=VARCHAR},
+      MODEL = #{record.model,jdbcType=VARCHAR},
+      VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
+      ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
+      TYPEID = #{record.typeid,jdbcType=VARCHAR},
+      MODELID = #{record.modelid,jdbcType=VARCHAR},
+      MAXVAL = #{record.maxval,jdbcType=DECIMAL},
+      MINVAL = #{record.minval,jdbcType=DECIMAL},
+      REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
+      REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
+      WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
+      SHORTID = #{record.shortid,jdbcType=VARCHAR},
+      LONGID = #{record.longid,jdbcType=VARCHAR},
+      WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      REALTIMEID = #{record.realtimeid,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+</mapper>

+ 93 - 0
src/test/java/test/FaultPlaybackControllerTest.java

@@ -0,0 +1,93 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.controller.warn.FaultPlaybackController;
+import com.gyee.frame.model.custom.DataVo;
+import com.gyee.frame.model.custom.Tablepar;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+public class FaultPlaybackControllerTest {
+
+    @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";
+
+        FaultPlaybackController faultPlaybackController = SpringUtils.getBean("faultPlaybackController");
+
+
+        Tablepar tablepar = new Tablepar();
+        tablepar.setPageNum(1);
+        tablepar.setPageSize(10);
+        tablepar.setOrderByColumn(null);
+        tablepar.setIsAsc(null);
+
+        Calendar c = Calendar.getInstance();
+
+        c.set(Calendar.HOUR_OF_DAY, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+
+        c.set(Calendar.DAY_OF_MONTH, 1);
+        c.set(Calendar.MONTH, 0);
+        c.set(Calendar.YEAR, 2021);
+
+        Date beginDate = c.getTime();
+
+        c.add(Calendar.DAY_OF_MONTH, 1);
+
+        Date endDate = c.getTime();
+
+
+        AjaxResult result = faultPlaybackController.getFaultPlayback("MG01_01", "MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLS70,MHSFGL.NX_GD_MHSF_YC_P1_L1_001_FGLD70,MHSDQ.NX_GD_MHSF_DQ_P1_L1_001_DI0985", "0");
+        List<DataVo> ls = (List<DataVo>) result.get("data");
+        System.out.println(ls.size());
+
+//        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());
+//        }
+//
+//
+//
+    }
+}

+ 2 - 4
src/test/java/test/GenreSetPushDetialTest.java

@@ -51,10 +51,8 @@ public class GenreSetPushDetialTest {
 //        map.put("MHS01_XL", genreSetPushDetailLnService.findYearInfo("MHS01_XL","nfdl"));
 
 
-        map.put("0", realPowerPushService.findGLDetail("0","sjgl"));
-        map.put("MHS_FDC",realPowerPushService.findGLDetail("MHS_FDC","sjgl"));
-        map.put("MHS01_GC",realPowerPushService.findGLDetail("MHS01_GC","sjgl"));
-        map.put("MHS01_XL",realPowerPushService.findGLDetail("MHS01_XL","sjgl"));
+        map.put("0", realPowerPushService.findGLDetail("0","bzgl"));
+        map.put("0s",realPowerPushService.findGLDetail("0","yfgl"));
 
 
          System.out.println(map.size());

+ 1 - 1
src/test/java/test/GenreSetPushTest.java

@@ -26,7 +26,7 @@ public class GenreSetPushTest {
         GenreSetPushController genreSetPushController= SpringUtils.getBean("genreSetPushController");
 
 
-        Map<String, Object> map =genreSetPushController.findBasicDataInfo("-2");
+        Map<String, Object> map =genreSetPushController.findBasicDataInfo("0");
 //        Map<String, Object> map =genreSetPushController.findDayInfo("0","rfdl");
 
 //        Map<String, Object> map2 =genreSetPushController.findBasicDataInfo("MHS_FDC");

+ 8 - 4
src/test/java/test/HealthTest.java

@@ -58,10 +58,14 @@ public class HealthTest {
 //        System.out.println(map);
 //
 //
-//        Map<String, Object> map =healthSubController.findPartHealthInfo(wtid);
+       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);
+       System.out.println(map);
 
 
 
@@ -79,8 +83,8 @@ public class HealthTest {
 //        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());
         System.out.println("***************************************************************************************");
 
 

+ 15 - 9
src/test/java/test/LeaderboardTest.java

@@ -1,14 +1,17 @@
 package test;
 
 import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.leaderboard.LeaderboardController;
+import com.gyee.frame.model.custom.StatisticalAnalysisTopVo;
 import com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
 import java.util.Calendar;
 import java.util.Date;
+import java.util.List;
 
 public class LeaderboardTest {
 
@@ -43,8 +46,8 @@ public class LeaderboardTest {
         Tablepar tablepar=new Tablepar();
         tablepar.setPageNum(1);
         tablepar.setPageSize(10);
-        tablepar.setOrderByColumn("power");
-        tablepar.setIsAsc("asc");
+        tablepar.setOrderByColumn(null);
+        tablepar.setIsAsc(null);
 
 //        AjaxResult ajaxResult =leaderboardController.fittingtoplist(tablepar,null,beginDate,endDate);
 //
@@ -54,14 +57,17 @@ public class LeaderboardTest {
 //            System.out.println(wtd.getFrequency()+"----------------"+wtd.getPower()+"----------------"+wtd.getSpeed());
 //        }
 
-//        AjaxResult  ajaxResult =leaderboardController.totalPowerCapacityTopList(tablepar,null,beginDate,endDate);
-//
-//        List<StatisticalAnalysisTopVo>   test2=(List<StatisticalAnalysisTopVo>)ajaxResult.get("data");
-//        for(StatisticalAnalysisTopVo wtd:test2)
-//        {
-//            System.out.println(wtd.getGeneratingCapacity()+"----------------"+wtd.getPower()+"----------------"+wtd.getSpeed());
-//        }
+//        AjaxResult ajaxResult =leaderboardController.loadfactortoplist(tablepar,"-1","MHS_FDC","2021-01-01","2021-01-03");
+//        AjaxResult ajaxResult =leaderboardController.querywarningStatistical(tablepar,"1","2021-01-01","2021-01-03");
+
+        AjaxResult ajaxResult1 =leaderboardController.querywarningStatistical(tablepar,"2","2021-01-01","2021-01-03");
+//        AjaxResult ajaxResult2 =leaderboardController.querywarningStatistical(tablepar,"3","2021-01-01","2021-01-03");
 
+        List<StatisticalAnalysisTopVo> test2=(List<StatisticalAnalysisTopVo>)ajaxResult1.get("data");
+        for(StatisticalAnalysisTopVo wtd:test2)
+        {
+            System.out.println(wtd.getWindfarm()+"----------------"+wtd.getPower()+"----------------"+wtd.getSpeed());
+        }
 
 //        AjaxResult ajaxResult =leaderboardController.utilizationList(tablepar,null,"2021-01-01","2021-01-03","0");
 //

+ 104 - 0
src/test/java/test/MainBrownouts2ControllerTest.java

@@ -0,0 +1,104 @@
+package test;
+
+import com.github.pagehelper.PageInfo;
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.controller.warn.MainBrownouts2Controller;
+import com.gyee.frame.model.custom.MainBrownoutsVo;
+import com.gyee.frame.model.custom.Tablepar;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+public class MainBrownouts2ControllerTest {
+
+    @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";
+
+        MainBrownouts2Controller mainBrownouts2Controller= SpringUtils.getBean("mainBrownouts2Controller");
+
+
+        Tablepar tablepar=new Tablepar();
+        tablepar.setPageNum(1);
+        tablepar.setPageSize(10);
+        tablepar.setOrderByColumn(null);
+        tablepar.setIsAsc(null);
+
+        Calendar c = Calendar.getInstance();
+
+        c.set(Calendar.HOUR_OF_DAY, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+
+        c.set(Calendar.DAY_OF_MONTH,1);
+        c.set(Calendar.MONTH,0);
+        c.set(Calendar.YEAR,2021);
+
+        Date beginDate = c.getTime();
+
+        c.add(Calendar.DAY_OF_MONTH,1);
+
+        Date endDate = c.getTime();
+
+        AjaxResult result= mainBrownouts2Controller.getBrownoutsList(tablepar,"MHS_FDC","2021-05-01","2021-05-10");
+
+
+        PageInfo<MainBrownoutsVo> pageinfo=(PageInfo<MainBrownoutsVo>)result.get("data");
+        List<MainBrownoutsVo> list=(List<MainBrownoutsVo>)pageinfo.getList();
+        if(!list.isEmpty())
+        {
+            Map<String,Object> map= mainBrownouts2Controller.getBrownouts(list.get(1).getId());
+            System.out.println(map.size());
+        }
+
+
+
+//        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());
+//        }
+//
+//
+//
+    }
+}

+ 4 - 3
src/test/java/test/ScatterTest.java

@@ -23,7 +23,7 @@ public class ScatterTest {
         String wtId="MG01_03";
         String wpId="MHS_FDC";
         String year="2021";
-        String month="1";
+        String month="7";
 
         ScatterController scatterController= SpringUtils.getBean("scatterController");
 
@@ -35,8 +35,9 @@ public class ScatterTest {
 
 
 
-        AjaxResult ar = scatterController.scatterWtAjax(wtId,year,month);
-
+        AjaxResult ar = scatterController.scatterWtAjax(wtId,year,"7");
+        AjaxResult ar1 = scatterController.scatterWtAjax(wtId,year,"6");
+        AjaxResult ar2 = scatterController.scatterWtAjax(wtId,year,"5");
         Map<String, List<List<Double>>> map=(Map<String, List<List<Double>>>)ar.get("data");
 
         List<List<Double>> vos=map.get("line");

+ 39 - 13
src/test/java/test/ShutdowneventServiceTest.java

@@ -1,15 +1,16 @@
 package test;
 
+import com.github.pagehelper.PageInfo;
 import com.gyee.SpringbootStart;
-import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.common.spring.SpringUtils;
-import com.gyee.frame.model.auto.Windturbine;
-import com.gyee.frame.model.custom.SimpleVo;
+import com.gyee.frame.model.custom.ShutdowneventVo;
+import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.service.ShutdowneventService;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
-import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
 import java.util.List;
 
 public class ShutdowneventServiceTest {
@@ -21,7 +22,7 @@ public class ShutdowneventServiceTest {
 
 
 
-        String wtId="MG01_03";
+//        String wtId="MG01_03";
         String wpId="MHS_FDC";
         String year="2021";
         String month="1";
@@ -31,20 +32,45 @@ public class ShutdowneventServiceTest {
 
 
 
-        List<String> wtids=new ArrayList<>();
-
-        for(Windturbine wt: InitialRunner.wtls)
-        {
-            wtids.add(wt.getId());
-        }
+//        List<String> wtids=new ArrayList<>();
+//
+//        for(Windturbine wt: InitialRunner.wtls)
+//        {
+//            wtids.add(wt.getId());
+//        }
 //        Map<String,Object> map = shutdowneventService.queryMttrAndMtbf(wtids);
 //
 //
 //        System.out.println(map.size());
 
-        List<SimpleVo> ls = shutdowneventService.countStopByWp();
-        List<SimpleVo> ls1 = shutdowneventService.countStopByPj();
+//        List<SimpleVo> ls = shutdowneventService.countStopByWp();
+//        List<SimpleVo> ls1 = shutdowneventService.countStopByPj();
+
+        Tablepar tablepar=new Tablepar();
+        tablepar.setPageNum(1);
+        tablepar.setPageSize(10);
+        tablepar.setOrderByColumn(null);
+        tablepar.setIsAsc(null);
+
+        Calendar c = Calendar.getInstance();
+
+        c.set(Calendar.HOUR_OF_DAY, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+
+        c.set(Calendar.DAY_OF_MONTH,1);
+        c.set(Calendar.MONTH,0);
+        c.set(Calendar.YEAR,2021);
+
+        Date beginDate = c.getTime();
+
+        c.add(Calendar.DAY_OF_MONTH,1);
+
+        Date endDate = c.getTime();
+
 
+        PageInfo<ShutdowneventVo> result= shutdowneventService.getShutdownevent(tablepar,wpId,null, beginDate, endDate,"2");
+        List<ShutdowneventVo> ls=result.getList();
         System.out.println(ls.size());
 
 //        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);

+ 100 - 0
src/test/java/test/TemperatureControllerTest.java

@@ -0,0 +1,100 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.controller.warn.TemperatureController;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.model.custom.TemperatureVo;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+public class TemperatureControllerTest {
+
+    @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";
+
+        TemperatureController temperatureController= SpringUtils.getBean("temperatureController");
+
+
+        Tablepar tablepar=new Tablepar();
+        tablepar.setPageNum(1);
+        tablepar.setPageSize(10);
+        tablepar.setOrderByColumn(null);
+        tablepar.setIsAsc(null);
+
+        Calendar c = Calendar.getInstance();
+
+        c.set(Calendar.HOUR_OF_DAY, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+
+        c.set(Calendar.DAY_OF_MONTH,1);
+        c.set(Calendar.MONTH,0);
+        c.set(Calendar.YEAR,2021);
+
+        Date beginDate = c.getTime();
+
+        c.add(Calendar.DAY_OF_MONTH,1);
+
+        Date endDate = c.getTime();
+
+        AjaxResult result= temperatureController.getTemperatureList("MHS_FDC","yyz");
+        AjaxResult result2= temperatureController.getTemperatureList("MHS_FDC","clx");
+        AjaxResult result3= temperatureController.getTemperatureList("MHS_FDC","fdj");
+        AjaxResult result4= temperatureController.getTemperatureList("MHS_FDC","bj");
+        AjaxResult result5= temperatureController.getTemperatureList("MHS_FDC","zz");
+        AjaxResult result6= temperatureController.getTemperatureList("MHS_FDC","zd");
+        AjaxResult result7= temperatureController.getTemperatureList("MHS_FDC","qt");
+
+        List<List<TemperatureVo>> ls=(List<List<TemperatureVo>>)result.get("data");
+        System.out.println(ls.size());
+
+//        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());
+//        }
+//
+//
+//
+    }
+}

+ 5 - 2
src/test/java/test/WindTurbineHealthTest.java

@@ -35,8 +35,11 @@ public class WindTurbineHealthTest {
 
 
 
-        AjaxResult ar = windTurbineHealthListController.windTurbineHealthList(wpId);
-
+        AjaxResult ar = windTurbineHealthListController.windTurbineHealthList("NSS_FDC");
+        AjaxResult ar2 = windTurbineHealthListController.windTurbineHealthList("NSS_FDC");
+        AjaxResult ar3 = windTurbineHealthListController.windTurbineHealthList("QS_FDC");
+        AjaxResult ar4 = windTurbineHealthListController.windTurbineHealthList("SBQ_FDC");
+        AjaxResult ar5 = windTurbineHealthListController.windTurbineHealthList("XS_FDC");
         List<HealthmodelrecordsVo> vos=(List<HealthmodelrecordsVo>)ar.get("data");
 
 

+ 0 - 0
src/test/java/test/UDPTest.java


Some files were not shown because too many files changed in this diff