瀏覽代碼

健康管理模块开发

shilin 3 年之前
父節點
當前提交
b573527471
共有 48 個文件被更改,包括 7382 次插入397 次删除
  1. 2 1
      src/main/java/com/gyee/frame/common/cache/RedisConfig.java
  2. 0 24
      src/main/java/com/gyee/frame/common/quartz/task/HealthMatrixTask.java
  3. 24 19
      src/main/java/com/gyee/frame/common/websocket/ClientInboundChannelInterceptor.java
  4. 11 61
      src/main/java/com/gyee/frame/common/websocket/WebSocketCache.java
  5. 176 12
      src/main/java/com/gyee/frame/common/websocket/WebSocketConfig.java
  6. 68 0
      src/main/java/com/gyee/frame/common/websocket/WebSocketLoginOutEvent.java
  7. 3 2
      src/main/java/com/gyee/frame/common/websocket/WebsocketMessageService.java
  8. 35 11
      src/main/java/com/gyee/frame/controller/AdminController.java
  9. 96 0
      src/main/java/com/gyee/frame/mapper/auto/WeatherfdMapper.java
  10. 97 0
      src/main/java/com/gyee/frame/mapper/auto/WeatherfhMapper.java
  11. 806 0
      src/main/java/com/gyee/frame/model/auto/Weatherfd.java
  12. 1843 0
      src/main/java/com/gyee/frame/model/auto/WeatherfdExample.java
  13. 311 0
      src/main/java/com/gyee/frame/model/auto/Weatherfh.java
  14. 883 0
      src/main/java/com/gyee/frame/model/auto/WeatherfhExample.java
  15. 14 3
      src/main/java/com/gyee/frame/model/custom/MatrixVo.java
  16. 119 0
      src/main/java/com/gyee/frame/service/WeatherfdService.java
  17. 118 0
      src/main/java/com/gyee/frame/service/WeatherfhService.java
  18. 757 6
      src/main/java/com/gyee/frame/service/health/HealthMainService.java
  19. 163 0
      src/main/java/com/gyee/frame/service/websocket/GeneralAppearancePushService.java
  20. 395 0
      src/main/java/com/gyee/frame/service/websocket/MatrixDetialGfPushService.java
  21. 26 24
      src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java
  22. 165 152
      src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java
  23. 83 55
      src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java
  24. 18 10
      src/main/java/com/gyee/frame/service/websocket/MatrixQfPushService.java
  25. 2 2
      src/main/java/com/gyee/frame/common/quartz/task/GenreSetPushTask.java
  26. 23 0
      src/main/java/com/gyee/frame/service/websocket/task/MatrixDetialGfPushTask.java
  27. 23 0
      src/main/java/com/gyee/frame/service/websocket/task/MatrixDetialPushTask.java
  28. 23 0
      src/main/java/com/gyee/frame/service/websocket/task/MatrixPushTask.java
  29. 23 0
      src/main/java/com/gyee/frame/service/websocket/task/MatrixQfPushTask.java
  30. 1 1
      src/main/java/com/gyee/frame/common/quartz/task/V2Task.java
  31. 3 2
      src/main/java/com/gyee/frame/common/quartz/task/WtTestTask.java
  32. 8 5
      src/main/java/com/gyee/frame/shiro/config/ShiroConfig.java
  33. 1 1
      src/main/java/com/gyee/frame/shiro/config/ShiroService.java
  34. 5 0
      src/main/java/com/gyee/frame/util/DateUtils.java
  35. 1 1
      src/main/resources/application.yml
  36. 2 2
      src/main/resources/mybatis-generator.xml
  37. 573 0
      src/main/resources/mybatis/auto/WeatherfdMapper.xml
  38. 336 0
      src/main/resources/mybatis/auto/WeatherfhMapper.xml
  39. 二進制
      src/main/resources/static/syz/mhs_zm.xls
  40. 二進制
      src/main/resources/static/syz/nss_zm.xls
  41. 二進制
      src/main/resources/static/syz/qs_zm.xls
  42. 二進制
      src/main/resources/static/syz/sbq_zm.xls
  43. 二進制
      src/main/resources/static/syz/xs_zm.xls
  44. 1 1
      src/main/resources/templates/admin/sysQuartzJob/add.html
  45. 1 1
      src/main/resources/templates/admin/sysQuartzJob/add2.html
  46. 65 0
      src/test/java/test/GeneralAppearancePushTest.java
  47. 73 0
      src/test/java/test/MatrixByWpPushTest.java
  48. 5 1
      src/test/java/test/WtInfoPushServiceTest.java

+ 2 - 1
src/main/java/com/gyee/frame/common/cache/RedisConfig.java

@@ -34,7 +34,7 @@ public class RedisConfig {
     public JedisPoolConfig jedisPoolConfig() {
         JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
 
-        jedisPoolConfig.setMaxWaitMillis(10000);
+        jedisPoolConfig.setMaxWaitMillis(60000);
         return jedisPoolConfig;
     }
 
@@ -46,6 +46,7 @@ public class RedisConfig {
         redisStandaloneConfiguration.setPassword(pwd);
         redisStandaloneConfiguration.setPort(port);
         redisStandaloneConfiguration.setDatabase(1);
+
         JedisClientConfiguration.JedisPoolingClientConfigurationBuilder jpcb = (JedisClientConfiguration.JedisPoolingClientConfigurationBuilder) JedisClientConfiguration.builder();
         jpcb.poolConfig(jedisPoolConfig);
         JedisClientConfiguration jedisClientConfiguration = jpcb.build();

+ 0 - 24
src/main/java/com/gyee/frame/common/quartz/task/HealthMatrixTask.java

@@ -1,24 +0,0 @@
-package com.gyee.frame.common.quartz.task;
-
-
-import com.gyee.frame.common.websocket.WebsocketMessageService;
-import com.gyee.frame.service.health.HealthMainService;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import java.util.Map;
-
-@Component("healthMatrixTask")
-public class HealthMatrixTask {
-    @Resource
-    private HealthMainService healthMainService;
-    @Resource
-    private WebsocketMessageService websocketMessageService;
-
-    public void healthMatrixTask(String destination) throws Exception {
-
-        Map<String, Object> map=healthMainService.findHealthMatrix();
-
-        websocketMessageService.SendAlertToAll(destination,map);
-    }
-}

+ 24 - 19
src/main/java/com/gyee/frame/common/websocket/ClientInboundChannelInterceptor.java

@@ -22,7 +22,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
 public class ClientInboundChannelInterceptor extends QuartzSchedulerUtil.SocketTaskUtil implements ChannelInterceptor {
 
 
-
+    private String AUTHTOKEN="authToken";
     @Override
     public Message<?> preSend(Message<?> message, MessageChannel channel) {
         StompHeaderAccessor accessor = MessageHeaderAccessor.getAccessor(message, StompHeaderAccessor.class);
@@ -30,24 +30,29 @@ public class ClientInboundChannelInterceptor extends QuartzSchedulerUtil.SocketT
             Object raw = message.getHeaders().get(SimpMessageHeaderAccessor.NATIVE_HEADERS);
 
             String topic=null;
+            String authToken=null;
             if (raw instanceof Map) {
                 Object name = ((Map) raw).get("topic");
                 LinkedList<String> temp=(LinkedList<String>) name;
                 topic=temp.get(0);
+                Object authTokenobj = ((Map) raw).get("authToken");
+                 temp=(LinkedList<String>) authTokenobj;
+                authToken=temp.get(0);
             }
-            String sessionId =String.valueOf(message.getHeaders().get(SimpMessageHeaderAccessor.SESSION_ID_HEADER));
+            //String authToken =String.valueOf(message.getHeaders().get(SimpMessageHeaderAccessor.SESSION_ID_HEADER));
 
-            if(StringUtils.notEmp(topic) && !topic.equals("undefined")) {
+           // String authToken =String.valueOf(message.getHeaders().get(AUTHTOKEN));
+            if(StringUtils.notEmp(topic) && !topic.equals("undefined") && StringUtils.notEmp(authToken) && !authToken.equals("undefined")) {
 
 
                 //判断是否为带参操作
                 if(topic.indexOf(WebSocketConfig.PARAM)!=-1)
                 {
-                    if (StringUtils.notEmp(sessionId)) {
-                        //判断带参sessionMAP中是否包含sessionId
-                        if (WebSocketConfig.sessionparamcacheMap.containsKey(sessionId)) {
+                    if (StringUtils.notEmp(authToken)) {
+                        //判断带参sessionMAP中是否包含authToken
+                        if (WebSocketConfig.sessionparamcacheMap.containsKey(authToken)) {
                             //通过sessionId获得topicSET集合
-                            CopyOnWriteArraySet<String> set = WebSocketConfig.sessionparamcacheMap.get(sessionId);
+                            CopyOnWriteArraySet<String> set = WebSocketConfig.sessionparamcacheMap.get(authToken);
                             //截取topic/****/中的功能描述
                             String temptoptic=topic.substring(topic.indexOf("/")+1);
                             temptoptic=temptoptic.substring(0,temptoptic.indexOf("/"));
@@ -65,7 +70,7 @@ public class ClientInboundChannelInterceptor extends QuartzSchedulerUtil.SocketT
                                     //提供过str主题获得sessionidSET集合
                                     CopyOnWriteArraySet<String> sessionIdset = WebSocketConfig.websocketparamcacheMap.get(str);
                                     //移除主题中的sessionId
-                                    sessionIdset.remove(sessionId);
+                                    sessionIdset.remove(authToken);
                                     //如果sessionIdset记录为空,移除websocketparamcacheMap的主题
                                     if(sessionIdset.size()==0)
                                     {
@@ -76,11 +81,11 @@ public class ClientInboundChannelInterceptor extends QuartzSchedulerUtil.SocketT
                             }
                             //添加新的主题
                             set.add(topic);
-                            WebSocketConfig.sessionparamcacheMap.put(sessionId, set);
+                            WebSocketConfig.sessionparamcacheMap.put(authToken, set);
                         } else {
                             CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<String>();
                             set.add(topic);
-                            WebSocketConfig.sessionparamcacheMap.put(sessionId, set);
+                            WebSocketConfig.sessionparamcacheMap.put(authToken, set);
                         }
 
 
@@ -88,35 +93,35 @@ public class ClientInboundChannelInterceptor extends QuartzSchedulerUtil.SocketT
 
                     if (WebSocketConfig.websocketparamcacheMap.containsKey(topic)) {
                         CopyOnWriteArraySet<String> set = WebSocketConfig.websocketparamcacheMap.get(topic);
-                        set.add(sessionId);
+                        set.add(authToken);
                         WebSocketConfig.websocketparamcacheMap.put(topic, set);
                     } else {
                         CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<String>();
-                        set.add(sessionId);
+                        set.add(authToken);
                         WebSocketConfig.websocketparamcacheMap.put(topic, set);
                     }
                 }else
                 {
                     if (WebSocketConfig.websocketcacheMap.containsKey(topic)) {
                         CopyOnWriteArraySet<String> set = WebSocketConfig.websocketcacheMap.get(topic);
-                        set.add(sessionId);
+                        set.add(authToken);
                         WebSocketConfig.websocketcacheMap.put(topic, set);
                     } else {
                         CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<String>();
-                        set.add(sessionId);
+                        set.add(authToken);
                         WebSocketConfig.websocketcacheMap.put(topic, set);
                     }
 
 
-                    if (StringUtils.notEmp(sessionId)) {
-                        if (WebSocketConfig.sessioncacheMap.containsKey(sessionId)) {
-                            CopyOnWriteArraySet<String> set = WebSocketConfig.websocketcacheMap.get(sessionId);
+                    if (StringUtils.notEmp(authToken)) {
+                        if (WebSocketConfig.sessioncacheMap.containsKey(authToken)) {
+                            CopyOnWriteArraySet<String> set = WebSocketConfig.sessioncacheMap.get(authToken);
                             set.add(topic);
-                            WebSocketConfig.sessioncacheMap.put(sessionId, set);
+                            WebSocketConfig.sessioncacheMap.put(authToken, set);
                         } else {
                             CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<String>();
                             set.add(topic);
-                            WebSocketConfig.sessioncacheMap.put(sessionId, set);
+                            WebSocketConfig.sessioncacheMap.put(authToken, set);
                         }
 
 

+ 11 - 61
src/main/java/com/gyee/frame/common/websocket/WebSocketCache.java

@@ -2,15 +2,16 @@ package com.gyee.frame.common.websocket;
 
 import com.gyee.frame.common.quartz.QuartzSchedulerUtil;
 import org.springframework.context.event.EventListener;
-import org.springframework.messaging.simp.stomp.StompHeaderAccessor;
 import org.springframework.stereotype.Component;
 import org.springframework.web.socket.messaging.SessionDisconnectEvent;
 
-import java.util.concurrent.CopyOnWriteArraySet;
+import javax.annotation.Resource;
 
 @Component
 public class WebSocketCache  extends QuartzSchedulerUtil.SocketTaskUtil {
 
+    @Resource
+    private WebSocketLoginOutEvent webSocketLoginOutEvent;
 //    public static ConcurrentHashMap<String, CopyOnWriteArraySet<String>> websocketcacheMap = new ConcurrentHashMap();
 //
 //    @EventListener(SessionConnectEvent.class)
@@ -22,7 +23,7 @@ public class WebSocketCache  extends QuartzSchedulerUtil.SocketTaskUtil {
 //        sha
 //        List<String> topics=sha.getNativeHeader("topic");
 //        //获取SessionId
-//        String sessionId = sha.getSessionId();
+//        String authToken = sha.getSessionId();
 //
 //       if(StringUtils.isNotEmpty(topics))
 //       {
@@ -32,12 +33,12 @@ public class WebSocketCache  extends QuartzSchedulerUtil.SocketTaskUtil {
 //           if(websocketcacheMap.containsKey(topic))
 //           {
 //               CopyOnWriteArraySet<String> set=websocketcacheMap.get(topic);
-//               set.add(sessionId);
+//               set.add(authToken);
 //               websocketcacheMap.put(topic,set);
 //           }else
 //           {
 //               CopyOnWriteArraySet<String> set= new CopyOnWriteArraySet<String>();
-//               set.add(sessionId);
+//               set.add(authToken);
 //               websocketcacheMap.put(topic,set);
 //           }
 //           if(InitialRunner.jobsmap.containsKey(topic))
@@ -52,62 +53,11 @@ public class WebSocketCache  extends QuartzSchedulerUtil.SocketTaskUtil {
 //
     @EventListener(SessionDisconnectEvent.class)
     public void onDisconnectEvent(SessionDisconnectEvent event) {
-        //获取Session连接信息
-        StompHeaderAccessor sha = StompHeaderAccessor.wrap(event.getMessage());
-        //获取SessionId
-        String sessionId = sha.getSessionId();
-
-
-        if(WebSocketConfig.sessioncacheMap.containsKey(sessionId))
-        {
-            CopyOnWriteArraySet<String> sessionIdset=WebSocketConfig.sessioncacheMap.get(sessionId);
-
-            for(String topic:sessionIdset)
-            {
-                if(WebSocketConfig.websocketcacheMap.containsKey(topic))
-                {
-                    CopyOnWriteArraySet<String> set=WebSocketConfig.websocketcacheMap.get(topic);
-                    set.remove(sessionId);
-                    WebSocketConfig.websocketcacheMap.put(topic,set);
-
-                    if(set.size()==0)
-                    {
-                        WebSocketConfig.websocketcacheMap.remove(topic);
-                        this.deleteJob(topic);
-                    }
-                }
-
-
-
-                sessionIdset.remove(topic);
-            }
-            WebSocketConfig.sessioncacheMap.remove(sessionId);
-        }
-
-
-        if(WebSocketConfig.sessionparamcacheMap.containsKey(sessionId))
-        {
-            CopyOnWriteArraySet<String> sessionIdset=WebSocketConfig.sessionparamcacheMap.get(sessionId);
-
-            for(String topic:sessionIdset)
-            {
-                if(WebSocketConfig.websocketparamcacheMap.containsKey(topic))
-                {
-                    CopyOnWriteArraySet<String> set=WebSocketConfig.websocketparamcacheMap.get(topic);
-                    set.remove(sessionId);
-                    WebSocketConfig.websocketparamcacheMap.put(topic,set);
-
-                    if(set.size()==0)
-                    {
-                        WebSocketConfig.websocketparamcacheMap.remove(topic);
-                        this.deleteJob(topic);
-                    }
-                }
-
-                sessionIdset.remove(topic);
-            }
-            WebSocketConfig.sessionparamcacheMap.remove(sessionId);
-        }
+//        //获取Session连接信息
+//        StompHeaderAccessor sha = StompHeaderAccessor.wrap(event.getMessage());
+//        String authToken=String.valueOf(sha.getHeader("authToken"));
+//
+//        webSocketLoginOutEvent.loginOut(authToken);
 
 
     }

+ 176 - 12
src/main/java/com/gyee/frame/common/websocket/WebSocketConfig.java

@@ -1,13 +1,17 @@
 package com.gyee.frame.common.websocket;
 
 import org.springframework.context.annotation.Configuration;
+import org.springframework.messaging.converter.MessageConverter;
 import org.springframework.messaging.simp.config.ChannelRegistration;
 import org.springframework.messaging.simp.config.MessageBrokerRegistry;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
 import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
 import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
 import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
+import org.springframework.web.socket.config.annotation.WebSocketTransportRegistration;
 
 import javax.annotation.Resource;
+import java.util.List;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArraySet;
 
@@ -44,32 +48,192 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
      //  .withSockJS(); //使用sockJS1启用该行代码,使用VUE注释该行代码
 
     }
+//    /**
+//     * 采用自定义拦截器,获取connect时候传递的参数
+//     *
+//     * @param registration
+//     */
+//    @Override
+//    public void configureClientInboundChannel(ChannelRegistration registration) {
+//        registration.interceptors(clientInboundChannelInterceptor);
+//    }
+
+
+//    /**
+//     * 注册相关服务
+//     *
+//     * @param registry
+//     */
+//    @Override
+//    public void configureMessageBroker(MessageBrokerRegistry registry) {
+//
+//        registry.enableSimpleBroker("/topic", "/queue");
+//        //客户端名称前缀
+//        registry.setApplicationDestinationPrefixes("/app");
+//        //用户名称前
+//        registry.setUserDestinationPrefix("/userDataSet");
+//    }
+
     /**
-     * 采用自定义拦截器,获取connect时候传递的参数
-     *
+     * 配置消息代理
+     * @param registry
+     */
+    @Override
+    public void configureMessageBroker(MessageBrokerRegistry registry)
+    {
+        /*
+         *  enableStompBrokerRelay 配置外部的STOMP服务,需要安装额外的支持 比如rabbitmq或activemq
+         * 1. 配置代理域,可以配置多个,此段代码配置代理目的地的前缀为 /topicTest 或者 /userTest
+         *    我们就可以在配置的域上向客户端推送消息
+         * 3. 可以通过 setRelayHost 配置代理监听的host,默认为localhost
+         * 4. 可以通过 setRelayPort 配置代理监听的端口,默认为61613
+         * 5. 可以通过 setClientLogin 和 setClientPasscode 配置账号和密码
+         * 6. setxxx这种设置方法是可选的,根据业务需要自行配置,也可以使用默认配置
+         */
+        //registry.enableStompBrokerRelay("/topicTest","/userTest")
+        //.setRelayHost("rabbit.someotherserver")
+        //.setRelayPort(62623);
+        //.setClientLogin("userName")
+        //.setClientPasscode("password")
+        //;
+
+        // 自定义调度器,用于控制心跳线程
+        ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
+        // 线程池线程数,心跳连接开线程
+        taskScheduler.setPoolSize(1);
+        // 线程名前缀
+        taskScheduler.setThreadNamePrefix("websocket-heartbeat-thread-");
+        // 初始化
+        taskScheduler.initialize();
+
+        /*
+         * spring 内置broker对象
+         * 1. 配置代理域,可以配置多个,此段代码配置代理目的地的前缀为 /topicTest 或者 /userTest
+         *    我们就可以在配置的域上向客户端推送消息
+         * 2,进行心跳设置,第一值表示server最小能保证发的心跳间隔毫秒数, 第二个值代码server希望client发的心跳间隔毫秒数
+         * 3. 可以配置心跳线程调度器 setHeartbeatValue这个不能单独设置,不然不起作用,要配合setTaskScheduler才可以生效
+         *    调度器我们可以自己写一个,也可以自己使用默认的调度器 new DefaultManagedTaskScheduler()
+         */
+        registry.enableSimpleBroker("/topic","/queue")
+                .setHeartbeatValue(new long[]{10000,10000})
+                .setTaskScheduler(taskScheduler);
+        /*
+         *  "/app" 为配置应用服务器的地址前缀,表示所有以/app 开头的客户端消息或请求
+         *  都会路由到带有@MessageMapping 注解的方法中
+         */
+        registry.setApplicationDestinationPrefixes("/app");
+
+        /*
+         *  1. 配置一对一消息前缀, 客户端接收一对一消息需要配置的前缀 如“'/user/'+userid + '/message'”,
+         *     是客户端订阅一对一消息的地址 stompClient.subscribe js方法调用的地址
+         *  2. 使用@SendToUser发送私信的规则不是这个参数设定,在框架内部是用UserDestinationMessageHandler处理,
+         *     而不是而不是 AnnotationMethodMessageHandler 或  SimpleBrokerMessageHandler
+         *     or StompBrokerRelayMessageHandler,是在@SendToUser的URL前加“user+sessionId"组成
+         */
+        registry.setUserDestinationPrefix("/user");
+
+        /*
+         * 自定义路径分割符
+         * 注释掉的这段代码添加的分割符为. 分割是类级别的@messageMapping和方法级别的@messageMapping的路径
+         * 例如类注解路径为 “topic”,方法注解路径为“hello”,那么客户端JS stompClient.send 方法调用的路径为“/app/topic.hello”
+         * 注释掉此段代码后,类注解路径“/topic”,方法注解路径“/hello”,JS调用的路径为“/app/topic/hello”
+         */
+        //registry.setPathMatcher(new AntPathMatcher("."));
+
+    }
+
+
+    /**
+     * 配置发送与接收的消息参数,可以指定消息字节大小,缓存大小,发送超时时间
+     * @param registration
+     */
+    @Override
+    public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
+        /*
+         * 1. setMessageSizeLimit 设置消息缓存的字节数大小 字节
+         * 2. setSendBufferSizeLimit 设置websocket会话时,缓存的大小 字节
+         * 3. setSendTimeLimit 设置消息发送会话超时时间,毫秒
+         */
+        registration.setMessageSizeLimit(1024*10)
+                .setSendBufferSizeLimit(1024*10)
+                .setSendTimeLimit(10000);
+    }
+
+    /**
+     * 设置输入消息通道的线程数,默认线程为1,可以自己自定义线程数,最大线程数,线程存活时间
      * @param registration
      */
     @Override
     public void configureClientInboundChannel(ChannelRegistration registration) {
+
+        /*
+         * 配置消息线程池
+         * 1. corePoolSize 配置核心线程池,当线程数小于此配置时,不管线程中有无空闲的线程,都会产生新线程处理任务
+         * 2. maxPoolSize 配置线程池最大数,当线程池数等于此配置时,不会产生新线程
+         * 3. keepAliveSeconds 线程池维护线程所允许的空闲时间,单位秒
+         */
+        registration.taskExecutor().corePoolSize(10)
+                .maxPoolSize(20)
+                .keepAliveSeconds(60);
+        /*
+         * 添加stomp自定义拦截器,可以根据业务做一些处理
+         * springframework 4.3.12 之后版本此方法废弃,代替方法 interceptors(ChannelInterceptor... interceptors)
+         * 消息拦截器,实现ChannelInterceptor接口
+         */
         registration.interceptors(clientInboundChannelInterceptor);
     }
 
-
     /**
-     * 注册相关服务
-     *
-     * @param registry
+     *设置输出消息通道的线程数,默认线程为1,可以自己自定义线程数,最大线程数,线程存活时间
+     * @param registration
      */
     @Override
-    public void configureMessageBroker(MessageBrokerRegistry registry) {
+    public void configureClientOutboundChannel(ChannelRegistration registration) {
+        registration.taskExecutor().corePoolSize(30)
+                .maxPoolSize(100)
+                .keepAliveSeconds(60);
+        //registration.setInterceptors(new WebSocketChannelInterceptor());
+    }
 
-        registry.enableSimpleBroker("/topic", "/queue");
-        //客户端名称前缀
-        registry.setApplicationDestinationPrefixes("/app");
-        //用户名称前
-        registry.setUserDestinationPrefix("/userDataSet");
+    /**
+     * 添加自定义的消息转换器,spring 提供多种默认的消息转换器,
+     * 返回false,不会添加消息转换器,返回true,会添加默认的消息转换器,当然也可以把自己写的消息转换器添加到转换链中
+     * @param list
+     * @return
+     */
+    @Override
+    public boolean configureMessageConverters(List<MessageConverter> list) {
+        return true;
     }
 
+//    /**
+//     * 自定义控制器方法的参数类型,有兴趣可以百度google HandlerMethodArgumentResolver这个的用法
+//     * @param list
+//     */
+//    @Override
+//    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> list) {
+//
+//    }
+//
+//    /**
+//     * 自定义控制器方法返回值类型,有兴趣可以百度google HandlerMethodReturnValueHandler这个的用法
+//     * @param list
+//     */
+//    @Override
+//    public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> list) {
+//
+//    }
+//
+//    /**
+//     * 拦截器加入 spring ioc容器
+//     * @return
+//     */
+//    @Bean
+//    public WebSocketChannelInterceptor webSocketChannelInterceptor()
+//    {
+//        return new WebSocketChannelInterceptor();
+//    }
+
 
 
 }

+ 68 - 0
src/main/java/com/gyee/frame/common/websocket/WebSocketLoginOutEvent.java

@@ -0,0 +1,68 @@
+package com.gyee.frame.common.websocket;
+
+import com.gyee.frame.common.quartz.QuartzSchedulerUtil;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.CopyOnWriteArraySet;
+
+@Component
+public class WebSocketLoginOutEvent extends QuartzSchedulerUtil.SocketTaskUtil {
+
+    public void loginOut(String authToken) {
+
+        if(StringUtils.notEmp(authToken) && !authToken.equals("null"))
+        {
+            if(WebSocketConfig.sessioncacheMap.containsKey(authToken))
+            {
+                CopyOnWriteArraySet<String> sessionIdset=WebSocketConfig.sessioncacheMap.get(authToken);
+
+                for(String topic:sessionIdset)
+                {
+                    if(WebSocketConfig.websocketcacheMap.containsKey(topic))
+                    {
+                        CopyOnWriteArraySet<String> set=WebSocketConfig.websocketcacheMap.get(topic);
+                        set.remove(authToken);
+                        WebSocketConfig.websocketcacheMap.put(topic,set);
+
+                        if(set.size()==0)
+                        {
+                            WebSocketConfig.websocketcacheMap.remove(topic);
+                            this.deleteJob(topic);
+                        }
+                    }
+
+                    sessionIdset.remove(topic);
+                }
+                WebSocketConfig.sessioncacheMap.remove(authToken);
+            }
+
+
+            if(WebSocketConfig.sessionparamcacheMap.containsKey(authToken))
+            {
+                CopyOnWriteArraySet<String> sessionIdset=WebSocketConfig.sessionparamcacheMap.get(authToken);
+
+                for(String topic:sessionIdset)
+                {
+                    if(WebSocketConfig.websocketparamcacheMap.containsKey(topic))
+                    {
+                        CopyOnWriteArraySet<String> set=WebSocketConfig.websocketparamcacheMap.get(topic);
+                        set.remove(authToken);
+                        WebSocketConfig.websocketparamcacheMap.put(topic,set);
+
+                        if(set.size()==0)
+                        {
+                            WebSocketConfig.websocketparamcacheMap.remove(topic);
+                            this.deleteJob(topic);
+                        }
+                    }
+
+                    sessionIdset.remove(topic);
+                }
+                WebSocketConfig.sessionparamcacheMap.remove(authToken);
+            }
+        }
+
+    }
+
+}

+ 3 - 2
src/main/java/com/gyee/frame/common/websocket/WebsocketMessageService.java

@@ -1,5 +1,6 @@
 package com.gyee.frame.common.websocket;
 
+import com.alibaba.fastjson.JSON;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.util.StringUtils;
@@ -20,9 +21,9 @@ public class WebsocketMessageService
     public void SendAlertToAll(String destination, Object sendData)
     {
         if (StringUtils.notEmp(sendData)) {
-            simpMessagingTemplate.convertAndSend(destination, AjaxResult.successData(AjaxStatus.success.code, sendData));
+            simpMessagingTemplate.convertAndSend(destination, AjaxResult.successData(AjaxStatus.success.code, JSON.toJSONString(sendData)));
         } else {
-            simpMessagingTemplate.convertAndSend(destination, AjaxResult.successData(AjaxStatus.error.code, sendData));
+            simpMessagingTemplate.convertAndSend(destination, AjaxResult.successData(AjaxStatus.error.code, "数据传输错误"));
         }
 
     }

+ 35 - 11
src/main/java/com/gyee/frame/controller/AdminController.java

@@ -5,6 +5,7 @@ import com.gyee.frame.common.base.BaseController;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.conf.V2Config;
 import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.websocket.WebSocketLoginOutEvent;
 import com.gyee.frame.model.auto.SysNotice;
 import com.gyee.frame.model.auto.TsysUser;
 import com.gyee.frame.model.custom.BootstrapTree;
@@ -51,9 +52,11 @@ public class AdminController extends BaseController {
 	private static Logger logger = LoggerFactory.getLogger(AdminController.class);
 
 	private String prefix = "admin";
-
+	private String AUTHTOKEN="authToken";
 	@Resource
 	private ShiroService shiroService;
+	@Resource
+	private WebSocketLoginOutEvent webSocketLoginOutEvent;
 
 	@ApiOperation(value = "首页", notes = "首页")
 	@GetMapping("/index")
@@ -195,7 +198,7 @@ public class AdminController extends BaseController {
 
 			String userName = user.getUsername();
 			Subject currentUser = SecurityUtils.getSubject();
-			String customtoken = request.getHeader("authToken");
+			String customtoken = request.getHeader(AUTHTOKEN);
 
 				if(StringUtils.notEmp(customtoken))
 				{
@@ -219,7 +222,7 @@ public class AdminController extends BaseController {
 						}else
 						{
 							Map<String, Object> result = new HashMap<>();
-							result.put("token", customtoken);
+							result.put(AUTHTOKEN, customtoken);
 							result.put("user", customuser);
 							return AjaxResult.successData(AjaxStatus.success.code, result);
 						}
@@ -244,7 +247,7 @@ public class AdminController extends BaseController {
 
 				Map<String, Object> authToken = shiroService.createToken(ShiroUtils.getUser());
 
-				if(authToken.containsKey("token"))
+				if(authToken.containsKey(AUTHTOKEN))
 				{
 					return AjaxResult.successData(AjaxStatus.success.code, authToken);
 				}else
@@ -285,7 +288,7 @@ public class AdminController extends BaseController {
 				// view.setViewName("redirect:/"+prefix+"/index");
 				Map<String, Object> authToken = shiroService.createToken(ShiroUtils.getUser());
 
-				if(authToken.containsKey("token"))
+				if(authToken.containsKey(AUTHTOKEN))
 				{
 					return AjaxResult.successData(AjaxStatus.success.code, authToken);
 				}else
@@ -304,8 +307,8 @@ public class AdminController extends BaseController {
 	@ResponseBody
 	public AjaxResult usermenu(HttpServletRequest request) {
 
-		//String authToken=request.getParameter("authToken");
-		String customtoken = request.getHeader("authToken");
+		//String authToken=request.getParameter(AUTHTOKEN);
+		String customtoken = request.getHeader(AUTHTOKEN);
 
 		if(StringUtils.notEmp(customtoken))
 		{
@@ -426,12 +429,33 @@ public class AdminController extends BaseController {
 	public AjaxResult Loginoutvue(HttpServletRequest request, HttpServletResponse response) {
 		// 在这里执行退出系统前需要清空的数据
 		Subject subject = SecurityUtils.getSubject();
-		// 注销
+		// shiro注销
 		subject.logout();
-		String customtoken = request.getHeader("authToken");
-		if(StringUtils.notEmp(customtoken))
+
+		String authToken = request.getHeader(AUTHTOKEN);
+		if(StringUtils.notEmp(authToken))
+		{
+			//websocekt退出
+			webSocketLoginOutEvent.loginOut(authToken);
+			//令牌退出
+			shiroService.logout(authToken);
+		}
+
+		return AjaxResult.success();
+	}
+
+
+	@ApiOperation(value = "WEBSOCKET缓存", notes = "WEBSOCKET缓存")
+	@PostMapping("/websocketdisconnect")
+	@ResponseBody
+	public AjaxResult websocketdisconnect(HttpServletRequest request, HttpServletResponse response) {
+
+
+		String authToken = request.getHeader(AUTHTOKEN);
+		if(StringUtils.notEmp(authToken))
 		{
-			shiroService.logout(customtoken);
+			//websocekt退出
+			webSocketLoginOutEvent.loginOut(authToken);
 		}
 
 		return AjaxResult.success();

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

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

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

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

+ 806 - 0
src/main/java/com/gyee/frame/model/auto/Weatherfd.java

@@ -0,0 +1,806 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Weatherfd implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.ID
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.RECODEDATA
+     *
+     * @mbg.generated
+     */
+    private Date recodedata;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.REGION
+     *
+     * @mbg.generated
+     */
+    private String region;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    private String windpowerstationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.WEATHER
+     *
+     * @mbg.generated
+     */
+    private String weather;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.MAXIMUMTEM
+     *
+     * @mbg.generated
+     */
+    private Double maximumtem;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.MINIMUMTEM
+     *
+     * @mbg.generated
+     */
+    private Double minimumtem;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.SUNRISE
+     *
+     * @mbg.generated
+     */
+    private String sunrise;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.SUNSET
+     *
+     * @mbg.generated
+     */
+    private String sunset;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.SUNDURATION
+     *
+     * @mbg.generated
+     */
+    private Double sunduration;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.WEATHER1
+     *
+     * @mbg.generated
+     */
+    private String weather1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.TEMPERATURE1
+     *
+     * @mbg.generated
+     */
+    private Double temperature1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.REALFEEL1
+     *
+     * @mbg.generated
+     */
+    private Double realfeel1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.PRECIPITATION1
+     *
+     * @mbg.generated
+     */
+    private Double precipitation1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.WINDDIRECTION1
+     *
+     * @mbg.generated
+     */
+    private String winddirection1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.SPEED1
+     *
+     * @mbg.generated
+     */
+    private Double speed1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.GUST1
+     *
+     * @mbg.generated
+     */
+    private Double gust1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.WEATHER2
+     *
+     * @mbg.generated
+     */
+    private String weather2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.TEMPERATURE2
+     *
+     * @mbg.generated
+     */
+    private Double temperature2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.REALFEEL2
+     *
+     * @mbg.generated
+     */
+    private Double realfeel2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.PRECIPITATION2
+     *
+     * @mbg.generated
+     */
+    private Double precipitation2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.WINDDIRECTION2
+     *
+     * @mbg.generated
+     */
+    private String winddirection2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.SPEED2
+     *
+     * @mbg.generated
+     */
+    private Double speed2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFD.GUST2
+     *
+     * @mbg.generated
+     */
+    private Double gust2;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WEATHERFD
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.ID
+     *
+     * @return the value of WEATHERFD.ID
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.ID
+     *
+     * @param id the value for WEATHERFD.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 WEATHERFD.RECODEDATA
+     *
+     * @return the value of WEATHERFD.RECODEDATA
+     *
+     * @mbg.generated
+     */
+    public Date getRecodedata() {
+        return recodedata;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.RECODEDATA
+     *
+     * @param recodedata the value for WEATHERFD.RECODEDATA
+     *
+     * @mbg.generated
+     */
+    public void setRecodedata(Date recodedata) {
+        this.recodedata = recodedata;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.REGION
+     *
+     * @return the value of WEATHERFD.REGION
+     *
+     * @mbg.generated
+     */
+    public String getRegion() {
+        return region;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.REGION
+     *
+     * @param region the value for WEATHERFD.REGION
+     *
+     * @mbg.generated
+     */
+    public void setRegion(String region) {
+        this.region = region == null ? null : region.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.WINDPOWERSTATIONID
+     *
+     * @return the value of WEATHERFD.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    public String getWindpowerstationid() {
+        return windpowerstationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.WINDPOWERSTATIONID
+     *
+     * @param windpowerstationid the value for WEATHERFD.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 WEATHERFD.WEATHER
+     *
+     * @return the value of WEATHERFD.WEATHER
+     *
+     * @mbg.generated
+     */
+    public String getWeather() {
+        return weather;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.WEATHER
+     *
+     * @param weather the value for WEATHERFD.WEATHER
+     *
+     * @mbg.generated
+     */
+    public void setWeather(String weather) {
+        this.weather = weather == null ? null : weather.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.MAXIMUMTEM
+     *
+     * @return the value of WEATHERFD.MAXIMUMTEM
+     *
+     * @mbg.generated
+     */
+    public Double getMaximumtem() {
+        return maximumtem;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.MAXIMUMTEM
+     *
+     * @param maximumtem the value for WEATHERFD.MAXIMUMTEM
+     *
+     * @mbg.generated
+     */
+    public void setMaximumtem(Double maximumtem) {
+        this.maximumtem = maximumtem;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.MINIMUMTEM
+     *
+     * @return the value of WEATHERFD.MINIMUMTEM
+     *
+     * @mbg.generated
+     */
+    public Double getMinimumtem() {
+        return minimumtem;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.MINIMUMTEM
+     *
+     * @param minimumtem the value for WEATHERFD.MINIMUMTEM
+     *
+     * @mbg.generated
+     */
+    public void setMinimumtem(Double minimumtem) {
+        this.minimumtem = minimumtem;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.SUNRISE
+     *
+     * @return the value of WEATHERFD.SUNRISE
+     *
+     * @mbg.generated
+     */
+    public String getSunrise() {
+        return sunrise;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.SUNRISE
+     *
+     * @param sunrise the value for WEATHERFD.SUNRISE
+     *
+     * @mbg.generated
+     */
+    public void setSunrise(String sunrise) {
+        this.sunrise = sunrise == null ? null : sunrise.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.SUNSET
+     *
+     * @return the value of WEATHERFD.SUNSET
+     *
+     * @mbg.generated
+     */
+    public String getSunset() {
+        return sunset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.SUNSET
+     *
+     * @param sunset the value for WEATHERFD.SUNSET
+     *
+     * @mbg.generated
+     */
+    public void setSunset(String sunset) {
+        this.sunset = sunset == null ? null : sunset.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.SUNDURATION
+     *
+     * @return the value of WEATHERFD.SUNDURATION
+     *
+     * @mbg.generated
+     */
+    public Double getSunduration() {
+        return sunduration;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.SUNDURATION
+     *
+     * @param sunduration the value for WEATHERFD.SUNDURATION
+     *
+     * @mbg.generated
+     */
+    public void setSunduration(Double sunduration) {
+        this.sunduration = sunduration;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.WEATHER1
+     *
+     * @return the value of WEATHERFD.WEATHER1
+     *
+     * @mbg.generated
+     */
+    public String getWeather1() {
+        return weather1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.WEATHER1
+     *
+     * @param weather1 the value for WEATHERFD.WEATHER1
+     *
+     * @mbg.generated
+     */
+    public void setWeather1(String weather1) {
+        this.weather1 = weather1 == null ? null : weather1.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.TEMPERATURE1
+     *
+     * @return the value of WEATHERFD.TEMPERATURE1
+     *
+     * @mbg.generated
+     */
+    public Double getTemperature1() {
+        return temperature1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.TEMPERATURE1
+     *
+     * @param temperature1 the value for WEATHERFD.TEMPERATURE1
+     *
+     * @mbg.generated
+     */
+    public void setTemperature1(Double temperature1) {
+        this.temperature1 = temperature1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.REALFEEL1
+     *
+     * @return the value of WEATHERFD.REALFEEL1
+     *
+     * @mbg.generated
+     */
+    public Double getRealfeel1() {
+        return realfeel1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.REALFEEL1
+     *
+     * @param realfeel1 the value for WEATHERFD.REALFEEL1
+     *
+     * @mbg.generated
+     */
+    public void setRealfeel1(Double realfeel1) {
+        this.realfeel1 = realfeel1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.PRECIPITATION1
+     *
+     * @return the value of WEATHERFD.PRECIPITATION1
+     *
+     * @mbg.generated
+     */
+    public Double getPrecipitation1() {
+        return precipitation1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.PRECIPITATION1
+     *
+     * @param precipitation1 the value for WEATHERFD.PRECIPITATION1
+     *
+     * @mbg.generated
+     */
+    public void setPrecipitation1(Double precipitation1) {
+        this.precipitation1 = precipitation1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.WINDDIRECTION1
+     *
+     * @return the value of WEATHERFD.WINDDIRECTION1
+     *
+     * @mbg.generated
+     */
+    public String getWinddirection1() {
+        return winddirection1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.WINDDIRECTION1
+     *
+     * @param winddirection1 the value for WEATHERFD.WINDDIRECTION1
+     *
+     * @mbg.generated
+     */
+    public void setWinddirection1(String winddirection1) {
+        this.winddirection1 = winddirection1 == null ? null : winddirection1.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.SPEED1
+     *
+     * @return the value of WEATHERFD.SPEED1
+     *
+     * @mbg.generated
+     */
+    public Double getSpeed1() {
+        return speed1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.SPEED1
+     *
+     * @param speed1 the value for WEATHERFD.SPEED1
+     *
+     * @mbg.generated
+     */
+    public void setSpeed1(Double speed1) {
+        this.speed1 = speed1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.GUST1
+     *
+     * @return the value of WEATHERFD.GUST1
+     *
+     * @mbg.generated
+     */
+    public Double getGust1() {
+        return gust1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.GUST1
+     *
+     * @param gust1 the value for WEATHERFD.GUST1
+     *
+     * @mbg.generated
+     */
+    public void setGust1(Double gust1) {
+        this.gust1 = gust1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.WEATHER2
+     *
+     * @return the value of WEATHERFD.WEATHER2
+     *
+     * @mbg.generated
+     */
+    public String getWeather2() {
+        return weather2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.WEATHER2
+     *
+     * @param weather2 the value for WEATHERFD.WEATHER2
+     *
+     * @mbg.generated
+     */
+    public void setWeather2(String weather2) {
+        this.weather2 = weather2 == null ? null : weather2.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.TEMPERATURE2
+     *
+     * @return the value of WEATHERFD.TEMPERATURE2
+     *
+     * @mbg.generated
+     */
+    public Double getTemperature2() {
+        return temperature2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.TEMPERATURE2
+     *
+     * @param temperature2 the value for WEATHERFD.TEMPERATURE2
+     *
+     * @mbg.generated
+     */
+    public void setTemperature2(Double temperature2) {
+        this.temperature2 = temperature2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.REALFEEL2
+     *
+     * @return the value of WEATHERFD.REALFEEL2
+     *
+     * @mbg.generated
+     */
+    public Double getRealfeel2() {
+        return realfeel2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.REALFEEL2
+     *
+     * @param realfeel2 the value for WEATHERFD.REALFEEL2
+     *
+     * @mbg.generated
+     */
+    public void setRealfeel2(Double realfeel2) {
+        this.realfeel2 = realfeel2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.PRECIPITATION2
+     *
+     * @return the value of WEATHERFD.PRECIPITATION2
+     *
+     * @mbg.generated
+     */
+    public Double getPrecipitation2() {
+        return precipitation2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.PRECIPITATION2
+     *
+     * @param precipitation2 the value for WEATHERFD.PRECIPITATION2
+     *
+     * @mbg.generated
+     */
+    public void setPrecipitation2(Double precipitation2) {
+        this.precipitation2 = precipitation2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.WINDDIRECTION2
+     *
+     * @return the value of WEATHERFD.WINDDIRECTION2
+     *
+     * @mbg.generated
+     */
+    public String getWinddirection2() {
+        return winddirection2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.WINDDIRECTION2
+     *
+     * @param winddirection2 the value for WEATHERFD.WINDDIRECTION2
+     *
+     * @mbg.generated
+     */
+    public void setWinddirection2(String winddirection2) {
+        this.winddirection2 = winddirection2 == null ? null : winddirection2.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.SPEED2
+     *
+     * @return the value of WEATHERFD.SPEED2
+     *
+     * @mbg.generated
+     */
+    public Double getSpeed2() {
+        return speed2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.SPEED2
+     *
+     * @param speed2 the value for WEATHERFD.SPEED2
+     *
+     * @mbg.generated
+     */
+    public void setSpeed2(Double speed2) {
+        this.speed2 = speed2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFD.GUST2
+     *
+     * @return the value of WEATHERFD.GUST2
+     *
+     * @mbg.generated
+     */
+    public Double getGust2() {
+        return gust2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFD.GUST2
+     *
+     * @param gust2 the value for WEATHERFD.GUST2
+     *
+     * @mbg.generated
+     */
+    public void setGust2(Double gust2) {
+        this.gust2 = gust2;
+    }
+}

文件差異過大導致無法顯示
+ 1843 - 0
src/main/java/com/gyee/frame/model/auto/WeatherfdExample.java


+ 311 - 0
src/main/java/com/gyee/frame/model/auto/Weatherfh.java

@@ -0,0 +1,311 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Weatherfh implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFH.ID
+     *
+     * @mbg.generated
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFH.RECODEDATA
+     *
+     * @mbg.generated
+     */
+    private Date recodedata;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFH.REGION
+     *
+     * @mbg.generated
+     */
+    private String region;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFH.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    private String windpowerstationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFH.WEATHER
+     *
+     * @mbg.generated
+     */
+    private String weather;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFH.TEMPERATURE
+     *
+     * @mbg.generated
+     */
+    private Double temperature;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFH.REALFEEL
+     *
+     * @mbg.generated
+     */
+    private Double realfeel;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFH.WINDDIRECTION
+     *
+     * @mbg.generated
+     */
+    private String winddirection;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WEATHERFH.SPEED
+     *
+     * @mbg.generated
+     */
+    private Double speed;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFH.ID
+     *
+     * @return the value of WEATHERFH.ID
+     *
+     * @mbg.generated
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFH.ID
+     *
+     * @param id the value for WEATHERFH.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 WEATHERFH.RECODEDATA
+     *
+     * @return the value of WEATHERFH.RECODEDATA
+     *
+     * @mbg.generated
+     */
+    public Date getRecodedata() {
+        return recodedata;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFH.RECODEDATA
+     *
+     * @param recodedata the value for WEATHERFH.RECODEDATA
+     *
+     * @mbg.generated
+     */
+    public void setRecodedata(Date recodedata) {
+        this.recodedata = recodedata;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFH.REGION
+     *
+     * @return the value of WEATHERFH.REGION
+     *
+     * @mbg.generated
+     */
+    public String getRegion() {
+        return region;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFH.REGION
+     *
+     * @param region the value for WEATHERFH.REGION
+     *
+     * @mbg.generated
+     */
+    public void setRegion(String region) {
+        this.region = region == null ? null : region.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFH.WINDPOWERSTATIONID
+     *
+     * @return the value of WEATHERFH.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    public String getWindpowerstationid() {
+        return windpowerstationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFH.WINDPOWERSTATIONID
+     *
+     * @param windpowerstationid the value for WEATHERFH.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 WEATHERFH.WEATHER
+     *
+     * @return the value of WEATHERFH.WEATHER
+     *
+     * @mbg.generated
+     */
+    public String getWeather() {
+        return weather;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFH.WEATHER
+     *
+     * @param weather the value for WEATHERFH.WEATHER
+     *
+     * @mbg.generated
+     */
+    public void setWeather(String weather) {
+        this.weather = weather == null ? null : weather.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFH.TEMPERATURE
+     *
+     * @return the value of WEATHERFH.TEMPERATURE
+     *
+     * @mbg.generated
+     */
+    public Double getTemperature() {
+        return temperature;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFH.TEMPERATURE
+     *
+     * @param temperature the value for WEATHERFH.TEMPERATURE
+     *
+     * @mbg.generated
+     */
+    public void setTemperature(Double temperature) {
+        this.temperature = temperature;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFH.REALFEEL
+     *
+     * @return the value of WEATHERFH.REALFEEL
+     *
+     * @mbg.generated
+     */
+    public Double getRealfeel() {
+        return realfeel;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFH.REALFEEL
+     *
+     * @param realfeel the value for WEATHERFH.REALFEEL
+     *
+     * @mbg.generated
+     */
+    public void setRealfeel(Double realfeel) {
+        this.realfeel = realfeel;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFH.WINDDIRECTION
+     *
+     * @return the value of WEATHERFH.WINDDIRECTION
+     *
+     * @mbg.generated
+     */
+    public String getWinddirection() {
+        return winddirection;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFH.WINDDIRECTION
+     *
+     * @param winddirection the value for WEATHERFH.WINDDIRECTION
+     *
+     * @mbg.generated
+     */
+    public void setWinddirection(String winddirection) {
+        this.winddirection = winddirection == null ? null : winddirection.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WEATHERFH.SPEED
+     *
+     * @return the value of WEATHERFH.SPEED
+     *
+     * @mbg.generated
+     */
+    public Double getSpeed() {
+        return speed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WEATHERFH.SPEED
+     *
+     * @param speed the value for WEATHERFH.SPEED
+     *
+     * @mbg.generated
+     */
+    public void setSpeed(Double speed) {
+        this.speed = speed;
+    }
+}

+ 883 - 0
src/main/java/com/gyee/frame/model/auto/WeatherfhExample.java

@@ -0,0 +1,883 @@
+package com.gyee.frame.model.auto;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class WeatherfhExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    public WeatherfhExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WEATHERFH
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WEATHERFH
+     *
+     * @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 WEATHERFH
+     *
+     * @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 WEATHERFH
+     *
+     * @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 WEATHERFH
+     *
+     * @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 WEATHERFH
+     *
+     * @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 andRecodedataIsNull() {
+            addCriterion("RECODEDATA is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataIsNotNull() {
+            addCriterion("RECODEDATA is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataEqualTo(Date value) {
+            addCriterion("RECODEDATA =", value, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataNotEqualTo(Date value) {
+            addCriterion("RECODEDATA <>", value, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataGreaterThan(Date value) {
+            addCriterion("RECODEDATA >", value, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataGreaterThanOrEqualTo(Date value) {
+            addCriterion("RECODEDATA >=", value, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataLessThan(Date value) {
+            addCriterion("RECODEDATA <", value, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataLessThanOrEqualTo(Date value) {
+            addCriterion("RECODEDATA <=", value, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataIn(List<Date> values) {
+            addCriterion("RECODEDATA in", values, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataNotIn(List<Date> values) {
+            addCriterion("RECODEDATA not in", values, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataBetween(Date value1, Date value2) {
+            addCriterion("RECODEDATA between", value1, value2, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecodedataNotBetween(Date value1, Date value2) {
+            addCriterion("RECODEDATA not between", value1, value2, "recodedata");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionIsNull() {
+            addCriterion("REGION is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionIsNotNull() {
+            addCriterion("REGION is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionEqualTo(String value) {
+            addCriterion("REGION =", value, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNotEqualTo(String value) {
+            addCriterion("REGION <>", value, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionGreaterThan(String value) {
+            addCriterion("REGION >", value, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionGreaterThanOrEqualTo(String value) {
+            addCriterion("REGION >=", value, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionLessThan(String value) {
+            addCriterion("REGION <", value, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionLessThanOrEqualTo(String value) {
+            addCriterion("REGION <=", value, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionLike(String value) {
+            addCriterion("REGION like", value, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNotLike(String value) {
+            addCriterion("REGION not like", value, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionIn(List<String> values) {
+            addCriterion("REGION in", values, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNotIn(List<String> values) {
+            addCriterion("REGION not in", values, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionBetween(String value1, String value2) {
+            addCriterion("REGION between", value1, value2, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andRegionNotBetween(String value1, String value2) {
+            addCriterion("REGION not between", value1, value2, "region");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidIsNull() {
+            addCriterion("WINDPOWERSTATIONID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidIsNotNull() {
+            addCriterion("WINDPOWERSTATIONID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidEqualTo(String value) {
+            addCriterion("WINDPOWERSTATIONID =", value, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidNotEqualTo(String value) {
+            addCriterion("WINDPOWERSTATIONID <>", value, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidGreaterThan(String value) {
+            addCriterion("WINDPOWERSTATIONID >", value, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidGreaterThanOrEqualTo(String value) {
+            addCriterion("WINDPOWERSTATIONID >=", value, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidLessThan(String value) {
+            addCriterion("WINDPOWERSTATIONID <", value, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidLessThanOrEqualTo(String value) {
+            addCriterion("WINDPOWERSTATIONID <=", value, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidLike(String value) {
+            addCriterion("WINDPOWERSTATIONID like", value, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidNotLike(String value) {
+            addCriterion("WINDPOWERSTATIONID not like", value, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidIn(List<String> values) {
+            addCriterion("WINDPOWERSTATIONID in", values, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidNotIn(List<String> values) {
+            addCriterion("WINDPOWERSTATIONID not in", values, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidBetween(String value1, String value2) {
+            addCriterion("WINDPOWERSTATIONID between", value1, value2, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindpowerstationidNotBetween(String value1, String value2) {
+            addCriterion("WINDPOWERSTATIONID not between", value1, value2, "windpowerstationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherIsNull() {
+            addCriterion("WEATHER is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherIsNotNull() {
+            addCriterion("WEATHER is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherEqualTo(String value) {
+            addCriterion("WEATHER =", value, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherNotEqualTo(String value) {
+            addCriterion("WEATHER <>", value, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherGreaterThan(String value) {
+            addCriterion("WEATHER >", value, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherGreaterThanOrEqualTo(String value) {
+            addCriterion("WEATHER >=", value, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherLessThan(String value) {
+            addCriterion("WEATHER <", value, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherLessThanOrEqualTo(String value) {
+            addCriterion("WEATHER <=", value, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherLike(String value) {
+            addCriterion("WEATHER like", value, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherNotLike(String value) {
+            addCriterion("WEATHER not like", value, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherIn(List<String> values) {
+            addCriterion("WEATHER in", values, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherNotIn(List<String> values) {
+            addCriterion("WEATHER not in", values, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherBetween(String value1, String value2) {
+            addCriterion("WEATHER between", value1, value2, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andWeatherNotBetween(String value1, String value2) {
+            addCriterion("WEATHER not between", value1, value2, "weather");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureIsNull() {
+            addCriterion("TEMPERATURE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureIsNotNull() {
+            addCriterion("TEMPERATURE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureEqualTo(Double value) {
+            addCriterion("TEMPERATURE =", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureNotEqualTo(Double value) {
+            addCriterion("TEMPERATURE <>", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureGreaterThan(Double value) {
+            addCriterion("TEMPERATURE >", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureGreaterThanOrEqualTo(Double value) {
+            addCriterion("TEMPERATURE >=", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureLessThan(Double value) {
+            addCriterion("TEMPERATURE <", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureLessThanOrEqualTo(Double value) {
+            addCriterion("TEMPERATURE <=", value, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureIn(List<Double> values) {
+            addCriterion("TEMPERATURE in", values, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureNotIn(List<Double> values) {
+            addCriterion("TEMPERATURE not in", values, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureBetween(Double value1, Double value2) {
+            addCriterion("TEMPERATURE between", value1, value2, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andTemperatureNotBetween(Double value1, Double value2) {
+            addCriterion("TEMPERATURE not between", value1, value2, "temperature");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelIsNull() {
+            addCriterion("REALFEEL is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelIsNotNull() {
+            addCriterion("REALFEEL is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelEqualTo(Double value) {
+            addCriterion("REALFEEL =", value, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelNotEqualTo(Double value) {
+            addCriterion("REALFEEL <>", value, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelGreaterThan(Double value) {
+            addCriterion("REALFEEL >", value, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelGreaterThanOrEqualTo(Double value) {
+            addCriterion("REALFEEL >=", value, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelLessThan(Double value) {
+            addCriterion("REALFEEL <", value, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelLessThanOrEqualTo(Double value) {
+            addCriterion("REALFEEL <=", value, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelIn(List<Double> values) {
+            addCriterion("REALFEEL in", values, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelNotIn(List<Double> values) {
+            addCriterion("REALFEEL not in", values, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelBetween(Double value1, Double value2) {
+            addCriterion("REALFEEL between", value1, value2, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealfeelNotBetween(Double value1, Double value2) {
+            addCriterion("REALFEEL not between", value1, value2, "realfeel");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionIsNull() {
+            addCriterion("WINDDIRECTION is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionIsNotNull() {
+            addCriterion("WINDDIRECTION is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionEqualTo(String value) {
+            addCriterion("WINDDIRECTION =", value, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionNotEqualTo(String value) {
+            addCriterion("WINDDIRECTION <>", value, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionGreaterThan(String value) {
+            addCriterion("WINDDIRECTION >", value, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionGreaterThanOrEqualTo(String value) {
+            addCriterion("WINDDIRECTION >=", value, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionLessThan(String value) {
+            addCriterion("WINDDIRECTION <", value, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionLessThanOrEqualTo(String value) {
+            addCriterion("WINDDIRECTION <=", value, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionLike(String value) {
+            addCriterion("WINDDIRECTION like", value, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionNotLike(String value) {
+            addCriterion("WINDDIRECTION not like", value, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionIn(List<String> values) {
+            addCriterion("WINDDIRECTION in", values, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionNotIn(List<String> values) {
+            addCriterion("WINDDIRECTION not in", values, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionBetween(String value1, String value2) {
+            addCriterion("WINDDIRECTION between", value1, value2, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andWinddirectionNotBetween(String value1, String value2) {
+            addCriterion("WINDDIRECTION not between", value1, value2, "winddirection");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedIsNull() {
+            addCriterion("SPEED is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedIsNotNull() {
+            addCriterion("SPEED is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedEqualTo(Double value) {
+            addCriterion("SPEED =", value, "speed");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedNotEqualTo(Double value) {
+            addCriterion("SPEED <>", value, "speed");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedGreaterThan(Double value) {
+            addCriterion("SPEED >", value, "speed");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedGreaterThanOrEqualTo(Double value) {
+            addCriterion("SPEED >=", value, "speed");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedLessThan(Double value) {
+            addCriterion("SPEED <", value, "speed");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedLessThanOrEqualTo(Double value) {
+            addCriterion("SPEED <=", value, "speed");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedIn(List<Double> values) {
+            addCriterion("SPEED in", values, "speed");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedNotIn(List<Double> values) {
+            addCriterion("SPEED not in", values, "speed");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedBetween(Double value1, Double value2) {
+            addCriterion("SPEED between", value1, value2, "speed");
+            return (Criteria) this;
+        }
+
+        public Criteria andSpeedNotBetween(Double value1, Double value2) {
+            addCriterion("SPEED not between", value1, value2, "speed");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table WEATHERFH
+     *
+     * @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 WEATHERFH
+     *
+     * @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);
+        }
+    }
+}

+ 14 - 3
src/main/java/com/gyee/frame/model/custom/MatrixVo.java

@@ -2,16 +2,27 @@ package com.gyee.frame.model.custom;
 
 public class MatrixVo {
 
+	private String wpId;
 	private String wtId;
 	private String wtCode;
-	private Integer wtnum;
+	private String wtnum;
 	private Double fjzt;
 	private Double fs;
     private Double gl;
+
+	public String getWpId() {
+		return wpId;
+	}
+
+	public void setWpId(String wpId) {
+		this.wpId = wpId;
+	}
+
 	/**
 	 *利用率=实时功率/装机容量
 	 */
 
+
 	private Double lyl;
 
 	public String getWtCode() {
@@ -62,11 +73,11 @@ public class MatrixVo {
 		this.gl = gl;
 	}
 
-	public Integer getWtnum() {
+	public String getWtnum() {
 		return wtnum;
 	}
 
-	public void setWtnum(Integer wtnum) {
+	public void setWtnum(String wtnum) {
 		this.wtnum = wtnum;
 	}
 }

+ 119 - 0
src/main/java/com/gyee/frame/service/WeatherfdService.java

@@ -0,0 +1,119 @@
+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.WeatherfdMapper;
+import com.gyee.frame.model.auto.Weatherfd;
+import com.gyee.frame.model.auto.WeatherfdExample;
+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 WeatherfdService implements BaseService<Weatherfd, WeatherfdExample> {
+	@Resource
+	private WeatherfdMapper weatherfdMapper;
+	
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			WeatherfdExample example=new WeatherfdExample();
+			example.createCriteria().andIdIn(lista);
+			return weatherfdMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public Weatherfd selectByPrimaryKey(String id) {
+				
+			return weatherfdMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(Weatherfd record) {
+		return weatherfdMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Weatherfd record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return weatherfdMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(Weatherfd record, WeatherfdExample example) {
+		
+		return weatherfdMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(Weatherfd record, WeatherfdExample example) {
+		
+		return weatherfdMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Weatherfd> selectByExample(WeatherfdExample example) {
+		
+		return weatherfdMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WeatherfdExample example) {
+		
+		return weatherfdMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WeatherfdExample example) {
+		
+		return weatherfdMapper.deleteByExample(example);
+	}
+
+	public List<Weatherfd> findWeatherfd(Date beginDate, Date endDate, String wpId) {
+
+		List<Weatherfd> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(wpId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+			WeatherfdExample example=new WeatherfdExample();
+			example.setOrderByClause("recodedata DESC");
+
+			WeatherfdExample.Criteria criteria =example.createCriteria();
+
+			criteria.andRecodedataGreaterThanOrEqualTo(beginDate).andRecodedataLessThan(endDate);
+
+			criteria.andWindpowerstationidEqualTo(wpId);
+			criteria.andWindpowerstationidLike("%FDC");
+
+			list= weatherfdMapper.selectByExample(example);
+
+		}
+		return list;
+
+	}
+}

+ 118 - 0
src/main/java/com/gyee/frame/service/WeatherfhService.java

@@ -0,0 +1,118 @@
+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.WeatherfhMapper;
+import com.gyee.frame.model.auto.Weatherfh;
+import com.gyee.frame.model.auto.WeatherfhExample;
+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 WeatherfhService implements BaseService<Weatherfh, WeatherfhExample> {
+	@Resource
+	private WeatherfhMapper weatherfhMapper;
+	
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<Integer> lista=Convert.toIntArrayList(ids);
+			WeatherfhExample example=new WeatherfhExample();
+			example.createCriteria().andIdIn(lista);
+			return weatherfhMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public Weatherfh selectByPrimaryKey(String id) {
+				
+			return weatherfhMapper.selectByPrimaryKey(Integer.valueOf(id));
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(Weatherfh record) {
+		return weatherfhMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Weatherfh record) {
+				
+
+			
+				
+		return weatherfhMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(Weatherfh record, WeatherfhExample example) {
+		
+		return weatherfhMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(Weatherfh record, WeatherfhExample example) {
+		
+		return weatherfhMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Weatherfh> selectByExample(WeatherfhExample example) {
+		
+		return weatherfhMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WeatherfhExample example) {
+		
+		return weatherfhMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WeatherfhExample example) {
+		
+		return weatherfhMapper.deleteByExample(example);
+	}
+
+
+	public List<Weatherfh> findWeatherfh(Date beginDate,Date endDate,String wpId) {
+
+		List<Weatherfh> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(wpId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+			WeatherfhExample example=new WeatherfhExample();
+			example.setOrderByClause("recodedata DESC");
+
+			WeatherfhExample.Criteria criteria =example.createCriteria();
+
+			criteria.andRecodedataGreaterThanOrEqualTo(beginDate).andRecodedataLessThan(endDate);
+
+			criteria.andWindpowerstationidEqualTo(wpId);
+			criteria.andWindpowerstationidLike("%FDC");
+			list= weatherfhMapper.selectByExample(example);
+
+		}
+		return list;
+
+	}
+
+}

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

@@ -2,26 +2,42 @@ package com.gyee.frame.service.health;
 
 import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
-import com.gyee.frame.model.auto.WindTurbineTestingPointAi2;
-import com.gyee.frame.model.auto.Windpowerstation;
-import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.custom.DNAVal;
 import com.gyee.frame.model.custom.PointData;
-import com.gyee.frame.service.WindTurbineTestingPointAiService;
+import com.gyee.frame.model.custom.ShutdowneventVo;
+import com.gyee.frame.service.*;
+import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.StringUtils;
 import com.gyee.frame.util.golden.EdosUtil;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.SimpleDateFormat;
 import java.util.*;
 @Service
 public class HealthMainService {
 
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+    @Resource
+    private WeatherfhService weatherfhService;
+    @Resource
+    private WeatherfdService weatherfdService;
+    @Resource
+    private ShutdowneventService shutdowneventService;
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+
 
+   private final int digit = 2;
+    private final double NUM = 3.6;
+    private final double XZNUM = 1.25;
     IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
-    private final int digit = 2;
-    public Map<String, Object> findHealthMatrix() throws Exception {
+   public Map<String, Object> findHealthMatrix() throws Exception {
 
 
         Map<String, Object> map = new HashMap<String, Object>();
@@ -109,4 +125,739 @@ public class HealthMainService {
 
         return map;
     }
+
+    /**
+     * 获得健康状态日情况图表
+     * @param wpId
+     * @param num 多少个点
+     * @param type 1、当日2、 7日3、当月
+     * @return
+     * @throws Exception
+     */
+    public Map<String, Object[]> findAllChart(String wpId, int num, int type) throws Exception {
+
+        Map<String, Object[]> map = new HashMap<String, Object[]>();
+
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(wpId) && StringUtils.notEmp(wpId)) {
+            String format1 = "yyyy-MM-dd HH点";
+            String format2 = "yyyy-MM-dd";
+            String format3 = "MM-dd";
+
+            SimpleDateFormat df1 = new SimpleDateFormat(format1);
+            SimpleDateFormat df2 = new SimpleDateFormat(format2);
+            SimpleDateFormat df3 = new SimpleDateFormat(format3);
+
+            Calendar cal = Calendar.getInstance();
+
+            String uniformcode = Constant.YCFJJKZT1DAY;
+            switch (type) {
+                case 1:
+                    cal.add(Calendar.HOUR_OF_DAY, 2);
+                    cal.set(Calendar.MINUTE, 0);
+                    cal.set(Calendar.SECOND, 0);
+
+                    uniformcode = Constant.YCFJJKZT1DAY;
+                    break;
+                case 2:
+                    cal.add(Calendar.DAY_OF_MONTH, 1);
+                    cal.set(Calendar.HOUR_OF_DAY, 0);
+                    cal.set(Calendar.MINUTE, 0);
+                    cal.set(Calendar.SECOND, 0);
+
+                    uniformcode = Constant.YCFJJKZT1MONTH;
+                    //   uniformcode = Constant.YCFJJKZT7DAY;
+                    break;
+                case 3:
+                    cal.add(Calendar.DAY_OF_MONTH, 1);
+                    cal.set(Calendar.HOUR_OF_DAY, 0);
+                    cal.set(Calendar.MINUTE, 0);
+                    cal.set(Calendar.SECOND, 0);
+                    uniformcode = Constant.YCFJJKZT1MONTH;
+                    break;
+                default:
+                    break;
+            }
+
+            int ysl = 0;// 优数量
+            int lsl = 0;// 良数量
+            int csl = 0;// 差数量
+            double jkd = 0.0;
+
+            Double[] yslchart = new Double[num];
+            Double[] lslchart = new Double[num];
+            Double[] cslchart = new Double[num];
+            Double[] lvchart = new Double[num];
+
+            String[] datechart = new String[num];
+            List<Windturbine> wtls = new ArrayList<Windturbine>();
+
+            if (InitialRunner.wpmap.containsKey(wpId)) {
+                wtls = InitialRunner.wp_wtmap.get(wpId);
+            } else {
+                for (Windturbine wt : InitialRunner.wtls) {
+                    wtls.add(wt);
+                }
+            }
+
+            List<String> wtidls = new ArrayList<String>();
+            List<String> codejkls = new ArrayList<String>();
+
+
+            for (Windturbine wt : wtls) {
+                wtidls.add(wt.getId());
+                codejkls.add(uniformcode);
+
+            }
+
+            String[] jkpoints = new String[wtidls.size()];
+
+            // 获得训练参数对象
+            for (int x = 0; x < wtidls.size(); x++) {
+
+
+                WindTurbineTestingPointAi2 ai = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x),codejkls.get(x));
+                jkpoints[x] = ai.getId();
+            }
+
+            for (int i = 0; i < num; i++) {
+                ysl = 0;// 优数量
+                lsl = 0;// 良数量
+                csl = 0;// 差数量
+                jkd = 0.0;
+
+                int recodeDate = new BigDecimal(cal.getTime().getTime()).divide(new BigDecimal(1000), 0, RoundingMode.HALF_EVEN).intValue();
+
+                // 获得风机健康状态结果数组
+                DNAVal[] jkvalues = realApiUtil.getHistMatrix(jkpoints, recodeDate);
+
+                for (int x = 0; x < wtidls.size(); x++) {
+
+                    double jk = jkvalues[x].DValue;
+
+                    if (jk == 4.0) {
+
+                        csl++;
+                    } else if (jk == 3.0) {
+
+                        lsl++;
+                    } else if (jk == 2.0 || jk == 1.0) {
+
+                        ysl++;
+                    } else {
+
+                        ysl++;
+                    }
+                }
+                jkd = new BigDecimal(ysl + lsl).divide(new BigDecimal(wtidls.size()), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                yslchart[i] = Double.valueOf(ysl);
+                lslchart[i] = Double.valueOf(lsl);
+                cslchart[i] = Double.valueOf(csl);
+                lvchart[i] = Double.valueOf(jkd);
+
+                switch (type) {
+                    case 1:
+                        datechart[i] = df1.format(cal.getTime());
+                        cal.add(Calendar.HOUR_OF_DAY, 2);
+
+                        break;
+                    case 2:
+                        datechart[i] = df2.format(cal.getTime());
+                        cal.add(Calendar.DAY_OF_MONTH, 1);
+                        break;
+                    case 3:
+                        datechart[i] = df3.format(cal.getTime());
+                        cal.add(Calendar.DAY_OF_MONTH, 1);
+                        break;
+                    default:
+                        break;
+                }
+
+            }
+
+            map.put("yslchart", yslchart);
+            map.put("lslchart", lslchart);
+            map.put("cslchart", cslchart);
+            map.put("lvchart", lvchart);
+            map.put("datechart", datechart);
+
+        }
+
+        return map;
+
+    }
+
+
+
+    /**
+     * 获得全省健康状态基础数据
+     * @return
+     * @throws Exception
+     */
+    public Map<String, Object> findAllMap() throws Exception {
+
+        Calendar cal = Calendar.getInstance();
+        // cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        Date beginDate = cal.getTime();
+        cal.add(Calendar.DAY_OF_MONTH, 1);
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        Date endDate = cal.getTime();
+
+        Map<String, Object> map = new HashMap<String, Object>();
+        List<Map<String, String>> gzls = new ArrayList<Map<String, String>>();
+        // 获得天气预报每小时数据
+        for (Windpowerstation wp : InitialRunner.wpls) {
+
+            String wpId = wp.getId();
+
+            if (wpId.endsWith("FDC")) {
+
+                double tqyb;// 天气预报
+                double ycfs;// 预测风速
+                double sjfs;// 实际风速
+                List<String> gzWtId = new ArrayList<String>();// 故障风机编号集合
+                List<String> lhWtId = new ArrayList<String>();// 良好风机编号集合
+                List<String> bjWtId = new ArrayList<String>();// 故障部件编号集合
+
+                int ysl = 0;// 优数量
+                int lsl = 0;// 良数量
+                int csl = 0;// 差数量
+                double jkd = 0.0;
+                List<Weatherfh> wfhls = weatherfhService.findWeatherfh(beginDate, endDate, wp.getId());
+                if (!wfhls.isEmpty()) {
+
+                    Weatherfh wth = wfhls.get(wfhls.size() - 1);
+
+                    String temp = wth.getWeather();
+                    if (StringUtils.notEmp(temp)) {
+                        String strtemp=temp.substring(temp.length()-6,temp.length()-4);
+                        tqyb = Double.valueOf(strtemp);
+                    } else {
+                        tqyb = 1.0;
+                    }
+
+                    ycfs = wth.getSpeed();
+
+                    ycfs = new BigDecimal(ycfs).multiply(new BigDecimal(XZNUM)).divide(new BigDecimal(NUM), 2, RoundingMode.HALF_EVEN).doubleValue();
+                    map.put(wpId + "_ycfs", ycfs);
+                    map.put(wpId + "_tqyb", tqyb);
+
+                } else {
+                    map.put(wpId + "_ycfs", 6.0);
+                    map.put(wpId + "_tqyb", 1.0);
+                }
+                // 获得实时风速测点编号
+
+                WindPowerStationTestingPoint2 point =windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(),Constant.TPOINT_WP_SSFS);
+                String wppintId = point.getCode();
+
+                PointData ssfspoint = realApiUtil.getRealData(wppintId);
+                sjfs = StringUtils.round(ssfspoint.getPointValueInDouble(), digit);
+
+                map.put(wpId + "_sjfs", sjfs);
+                List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
+                List<String> wtidls = new ArrayList<String>();
+                List<String> codejkls = new ArrayList<String>();
+
+                List<String> codeztls = new ArrayList<String>();
+
+                for (Windturbine wt : wtls) {
+                    wtidls.add(wt.getId());
+                    codejkls.add(Constant.FJJKZZ);
+                    codeztls.add(Constant.FJZT);
+                }
+
+                cal = Calendar.getInstance();
+                // cal.add(Calendar.MINUTE, -1);
+                // int recodeDate = new BigDecimal(cal.getTime().getTime())
+                // .divide(new BigDecimal(1000), 0,
+                // RoundingMode.HALF_EVEN).intValue();
+
+                String[] jkpoints = new String[wtidls.size()];
+                String[] ztpoints = new String[wtidls.size()];
+
+
+
+                // 获得训练参数对象
+                for (int x = 0; x < wtidls.size(); x++) {
+
+                    WindTurbineTestingPointAi2 ai1 =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x),codejkls.get(x));
+                    jkpoints[x] = ai1.getId();
+                    WindTurbineTestingPointAi2 ai2 =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x),codeztls.get(x));
+                    ztpoints[x] = ai2.getId();
+
+                }
+                // 获得风机健康状态结果数组
+                DNAVal[] jkvalues = realApiUtil.getRealtimeTagValues(jkpoints);
+
+                // 获得风机实时状态结果数组
+                DNAVal[] ztvalues = realApiUtil.getRealtimeTagValues(ztpoints);
+
+                Calendar cal2 = Calendar.getInstance();
+                Date end = cal2.getTime();
+                cal2.add(Calendar.DAY_OF_MONTH, -1);
+                Date begin = cal2.getTime();
+                for (int x = 0; x < wtidls.size(); x++) {
+                    String wtId = wtidls.get(x);
+                    double jk = jkvalues[x].DValue;
+
+                    double zt = ztvalues[x].DValue;
+                    if (zt == 2.0) {
+
+                        List<ShutdowneventVo> svos=shutdowneventService.queryEvents(null,wtId, begin, end,null);
+
+                        List<Map<String, String>> stoptypels =new ArrayList<Map<String, String>>();
+
+                        if(!svos.isEmpty())
+                        {
+                            for(ShutdowneventVo vo:svos)
+                            {
+                                map.put("stopTypeId", vo.getStopTypeId());
+                                map.put("windTurbineId", vo.getWindTurbineId());
+                                map.put("stopTime", DateUtils.formatDateTime(vo.getStopTime()));
+
+                                if (StringUtils.notEmp(vo.getWarningId()) && InitialRunner.warningmap.containsKey(vo.getWarningId())) {
+                                    map.put("warningId", InitialRunner.warningmap.get(vo.getWarningId()).getChinesetext());
+                                } else {
+                                    map.put("warningId", " ");
+                                }
+                            }
+                        }
+
+                        if (StringUtils.notEmp(stoptypels) && !stoptypels.isEmpty()) {
+                            if (StringUtils.notEmp(stoptypels.get(0))) {
+                                Map<String, String> strmap = stoptypels.get(0);
+
+                                String stoptype = strmap.get("stopTypeId");
+                                if (stoptype.equals("fdj")) {
+                                    bjWtId.add("1");
+                                    strmap.put("stopTypeId", "发电机");
+                                } else if (stoptype.equals("clx")) {
+                                    bjWtId.add("2");
+                                    strmap.put("stopTypeId", "齿轮箱");
+                                } else if (stoptype.equals("zz")) {
+                                    bjWtId.add("3");
+                                    strmap.put("stopTypeId", "主控");
+                                } else if (stoptype.equals("bj")) {
+                                    bjWtId.add("4");
+                                    strmap.put("stopTypeId", "变桨");
+                                } else if (stoptype.equals("ph")) {
+                                    bjWtId.add("5");
+                                    strmap.put("stopTypeId", "偏航");
+                                } else if (stoptype.equals("other")) {
+                                    bjWtId.add("6");
+                                    strmap.put("stopTypeId", "主系统");
+                                } else if (stoptype.equals("kz")) {
+                                    bjWtId.add("7");
+                                    strmap.put("stopTypeId", "控制");
+                                } else {
+                                    bjWtId.add("8");
+                                    strmap.put("stopTypeId", "其它");
+                                }
+
+                                gzls.add(strmap);
+                            }
+
+                        }
+                        gzWtId.add(wtId);
+                        csl++;
+                    } else {
+                        if (jk >= 60) {
+
+                            ysl++;
+
+                        } else if (jk < 60  && jk >= 30) {
+                            lhWtId.add(wtId);
+                            lsl++;
+                        } else {
+                            gzWtId.add(wtId);
+                            csl++;
+
+                        }
+
+                    }
+
+                }
+
+                map.put(wpId + "_csl", csl);
+                map.put(wpId + "_lsl", lsl);
+                map.put(wpId + "_ysl", ysl);
+                jkd = new BigDecimal(ysl + lsl).divide(new BigDecimal(wtidls.size()), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                map.put(wpId + "_jkd", jkd);
+                map.put(wpId + "_gzWtId", gzWtId);
+                map.put(wpId + "_lhWtId", lhWtId);
+                map.put(wpId + "_bjWtId", bjWtId);
+
+            }
+        }
+        map.put("_gzls", gzls);
+        return map;
+    }
+
+
+    /**
+     * 获得风场健康状态基础数据
+     * @return
+     * @throws Exception
+     */
+    public Map<String, Object> findWpMap(String wpId) throws Exception {
+        Calendar cal = Calendar.getInstance();
+        int hour = cal.get(Calendar.HOUR_OF_DAY);
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+
+        Date beginDate = cal.getTime();
+        cal.add(Calendar.DAY_OF_MONTH, 1);
+        Date endDate = cal.getTime();
+
+
+        Map<String, Object> map = new HashMap<String, Object>();
+        List<Map<String, String>> gzls = new ArrayList<Map<String, String>>();
+        if (StringUtils.notEmp(wpId) && InitialRunner.wpmap.containsKey(wpId)) {
+
+            if (wpId.endsWith("FDC")) {
+                int ysl = 0;// 优数量
+                int lsl = 0;// 良数量
+                int csl = 0;// 差数量
+                double jkd = 0.0;
+                double ycdl15minute = 0.0;
+                double ycdl1hour = 0.0;
+                double ycdl1day = 0.0;
+                double ycdl1month = 0.0;
+                double yczqlday = 0.0;
+                double yczqlmonth = 0.0;
+
+                // 获得实时风速测点编号
+
+                WindPowerStationTestingPoint2 point =windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId,Constant.TPOINT_WP_RFDL);
+                String wppintId1 = point.getCode();
+                PointData ssfspoint1 = realApiUtil.getRealData(wppintId1);
+                double rfdl = StringUtils.round(ssfspoint1.getPointValueInDouble(), digit);
+
+                WindPowerStationTestingPoint2 point2 =windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId,Constant.TPOINT_WP_YFDL);
+                String wppintId2 = point2.getCode();
+                PointData ssfspoint2 = realApiUtil.getRealData(wppintId2);
+                double yfdl = StringUtils.round(ssfspoint2.getPointValueInDouble(), digit);
+
+                List<String[]> wtIdls = new ArrayList<String[]>();// 风机编号集合
+                List<String> bjWtId = new ArrayList<String>();// 故障部件编号集合
+
+                List<Weatherfh> wfhls = weatherfhService.findWeatherfh(beginDate, endDate, wpId);
+                if (!wfhls.isEmpty()) {
+
+                    Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
+                    for (Weatherfh wh : wfhls) {
+                        cal.setTime(wh.getRecodedata());
+                        int hourtemp = cal.get(Calendar.HOUR_OF_DAY);
+                        if (hourtemp == hour) {
+                            ycdl15minute = StringUtils.round(getPowerByWp(wh.getSpeed(), wpId, 1) * 0.25, 2);
+                        }
+                        if (hourtemp == hour + 1) {
+                            ycdl1hour = getPowerByWp(wh.getSpeed(), wpId, 1);
+                        }
+
+                        if (speedmap.containsKey(wh.getSpeed())) {
+                            int temp = speedmap.get(wh.getSpeed()) + 1;
+                            speedmap.put(wh.getSpeed(), temp);
+                        } else {
+                            speedmap.put(wh.getSpeed(), 1);
+                        }
+
+                    }
+                    ycdl1day = getPowerByWp(speedmap, wpId, 1);
+
+                }
+                cal = Calendar.getInstance();
+                cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+                cal.set(Calendar.HOUR_OF_DAY, 0);
+                cal.set(Calendar.MINUTE, 0);
+                cal.set(Calendar.SECOND, 0);
+
+                beginDate = cal.getTime();
+                cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                cal.add(Calendar.DAY_OF_MONTH, 1);
+                cal.set(Calendar.HOUR_OF_DAY, 0);
+                endDate = cal.getTime();
+
+                List<Weatherfd> wfdls = weatherfdService.findWeatherfd(beginDate, endDate, wpId);
+
+                if (!wfdls.isEmpty()) {
+                    Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
+
+                    for (Weatherfd wd : wfdls) {
+                        if (speedmap.containsKey(wd.getSpeed1())) {
+                            int temp = speedmap.get(wd.getSpeed1()) + 1;
+                            speedmap.put(wd.getSpeed1(), temp);
+                        } else {
+                            speedmap.put(wd.getSpeed1(), 1);
+                        }
+                        if (speedmap.containsKey(wd.getSpeed2())) {
+                            int temp = speedmap.get(wd.getSpeed2()) + 1;
+                            speedmap.put(wd.getSpeed2(), temp);
+                        } else {
+                            speedmap.put(wd.getSpeed2(), 1);
+                        }
+
+                    }
+
+                    ycdl1month = getPowerByWp(speedmap, wpId, 24);
+
+                }
+
+                if (ycdl1day != 0.0) {
+                    yczqlday = new BigDecimal(rfdl).divide(new BigDecimal(ycdl1day), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                }
+                if (ycdl1month != 0.0) {
+                    yczqlmonth = new BigDecimal(yfdl).divide(new BigDecimal(ycdl1month), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                }
+
+                List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wpId);
+                List<String> wtidls = new ArrayList<String>();
+                List<String> codejkls = new ArrayList<String>();
+                List<String> codeztls = new ArrayList<String>();
+
+
+                for (Windturbine wt : wtls) {
+
+                    wtidls.add(wt.getId());
+                    codejkls.add(Constant.FJJKZZ);
+                    codeztls.add(Constant.FJZT);
+
+                }
+
+                // cal = Calendar.getInstance();
+                // // cal.add(Calendar.MINUTE, -1);
+                // int recodeDate = new
+                // BigDecimal(cal.getTime().getTime()).divide(new
+                // BigDecimal(1000), 0, RoundingMode.HALF_EVEN).intValue();
+
+                String[] jkpoints = new String[wtidls.size()];
+                String[] ztpoints = new String[wtidls.size()];
+
+                // 获得训练参数对象
+                for (int x = 0; x < wtidls.size(); x++) {
+
+                    WindTurbineTestingPointAi2 ai1 =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x),codejkls.get(x));
+                    jkpoints[x] = ai1.getId();
+                    WindTurbineTestingPointAi2 ai2 =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x),codeztls.get(x));
+                    ztpoints[x] = ai2.getId();
+
+                }
+                // // 获得风机健康状态结果数组
+                // DNAVal[] jkvalues = realApiUtil.getHistMatrix(jkpoints,
+                // recodeDate);
+                // // 获得风机实时状态结果数组
+                // DNAVal[] ztvalues = realApiUtil.getHistMatrix(ztpoints,
+                // recodeDate);
+
+                // 获得风机健康状态结果数组
+                DNAVal[] jkvalues = realApiUtil.getRealtimeTagValues(jkpoints);
+                // 获得风机实时状态结果数组
+                DNAVal[] ztvalues = realApiUtil.getRealtimeTagValues(ztpoints);
+
+
+                Calendar cal2 = Calendar.getInstance();
+                Date end = cal2.getTime();
+                cal2.add(Calendar.DAY_OF_MONTH, -1);
+                Date begin = cal2.getTime();
+                for (int x = 0; x < wtidls.size(); x++) {
+                    String wtId = wtidls.get(x);
+                    double jk = jkvalues[x].DValue;
+                    double zt = ztvalues[x].DValue;
+
+
+                    if (zt == 2.0) {
+
+                        List<ShutdowneventVo> svos=shutdowneventService.queryEvents(null,wtId, begin, end,null);
+
+                        List<Map<String, String>> stoptypels =new ArrayList<Map<String, String>>();
+
+                        if(!svos.isEmpty())
+                        {
+                            for(ShutdowneventVo vo:svos)
+                            {
+                                map.put("stopTypeId", vo.getStopTypeId());
+                                map.put("windTurbineId", vo.getWindTurbineId());
+                                map.put("stopTime", DateUtils.formatDateTime(vo.getStopTime()));
+
+                                if (StringUtils.notEmp(vo.getWarningId()) && InitialRunner.warningmap.containsKey(vo.getWarningId())) {
+                                    map.put("warningId", InitialRunner.warningmap.get(vo.getWarningId()).getChinesetext());
+                                } else {
+                                    map.put("warningId", " ");
+                                }
+                            }
+                        }
+                        if (StringUtils.notEmp(stoptypels) && !stoptypels.isEmpty()) {
+                            if (StringUtils.notEmp(stoptypels.get(0))) {
+                                Map<String, String> strmap = stoptypels.get(0);
+
+                                String stoptype = strmap.get("stopTypeId");
+                                if(stoptype==null) {
+                                    continue;
+
+                                }
+                                if (stoptype.equals("fdj")) {
+                                    bjWtId.add("1");
+                                    strmap.put("stopTypeId", "发电机");
+                                } else if (stoptype.equals("clx")) {
+                                    bjWtId.add("2");
+                                    strmap.put("stopTypeId", "齿轮箱");
+                                } else if (stoptype.equals("zz")) {
+                                    bjWtId.add("3");
+                                    strmap.put("stopTypeId", "主控");
+                                } else if (stoptype.equals("bj")) {
+                                    bjWtId.add("4");
+                                    strmap.put("stopTypeId", "变桨");
+                                } else if (stoptype.equals("ph")) {
+                                    bjWtId.add("5");
+                                    strmap.put("stopTypeId", "偏航");
+                                } else if (stoptype.equals("other")) {
+                                    bjWtId.add("6");
+                                    strmap.put("stopTypeId", "主系统");
+                                } else if (stoptype.equals("kz")) {
+                                    bjWtId.add("7");
+                                    strmap.put("stopTypeId", "控制");
+                                } else {
+                                    bjWtId.add("8");
+                                    strmap.put("stopTypeId", "其它");
+                                }
+
+                                gzls.add(strmap);
+                            }
+
+                        }
+
+                        String[] str = new String[2];
+                        str[0] = wtId;
+                        str[1] = "3";
+                        wtIdls.add(str);
+                        csl++;
+                    } else {
+                        String[] str = new String[2];
+                        if (jk >= 60) {
+                            str[0] = wtId;
+                            str[1] = "1";
+                            wtIdls.add(str);
+                            ysl++;
+                        } else if (jk < 60  && jk >= 30) {
+                            str[0] = wtId;
+                            str[1] = "2";
+                            wtIdls.add(str);
+                            lsl++;
+                        } else {
+                            str[0] = wtId;
+                            str[1] = "3";
+                            wtIdls.add(str);
+                            csl++;
+                        }
+
+                    }
+
+                }
+                jkd = new BigDecimal(ysl + lsl).divide(new BigDecimal(wtidls.size()), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                map.put(wpId + "_jkd", jkd);
+                map.put(wpId + "_csl", csl);
+                map.put(wpId + "_lsl", lsl);
+                map.put(wpId + "_ysl", ysl);
+                map.put(wpId + "_ycdl15minute", ycdl15minute);
+                map.put(wpId + "_ycdl1hour", ycdl1hour);
+                map.put(wpId + "_ycdl1day", ycdl1day);
+                map.put(wpId + "_ycdl1month", ycdl1month);
+                map.put(wpId + "_rfdl", rfdl);
+                map.put(wpId + "_yfdl", yfdl);
+                map.put(wpId + "_yczqlday", yczqlday);
+                map.put(wpId + "_yczqlmonth", yczqlmonth);
+                map.put(wpId + "_wtIdls", wtIdls);
+
+            }
+        }
+        map.put("_gzls", gzls);
+        return map;
+    }
+
+
+    private double getPowerByWp(double speed, String wpId, double step) {
+        double power = 0.0;
+
+        if (InitialRunner.wp_wtmap.containsKey(wpId)) {
+            List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wpId);
+            for (Windturbine wt : wtls) {
+                Map<Double, Windturbinepowercurvefitting> map = InitialRunner.wpcmap.get(wt.getId());
+                if (map.containsKey(speed)) {
+                    Windturbinepowercurvefitting wc = map.get(speed);
+
+                    double actualpower = wc.getActualpower();
+                    // / <summary>
+                    // /电量分析主要针对省公司和各风场的每月实际发电量与计划的对比分析,可以查看省公司及各风场每月计划的完成情况和总体的计划完成情况,可以同比和环比进行比较;
+                    // /对省公司和各风场的实际发电量与理论发电量的对比分析,利用标准功率曲线中的风速,理论功率,和固定时间段的风频进行统计,设计统计分析公式为:
+                    // /理论发电量=(T*f1/f)*P1+(T*f2/f)*P2+…………(T*fn/f)*Pn
+                    // /T是选取的时间段;
+                    // /f是所有风频的和;
+                    // /f1、f2、fn是某风速对应的风频;
+                    // /P1、Pn是某风速对应理论曲线上的功率。
+                    // /必要性:如果理论电量能够实现计算的准确,调峰电量就可以用理论电量来减去实际电量得出。
+                    // /b、可选一段时间内的实际功率和理论功率能够形成曲线形式展示对比,理论功率根据实际风速利用理论功率曲线得出。
+                    // /c、风频数据取值时间段需要统一。
+                    // / </summary>
+                    // / <param name="powerDataList">功率集合</param>
+                    // / <param name="hours">时长小时数</param>
+                    // / <returns>理论发电量</returns>
+                    power = power + new BigDecimal(step).multiply(new BigDecimal(actualpower)).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                }
+            }
+        }
+        return StringUtils.round(power, 2);
+    }
+
+    private double getPowerByWp(Map<Double, Integer> speedmap, String wpId, double step) {
+        double power = 0.0;
+
+        if (InitialRunner.wp_wtmap.containsKey(wpId)) {
+            List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wpId);
+            for (Windturbine wt : wtls) {
+                Map<Double, Windturbinepowercurvefitting> map = InitialRunner.wpcmap.get(wt.getId());
+
+                Set<Map.Entry<Double, Integer>> set = speedmap.entrySet();
+                for (Iterator<Map.Entry<Double, Integer>> it = set.iterator(); it.hasNext();) {
+                    Map.Entry<Double, Integer> entry = (Map.Entry<Double, Integer>) it.next();
+                    // System.out.println(entry.getKey() + "--->" +
+                    // entry.getValue());
+
+                    double speed = entry.getKey() > 24.99 ? entry.getKey() : 24.99;
+                    if (null!=map && map.containsKey(speed)) {
+                        Windturbinepowercurvefitting wc = map.get(speed);
+
+                        double actualpower = wc.getActualpower();
+                        // / <summary>
+                        // /电量分析主要针对省公司和各风场的每月实际发电量与计划的对比分析,可以查看省公司及各风场每月计划的完成情况和总体的计划完成情况,可以同比和环比进行比较;
+                        // /对省公司和各风场的实际发电量与理论发电量的对比分析,利用标准功率曲线中的风速,理论功率,和固定时间段的风频进行统计,设计统计分析公式为:
+                        // /理论发电量=(T*f1/f)*P1+(T*f2/f)*P2+…………(T*fn/f)*Pn
+                        // /T是选取的时间段;
+                        // /f是所有风频的和;
+                        // /f1、f2、fn是某风速对应的风频;
+                        // /P1、Pn是某风速对应理论曲线上的功率。
+                        // /必要性:如果理论电量能够实现计算的准确,调峰电量就可以用理论电量来减去实际电量得出。
+                        // /b、可选一段时间内的实际功率和理论功率能够形成曲线形式展示对比,理论功率根据实际风速利用理论功率曲线得出。
+                        // /c、风频数据取值时间段需要统一。
+                        // / </summary>
+                        // / <param name="powerDataList">功率集合</param>
+                        // / <param name="hours">时长小时数</param>
+                        // / <returns>理论发电量</returns>
+
+                        power = power + new BigDecimal(step).multiply(new BigDecimal(entry.getValue())).divide(new BigDecimal(speedmap.size()), 2, RoundingMode.HALF_EVEN).multiply(new BigDecimal(actualpower)).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                    }
+                }
+
+            }
+        }
+        return StringUtils.round(power, 2);
+    }
 }

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

@@ -0,0 +1,163 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+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;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class GeneralAppearancePushService {
+
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+        List<String> ls = new ArrayList<>();
+        ls.add("MHS_FDC");
+        ls.add("NSS_FDC");
+        ls.add("QS_FDC");
+        ls.add("SBQ_FDC");
+        ls.add("XS_FDC");
+        ls.add("QS03_GC");
+        ls.add("DWK_GDC");
+        ls.add("PL01_GC");
+        ls.add("PL02_GC");
+        ls.add("MCH_GDC");
+        ls.add("XH_GDC");
+
+
+        for (String wpId : ls) {
+            map.put(wpId, findGeneralAppearance(wpId));
+        }
+        return map;
+
+    }
+
+    public Map<String, Object> findGeneralAppearance(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if (StringUtils.notEmp(id)) {
+
+            map = findPowerMap(id);
+        }
+
+
+        return map;
+    }
+
+
+    private Workbook openExcelByFile(String wpId) throws FileNotFoundException {
+        Workbook wb = null;
+        //String path = ClassUtils.getDefaultClassLoader().getResource("").getPath();
+        String staticPath = ClassUtils.getDefaultClassLoader().getResource("static").getPath();
+
+        StringBuilder sb = new StringBuilder();
+        switch (wpId) {
+            case "MHS_FDC":
+                sb.append(staticPath).append("/syz/mhs_zm.xls");
+                break;
+            case "NSS_FDC":
+                sb.append(staticPath).append("/syz/nss_zm.xls");
+                break;
+            case "QS_FDC":
+                sb.append(staticPath).append("/syz/qs_zm.xls");
+                break;
+            case "SBQ_FDC":
+                sb.append(staticPath).append("/syz/sbq_zm.xls");
+                break;
+            case "XS_FDC":
+                sb.append(staticPath).append("/syz/xs_zm.xls");
+                break;
+            case "DWK_GDC":
+                sb.append(staticPath).append("/syz/dwk_zm.xls");
+                break;
+            case "PL01_GC":
+                sb.append(staticPath).append("/syz/plyq_gf.xls");
+                break;
+            case "PL02_GC":
+                sb.append(staticPath).append("/syz/pleq_gf.xls");
+                break;
+            case "MCH_GDC":
+                sb.append(staticPath).append("/syz/mch_gf.xls");
+                break;
+            case "XH_GDC":
+                sb.append(staticPath).append("/syz/xh_gf.xls");
+                break;
+
+            default:
+
+        }
+        File file = new File(String.valueOf(sb));
+
+        try {
+            wb = WorkbookFactory.create(file);
+
+        } catch (Exception ex) {
+            // do something
+        }
+
+        return wb;
+    }
+
+    public Map<String, Object> findPowerMap(String wpId) throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+        List<String> namels = new ArrayList<>();
+        List<String> valuels = new ArrayList<>();
+        Workbook wb = openExcelByFile(wpId);
+
+        if (StringUtils.notEmp(wb)) {
+            Sheet sheet = wb.getSheetAt(0);//第一个
+
+            boolean firstRow = true;
+            for (int i = sheet.getFirstRowNum(); i <= sheet.getLastRowNum(); i++) {
+                if (i == 0) {
+                    continue;
+                }
+                Row row = sheet.getRow(i);
+                Cell cell0 = row.getCell(0);
+                Cell cell1 = row.getCell(1);
+                if (StringUtils.notEmp(cell0) && StringUtils.notEmp(cell1)) {
+                    String pointName = cell0.getStringCellValue(); //点名
+                    String pointValue = cell1.getStringCellValue(); //点值
+                    //System.out.println(pointName + "*********" + pointValue);
+                    namels.add(pointName);
+                    valuels.add(pointValue);
+                }
+            }
+
+            if (!valuels.isEmpty()) {
+                List<PointData> pointlist = realApiUtil.getRealData(valuels);
+
+                if (!pointlist.isEmpty() && pointlist.size() == valuels.size() && namels.size() == valuels.size()) {
+
+
+                    for (int i = 0; i < pointlist.size(); i++) {
+
+                        map.put(namels.get(i), pointlist.get(i).getPointValueInDouble());
+                    }
+
+                }
+
+            }
+
+        }
+        return map;
+    }
+}

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

@@ -0,0 +1,395 @@
+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.Windpowerstation;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.MatrixVo;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.service.ProjectPlanService;
+import com.gyee.frame.service.WindPowerstationTestingPointService;
+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.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class MatrixDetialGfPushService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private ProjectPlanService projectPlanService;
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+
+
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = findMatrix();
+
+
+        return map;
+
+    }
+
+    private Map<String, Object> findMatrix() throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        Map<String, Object> wpmap = new HashMap<String, Object>();
+
+
+
+        int fcdjnum = 0;
+        int fcsdtjnum = 0;
+        int fczcfdnum = 0;
+        int fcqxjclnum = 0;
+        int fcxdjclnum = 0;
+        int fcxdtjnum = 0;
+        int fcgztjnum = 0;
+        int fccnsltjnum = 0;
+        int fcjxtjnum = 0;
+        int fccnsljxnum = 0;
+        int fcdwslnum = 0;
+        int fchjslnum = 0;
+        int fclxnum = 0;
+
+        int gfdjnum = 0;
+        int gfsdtjnum = 0;
+        int gfzcfdnum = 0;
+        int gfqxjclnum = 0;
+        int gfxdjclnum = 0;
+        int gfxdtjnum = 0;
+        int gfgztjnum = 0;
+        int gfcnsltjnum = 0;
+        int gfjxtjnum = 0;
+        int gfcnsljxnum = 0;
+        int gfdwslnum = 0;
+        int gfhjslnum = 0;
+        int gflxnum = 0;
+        String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
+
+//        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
+        List< List<MatrixVo>> fjvos=new ArrayList<>();
+        Map<String, Map<String, Object>> fczbmap = new HashMap<>();
+        for (Windpowerstation wp : InitialRunner.wpallls) {
+
+            if(wp.getId().endsWith("FDC"))
+            {
+                continue;
+            }
+            Map<String, Object> jczbmap = new HashMap<>();
+            jczbmap.put("name", wp.getName());
+
+        /*************************************************风场指标统计*************************************************************/
+
+
+            List<String> jczbls = new ArrayList<>();
+            //实时风速
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SSFS).getCode());
+            //预测功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), ycPoints1[0]).getCode());
+            //保证功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.ZBZGL).getCode());
+            //应发功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_ZZSGL).getCode());
+            //实际功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SJGL).getCode());
+            //AGC出线有功
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.AGC001).getCode());
+            //AGC有功设定
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.AGC002).getCode());
+
+            //待机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.DJNUM).getCode());
+            //手动停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TJNUM).getCode());
+            //正常发电台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.FDNUM).getCode());
+            // 缺陷降出力台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.FDJCLNUM).getCode());
+            // 限电降出力台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.XDJCLNUM).getCode());
+            // 限电停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.XDTJNUM).getCode());
+            // 故障停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.GZNUM).getCode());
+            // 场内受累停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.CNGZNUM).getCode());
+            // 检修停机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.JXNUM).getCode());
+            // 场内受累检修台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.CNJXNUM).getCode());
+            // 电网受累台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.DWSLNUM).getCode());
+            // 环境受累台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.HJSLNUM).getCode());
+            // 风机离线台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.LXNUM).getCode());
+
+
+            List<PointData> jczblist = realApiUtil.getRealData(jczbls);
+
+            if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+
+                //实时风速
+                jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));
+                //预测功率
+                jczbmap.put("ycgl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
+                //保证功率
+                double bzgl = new BigDecimal(jczblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("bzgl", bzgl);
+                //应发功率
+                double yfgl = new BigDecimal(jczblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("yfgl", yfgl);
+                //实际功率
+                jczbmap.put("sjgl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
+                //AGC出线有功
+                jczbmap.put("agccxyg", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+                //AGC有功设定
+                jczbmap.put("agcygsd", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));
+                //待机台数
+                Double djnum = MathUtil.twoBit(jczblist.get(7).getPointValueInDouble());
+                jczbmap.put("djnum", djnum);
+                //手动停机台数
+                Double sdtjnum = MathUtil.twoBit(jczblist.get(8).getPointValueInDouble());
+                jczbmap.put("sdtjts", sdtjnum);
+                //正常发电台数
+                Double zcfdnum = MathUtil.twoBit(jczblist.get(9).getPointValueInDouble());
+                jczbmap.put("zcfdnum", zcfdnum);
+                //缺陷降出力台数
+                Double qxjclnum = MathUtil.twoBit(jczblist.get(10).getPointValueInDouble());
+                jczbmap.put("qxjclnum", qxjclnum);
+                // 限电降出力台数
+                Double xdjclnum = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
+                jczbmap.put("xdjclnum", xdjclnum);
+                // 限电停机台数
+                Double xdtjnum = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
+                jczbmap.put("xdtjnum", xdtjnum);
+                // 故障停机台数
+                Double gztjnum = MathUtil.twoBit(jczblist.get(13).getPointValueInDouble());
+                jczbmap.put("gztjnum", gztjnum);
+                // 场内受累停机台数
+                Double cnsltjnum = MathUtil.twoBit(jczblist.get(14).getPointValueInDouble());
+                jczbmap.put("cnsltjnum", cnsltjnum);
+                // 检修停机台数
+                Double jxtjnum = MathUtil.twoBit(jczblist.get(15).getPointValueInDouble());
+                jczbmap.put("jxtjnum", jxtjnum);
+                // 场内受累检修台数
+                Double cnsljxnum = MathUtil.twoBit(jczblist.get(16).getPointValueInDouble());
+                jczbmap.put("cnsljxnum", cnsljxnum);
+                // 电网受累台数
+                Double dwslnum = MathUtil.twoBit(jczblist.get(17).getPointValueInDouble());
+                jczbmap.put("dwslnum", dwslnum);
+                // 环境受累台数
+                Double hjslnum = MathUtil.twoBit(jczblist.get(18).getPointValueInDouble());
+                jczbmap.put("hjslnum", hjslnum);
+                // 风机离线台数
+                Double lxnum = MathUtil.twoBit(jczblist.get(19).getPointValueInDouble());
+                jczbmap.put("lxnum", lxnum);
+
+                if (wp.getId().endsWith("FDC")) {
+
+                    fcdjnum = fcdjnum + djnum.intValue();
+                    fcsdtjnum = fcsdtjnum + sdtjnum.intValue();
+                    fczcfdnum = fczcfdnum + zcfdnum.intValue();
+                    fcqxjclnum = fcqxjclnum + qxjclnum.intValue();
+                    fcxdjclnum = fcxdjclnum + xdjclnum.intValue();
+                    fcxdtjnum = fcxdtjnum + xdtjnum.intValue();
+                    fcgztjnum = fcgztjnum + gztjnum.intValue();
+                    fccnsltjnum = fccnsltjnum + cnsltjnum.intValue();
+                    fcjxtjnum = fcjxtjnum + jxtjnum.intValue();
+                    fccnsljxnum = fccnsljxnum + cnsljxnum.intValue();
+                    fcdwslnum = fcdwslnum + dwslnum.intValue();
+                    fchjslnum = fchjslnum + hjslnum.intValue();
+                    fclxnum = fclxnum + lxnum.intValue();
+
+                } else if (wp.getId().endsWith("GDC")) {
+
+                    gfdjnum = gfdjnum + djnum.intValue();
+                    gfsdtjnum = gfsdtjnum + sdtjnum.intValue();
+                    gfzcfdnum = gfzcfdnum + zcfdnum.intValue();
+                    gfqxjclnum = gfqxjclnum + qxjclnum.intValue();
+                    gfxdjclnum = gfxdjclnum + xdjclnum.intValue();
+                    gfxdtjnum = gfxdtjnum + xdtjnum.intValue();
+                    gfgztjnum = gfgztjnum + gztjnum.intValue();
+                    gfcnsltjnum = gfcnsltjnum + cnsltjnum.intValue();
+                    gfjxtjnum = gfjxtjnum + jxtjnum.intValue();
+                    gfcnsljxnum = gfcnsljxnum + cnsljxnum.intValue();
+                    gfdwslnum = gfdwslnum + dwslnum.intValue();
+                    gfhjslnum = gfhjslnum + hjslnum.intValue();
+                    gflxnum = gflxnum + lxnum.intValue();
+                }
+
+            } else {
+                //实时风速
+                jczbmap.put("ssfs", 0.0);
+                //预测功率
+                jczbmap.put("ssfs", 0.0);
+                //保证功率
+                jczbmap.put("bzgl", 0.0);
+                //应发功率
+                jczbmap.put("yfgl", 0.0);
+                //实际功率
+                jczbmap.put("sjgl", 0.0);
+                //AGC出线有功
+                jczbmap.put("agccxyg", 0.0);
+                //AGC有功设定
+                jczbmap.put("agcygsd", 0.0);
+                //待机台数
+                jczbmap.put("djnum",  0.0);
+                //手动停机台数
+                jczbmap.put("sdtjts", 0.0);
+                //正常发电台数
+                jczbmap.put("zcfdnum", 0.0);
+                //缺陷降出力台数
+                jczbmap.put("qxjclnum", 0.0);
+                // 限电降出力台数
+                jczbmap.put("xdjclnum", 0.0);
+                // 限电停机台数
+                jczbmap.put("xdtjnum", 0.0);
+                // 故障停机台数
+                jczbmap.put("gztjnum", 0.0);
+                // 场内受累停机台数
+                jczbmap.put("cnsltjnum", 0.0);
+                // 检修停机台数
+                jczbmap.put("jxtjnum", 0.0);
+                // 场内受累检修台数
+                jczbmap.put("cnsljxnum", 0.0);
+                // 电网受累台数
+                jczbmap.put("dwslnum", 0.0);
+                // 环境受累台数
+                jczbmap.put("hjslnum", 0.0);
+                // 风机离线台数
+                jczbmap.put("lxnum", 0.0);
+            }
+
+            fczbmap.put(wp.getId(),jczbmap);
+/*************************************************风场指标统计*************************************************************/
+
+
+
+
+/*************************************************风机指标统计*************************************************************/
+            List<String> fjzbls = new ArrayList<>();
+
+            List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
+
+            List<MatrixVo> vos = new ArrayList<>();
+
+            for(Windturbine wt:wtls)
+            {
+                //风机状态
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
+                //风速
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getId());
+                //功率
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
+
+            }
+
+            List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
+
+            if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
+
+
+                int step=3;
+                for(int i=0;i<wtls.size();i++)
+                {
+                    Windturbine wt=wtls.get(i);
+
+                    MatrixVo vo=new MatrixVo();
+                    vo.setWtId(wt.getId());
+
+                    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.setWtCode(wt.getCode());
+                    vo.setWpId(wt.getWindpowerstationid());
+                    vos.add(vo);
+
+                }
+
+            }
+            fjvos.add(vos);
+
+/*************************************************风机指标统计*************************************************************/
+
+        }
+        //风场待机台数
+        map.put("fczbmap", fczbmap);
+        //风机指标对象
+        map.put("fjmap", fjvos);
+
+/*******************************************风场、光伏状态数量统计***********************************************************/
+
+
+
+//        map.put("fcdjnum", fcdjnum);
+//        map.put("fcsdtjnum", fcsdtjnum);
+//        map.put("fczcfdnum", fczcfdnum);
+//        map.put("fcqxjclnum", fcqxjclnum);
+//        map.put("fcxdjclnum", fcxdjclnum);
+//        map.put("fcxdtjnum", fcxdtjnum);
+//        map.put("fcgztjnum", fcgztjnum);
+//        map.put("fccnsltjnum", fccnsltjnum);
+//        map.put("fcjxtjnum", fcjxtjnum);
+//        map.put("fccnsljxnum", fccnsljxnum);
+//        map.put("fcdwslnum", fcdwslnum);
+//        map.put("fchjslnum", fchjslnum);
+//        map.put("fclxnum", fclxnum);
+
+
+        map.put("gfdjnum", gfdjnum);
+        map.put("gfsdtjnum", gfsdtjnum);
+        map.put("gfzcfdnum", gfzcfdnum);
+        map.put("gfqxjclnum", gfqxjclnum);
+        map.put("gfxdjclnum", gfxdjclnum);
+        map.put("gfxdtjnum", gfxdtjnum);
+        map.put("gfgztjnum", gfgztjnum);
+        map.put("gfcnsltjnum", gfcnsltjnum);
+        map.put("gfjxtjnum", gfjxtjnum);
+        map.put("gfcnsljxnum", gfcnsljxnum);
+        map.put("gfdwslnum", gfdwslnum);
+        map.put("gfhjslnum", gfhjslnum);
+        map.put("gflxnum", gflxnum);
+
+        double gfjrnum = gfdjnum + gfsdtjnum + gfzcfdnum + gfqxjclnum + gfxdjclnum + gfxdtjnum+gfgztjnum+gfcnsltjnum+gfjxtjnum+gfcnsljxnum+gfdwslnum+gfhjslnum+gflxnum;
+
+        map.put("gfjrnum", gfjrnum);
+/*******************************************风场、光伏状态数量统计***********************************************************/
+
+
+        return map;
+    }
+
+
+}
+
+

+ 26 - 24
src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java

@@ -88,11 +88,13 @@ public class MatrixDetialPushService {
         int gflxnum = 0;
         String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
 
-        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
-        Map<String, Map<String, Double>> fczbmap = new HashMap<>();
-        for (Windpowerstation wp : InitialRunner.wpallls) {
+        //        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
+        List<List<MatrixVo>> fjvos=new ArrayList<>();
+        Map<String, Map<String, Object>> fczbmap = new HashMap<>();
+        for (Windpowerstation wp : InitialRunner.wpls) {
 
-            Map<String, Double> jczbmap = new HashMap<>();
+            Map<String, Object> jczbmap = new HashMap<>();
+            jczbmap.put("name", wp.getName());
 
         /*************************************************风场指标统计*************************************************************/
 
@@ -316,10 +318,7 @@ public class MatrixDetialPushService {
                     if(StringUtils.notEmp(wt.getStatus()))
                     {
                         String num=wt.getStatus().substring(wt.getStatus().length()-3);
-                        if(StringUtils.isNumeric(num))
-                        {
-                            vo.setWtnum(Integer.valueOf(num));
-                        }
+                        vo.setWtnum(num);
 
                     }
 
@@ -327,12 +326,13 @@ public class MatrixDetialPushService {
                     vo.setFs(MathUtil.twoBit(fjzblist.get(i*step+1).getPointValueInDouble()));
                     vo.setGl(MathUtil.twoBit(fjzblist.get(i*step+2).getPointValueInDouble()));
                     vo.setWtCode(wt.getCode());
+                    vo.setWpId(wt.getWindpowerstationid());
                     vos.add(vo);
 
                 }
 
             }
-            fjmap.put(wp.getId(),vos);
+            fjvos.add(vos);
 
 /*************************************************风机指标统计*************************************************************/
 
@@ -340,7 +340,7 @@ public class MatrixDetialPushService {
         //风场待机台数
         map.put("fczbmap", fczbmap);
         //风机指标对象
-        map.put("fjmap", fjmap);
+        map.put("fjmap", fjvos);
 
 /*******************************************风场、光伏状态数量统计***********************************************************/
 
@@ -360,20 +360,22 @@ public class MatrixDetialPushService {
         map.put("fchjslnum", fchjslnum);
         map.put("fclxnum", fclxnum);
 
-
-        map.put("gfdjnum", gfdjnum);
-        map.put("gfsdtjnum", gfsdtjnum);
-        map.put("gfzcfdnum", gfzcfdnum);
-        map.put("gfqxjclnum", gfqxjclnum);
-        map.put("gfxdjclnum", gfxdjclnum);
-        map.put("gfxdtjnum", gfxdtjnum);
-        map.put("gfgztjnum", gfgztjnum);
-        map.put("gfcnsltjnum", gfcnsltjnum);
-        map.put("gfjxtjnum", gfjxtjnum);
-        map.put("gfcnsljxnum", gfcnsljxnum);
-        map.put("gfdwslnum", gfdwslnum);
-        map.put("gfhjslnum", gfhjslnum);
-        map.put("gflxnum", gflxnum);
+        double fcjrnum = fcdjnum + fcsdtjnum + fczcfdnum + fcqxjclnum + fcxdjclnum + fcxdtjnum+fcgztjnum+fccnsltjnum+fcjxtjnum+fccnsljxnum+fcdwslnum+fchjslnum+fclxnum;
+
+        map.put("fcjrnum", fcjrnum);
+//        map.put("gfdjnum", gfdjnum);
+//        map.put("gfsdtjnum", gfsdtjnum);
+//        map.put("gfzcfdnum", gfzcfdnum);
+//        map.put("gfqxjclnum", gfqxjclnum);
+//        map.put("gfxdjclnum", gfxdjclnum);
+//        map.put("gfxdtjnum", gfxdtjnum);
+//        map.put("gfgztjnum", gfgztjnum);
+//        map.put("gfcnsltjnum", gfcnsltjnum);
+//        map.put("gfjxtjnum", gfjxtjnum);
+//        map.put("gfcnsljxnum", gfcnsljxnum);
+//        map.put("gfdwslnum", gfdwslnum);
+//        map.put("gfhjslnum", gfhjslnum);
+//        map.put("gflxnum", gflxnum);
 
 
 /*******************************************风场、光伏状态数量统计***********************************************************/

+ 165 - 152
src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java

@@ -36,8 +36,8 @@ public class MatrixPushByWpService {
     private ProjectPlanService projectPlanService;
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
-
-
+    @Resource
+    private GeneralAppearancePushService generalAppearancePushService;
 
     IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
 
@@ -52,205 +52,218 @@ public class MatrixPushByWpService {
     }
 
     private Map<String, Object> findMatrix(String wpId) throws Exception {
+
         Map<String, Object> map = new HashMap<String, Object>();
 
-        Map<String, Object> wpmap = new HashMap<String, Object>();
-
-        int fcdjnum = 0;
-        int fcyxnum = 0;
-        int fcgznum = 0;
-        int fclxnum = 0;
-        int fcwhnum = 0;
-        int fcxdnum = 0;
-
-        int gfdjnum = 0;
-        int gfyxnum = 0;
-        int gfgznum = 0;
-        int gflxnum = 0;
-        int gfwhnum = 0;
-        int gfxdnum = 0;
-        String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
-
-        Map<String, Map<String, MatrixVo>> fjmap = new HashMap<>();
-        Map<String, Map<String, Double>> fczbmap = new HashMap<>();
-
-  
-        
-        if(StringUtils.notEmp(wpId))
+        if(InitialRunner.wpmap.containsKey(wpId))
         {
-            Map<String, Double> jczbmap = new HashMap<>();
-
-            /*************************************************风场指标统计*************************************************************/
-
-
-            List<String> jczbls = new ArrayList<>();
-            //实时风速
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS).getCode());
-            //预测功率
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, ycPoints1[0]).getCode());
-            //保证功率
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.ZBZGL).getCode());
-            //应发功率
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_ZZSGL).getCode());
-            //实际功率
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL).getCode());
-            //AGC出线有功
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.AGC001).getCode());
-            //AGC有功设定
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.AGC002).getCode());
-            //待机台数
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS).getCode());
-            //运行台数
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_YXTS).getCode());
-            //故障台数
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_GZTJ).getCode());
-            //离线台数
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_TXZD).getCode());
-            //维护台数
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_WHTJ).getCode());
-            //限电台数
-            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_XDTS).getCode());
-
-
-            List<PointData> jczblist = realApiUtil.getRealData(jczbls);
-
-            if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
 
-                //实时风速
-                jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));
-                //预测功率
-                jczbmap.put("ycgl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
-                //保证功率
-                double bzgl = new BigDecimal(jczblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                jczbmap.put("bzgl", bzgl);
-                //应发功率
-                double yfgl = new BigDecimal(jczblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
-                jczbmap.put("yfgl", yfgl);
-                //实际功率
-                jczbmap.put("sjgl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
-                //AGC出线有功
-                jczbmap.put("agccxyg", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
-                //AGC有功设定
-                jczbmap.put("agcygsd", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));
+            Map<String, Object> wpmap = new HashMap<String, Object>();
 
+            int fcdjnum = 0;
+            int fcyxnum = 0;
+            int fcgznum = 0;
+            int fclxnum = 0;
+            int fcwhnum = 0;
+            int fcxdnum = 0;
 
-                Double djts = MathUtil.twoBit(jczblist.get(7).getPointValueInDouble());
-                //待机台数
-                jczbmap.put("djts", djts);
-                //运行台数
-                Double yxts = MathUtil.twoBit(jczblist.get(8).getPointValueInDouble());
-                jczbmap.put("yxts", yxts);
-                //故障台数
-                Double gzts = MathUtil.twoBit(jczblist.get(9).getPointValueInDouble());
-                jczbmap.put("gzts", gzts);
-                //离线台数
-                Double lxts = MathUtil.twoBit(jczblist.get(10).getPointValueInDouble());
-                jczbmap.put("lxts", lxts);
-                //维护台数
-                Double whts = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
-                jczbmap.put("whts", whts);
-                //限电台数
-                Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
-                jczbmap.put("xdts", xdts);
+            int gfdjnum = 0;
+            int gfyxnum = 0;
+            int gfgznum = 0;
+            int gflxnum = 0;
+            int gfwhnum = 0;
+            int gfxdnum = 0;
+            String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
+
+            Map<String, Map<String, MatrixVo>> fjmap = new HashMap<>();
+            Map<String, Map<String, Object>> fczbmap = new HashMap<>();
 
 
-            } else {
+
+            if(StringUtils.notEmp(wpId))
+            {
+                Map<String, Object> jczbmap = new HashMap<>();
+
+                /*************************************************风场指标统计*************************************************************/
+
+
+                List<String> jczbls = new ArrayList<>();
                 //实时风速
-                jczbmap.put("ssfs", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS).getCode());
                 //预测功率
-                jczbmap.put("ssfs", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, ycPoints1[0]).getCode());
                 //保证功率
-                jczbmap.put("bzgl", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.ZBZGL).getCode());
                 //应发功率
-                jczbmap.put("yfgl", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_ZZSGL).getCode());
                 //实际功率
-                jczbmap.put("sjgl", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL).getCode());
                 //AGC出线有功
-                jczbmap.put("agccxyg", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.AGC001).getCode());
                 //AGC有功设定
-                jczbmap.put("agcygsd", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.AGC002).getCode());
                 //待机台数
-                jczbmap.put("djts", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS).getCode());
                 //运行台数
-                jczbmap.put("yxts", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_YXTS).getCode());
                 //故障台数
-                jczbmap.put("gzts", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_GZTJ).getCode());
                 //离线台数
-                jczbmap.put("lxts", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_TXZD).getCode());
                 //维护台数
-                jczbmap.put("whts", 0.0);
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_WHTJ).getCode());
                 //限电台数
-                jczbmap.put("xdts", 0.0);
-            }
+                jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_XDTS).getCode());
+
+
+                List<PointData> jczblist = realApiUtil.getRealData(jczbls);
+
+                if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+
+                    //实时风速
+                    jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));
+                    //预测功率
+                    jczbmap.put("ycgl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
+                    //保证功率
+                    double bzgl = new BigDecimal(jczblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                    jczbmap.put("bzgl", bzgl);
+                    //应发功率
+                    double yfgl = new BigDecimal(jczblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                    jczbmap.put("yfgl", yfgl);
+                    //实际功率
+                    jczbmap.put("sjgl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
+                    //AGC出线有功
+                    jczbmap.put("agccxyg", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+                    //AGC有功设定
+                    jczbmap.put("agcygsd", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));
+
+
+                    Double djts = MathUtil.twoBit(jczblist.get(7).getPointValueInDouble());
+                    //待机台数
+                    jczbmap.put("djts", djts);
+                    //运行台数
+                    Double yxts = MathUtil.twoBit(jczblist.get(8).getPointValueInDouble());
+                    jczbmap.put("yxts", yxts);
+                    //故障台数
+                    Double gzts = MathUtil.twoBit(jczblist.get(9).getPointValueInDouble());
+                    jczbmap.put("gzts", gzts);
+                    //离线台数
+                    Double lxts = MathUtil.twoBit(jczblist.get(10).getPointValueInDouble());
+                    jczbmap.put("lxts", lxts);
+                    //维护台数
+                    Double whts = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
+                    jczbmap.put("whts", whts);
+                    //限电台数
+                    Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
+                    jczbmap.put("xdts", xdts);
+
+
+                } else {
+                    //实时风速
+                    jczbmap.put("ssfs", 0.0);
+                    //预测功率
+                    jczbmap.put("ssfs", 0.0);
+                    //保证功率
+                    jczbmap.put("bzgl", 0.0);
+                    //应发功率
+                    jczbmap.put("yfgl", 0.0);
+                    //实际功率
+                    jczbmap.put("sjgl", 0.0);
+                    //AGC出线有功
+                    jczbmap.put("agccxyg", 0.0);
+                    //AGC有功设定
+                    jczbmap.put("agcygsd", 0.0);
+                    //待机台数
+                    jczbmap.put("djts", 0.0);
+                    //运行台数
+                    jczbmap.put("yxts", 0.0);
+                    //故障台数
+                    jczbmap.put("gzts", 0.0);
+                    //离线台数
+                    jczbmap.put("lxts", 0.0);
+                    //维护台数
+                    jczbmap.put("whts", 0.0);
+                    //限电台数
+                    jczbmap.put("xdts", 0.0);
+                }
+
+
+                Map<String, Object> zmmap=generalAppearancePushService.findGeneralAppearance(wpId);
 
-            fczbmap.put(wpId,jczbmap);
+                //风场指标MAP
+                fczbmap.put("zmmap", zmmap);
+                fczbmap.put("jczbmap",jczbmap);
 /*************************************************风场指标统计*************************************************************/
 
 
 
 
 /*************************************************风机指标统计*************************************************************/
-            List<String> fjzbls = new ArrayList<>();
+                List<String> fjzbls = new ArrayList<>();
 
-            List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wpId);
+                List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wpId);
 
-            Map<String, MatrixVo> vomap = new HashMap<>();
+                Map<String, MatrixVo> vomap = new HashMap<>();
 
-            for(Windturbine wt:wtls)
-            {
-                //风机状态
-                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
-                //风速
-                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getId());
-                //功率
-                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
-
-            }
+                for(Windturbine wt:wtls)
+                {
+                    //风机状态
+                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
+                    //风速
+                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getId());
+                    //功率
+                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
 
-            List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
+                }
 
-            if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
+                List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
 
+                if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
 
-                int step=3;
-                for(int i=0;i<wtls.size();i++)
-                {
-                    Windturbine wt=wtls.get(i);
 
-                    MatrixVo vo=new MatrixVo();
-                    vo.setWtId(wt.getId());
-                    if(StringUtils.notEmp(wt.getStatus()))
+                    int step=3;
+                    for(int i=0;i<wtls.size();i++)
                     {
-                        String num=wt.getStatus().substring(wt.getStatus().length()-3);
-                        if(StringUtils.isNumeric(num))
+                        Windturbine wt=wtls.get(i);
+
+                        MatrixVo vo=new MatrixVo();
+                        vo.setWtId(wt.getId());
+
+                        if(StringUtils.notEmp(wt.getStatus()))
                         {
-                            vo.setWtnum(Integer.valueOf(num));
+                            String num=wt.getStatus().substring(wt.getStatus().length()-3);
+                            vo.setWtnum(num);
+
                         }
 
-                    }
+                        vo.setWpId(wt.getWindpowerstationid());
+                        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.setWtCode(wt.getCode());
+                        vomap.put(wt.getId(),vo);
 
-                    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.setWtCode(wt.getCode());
-                    vomap.put(wt.getId(),vo);
+                    }
 
                 }
+                fjmap.put(wpId,vomap);
+
+/*************************************************风机指标统计*************************************************************/
+
+
+
 
             }
-            fjmap.put(wpId,vomap);
 
-/*************************************************风机指标统计*************************************************************/
-        }
-      
-        //风场指标MAP
-        map.put("fczbmap", fczbmap);
-        //风机指标MAP
-        map.put("fjmap", fjmap);
+            //风场指标MAP
+            map.put("fczbmap", fczbmap);
+            //风机指标MAP
+            map.put("fjmap", fjmap);
 
 
 
-/*******************************************风场、光伏状态数量统计***********************************************************/
+        }
+
 
 
         return map;

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

@@ -39,7 +39,6 @@ public class MatrixPushService {
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
 
 
-
     IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
 
 
@@ -63,6 +62,7 @@ public class MatrixPushService {
         int fclxnum = 0;
         int fcwhnum = 0;
         int fcxdnum = 0;
+        int fcslnum = 0;
 
         int gfdjnum = 0;
         int gfyxnum = 0;
@@ -70,15 +70,19 @@ public class MatrixPushService {
         int gflxnum = 0;
         int gfwhnum = 0;
         int gfxdnum = 0;
+        int gfslnum = 0;
         String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
 
-        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
-        Map<String, Map<String, Double>> fczbmap = new HashMap<>();
+        //        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
+        List<List<MatrixVo>> fjvos = new ArrayList<>();
+        Map<String, Map<String, Object>> fczbmap = new HashMap<>();
         for (Windpowerstation wp : InitialRunner.wpallls) {
 
-            Map<String, Double> jczbmap = new HashMap<>();
+            Map<String, Object> jczbmap = new HashMap<>();
+
 
-        /*************************************************风场指标统计*************************************************************/
+            jczbmap.put("name", wp.getName());
+            /*************************************************风场指标统计*************************************************************/
 
 
             List<String> jczbls = new ArrayList<>();
@@ -198,21 +202,18 @@ public class MatrixPushService {
                 jczbmap.put("xdts", 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.FJZT).getId());
                 //风速
@@ -227,33 +228,51 @@ public class MatrixPushService {
             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 = 3;
+                int slts = 0;
+                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.isNumeric(num))
-                        {
-                            vo.setWtnum(Integer.valueOf(num));
-                        }
+                    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()));
+
+                    double fjzt = MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble());
+                    if (fjzt == 6) {
+                        slts++;
+                    }
+                    vo.setFjzt(fjzt);
+                    vo.setFs(MathUtil.twoBit(fjzblist.get(i * step + 1).getPointValueInDouble()));
+                    vo.setGl(MathUtil.twoBit(fjzblist.get(i * step + 2).getPointValueInDouble()));
                     vo.setWtCode(wt.getCode());
+                    vo.setWpId(wt.getWindpowerstationid());
                     vos.add(vo);
 
                 }
 
+
+                jczbmap.put("slts", Double.valueOf(slts));
+
+                double djts=(Double)jczbmap.get("djts");
+                double yxts=(Double)jczbmap.get("yxts");
+                double gzts=(Double)jczbmap.get("gzts");
+                double lxts=(Double)jczbmap.get("lxts");
+                double whts=(Double)jczbmap.get("whts");
+                double xdts=(Double)jczbmap.get("xdts");
+                jczbmap.put("jrts", Double.valueOf(slts)+djts+yxts+gzts+lxts+whts+xdts);
+                if (wp.getId().endsWith("FDC")) {
+                    fcslnum = fcslnum + slts;
+                } else {
+                    gfslnum = gfslnum + slts;
+                }
+
             }
-            fjmap.put(wp.getId(),vos);
+            fjvos.add(vos);
 
 /*************************************************风机指标统计*************************************************************/
 
@@ -261,37 +280,46 @@ public class MatrixPushService {
         //风场待机台数
         map.put("fczbmap", fczbmap);
         //风机指标对象
-        map.put("fjmap", fjmap);
+        map.put("fjmap", fjvos);
 
 /*******************************************风场、光伏状态数量统计***********************************************************/
 
-            //风场待机台数
-            map.put("fcdjnum", fcdjnum);
-            //风场运行台数
-            map.put("fcyxnum", fcyxnum);
-            //风场故障台数
-            map.put("fcgznum", fcgznum);
-            //风场离线台数
-            map.put("fclxnum", fclxnum);
-            //风场维护台数
-            map.put("fcwhnum", fcwhnum);
-            //风场限电台数
-            map.put("fcxdnum", fcxdnum);
-
-            //光伏待机台数
-            map.put("gfdjnum", gfdjnum);
-            //光伏运行台数
-            map.put("gfyxnum", gfyxnum);
-            //光伏故障台数
-            map.put("gfgznum", gfgznum);
-            //光伏离线台数
-            map.put("gflxnum", gflxnum);
-            //光伏维护台数
-            map.put("gfwhnum", gfwhnum);
-            //光伏限电台数
-            map.put("gfxdnum", gfxdnum);
-
-
+        //风场待机台数
+        map.put("fcdjnum", fcdjnum);
+        //风场运行台数
+        map.put("fcyxnum", fcyxnum);
+        //风场故障台数
+        map.put("fcgznum", fcgznum);
+        //风场离线台数
+        map.put("fclxnum", fclxnum);
+        //风场维护台数
+        map.put("fcwhnum", fcwhnum);
+        //风场限电台数
+        map.put("fcxdnum", fcxdnum);
+        //风场限电台数
+        map.put("fcslnum", fcslnum);
+//风场受累台数
+        double fcjrnum = fcdjnum + fcyxnum + fcgznum + fclxnum + fcwhnum + fcxdnum + fcslnum;
+
+        map.put("fcjrnum", fcjrnum);
+
+        //光伏待机台数
+        map.put("gfdjnum", gfdjnum);
+        //光伏运行台数
+        map.put("gfyxnum", gfyxnum);
+        //光伏故障台数
+        map.put("gfgznum", gfgznum);
+        //光伏离线台数
+        map.put("gflxnum", gflxnum);
+        //光伏维护台数
+        map.put("gfwhnum", gfwhnum);
+        //光伏限电台数
+        map.put("gfxdnum", gfxdnum);
+        //光伏受累台数
+        map.put("gfslnum", gfslnum);
+        double gfjrnum = gfdjnum + gfyxnum + gfgznum + gflxnum + gfwhnum + gfslnum;
+
+        map.put("gfjrnum", gfjrnum);
 /*******************************************风场、光伏状态数量统计***********************************************************/
 
 

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

@@ -76,12 +76,13 @@ public class MatrixQfPushService {
         int gfxdnum = 0;
         String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
 
-        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
-        Map<String, Map<String, Double>> fczbmap = new HashMap<>();
+        //        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
+        List< List<MatrixVo>> fjvos=new ArrayList<>();
+        Map<String, Map<String, Object>> fczbmap = new HashMap<>();
         for (Windpowerstation wp : InitialRunner.wpls) {
 
-            Map<String, Double> jczbmap = new HashMap<>();
-
+            Map<String, Object> jczbmap = new HashMap<>();
+            jczbmap.put("name", wp.getName());
             /*************************************************风场指标统计*************************************************************/
 
 
@@ -225,9 +226,8 @@ public class MatrixQfPushService {
                     vo.setWtId(wt.getId());
                     if (StringUtils.notEmp(wt.getStatus())) {
                         String num = wt.getStatus().substring(wt.getStatus().length() - 3);
-                        if (StringUtils.isNumeric(num)) {
-                            vo.setWtnum(Integer.valueOf(num));
-                        }
+
+                        vo.setWtnum(num);
 
                     }
                     double fjzt = MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble());
@@ -250,19 +250,27 @@ public class MatrixQfPushService {
                             vo.setLyl(0.0);
                         }
                     }
+                    if(StringUtils.notEmp(wt.getStatus()))
+                    {
+                        String num=wt.getStatus().substring(wt.getStatus().length()-3);
+                        vo.setWtnum(num);
+
+                    }
+
+                    vo.setWpId(wt.getWindpowerstationid());
                     vos.add(vo);
                 }
 
             }
-            fjmap.put(wp.getId(), vos);
-
+           // fjmap.put(wp.getId(), vos);
+            fjvos.add(vos);
 /*************************************************风机指标统计*************************************************************/
 
         }
         //风场待机台数
         map.put("fczbmap", fczbmap);
         //风机指标对象
-        map.put("fjmap", fjmap);
+        map.put("fjmap", fjvos);
 
 /*******************************************风场、光伏状态数量统计***********************************************************/
 

+ 2 - 2
src/main/java/com/gyee/frame/common/quartz/task/GenreSetPushTask.java

@@ -1,4 +1,4 @@
-package com.gyee.frame.common.quartz.task;
+package com.gyee.frame.service.websocket.task;
 
 
 import com.gyee.frame.common.websocket.WebsocketMessageService;
@@ -9,7 +9,7 @@ import javax.annotation.Resource;
 import java.util.HashMap;
 import java.util.Map;
 
-@Component("genreSetPushTask")
+@Component
 public class GenreSetPushTask {
     @Resource
     private GenreSetPushService genreSetPushService;

+ 23 - 0
src/main/java/com/gyee/frame/service/websocket/task/MatrixDetialGfPushTask.java

@@ -0,0 +1,23 @@
+package com.gyee.frame.service.websocket.task;
+
+import com.gyee.frame.common.websocket.WebsocketMessageService;
+import com.gyee.frame.service.websocket.MatrixDetialGfPushService;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Map;
+
+@Component
+public class MatrixDetialGfPushTask {
+    @Resource
+    private MatrixDetialGfPushService matrixDetialGfPushService;
+    @Resource
+    private WebsocketMessageService websocketMessageService;
+
+    public void matrixPush(String destination) throws Exception {
+
+        Map<String, Object> map=matrixDetialGfPushService.genreSetMap();
+
+        websocketMessageService.SendAlertToAll(destination,map);
+    }
+}

+ 23 - 0
src/main/java/com/gyee/frame/service/websocket/task/MatrixDetialPushTask.java

@@ -0,0 +1,23 @@
+package com.gyee.frame.service.websocket.task;
+
+import com.gyee.frame.common.websocket.WebsocketMessageService;
+import com.gyee.frame.service.websocket.MatrixDetialPushService;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Map;
+
+@Component
+public class MatrixDetialPushTask {
+    @Resource
+    private MatrixDetialPushService matrixDetialPushService;
+    @Resource
+    private WebsocketMessageService websocketMessageService;
+
+    public void matrixPush(String destination) throws Exception {
+
+        Map<String, Object> map=matrixDetialPushService.genreSetMap();
+
+        websocketMessageService.SendAlertToAll(destination,map);
+    }
+}

+ 23 - 0
src/main/java/com/gyee/frame/service/websocket/task/MatrixPushTask.java

@@ -0,0 +1,23 @@
+package com.gyee.frame.service.websocket.task;
+
+import com.gyee.frame.common.websocket.WebsocketMessageService;
+import com.gyee.frame.service.websocket.MatrixPushService;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Map;
+
+@Component
+public class MatrixPushTask {
+    @Resource
+    private MatrixPushService matrixPushService;
+    @Resource
+    private WebsocketMessageService websocketMessageService;
+
+    public void matrixPush(String destination) throws Exception {
+
+        Map<String, Object> map=matrixPushService.genreSetMap();
+
+        websocketMessageService.SendAlertToAll(destination,map);
+    }
+}

+ 23 - 0
src/main/java/com/gyee/frame/service/websocket/task/MatrixQfPushTask.java

@@ -0,0 +1,23 @@
+package com.gyee.frame.service.websocket.task;
+
+import com.gyee.frame.common.websocket.WebsocketMessageService;
+import com.gyee.frame.service.websocket.MatrixQfPushService;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.Map;
+
+@Component
+public class MatrixQfPushTask {
+    @Resource
+    private MatrixQfPushService matrixQfPushService;
+    @Resource
+    private WebsocketMessageService websocketMessageService;
+
+    public void matrixPush(String destination) throws Exception {
+
+        Map<String, Object> map=matrixQfPushService.genreSetMap();
+
+        websocketMessageService.SendAlertToAll(destination,map);
+    }
+}

+ 1 - 1
src/main/java/com/gyee/frame/common/quartz/task/V2Task.java

@@ -1,4 +1,4 @@
-package com.gyee.frame.common.quartz.task;
+package com.gyee.frame.service.websocket.task;
 import java.util.List;
 import cn.hutool.core.date.DateUtil;
 import javax.annotation.Resource;

+ 3 - 2
src/main/java/com/gyee/frame/common/quartz/task/WtTestTask.java

@@ -1,10 +1,11 @@
-package com.gyee.frame.common.quartz.task;
+package com.gyee.frame.service.websocket.task;
 
 
 import com.gyee.frame.service.websocket.BraceletService;
-import javax.annotation.Resource;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
+
 @Component("wtTestTask")
 public class WtTestTask {
     @Resource

+ 8 - 5
src/main/java/com/gyee/frame/shiro/config/ShiroConfig.java

@@ -18,6 +18,7 @@ import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
+import java.security.NoSuchAlgorithmException;
 import java.util.concurrent.ConcurrentHashMap;
 
 
@@ -116,7 +117,7 @@ public class ShiroConfig {
 	 * @return
 	 */
 	@Bean
-	public RememberMeManager rememberMeManager() {
+	public RememberMeManager rememberMeManager() throws NoSuchAlgorithmException {
 		Cookie cookie = new SimpleCookie("rememberMe");
         cookie.setHttpOnly(true);//通过js脚本将无法读取到cookie信息
         cookie.setMaxAge(60 * 60 * 24 * 30);//cookie保存30天
@@ -124,12 +125,14 @@ public class ShiroConfig {
 		CookieRememberMeManager manager=new CookieRememberMeManager();
 
 		//rememberme cookie加密的密钥 建议每个项目都不一样 默认AES算法 密钥长度(128 256 512 位),通过以下代码可以获取
-		//KeyGenerator keygen = KeyGenerator.getInstance("AES");
-		//SecretKey deskey = keygen.generateKey();
-		//System.out.println(Base64.encodeToString(deskey.getEncoded()));
-//		byte[] cipherKey = Base64.decode("wGiHplamyXlVB11UXWol8g==");
+//		KeyGenerator keygen = KeyGenerator.getInstance("AES");
+//
+//		SecretKey deskey = keygen.generateKey();
+//		//System.out.println(Base64.encodeToString(deskey.getEncoded()));
+//		byte[] cipherKey = Base64.decode(deskey.getEncoded());
 //		manager.setCipherKey(cipherKey);
 
+		manager.setCipherKey("x5+126q47832#4*k".getBytes());
 		manager.setCookie(cookie);
 		return manager;
 	}

+ 1 - 1
src/main/java/com/gyee/frame/shiro/config/ShiroService.java

@@ -42,7 +42,7 @@ public class ShiroService {
         // 保存并更新token
         tokenCache.saveToken(token, tokenUser);
 
-        result.put("token", token);
+        result.put("authToken", token);
         result.put("user", tokenUser);
 
         return result;

+ 5 - 0
src/main/java/com/gyee/frame/util/DateUtils.java

@@ -29,6 +29,9 @@ public class DateUtils  extends org.apache.commons.lang3.time.DateUtils {
         return format(date, DATE_PATTERN);
     }
 
+    public static String formatDateTime(Date date) {
+        return format(date, DATE_TIME_PATTERN);
+    }
     /**
      * 时间转换
      *
@@ -318,4 +321,6 @@ public class DateUtils  extends org.apache.commons.lang3.time.DateUtils {
 
         return date;
     }
+
+
 }

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

@@ -87,7 +87,7 @@ spring :
     time-zone: GMT+8
     date-format: yyyy-MM-dd HH:mm:ss
   redis:
-    database: 0
+    database: 1
     host: 10.155.32.4
     password: gdnxfd123
     pool:

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

@@ -105,8 +105,8 @@
 <!--        <table tableName='Windturbine' domainObjectName='WindturbineSql'/>-->
 <!--        <table tableName='Equipment' domainObjectName='EquipmentSql'/>-->
 
-        <table tableName='WindTurbineTestingPointDi2' domainObjectName='WindTurbineTestingPointDi2'/>
-
+        <table tableName='Weatherfh' domainObjectName='Weatherfh'/>
+        <table tableName='Weatherfd' domainObjectName='Weatherfd'/>
 
     </context>
 </generatorConfiguration>

+ 573 - 0
src/main/resources/mybatis/auto/WeatherfdMapper.xml

@@ -0,0 +1,573 @@
+<?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.WeatherfdMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Weatherfd">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="RECODEDATA" jdbcType="TIMESTAMP" property="recodedata" />
+    <result column="REGION" jdbcType="VARCHAR" property="region" />
+    <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
+    <result column="WEATHER" jdbcType="VARCHAR" property="weather" />
+    <result column="MAXIMUMTEM" jdbcType="DECIMAL" property="maximumtem" />
+    <result column="MINIMUMTEM" jdbcType="DECIMAL" property="minimumtem" />
+    <result column="SUNRISE" jdbcType="VARCHAR" property="sunrise" />
+    <result column="SUNSET" jdbcType="VARCHAR" property="sunset" />
+    <result column="SUNDURATION" jdbcType="DECIMAL" property="sunduration" />
+    <result column="WEATHER1" jdbcType="VARCHAR" property="weather1" />
+    <result column="TEMPERATURE1" jdbcType="DECIMAL" property="temperature1" />
+    <result column="REALFEEL1" jdbcType="DECIMAL" property="realfeel1" />
+    <result column="PRECIPITATION1" jdbcType="DECIMAL" property="precipitation1" />
+    <result column="WINDDIRECTION1" jdbcType="VARCHAR" property="winddirection1" />
+    <result column="SPEED1" jdbcType="DECIMAL" property="speed1" />
+    <result column="GUST1" jdbcType="DECIMAL" property="gust1" />
+    <result column="WEATHER2" jdbcType="VARCHAR" property="weather2" />
+    <result column="TEMPERATURE2" jdbcType="DECIMAL" property="temperature2" />
+    <result column="REALFEEL2" jdbcType="DECIMAL" property="realfeel2" />
+    <result column="PRECIPITATION2" jdbcType="DECIMAL" property="precipitation2" />
+    <result column="WINDDIRECTION2" jdbcType="VARCHAR" property="winddirection2" />
+    <result column="SPEED2" jdbcType="DECIMAL" property="speed2" />
+    <result column="GUST2" jdbcType="DECIMAL" property="gust2" />
+  </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, RECODEDATA, REGION, WINDPOWERSTATIONID, WEATHER, MAXIMUMTEM, MINIMUMTEM, SUNRISE, 
+    SUNSET, SUNDURATION, WEATHER1, TEMPERATURE1, REALFEEL1, PRECIPITATION1, WINDDIRECTION1, 
+    SPEED1, GUST1, WEATHER2, TEMPERATURE2, REALFEEL2, PRECIPITATION2, WINDDIRECTION2, 
+    SPEED2, GUST2
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WeatherfdExample" 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 WEATHERFD
+    <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 WEATHERFD
+    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 WEATHERFD
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WeatherfdExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from WEATHERFD
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Weatherfd">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WEATHERFD (ID, RECODEDATA, REGION, 
+      WINDPOWERSTATIONID, WEATHER, MAXIMUMTEM, 
+      MINIMUMTEM, SUNRISE, SUNSET, 
+      SUNDURATION, WEATHER1, TEMPERATURE1, 
+      REALFEEL1, PRECIPITATION1, WINDDIRECTION1, 
+      SPEED1, GUST1, WEATHER2, 
+      TEMPERATURE2, REALFEEL2, PRECIPITATION2, 
+      WINDDIRECTION2, SPEED2, GUST2
+      )
+    values (#{id,jdbcType=VARCHAR}, #{recodedata,jdbcType=TIMESTAMP}, #{region,jdbcType=VARCHAR}, 
+      #{windpowerstationid,jdbcType=VARCHAR}, #{weather,jdbcType=VARCHAR}, #{maximumtem,jdbcType=DECIMAL}, 
+      #{minimumtem,jdbcType=DECIMAL}, #{sunrise,jdbcType=VARCHAR}, #{sunset,jdbcType=VARCHAR}, 
+      #{sunduration,jdbcType=DECIMAL}, #{weather1,jdbcType=VARCHAR}, #{temperature1,jdbcType=DECIMAL}, 
+      #{realfeel1,jdbcType=DECIMAL}, #{precipitation1,jdbcType=DECIMAL}, #{winddirection1,jdbcType=VARCHAR}, 
+      #{speed1,jdbcType=DECIMAL}, #{gust1,jdbcType=DECIMAL}, #{weather2,jdbcType=VARCHAR}, 
+      #{temperature2,jdbcType=DECIMAL}, #{realfeel2,jdbcType=DECIMAL}, #{precipitation2,jdbcType=DECIMAL}, 
+      #{winddirection2,jdbcType=VARCHAR}, #{speed2,jdbcType=DECIMAL}, #{gust2,jdbcType=DECIMAL}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Weatherfd">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WEATHERFD
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="recodedata != null">
+        RECODEDATA,
+      </if>
+      <if test="region != null">
+        REGION,
+      </if>
+      <if test="windpowerstationid != null">
+        WINDPOWERSTATIONID,
+      </if>
+      <if test="weather != null">
+        WEATHER,
+      </if>
+      <if test="maximumtem != null">
+        MAXIMUMTEM,
+      </if>
+      <if test="minimumtem != null">
+        MINIMUMTEM,
+      </if>
+      <if test="sunrise != null">
+        SUNRISE,
+      </if>
+      <if test="sunset != null">
+        SUNSET,
+      </if>
+      <if test="sunduration != null">
+        SUNDURATION,
+      </if>
+      <if test="weather1 != null">
+        WEATHER1,
+      </if>
+      <if test="temperature1 != null">
+        TEMPERATURE1,
+      </if>
+      <if test="realfeel1 != null">
+        REALFEEL1,
+      </if>
+      <if test="precipitation1 != null">
+        PRECIPITATION1,
+      </if>
+      <if test="winddirection1 != null">
+        WINDDIRECTION1,
+      </if>
+      <if test="speed1 != null">
+        SPEED1,
+      </if>
+      <if test="gust1 != null">
+        GUST1,
+      </if>
+      <if test="weather2 != null">
+        WEATHER2,
+      </if>
+      <if test="temperature2 != null">
+        TEMPERATURE2,
+      </if>
+      <if test="realfeel2 != null">
+        REALFEEL2,
+      </if>
+      <if test="precipitation2 != null">
+        PRECIPITATION2,
+      </if>
+      <if test="winddirection2 != null">
+        WINDDIRECTION2,
+      </if>
+      <if test="speed2 != null">
+        SPEED2,
+      </if>
+      <if test="gust2 != null">
+        GUST2,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="recodedata != null">
+        #{recodedata,jdbcType=TIMESTAMP},
+      </if>
+      <if test="region != null">
+        #{region,jdbcType=VARCHAR},
+      </if>
+      <if test="windpowerstationid != null">
+        #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="weather != null">
+        #{weather,jdbcType=VARCHAR},
+      </if>
+      <if test="maximumtem != null">
+        #{maximumtem,jdbcType=DECIMAL},
+      </if>
+      <if test="minimumtem != null">
+        #{minimumtem,jdbcType=DECIMAL},
+      </if>
+      <if test="sunrise != null">
+        #{sunrise,jdbcType=VARCHAR},
+      </if>
+      <if test="sunset != null">
+        #{sunset,jdbcType=VARCHAR},
+      </if>
+      <if test="sunduration != null">
+        #{sunduration,jdbcType=DECIMAL},
+      </if>
+      <if test="weather1 != null">
+        #{weather1,jdbcType=VARCHAR},
+      </if>
+      <if test="temperature1 != null">
+        #{temperature1,jdbcType=DECIMAL},
+      </if>
+      <if test="realfeel1 != null">
+        #{realfeel1,jdbcType=DECIMAL},
+      </if>
+      <if test="precipitation1 != null">
+        #{precipitation1,jdbcType=DECIMAL},
+      </if>
+      <if test="winddirection1 != null">
+        #{winddirection1,jdbcType=VARCHAR},
+      </if>
+      <if test="speed1 != null">
+        #{speed1,jdbcType=DECIMAL},
+      </if>
+      <if test="gust1 != null">
+        #{gust1,jdbcType=DECIMAL},
+      </if>
+      <if test="weather2 != null">
+        #{weather2,jdbcType=VARCHAR},
+      </if>
+      <if test="temperature2 != null">
+        #{temperature2,jdbcType=DECIMAL},
+      </if>
+      <if test="realfeel2 != null">
+        #{realfeel2,jdbcType=DECIMAL},
+      </if>
+      <if test="precipitation2 != null">
+        #{precipitation2,jdbcType=DECIMAL},
+      </if>
+      <if test="winddirection2 != null">
+        #{winddirection2,jdbcType=VARCHAR},
+      </if>
+      <if test="speed2 != null">
+        #{speed2,jdbcType=DECIMAL},
+      </if>
+      <if test="gust2 != null">
+        #{gust2,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WeatherfdExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from WEATHERFD
+    <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 WEATHERFD
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.recodedata != null">
+        RECODEDATA = #{record.recodedata,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.region != null">
+        REGION = #{record.region,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windpowerstationid != null">
+        WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.weather != null">
+        WEATHER = #{record.weather,jdbcType=VARCHAR},
+      </if>
+      <if test="record.maximumtem != null">
+        MAXIMUMTEM = #{record.maximumtem,jdbcType=DECIMAL},
+      </if>
+      <if test="record.minimumtem != null">
+        MINIMUMTEM = #{record.minimumtem,jdbcType=DECIMAL},
+      </if>
+      <if test="record.sunrise != null">
+        SUNRISE = #{record.sunrise,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sunset != null">
+        SUNSET = #{record.sunset,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sunduration != null">
+        SUNDURATION = #{record.sunduration,jdbcType=DECIMAL},
+      </if>
+      <if test="record.weather1 != null">
+        WEATHER1 = #{record.weather1,jdbcType=VARCHAR},
+      </if>
+      <if test="record.temperature1 != null">
+        TEMPERATURE1 = #{record.temperature1,jdbcType=DECIMAL},
+      </if>
+      <if test="record.realfeel1 != null">
+        REALFEEL1 = #{record.realfeel1,jdbcType=DECIMAL},
+      </if>
+      <if test="record.precipitation1 != null">
+        PRECIPITATION1 = #{record.precipitation1,jdbcType=DECIMAL},
+      </if>
+      <if test="record.winddirection1 != null">
+        WINDDIRECTION1 = #{record.winddirection1,jdbcType=VARCHAR},
+      </if>
+      <if test="record.speed1 != null">
+        SPEED1 = #{record.speed1,jdbcType=DECIMAL},
+      </if>
+      <if test="record.gust1 != null">
+        GUST1 = #{record.gust1,jdbcType=DECIMAL},
+      </if>
+      <if test="record.weather2 != null">
+        WEATHER2 = #{record.weather2,jdbcType=VARCHAR},
+      </if>
+      <if test="record.temperature2 != null">
+        TEMPERATURE2 = #{record.temperature2,jdbcType=DECIMAL},
+      </if>
+      <if test="record.realfeel2 != null">
+        REALFEEL2 = #{record.realfeel2,jdbcType=DECIMAL},
+      </if>
+      <if test="record.precipitation2 != null">
+        PRECIPITATION2 = #{record.precipitation2,jdbcType=DECIMAL},
+      </if>
+      <if test="record.winddirection2 != null">
+        WINDDIRECTION2 = #{record.winddirection2,jdbcType=VARCHAR},
+      </if>
+      <if test="record.speed2 != null">
+        SPEED2 = #{record.speed2,jdbcType=DECIMAL},
+      </if>
+      <if test="record.gust2 != null">
+        GUST2 = #{record.gust2,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 WEATHERFD
+    set ID = #{record.id,jdbcType=VARCHAR},
+      RECODEDATA = #{record.recodedata,jdbcType=TIMESTAMP},
+      REGION = #{record.region,jdbcType=VARCHAR},
+      WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      WEATHER = #{record.weather,jdbcType=VARCHAR},
+      MAXIMUMTEM = #{record.maximumtem,jdbcType=DECIMAL},
+      MINIMUMTEM = #{record.minimumtem,jdbcType=DECIMAL},
+      SUNRISE = #{record.sunrise,jdbcType=VARCHAR},
+      SUNSET = #{record.sunset,jdbcType=VARCHAR},
+      SUNDURATION = #{record.sunduration,jdbcType=DECIMAL},
+      WEATHER1 = #{record.weather1,jdbcType=VARCHAR},
+      TEMPERATURE1 = #{record.temperature1,jdbcType=DECIMAL},
+      REALFEEL1 = #{record.realfeel1,jdbcType=DECIMAL},
+      PRECIPITATION1 = #{record.precipitation1,jdbcType=DECIMAL},
+      WINDDIRECTION1 = #{record.winddirection1,jdbcType=VARCHAR},
+      SPEED1 = #{record.speed1,jdbcType=DECIMAL},
+      GUST1 = #{record.gust1,jdbcType=DECIMAL},
+      WEATHER2 = #{record.weather2,jdbcType=VARCHAR},
+      TEMPERATURE2 = #{record.temperature2,jdbcType=DECIMAL},
+      REALFEEL2 = #{record.realfeel2,jdbcType=DECIMAL},
+      PRECIPITATION2 = #{record.precipitation2,jdbcType=DECIMAL},
+      WINDDIRECTION2 = #{record.winddirection2,jdbcType=VARCHAR},
+      SPEED2 = #{record.speed2,jdbcType=DECIMAL},
+      GUST2 = #{record.gust2,jdbcType=DECIMAL}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Weatherfd">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WEATHERFD
+    <set>
+      <if test="recodedata != null">
+        RECODEDATA = #{recodedata,jdbcType=TIMESTAMP},
+      </if>
+      <if test="region != null">
+        REGION = #{region,jdbcType=VARCHAR},
+      </if>
+      <if test="windpowerstationid != null">
+        WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="weather != null">
+        WEATHER = #{weather,jdbcType=VARCHAR},
+      </if>
+      <if test="maximumtem != null">
+        MAXIMUMTEM = #{maximumtem,jdbcType=DECIMAL},
+      </if>
+      <if test="minimumtem != null">
+        MINIMUMTEM = #{minimumtem,jdbcType=DECIMAL},
+      </if>
+      <if test="sunrise != null">
+        SUNRISE = #{sunrise,jdbcType=VARCHAR},
+      </if>
+      <if test="sunset != null">
+        SUNSET = #{sunset,jdbcType=VARCHAR},
+      </if>
+      <if test="sunduration != null">
+        SUNDURATION = #{sunduration,jdbcType=DECIMAL},
+      </if>
+      <if test="weather1 != null">
+        WEATHER1 = #{weather1,jdbcType=VARCHAR},
+      </if>
+      <if test="temperature1 != null">
+        TEMPERATURE1 = #{temperature1,jdbcType=DECIMAL},
+      </if>
+      <if test="realfeel1 != null">
+        REALFEEL1 = #{realfeel1,jdbcType=DECIMAL},
+      </if>
+      <if test="precipitation1 != null">
+        PRECIPITATION1 = #{precipitation1,jdbcType=DECIMAL},
+      </if>
+      <if test="winddirection1 != null">
+        WINDDIRECTION1 = #{winddirection1,jdbcType=VARCHAR},
+      </if>
+      <if test="speed1 != null">
+        SPEED1 = #{speed1,jdbcType=DECIMAL},
+      </if>
+      <if test="gust1 != null">
+        GUST1 = #{gust1,jdbcType=DECIMAL},
+      </if>
+      <if test="weather2 != null">
+        WEATHER2 = #{weather2,jdbcType=VARCHAR},
+      </if>
+      <if test="temperature2 != null">
+        TEMPERATURE2 = #{temperature2,jdbcType=DECIMAL},
+      </if>
+      <if test="realfeel2 != null">
+        REALFEEL2 = #{realfeel2,jdbcType=DECIMAL},
+      </if>
+      <if test="precipitation2 != null">
+        PRECIPITATION2 = #{precipitation2,jdbcType=DECIMAL},
+      </if>
+      <if test="winddirection2 != null">
+        WINDDIRECTION2 = #{winddirection2,jdbcType=VARCHAR},
+      </if>
+      <if test="speed2 != null">
+        SPEED2 = #{speed2,jdbcType=DECIMAL},
+      </if>
+      <if test="gust2 != null">
+        GUST2 = #{gust2,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Weatherfd">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WEATHERFD
+    set RECODEDATA = #{recodedata,jdbcType=TIMESTAMP},
+      REGION = #{region,jdbcType=VARCHAR},
+      WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
+      WEATHER = #{weather,jdbcType=VARCHAR},
+      MAXIMUMTEM = #{maximumtem,jdbcType=DECIMAL},
+      MINIMUMTEM = #{minimumtem,jdbcType=DECIMAL},
+      SUNRISE = #{sunrise,jdbcType=VARCHAR},
+      SUNSET = #{sunset,jdbcType=VARCHAR},
+      SUNDURATION = #{sunduration,jdbcType=DECIMAL},
+      WEATHER1 = #{weather1,jdbcType=VARCHAR},
+      TEMPERATURE1 = #{temperature1,jdbcType=DECIMAL},
+      REALFEEL1 = #{realfeel1,jdbcType=DECIMAL},
+      PRECIPITATION1 = #{precipitation1,jdbcType=DECIMAL},
+      WINDDIRECTION1 = #{winddirection1,jdbcType=VARCHAR},
+      SPEED1 = #{speed1,jdbcType=DECIMAL},
+      GUST1 = #{gust1,jdbcType=DECIMAL},
+      WEATHER2 = #{weather2,jdbcType=VARCHAR},
+      TEMPERATURE2 = #{temperature2,jdbcType=DECIMAL},
+      REALFEEL2 = #{realfeel2,jdbcType=DECIMAL},
+      PRECIPITATION2 = #{precipitation2,jdbcType=DECIMAL},
+      WINDDIRECTION2 = #{winddirection2,jdbcType=VARCHAR},
+      SPEED2 = #{speed2,jdbcType=DECIMAL},
+      GUST2 = #{gust2,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 336 - 0
src/main/resources/mybatis/auto/WeatherfhMapper.xml

@@ -0,0 +1,336 @@
+<?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.WeatherfhMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Weatherfh">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="RECODEDATA" jdbcType="TIMESTAMP" property="recodedata" />
+    <result column="REGION" jdbcType="VARCHAR" property="region" />
+    <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
+    <result column="WEATHER" jdbcType="VARCHAR" property="weather" />
+    <result column="TEMPERATURE" jdbcType="DECIMAL" property="temperature" />
+    <result column="REALFEEL" jdbcType="DECIMAL" property="realfeel" />
+    <result column="WINDDIRECTION" jdbcType="VARCHAR" property="winddirection" />
+    <result column="SPEED" jdbcType="DECIMAL" property="speed" />
+  </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, RECODEDATA, REGION, WINDPOWERSTATIONID, WEATHER, TEMPERATURE, REALFEEL, WINDDIRECTION, 
+    SPEED
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WeatherfhExample" 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 WEATHERFH
+    <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 WEATHERFH
+    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 WEATHERFH
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WeatherfhExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from WEATHERFH
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Weatherfh">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WEATHERFH (ID, RECODEDATA, REGION, 
+      WINDPOWERSTATIONID, WEATHER, TEMPERATURE, 
+      REALFEEL, WINDDIRECTION, SPEED
+      )
+    values (#{id,jdbcType=DECIMAL}, #{recodedata,jdbcType=TIMESTAMP}, #{region,jdbcType=VARCHAR}, 
+      #{windpowerstationid,jdbcType=VARCHAR}, #{weather,jdbcType=VARCHAR}, #{temperature,jdbcType=DECIMAL}, 
+      #{realfeel,jdbcType=DECIMAL}, #{winddirection,jdbcType=VARCHAR}, #{speed,jdbcType=DECIMAL}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Weatherfh">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WEATHERFH
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="recodedata != null">
+        RECODEDATA,
+      </if>
+      <if test="region != null">
+        REGION,
+      </if>
+      <if test="windpowerstationid != null">
+        WINDPOWERSTATIONID,
+      </if>
+      <if test="weather != null">
+        WEATHER,
+      </if>
+      <if test="temperature != null">
+        TEMPERATURE,
+      </if>
+      <if test="realfeel != null">
+        REALFEEL,
+      </if>
+      <if test="winddirection != null">
+        WINDDIRECTION,
+      </if>
+      <if test="speed != null">
+        SPEED,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="recodedata != null">
+        #{recodedata,jdbcType=TIMESTAMP},
+      </if>
+      <if test="region != null">
+        #{region,jdbcType=VARCHAR},
+      </if>
+      <if test="windpowerstationid != null">
+        #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="weather != null">
+        #{weather,jdbcType=VARCHAR},
+      </if>
+      <if test="temperature != null">
+        #{temperature,jdbcType=DECIMAL},
+      </if>
+      <if test="realfeel != null">
+        #{realfeel,jdbcType=DECIMAL},
+      </if>
+      <if test="winddirection != null">
+        #{winddirection,jdbcType=VARCHAR},
+      </if>
+      <if test="speed != null">
+        #{speed,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WeatherfhExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from WEATHERFH
+    <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 WEATHERFH
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.recodedata != null">
+        RECODEDATA = #{record.recodedata,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.region != null">
+        REGION = #{record.region,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windpowerstationid != null">
+        WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.weather != null">
+        WEATHER = #{record.weather,jdbcType=VARCHAR},
+      </if>
+      <if test="record.temperature != null">
+        TEMPERATURE = #{record.temperature,jdbcType=DECIMAL},
+      </if>
+      <if test="record.realfeel != null">
+        REALFEEL = #{record.realfeel,jdbcType=DECIMAL},
+      </if>
+      <if test="record.winddirection != null">
+        WINDDIRECTION = #{record.winddirection,jdbcType=VARCHAR},
+      </if>
+      <if test="record.speed != null">
+        SPEED = #{record.speed,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 WEATHERFH
+    set ID = #{record.id,jdbcType=DECIMAL},
+      RECODEDATA = #{record.recodedata,jdbcType=TIMESTAMP},
+      REGION = #{record.region,jdbcType=VARCHAR},
+      WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      WEATHER = #{record.weather,jdbcType=VARCHAR},
+      TEMPERATURE = #{record.temperature,jdbcType=DECIMAL},
+      REALFEEL = #{record.realfeel,jdbcType=DECIMAL},
+      WINDDIRECTION = #{record.winddirection,jdbcType=VARCHAR},
+      SPEED = #{record.speed,jdbcType=DECIMAL}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Weatherfh">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WEATHERFH
+    <set>
+      <if test="recodedata != null">
+        RECODEDATA = #{recodedata,jdbcType=TIMESTAMP},
+      </if>
+      <if test="region != null">
+        REGION = #{region,jdbcType=VARCHAR},
+      </if>
+      <if test="windpowerstationid != null">
+        WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="weather != null">
+        WEATHER = #{weather,jdbcType=VARCHAR},
+      </if>
+      <if test="temperature != null">
+        TEMPERATURE = #{temperature,jdbcType=DECIMAL},
+      </if>
+      <if test="realfeel != null">
+        REALFEEL = #{realfeel,jdbcType=DECIMAL},
+      </if>
+      <if test="winddirection != null">
+        WINDDIRECTION = #{winddirection,jdbcType=VARCHAR},
+      </if>
+      <if test="speed != null">
+        SPEED = #{speed,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Weatherfh">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WEATHERFH
+    set RECODEDATA = #{recodedata,jdbcType=TIMESTAMP},
+      REGION = #{region,jdbcType=VARCHAR},
+      WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
+      WEATHER = #{weather,jdbcType=VARCHAR},
+      TEMPERATURE = #{temperature,jdbcType=DECIMAL},
+      REALFEEL = #{realfeel,jdbcType=DECIMAL},
+      WINDDIRECTION = #{winddirection,jdbcType=VARCHAR},
+      SPEED = #{speed,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+</mapper>

二進制
src/main/resources/static/syz/mhs_zm.xls


二進制
src/main/resources/static/syz/nss_zm.xls


二進制
src/main/resources/static/syz/qs_zm.xls


二進制
src/main/resources/static/syz/sbq_zm.xls


二進制
src/main/resources/static/syz/xs_zm.xls


+ 1 - 1
src/main/resources/templates/admin/sysQuartzJob/add.html

@@ -66,7 +66,7 @@ list-style-type:none;
 										<div class="col-sm-8">
 											<input class="form-control" type="text" id="invokeTarget" name="invokeTarget"/>
 											 <span class="help-block">Bean调用示例:v2Task.runTask2(1,2l,'asa',true,2D)</span>
-											 <span class="help-block">Class类调用示例:com.gyee.frame.common.quartz.task.runTask2('ry')</span>
+											 <span class="help-block">Class类调用示例:com.gyee.frame.service.websocket.task.runTask2('ry')</span>
 											 <span class="help-block">参数说明:支持字符串,布尔类型,长整型,浮点型,整型</span>
 										</div>
 									</div>

+ 1 - 1
src/main/resources/templates/admin/sysQuartzJob/add2.html

@@ -66,7 +66,7 @@ list-style-type:none;
 										<div class="col-sm-8">
 											<input class="form-control" type="text" id="invokeTarget" name="invokeTarget"/>
 											 <span class="help-block">Bean调用示例:v2Task.runTask2(1,2l,'asa',true,2D)</span>
-											 <span class="help-block">Class类调用示例:com.gyee.frame.common.quartz.task.runTask2('ry')</span>
+											 <span class="help-block">Class类调用示例:com.gyee.frame.service.websocket.task.runTask2('ry')</span>
 											 <span class="help-block">参数说明:支持字符串,布尔类型,长整型,浮点型,整型</span>
 										</div>
 									</div>

+ 65 - 0
src/test/java/test/GeneralAppearancePushTest.java

@@ -0,0 +1,65 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.GeneralAppearancePushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class GeneralAppearancePushTest {
+
+    @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";
+
+        GeneralAppearancePushService generalAppearancePushService= SpringUtils.getBean("generalAppearancePushService");
+
+        Map<String, Object> map = generalAppearancePushService.genreSetMap();
+
+         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());
+//        }
+//
+//
+//
+    }
+}

+ 73 - 0
src/test/java/test/MatrixByWpPushTest.java

@@ -0,0 +1,73 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.MatrixPushByWpService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class MatrixByWpPushTest {
+
+    @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";
+
+        MatrixPushByWpService matrixPushByWpService= SpringUtils.getBean("matrixPushByWpService");
+
+
+
+
+
+        Map<String, Object> map = matrixPushByWpService.genreSetMap();
+
+
+
+         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());
+//        }
+//
+//
+//
+    }
+}

+ 5 - 1
src/test/java/test/WtInfoPushServiceTest.java

@@ -6,6 +6,7 @@ import com.gyee.frame.service.websocket.WtInfoPushService;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
+import java.util.Date;
 import java.util.Map;
 
 public class WtInfoPushServiceTest {
@@ -28,10 +29,13 @@ public class WtInfoPushServiceTest {
 
 
 
-        Map<String, Object> map = wtInfoPushService.genreSetMap();
+        Date begin=new Date();
 
+        Map<String, Object> map = wtInfoPushService.genreSetMap();
 
 
+        Date end=new Date();
+        System.out.println((end.getTime()-begin.getTime())/1000);
          System.out.println(map.size());