Переглянути джерело

健康管理接口开发修正

shilin 3 роки тому
батько
коміт
9121a4f5bd
30 змінених файлів з 1352 додано та 135 видалено
  1. 1 0
      src/main/java/com/gyee/frame/common/cache/AppRedisCacheManager.java
  2. 24 2
      src/main/java/com/gyee/frame/common/cache/RedisConfig.java
  3. 31 0
      src/main/java/com/gyee/frame/common/cache/RedisUtils.java
  4. 0 5
      src/main/java/com/gyee/frame/common/spring/Constant.java
  5. 1 1
      src/main/java/com/gyee/frame/controller/health/HealthOperationController.java
  6. 29 0
      src/main/java/com/gyee/frame/controller/health/HealthSubController.java
  7. 22 0
      src/main/java/com/gyee/frame/model/custom/weather/Clouds.java
  8. 30 0
      src/main/java/com/gyee/frame/model/custom/weather/Coord.java
  9. 78 0
      src/main/java/com/gyee/frame/model/custom/weather/Main.java
  10. 38 0
      src/main/java/com/gyee/frame/model/custom/weather/Sys.java
  11. 46 0
      src/main/java/com/gyee/frame/model/custom/weather/Weather.java
  12. 119 0
      src/main/java/com/gyee/frame/model/custom/weather/WeatherReal.java
  13. 38 0
      src/main/java/com/gyee/frame/model/custom/weather/Wind.java
  14. 99 42
      src/main/java/com/gyee/frame/service/health/HealthMainService.java
  15. 35 4
      src/main/java/com/gyee/frame/service/health/HealthOperationService.java
  16. 124 0
      src/main/java/com/gyee/frame/service/health/HealthSubService.java
  17. 2 2
      src/main/java/com/gyee/frame/service/health/WindTurbineHealthListService.java
  18. 13 6
      src/main/java/com/gyee/frame/service/recommen/RecommenService.java
  19. 220 0
      src/main/java/com/gyee/frame/service/weather/WeatherService.java
  20. 1 1
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailPjService.java
  21. 1 1
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailService.java
  22. 1 1
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushDetailWpService.java
  23. 24 4
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java
  24. 242 31
      src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java
  25. 4 4
      src/main/resources/application.yml
  26. 2 2
      src/test/java/test/GenreSetPushTest.java
  27. 4 4
      src/test/java/test/HealthOperationTest.java
  28. 7 7
      src/test/java/test/HealthTest.java
  29. 21 18
      src/test/java/test/RecommenTest.java
  30. 95 0
      src/test/java/test/WeatherServiceTest.java

+ 1 - 0
src/main/java/com/gyee/frame/common/cache/AppRedisCacheManager.java

@@ -27,6 +27,7 @@ public final class AppRedisCacheManager implements IGlobalCache {
             if (time > 0) {
                 redisTemplate.expire(key, time, TimeUnit.SECONDS);
             }
+
             return true;
         } catch (Exception e) {
             e.printStackTrace();

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

@@ -13,6 +13,7 @@ import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
 import org.springframework.data.redis.serializer.StringRedisSerializer;
+import redis.clients.jedis.JedisPool;
 import redis.clients.jedis.JedisPoolConfig;
 
 @EnableCaching
@@ -28,16 +29,37 @@ public class RedisConfig {
     @Value("${spring.redis.password}")
     private String pwd;
 
+    @Value("${spring.redis.pool.maxTotal}")
+    private Integer maxTotal;
+    @Value("${spring.redis.pool.maxIdle}")
+    private Integer maxIdle;
+    @Value("${spring.redis.pool.minIdle}")
+    private Integer minIdle;
+    @Value("${spring.redis.pool.maxwait}")
+    private Integer maxwait;
+
     @Primary
     @Bean(name = "jedisPoolConfig")
     @ConfigurationProperties(prefix = "spring.redis.pool")
     public JedisPoolConfig jedisPoolConfig() {
         JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
-
-        jedisPoolConfig.setMaxWaitMillis(60000);
+        jedisPoolConfig.setMaxTotal(maxTotal);
+        jedisPoolConfig.setMaxIdle(maxIdle);
+        jedisPoolConfig.setMinIdle(minIdle);
+        jedisPoolConfig.setMaxWaitMillis(maxwait);
         return jedisPoolConfig;
     }
 
+    @Primary
+    @Bean(name = "jedisPool")
+    public JedisPool redisPoolFactory(JedisPoolConfig jedisPoolConfig){
+
+        JedisPool jedisPool = new JedisPool(jedisPoolConfig,host,port,maxwait,pwd);
+
+        return  jedisPool;
+    }
+
+
     @Bean
     public RedisConnectionFactory redisConnectionFactory(JedisPoolConfig jedisPoolConfig) {
         RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration();

+ 31 - 0
src/main/java/com/gyee/frame/common/cache/RedisUtils.java

@@ -0,0 +1,31 @@
+package com.gyee.frame.common.cache;
+
+import org.springframework.stereotype.Service;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.JedisPool;
+
+import javax.annotation.Resource;
+@Service
+public class RedisUtils {
+
+    @Resource
+    private  JedisPool jedisPool;
+
+
+
+    public  String get(String key, int indexdb) {
+        Jedis jedis = null;
+        String value = null;
+
+        try {
+            jedis = jedisPool.getResource();//获取一个jedis实例
+            jedis.select(indexdb);
+            value = jedis.get(key);
+        } catch (Exception e) {
+        System.out.println(e.getMessage());
+        } finally {
+            jedis.close();
+        }
+        return value;
+    }
+}

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

@@ -512,19 +512,14 @@ public class Constant {
 	public static final String TPOINT_WT_YPWZ1 = "AI085";// 叶片位置1
 	public static final String TPOINT_WT_YPWZ2 = "AI086";// 叶片位置2
 	public static final String TPOINT_WT_YPWZ3 = "AI087";// 叶片位置3
-
 	public static final String TPOINT_WT_FJSSFS = "AI022";// 风机实时风速
 	public static final String TPOINT_WT_FJGL = "AI130";// 风机功率
 	public static final String TPOINT_WT_GLYS = "AI067";// 功率因数
-
 	public static final String QSTPOINT_WT_BJJD1 = "AI184";// 青山变桨角度1
 	public static final String QSTPOINT_WT_FDJZS = "AI223";// 发电机转速
-
 	public static final String TPOINT_WT_BJJD1 = "AI076";// 变桨角度1
 	public static final String TPOINT_WT_FDJZS = "AI128";// 发电机转速
-
 	public static final String TPOINT_WT_YLZS = "AI012";// 叶轮转速
-
 	public static final String TPOINT_WT_JCWWD = "AI056";// 机舱外温度
 	public static final String TPOINT_WT_JCWD = "AI057";// 机舱温度
 	public static final String TPOINT_WT_TDGWD = "AI069";// 塔底柜温度

+ 1 - 1
src/main/java/com/gyee/frame/controller/health/HealthOperationController.java

@@ -119,7 +119,7 @@ public class HealthOperationController {
 
     @PostMapping("/findWpOrProStatusForHistory")
     @ResponseBody
-    @ApiOperation(value = "健康状态占比图表 type 1风场2项目 status 1良好2注意", notes = "健康状态占比图表 type 1风场2项目 status 1良好2注意")
+    @ApiOperation(value = "健康状态曲线图表 type 1风场2项目 status 1良好2注意", notes = "健康状态曲线图表 type 1风场2项目 status 1良好2注意")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "type", value = "类型", required = true, dataType = "string", paramType = "query"),
             @ApiImplicitParam(name = "status", value = "状态", required = true, dataType = "string", paramType = "query")})

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

@@ -427,4 +427,33 @@ public class HealthSubController {
         }
 
     }
+
+
+    @PostMapping("/findWtHisValueForBj")
+    @ResponseBody
+    @ApiOperation(value = "获取风机部件健康曲线图表", notes = "获取风机部件健康曲线图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
+    })
+    public AjaxResult findWtHisValueForBj(String wtId) throws Exception {
+
+
+        Map<String,Object> map = new HashMap();
+
+
+        if(StringUtils.notEmp(wtId))
+        {
+
+            map = healthSubService.findWtHisValueForBj(wtId);
+        }
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+
 }

+ 22 - 0
src/main/java/com/gyee/frame/model/custom/weather/Clouds.java

@@ -0,0 +1,22 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+
+/**
+ * Auto-generated: 2021-07-02 15:21:42
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class Clouds {
+
+    private int all;
+    public void setAll(int all) {
+         this.all = all;
+     }
+     public int getAll() {
+         return all;
+     }
+
+}

+ 30 - 0
src/main/java/com/gyee/frame/model/custom/weather/Coord.java

@@ -0,0 +1,30 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+
+/**
+ * Auto-generated: 2021-07-02 15:21:42
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class Coord {
+
+    private double lon;//经度
+    private double lat;//纬度
+    public void setLon(double lon) {
+         this.lon = lon;
+     }
+     public double getLon() {
+         return lon;
+     }
+
+    public void setLat(double lat) {
+         this.lat = lat;
+     }
+     public double getLat() {
+         return lat;
+     }
+
+}

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

@@ -0,0 +1,78 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+
+/**
+ * Auto-generated: 2021-07-02 15:21:42
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class Main {
+
+    private double temp;//温度
+    private double feels_like;
+    private double temp_min;
+    private double temp_max;
+    private int pressure;// 大气压力
+    private int humidity;//湿度
+    private int sea_level;
+    private int grnd_level;
+    public void setTemp(double temp) {
+         this.temp = temp;
+     }
+     public double getTemp() {
+         return temp;
+     }
+
+    public void setFeels_like(double feels_like) {
+         this.feels_like = feels_like;
+     }
+     public double getFeels_like() {
+         return feels_like;
+     }
+
+    public void setTemp_min(double temp_min) {
+         this.temp_min = temp_min;
+     }
+     public double getTemp_min() {
+         return temp_min;
+     }
+
+    public void setTemp_max(double temp_max) {
+         this.temp_max = temp_max;
+     }
+     public double getTemp_max() {
+         return temp_max;
+     }
+
+    public void setPressure(int pressure) {
+         this.pressure = pressure;
+     }
+     public int getPressure() {
+         return pressure;
+     }
+
+    public void setHumidity(int humidity) {
+         this.humidity = humidity;
+     }
+     public int getHumidity() {
+         return humidity;
+     }
+
+    public void setSea_level(int sea_level) {
+         this.sea_level = sea_level;
+     }
+     public int getSea_level() {
+         return sea_level;
+     }
+
+    public void setGrnd_level(int grnd_level) {
+         this.grnd_level = grnd_level;
+     }
+     public int getGrnd_level() {
+         return grnd_level;
+     }
+
+}

+ 38 - 0
src/main/java/com/gyee/frame/model/custom/weather/Sys.java

@@ -0,0 +1,38 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+
+/**
+ * Auto-generated: 2021-07-02 15:21:42
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class Sys {
+
+    private String country;
+    private long sunrise;
+    private long sunset;
+    public void setCountry(String country) {
+         this.country = country;
+     }
+     public String getCountry() {
+         return country;
+     }
+
+    public void setSunrise(long sunrise) {
+         this.sunrise = sunrise;
+     }
+     public long getSunrise() {
+         return sunrise;
+     }
+
+    public void setSunset(long sunset) {
+         this.sunset = sunset;
+     }
+     public long getSunset() {
+         return sunset;
+     }
+
+}

+ 46 - 0
src/main/java/com/gyee/frame/model/custom/weather/Weather.java

@@ -0,0 +1,46 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+
+/**
+ * Auto-generated: 2021-07-02 15:21:42
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class Weather {
+
+    private int id; //天气状况 ID
+    private String main;//一组天气参数(雨、雪、极端等)
+    private String description;//组内天气状况。您可以获得您的语言的输出
+    private String icon;//天气图标 ID
+    public void setId(int id) {
+         this.id = id;
+     }
+     public int getId() {
+         return id;
+     }
+
+    public void setMain(String main) {
+         this.main = main;
+     }
+     public String getMain() {
+         return main;
+     }
+
+    public void setDescription(String description) {
+         this.description = description;
+     }
+     public String getDescription() {
+         return description;
+     }
+
+    public void setIcon(String icon) {
+         this.icon = icon;
+     }
+     public String getIcon() {
+         return icon;
+     }
+
+}

+ 119 - 0
src/main/java/com/gyee/frame/model/custom/weather/WeatherReal.java

@@ -0,0 +1,119 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+import java.util.List;
+
+/**
+ * Auto-generated: 2021-07-02 15:21:42
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class WeatherReal {
+
+    private Coord coord;
+    private List<Weather> weather;
+    private String base;
+    private Main main;
+    private int visibility;//能见度
+    private Wind wind;
+    private Clouds clouds;
+    private long dt;
+    private Sys sys;
+    private int timezone;
+    private long id;
+    private String name;
+    private int cod;
+    public void setCoord(Coord coord) {
+         this.coord = coord;
+     }
+     public Coord getCoord() {
+         return coord;
+     }
+
+    public void setWeather(List<Weather> weather) {
+         this.weather = weather;
+     }
+     public List<Weather> getWeather() {
+         return weather;
+     }
+
+    public void setBase(String base) {
+         this.base = base;
+     }
+     public String getBase() {
+         return base;
+     }
+
+    public void setMain(Main main) {
+         this.main = main;
+     }
+     public Main getMain() {
+         return main;
+     }
+
+    public void setVisibility(int visibility) {
+         this.visibility = visibility;
+     }
+     public int getVisibility() {
+         return visibility;
+     }
+
+    public void setWind(Wind wind) {
+         this.wind = wind;
+     }
+     public Wind getWind() {
+         return wind;
+     }
+
+    public void setClouds(Clouds clouds) {
+         this.clouds = clouds;
+     }
+     public Clouds getClouds() {
+         return clouds;
+     }
+
+    public void setDt(long dt) {
+         this.dt = dt;
+     }
+     public long getDt() {
+         return dt;
+     }
+
+    public void setSys(Sys sys) {
+         this.sys = sys;
+     }
+     public Sys getSys() {
+         return sys;
+     }
+
+    public void setTimezone(int timezone) {
+         this.timezone = timezone;
+     }
+     public int getTimezone() {
+         return timezone;
+     }
+
+    public void setId(long id) {
+         this.id = id;
+     }
+     public long getId() {
+         return id;
+     }
+
+    public void setName(String name) {
+         this.name = name;
+     }
+     public String getName() {
+         return name;
+     }
+
+    public void setCod(int cod) {
+         this.cod = cod;
+     }
+     public int getCod() {
+         return cod;
+     }
+
+}

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

@@ -0,0 +1,38 @@
+/**
+  * Copyright 2021 bejson.com 
+  */
+package com.gyee.frame.model.custom.weather;
+
+/**
+ * Auto-generated: 2021-07-02 15:21:42
+ *
+ * @author bejson.com (i@bejson.com)
+ * @website http://www.bejson.com/java2pojo/
+ */
+public class Wind {
+
+    private double speed;//风速
+    private int deg;//风向
+    private double gust;
+    public void setSpeed(double speed) {
+         this.speed = speed;
+     }
+     public double getSpeed() {
+         return speed;
+     }
+
+    public void setDeg(int deg) {
+         this.deg = deg;
+     }
+     public int getDeg() {
+         return deg;
+     }
+
+    public void setGust(double gust) {
+         this.gust = gust;
+     }
+     public double getGust() {
+         return gust;
+     }
+
+}

+ 99 - 42
src/main/java/com/gyee/frame/service/health/HealthMainService.java

@@ -3,11 +3,9 @@ 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.*;
-import com.gyee.frame.model.custom.DNAVal;
-import com.gyee.frame.model.custom.MatrixVo;
-import com.gyee.frame.model.custom.PointData;
-import com.gyee.frame.model.custom.ShutdowneventVo;
+import com.gyee.frame.model.custom.*;
 import com.gyee.frame.service.*;
+import com.gyee.frame.service.weather.WeatherService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
@@ -33,6 +31,8 @@ public class HealthMainService {
     private ShutdowneventService shutdowneventService;
     @Resource
     private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WeatherService weatherService;
 
 
     private final int digit = 2;
@@ -328,45 +328,60 @@ public class HealthMainService {
                 double tqyb=1.0;// 天气预报
                 double ycfs=0.0;// 预测风速
                 double sjfs=0.0;// 实际风速
-                List<String> gzIdLs = new ArrayList<String>();// 故障风机编号集合
+                List<SimpleVo> gzIdLs = new ArrayList<SimpleVo>();// 故障风机编号集合
 
                 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);
-                        if(StringUtils.isNumeric(strtemp))
-                        {
-                            tqyb = Double.valueOf(strtemp);
-                        }else
-                        {
-                            temp = temp.substring(0, temp.length() - 2);
-                            strtemp = temp.substring(temp.lastIndexOf("-")+1);
-                            if(StringUtils.isNumeric(strtemp)) {
-                                tqyb = Double.valueOf(strtemp);
-                            }
-                        }
-
-                    } else {
-                        tqyb = 1.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);
+//                        if(StringUtils.isNumeric(strtemp))
+//                        {
+//                            tqyb = Double.valueOf(strtemp);
+//                        }else
+//                        {
+//                            temp = temp.substring(0, temp.length() - 2);
+//                            strtemp = temp.substring(temp.lastIndexOf("-")+1);
+//                            if(StringUtils.isNumeric(strtemp)) {
+//                                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();
+//                    wpmap.put("ycfs", ycfs);
+//                    wpmap.put("tqyb", tqyb);
+//
+//                } else {
+//                    wpmap.put("ycfs", 6.0);
+//                    wpmap.put("tqyb", 1.0);
+//                }
+
+                Map<String,Object> weathermap=weatherService.getWeatherRealInfo(wp.getId());
+                if(null!=weathermap && !weathermap.isEmpty())
+                {
+                    if(weathermap.containsKey("tqtp"))
+                    {
+                        wpmap.put("tqyb", weathermap.get("tqtp"));
+                    }
+                    if(weathermap.containsKey("fs"))
+                    {
+                        wpmap.put("ycfs", weathermap.get("fs"));
                     }
-
-                    ycfs = wth.getSpeed();
-
-                    ycfs = new BigDecimal(ycfs).multiply(new BigDecimal(XZNUM)).divide(new BigDecimal(NUM), 2, RoundingMode.HALF_EVEN).doubleValue();
-                    wpmap.put("ycfs", ycfs);
-                    wpmap.put("tqyb", tqyb);
-
-                } else {
-                    wpmap.put("ycfs", 6.0);
-                    wpmap.put("tqyb", 1.0);
                 }
                 // 获得实时风速测点编号
 
@@ -377,8 +392,10 @@ public class HealthMainService {
                 sjfs = StringUtils.round(ssfspoint.getPointValueInDouble(), digit);
 
                 wpmap.put("sjfs", sjfs);
-
+                wpmap.put("name",wp.getName());
+                wpmap.put("wpId",wp.getId());
                 List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
+                wpmap.put("jrts",wtls.size());
                 List<String> wtidls = new ArrayList<String>();
                 List<String> codejkls = new ArrayList<String>();
                 List<String> codeztls = new ArrayList<String>();
@@ -466,8 +483,19 @@ public class HealthMainService {
                             }
                         }
 
+                        SimpleVo vo=new SimpleVo();
+                        vo.setId(wtId);
+                        if(InitialRunner.wtmap.containsKey(wtId))
+                        {
+                            Windturbine wt=InitialRunner.wtmap.get(wtId);
+                            if (StringUtils.notEmp(wt.getStatus())) {
+                                String num = wt.getStatus().substring(wt.getStatus().length() - 3);
+                                vo.setName(num);
+
+                            }
+                        }
 
-                        gzIdLs.add(wtId);
+                        gzIdLs.add(vo);
                         csl++;
                     } else {
                         if (jk >= 60) {
@@ -477,7 +505,19 @@ public class HealthMainService {
                         } else if (jk < 60 && jk >= 30) {
                             lsl++;
                         } else {
-                            gzIdLs.add(wtId);
+
+                            SimpleVo vo=new SimpleVo();
+                            vo.setId(wtId);
+                            if(InitialRunner.wtmap.containsKey(wtId))
+                            {
+                                Windturbine wt=InitialRunner.wtmap.get(wtId);
+                                if (StringUtils.notEmp(wt.getStatus())) {
+                                    String num = wt.getStatus().substring(wt.getStatus().length() - 3);
+                                    vo.setName(num);
+
+                                }
+                            }
+                            gzIdLs.add(vo);
                             csl++;
 
                         }
@@ -716,13 +756,22 @@ public class HealthMainService {
                         }
 
 
-                        String[] str = new String[2];
+                        String[] str = new String[3];
                         str[0] = wtId;
                         str[1] = "3";
+                        if(InitialRunner.wtmap.containsKey(wtId))
+                        {
+                            Windturbine wt=InitialRunner.wtmap.get(wtId);
+                            if (StringUtils.notEmp(wt.getStatus())) {
+                                String num = wt.getStatus().substring(wt.getStatus().length() - 3);
+                                str[2] = num;
+
+                            }
+                        }
                         wtIdls.add(str);
                         csl++;
                     } else {
-                        String[] str = new String[2];
+                        String[] str = new String[3];
                         if (jk >= 60) {
                             str[0] = wtId;
                             str[1] = "1";
@@ -739,7 +788,15 @@ public class HealthMainService {
                             wtIdls.add(str);
                             csl++;
                         }
+                        if(InitialRunner.wtmap.containsKey(wtId))
+                        {
+                            Windturbine wt=InitialRunner.wtmap.get(wtId);
+                            if (StringUtils.notEmp(wt.getStatus())) {
+                                String num = wt.getStatus().substring(wt.getStatus().length() - 3);
+                                str[2] = num;
 
+                            }
+                        }
                         if (jk >= 80) {
 
                             sl1++;

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

@@ -189,12 +189,14 @@ public class HealthOperationService {
         cl.set(Calendar.SECOND, 0);
         Long start = cl.getTimeInMillis();
         Long end = new Date().getTime();
+        List<Map<String,String>> nameList = new ArrayList<Map<String,String>>();
         if ("1".equals(type)) {
             List<Windpowerstation> wpList = InitialRunner.wpls;
-
+            Map<String,String> map=new HashMap<>();
             for (int i = 0; i < wpList.size(); i++) {
                 List<Integer> hgList = new ArrayList<Integer>();
                 List<String> tList = new ArrayList<String>();
+
                 if (wpList.get(i).getCode().indexOf("_FDC") > 0) {
                     if ("1".equals(status)) {
                         WindPowerStationTestingPoint2 point = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpList.get(i).getId(), Constant.FJZCSL);
@@ -223,9 +225,12 @@ public class HealthOperationService {
                                     tList.add(time);
                                 }
 
+
                             }
+
                             mapstatus.put(wpList.get(i).getCode(), hgList);
                             mapstatus.put("time", tList);
+
                         } else {
                             for (int ii = 0; ii < plhList.size(); ii++) {
                                 if (phgList.get(ii) == null) {
@@ -242,9 +247,12 @@ public class HealthOperationService {
                                     hgList.add(total);
                                     tList.add(time);
                                 }
-                                mapstatus.put(wpList.get(i).getCode(), hgList);
-                                mapstatus.put("time", tList);
+
                             }
+
+                            mapstatus.put(wpList.get(i).getCode(), hgList);
+                            mapstatus.put("time", tList);
+
                         }
 
                     } else {
@@ -274,8 +282,10 @@ public class HealthOperationService {
                                     hgList.add(total);
                                     tList.add(time);
                                 }
+
                                 mapstatus.put(wpList.get(i).getCode(), hgList);
                                 mapstatus.put("time", tList);
+
                             }
                         } else {
                             for (int ii = 0; ii < pyzList.size(); ii++) {
@@ -295,20 +305,29 @@ public class HealthOperationService {
                                 }
 
                             }
+
                             mapstatus.put(wpList.get(i).getCode(), hgList);
                             mapstatus.put("time", tList);
+
                         }
 
                     }
 
                 }
+                map.put(wpList.get(i).getId(),wpList.get(i).getName());
+
+
             }
+            nameList.add(map);
+            mapstatus.put("name", nameList);
 
         } else if ("2".equals(type)) {
             List<Project> pList = InitialRunner.pjls;
+            Map<String,String> map=new HashMap<>();
             for (int i = 0; i < pList.size(); i++) {
                 List<Integer> hgList = new ArrayList<Integer>();
                 List<String> tList = new ArrayList<String>();
+
                 if (pList.get(i).getWindpowerstationid().indexOf("_FDC") > 0) {
                     if ("1".equals(status)) {
                         WindPowerStationTestingPoint2 point = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(pList.get(i).getId(), Constant.FJZCSL);
@@ -338,8 +357,10 @@ public class HealthOperationService {
                                 }
 
                             }
+
                             mapstatus.put(pList.get(i).getCode(), hgList);
                             mapstatus.put("time", tList);
+
                         } else {
                             for (int ii = 0; ii < plhList.size(); ii++) {
                                 if (phgList.get(ii) == null) {
@@ -358,8 +379,10 @@ public class HealthOperationService {
                                 }
 
                             }
+
                             mapstatus.put(pList.get(i).getCode(), hgList);
                             mapstatus.put("time", tList);
+
                         }
 
                     } else {
@@ -389,8 +412,10 @@ public class HealthOperationService {
                                     tList.add(time);
                                 }
                             }
+
                             mapstatus.put(pList.get(i).getCode(), hgList);
                             mapstatus.put("time", tList);
+
                         } else {
                             for (int ii = 0; ii < pyzList.size(); ii++) {
                                 if (pzyList.get(ii) == null) {
@@ -408,15 +433,21 @@ public class HealthOperationService {
                                     tList.add(time);
                                 }
                             }
+
                             mapstatus.put(pList.get(i).getCode(), hgList);
                             mapstatus.put("time", tList);
+
                         }
 
                     }
 
                 }
-            }
+                map.put(pList.get(i).getId(),pList.get(i).getName());
+
 
+            }
+            nameList.add(map);
+            mapstatus.put("name", nameList);
         }
         return mapstatus;
     }

+ 124 - 0
src/main/java/com/gyee/frame/service/health/HealthSubService.java

@@ -15,6 +15,7 @@ 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
@@ -919,4 +920,127 @@ public class HealthSubService {
     }
     /*************************************************风机健康曲线**************************************************/
 
+
+    /**
+     * 获取风机以及部件的健康历史
+     * @param wtId
+     * @return
+     */
+    public Map<String,Object> findWtHisValueForBj(String wtId) {
+        Map<String,Object> mapstatus = new HashMap();
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+        Map<String, Windturbine> wtmap = InitialRunner.wtmap;
+        //String wtName = wtmap.get(wtId).getName();
+
+        WindTurbineTestingPointAi2 fj =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId,Constant.FJJKZT);
+        WindTurbineTestingPointAi2 clx =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId,Constant.CLXJKZT);
+        WindTurbineTestingPointAi2 fdj =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId,Constant.FDJJKZT);
+        WindTurbineTestingPointAi2 bj =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId,Constant.BJJKZT);
+        WindTurbineTestingPointAi2 zk =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId,Constant.ZKJKZT);
+
+        // 时间 目前当天0点开始
+        Calendar cl = Calendar.getInstance();
+        cl.set(Calendar.HOUR_OF_DAY, 0);
+        cl.set(Calendar.MINUTE, 0);
+        cl.set(Calendar.SECOND, 0);
+        Long start = cl.getTimeInMillis();
+        Long end = new Date().getTime();
+        List<PointData> jkValueList = new ArrayList<PointData>();
+        List<String> tList = new ArrayList<String>();
+
+        List<List<Double>> datals = new ArrayList<List<Double>>();
+        List<Double> fjls = new ArrayList<Double>();
+        List<Double> clxls = new ArrayList<Double>();
+        List<Double> fdjls = new ArrayList<Double>();
+        List<Double> bjls = new ArrayList<Double>();
+        List<Double> zkls = new ArrayList<Double>();
+
+        List<String> namels = new ArrayList<String>();
+        namels.add("风机健康状态");
+        namels.add("齿轮箱健康状态");
+        namels.add("发电机健康状态");
+        namels.add("变桨健康状态");
+        namels.add("主控健康状态");
+        try {
+            jkValueList = realApiUtil.getHistoryDatasSnap(fj, start / 1000, end / 1000, 0L, 15 * 60L);
+            for (int i = 0; i < jkValueList.size(); i++) {
+                double hisData = (Double) jkValueList.get(i).getPointValueInDouble();
+                String time = sdf.format(new Date(jkValueList.get(i).getPointTime() * 1000));
+                time = time.substring(time.length() - 5);
+                tList.add(time);
+                fjls.add(hisData);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        try {
+            jkValueList = realApiUtil.getHistoryDatasSnap(clx, start / 1000, end / 1000, 0L, 15 * 60L);
+            for (int i = 0; i < jkValueList.size(); i++) {
+                double hisData = (Double) jkValueList.get(i).getPointValueInDouble();
+                String time = sdf.format(new Date(jkValueList.get(i).getPointTime() * 1000));
+                time = time.substring(time.length() - 5);
+                tList.add(time);
+                clxls.add(hisData);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        try {
+            jkValueList = realApiUtil.getHistoryDatasSnap(fdj, start / 1000, end / 1000, 0L, 15 * 60L);
+            for (int i = 0; i < jkValueList.size(); i++) {
+                double hisData = (Double) jkValueList.get(i).getPointValueInDouble();
+                String time = sdf.format(new Date(jkValueList.get(i).getPointTime() * 1000));
+                time = time.substring(time.length() - 5);
+                tList.add(time);
+                fdjls.add(hisData);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        try {
+            jkValueList = realApiUtil.getHistoryDatasSnap(bj, start / 1000, end / 1000, 0L, 15 * 60L);
+            for (int i = 0; i < jkValueList.size(); i++) {
+                double hisData = (Double) jkValueList.get(i).getPointValueInDouble();
+                String time = sdf.format(new Date(jkValueList.get(i).getPointTime() * 1000));
+                time = time.substring(time.length() - 5);
+                tList.add(time);
+                bjls.add(hisData);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        try {
+            jkValueList = realApiUtil.getHistoryDatasSnap(zk, start / 1000, end / 1000, 0L, 15 * 60L);
+            for (int i = 0; i < jkValueList.size(); i++) {
+                double hisData = (Double) jkValueList.get(i).getPointValueInDouble();
+                String time = sdf.format(new Date(jkValueList.get(i).getPointTime() * 1000));
+                time = time.substring(time.length() - 5);
+                tList.add(time);
+                zkls.add(hisData);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        datals.add(fjls);
+        datals.add(clxls);
+        datals.add(fdjls);
+        datals.add(bjls);
+        datals.add(zkls);
+
+        mapstatus.put("data", datals);
+//        mapstatus.put("clxls", clxls);
+//        mapstatus.put("fdjls", fdjls);
+//        mapstatus.put("bjls", bjls);
+//        mapstatus.put("zkls", zkls);
+        mapstatus.put("name", namels);
+        mapstatus.put("time", tList);
+
+      return mapstatus;
+    }
 }

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

@@ -142,8 +142,8 @@ public class WindTurbineHealthListService {
 
             Integer[] futureHealth = new Integer[4];
             Random random = new Random();
-            for (int i = 0; i < 4; i++) {
-                futureHealth[i] = random.nextInt(10) + 1;
+            for (int i = 0; i < 12; i++) {
+                futureHealth[i] = random.nextInt(4) + 1;
             }
             vo.setFutureHealth(futureHealth);
 

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

@@ -51,6 +51,9 @@ public class RecommenService {
 	@Resource
 	private WindturbineSqlService windturbineSqlService;
 
+	private final String QS = "0";
+	private final String FD = "-1";
+	private final String GF = "-2";
 
 	IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
 
@@ -275,14 +278,18 @@ public class RecommenService {
 			String[] datechart = new String[num];
 			List<Windturbine> wtls = new ArrayList<Windturbine>();
 
-			if (InitialRunner.wpmap.containsKey(wpId)) {
-				wtls = InitialRunner.wp_wtmap.get(wpId);
-			} else {
+			if (wpId.equals(QS) || wpId.equals(FD) || wpId.equals(GF)) {
 				for (Windturbine wt : InitialRunner.wtls) {
-					if (wt.getWindpowerstationid().endsWith("FDC")) {
-						wtls.add(wt);
-					}
+					wtls.add(wt);
 				}
+			}else if (InitialRunner.wpmap.containsKey(wpId)) {
+				wtls = InitialRunner.wp_wtmap.get(wpId);
+			} else if (InitialRunner.pjmap.containsKey(wpId))  {
+				wtls = InitialRunner.pj_wtmap.get(wpId);
+			} else if (InitialRunner.lnmap.containsKey(wpId))  {
+				wtls = InitialRunner.ln_wtmap.get(wpId);
+			} else if (InitialRunner.wtmap.containsKey(wpId))  {
+				wtls.add(InitialRunner.wtmap.get(wpId)) ;
 			}
 
 			List<String> wtidls = new ArrayList<String>();

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

@@ -0,0 +1,220 @@
+package com.gyee.frame.service.weather;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.gyee.frame.common.cache.RedisUtils;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Line;
+import com.gyee.frame.model.auto.Project;
+import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.custom.weather.Main;
+import com.gyee.frame.model.custom.weather.Weather;
+import com.gyee.frame.model.custom.weather.WeatherReal;
+import com.gyee.frame.model.custom.weather.Wind;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+
+@Service
+public class WeatherService  {
+
+	private final Integer DATABASE=2;
+	@Resource
+	private RedisUtils redisUtils;
+
+	public Map<String,Object> getWeatherRealInfo(String id)
+	{
+		Map<String,Object> map=new HashMap<>();
+
+
+
+		if(StringUtils.notEmp(id))
+		{
+
+			if (InitialRunner.wpmap.containsKey(id)) {
+				Windpowerstation wp = InitialRunner.wpmap.get(id);
+
+				id=wp.getId();
+
+
+			} else if (InitialRunner.pjmap.containsKey(id)) {
+				Project pj = InitialRunner.pjmap.get(id);
+				Windpowerstation wp = InitialRunner.wpmap.get(pj.getWindpowerstationid());
+				id=wp.getId();
+			} else if (InitialRunner.lnmap.containsKey(id)) {
+				Line ln = InitialRunner.lnmap.get(id);
+				Project pj = InitialRunner.pjmap.get(ln.getProjectid());
+				Windpowerstation wp = InitialRunner.wpmap.get(pj.getWindpowerstationid());
+				id=wp.getId();
+			}
+
+			String weatherStr =null;
+
+			switch(id) {
+				case "0" :
+					weatherStr = redisUtils.get("NX_QYGS_WEATHER_WEATHER",DATABASE);
+					break;
+				case "-1" :
+					weatherStr = redisUtils.get("NX_QYGS_WEATHER_WEATHER",DATABASE);
+					break;
+				case "-2" :
+					weatherStr = redisUtils.get("NX_QYGS_WEATHER_WEATHER",DATABASE);
+					break;
+				case "MHS_FDC" :
+					weatherStr = redisUtils.get("MHS_FDC_WEATHER_WEATHER",DATABASE);
+					break;
+				case "NSS_FDC" :
+					weatherStr = redisUtils.get("NSS_FDC_WEATHER_WEATHER",DATABASE);
+					break;
+				case "QS_FDC" :
+					weatherStr = redisUtils.get("QS_FDC_WEATHER_WEATHER",DATABASE);
+					break;
+				case "SBQ_FDC" :
+					weatherStr = redisUtils.get("SBQ_FDC_WEATHER_WEATHER",DATABASE);
+					break;
+				case "XS_FDC" :
+					weatherStr = redisUtils.get("XS_FDC_WEATHER_WEATHER",DATABASE);
+					break;
+				case "DWK_GDC" :
+					weatherStr = redisUtils.get("DWK_GDC_WEATHER_WEATHER",DATABASE);
+					break;
+				case "PL_GDC" :
+					weatherStr = redisUtils.get("PL_GDC_WEATHER_WEATHER",DATABASE);
+					break;
+				case "XH_GDC" :
+					weatherStr = redisUtils.get("XH_GDC_WEATHER_WEATHER",DATABASE);
+					break;
+				case "MCH_GDC" :
+					weatherStr = redisUtils.get("MCH_GDC_WEATHER_WEATHER",DATABASE);
+					break;
+				case "HZJ_GDC" :
+					weatherStr = redisUtils.get("HZJ_GDC_WEATHER_WEATHER",DATABASE);
+					break;
+				default:
+					break;
+			}
+
+			if(StringUtils.notEmp(weatherStr))
+			{
+				WeatherReal weatherReal = JSONObject.parseObject(weatherStr, new TypeReference<WeatherReal>() {
+				});
+
+				if(null!=weatherReal)
+				{
+					double qxd=weatherReal.getVisibility();
+					map.put("qxd", MathUtil.twoBit(qxd/1000));
+
+					if(null!=weatherReal.getMain())
+					{
+						Main main=weatherReal.getMain();
+						map.put("wd",main.getTemp());
+						map.put("dqyl",main.getPressure());
+						map.put("sd",main.getHumidity());
+
+					}
+
+
+					if(null!=weatherReal.getWind())
+					{
+						Wind wind=weatherReal.getWind();
+						map.put("fs",wind.getSpeed());
+
+						if(StringUtils.notEmp(wind.getDeg()))
+						{
+							int fx=wind.getDeg();
+							if(fx>= 11.25 && fx<= 348.76)
+							{
+								map.put("fx","北");
+							}else if(fx>= 33.76 && fx<= 56.25)
+							{
+								map.put("fx","东北");
+							}else if(fx>= 78.76 && fx<= 101.25)
+							{
+								map.put("fx","东");
+							}else if(fx>= 123.76 && fx<= 146.25)
+							{
+								map.put("fx","东南");
+							}else if(fx>= 168.76 && fx<= 191.25)
+							{
+								map.put("fx","南");
+							}else if(fx>= 213.76 && fx<= 236.25)
+							{
+								map.put("fx","西南");
+							}else if(fx>= 258.76 && fx<= 281.25)
+							{
+								map.put("fx","西");
+							}else if(fx>= 303.76 && fx<= 326.25)
+							{
+								map.put("fx","西北");
+							}
+
+						}
+
+					}
+
+					if(null!=weatherReal.getWeather() && !weatherReal.getWeather().isEmpty())
+					{
+						Weather weather=weatherReal.getWeather().get(0);
+
+						String icon=weather.getIcon();
+
+						if (StringUtils.notEmp(icon))
+						{
+							if(icon.equals("01d") || icon.equals("01n"))
+							{
+								map.put("tqmc","晴");
+								map.put("tqtp","01");
+							}else if(icon.equals("02d") || icon.equals("02n"))
+							{
+								map.put("tqmc","少云");
+								map.put("tqtp","02");
+							}else if(icon.equals("03d") || icon.equals("03n"))
+							{
+								map.put("tqmc","多云");
+								map.put("tqtp","06");
+							}else if(icon.equals("04d") || icon.equals("04n"))
+							{
+								map.put("tqmc","阴");
+								map.put("tqtp","07");
+							}else if(icon.equals("09d") || icon.equals("09n"))
+							{
+								map.put("tqmc","阵雨");
+								map.put("tqtp","13");
+							}else if(icon.equals("10d") || icon.equals("10n"))
+							{
+								map.put("tqmc","雨");
+								map.put("tqtp","18");
+							}else if(icon.equals("11d") || icon.equals("11n"))
+							{
+								map.put("tqmc","雷雨");
+								map.put("tqtp","15");
+							}else if(icon.equals("13d") || icon.equals("13n"))
+							{
+								map.put("tqmc","雪");
+								map.put("tqtp","19");
+							}else if(icon.equals("50d") || icon.equals("50n"))
+							{
+								map.put("tqmc","雾");
+								map.put("tqtp","32");
+							}else
+							{
+								map.put("description","晴");
+								map.put("tqtp","01");
+							}
+
+						}
+					}
+				}
+			}
+
+		}
+		return  map;
+	}
+
+
+}

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

@@ -1878,7 +1878,7 @@ public class GenreSetPushDetailPjService {
                     DataVo vo = new DataVo();
                     vo.setName(line.getName());
                     WindPowerStationTestingPoint2 yfdlpoint=windPowerstationTestingPointService.getWindPowerStationTestingPoint2(line.getId(), Constant.TPOINT_WP_YFDL);
-                    WindPowerStationTestingPoint2 nfdlpoint=windPowerstationTestingPointService.getWindPowerStationTestingPoint2(line.getId(), Constant.TPOINT_WP_YFDL);
+                    WindPowerStationTestingPoint2 nfdlpoint=windPowerstationTestingPointService.getWindPowerStationTestingPoint2(line.getId(), Constant.TPOINT_WP_NFDL);
 
                     double yfdl = realApiUtil.getRealData(yfdlpoint).getPointValueInDouble();
                     double nfdl = realApiUtil.getRealData(nfdlpoint).getPointValueInDouble();

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

@@ -1962,7 +1962,7 @@ public class GenreSetPushDetailService {
             DataVo vo = entry.getValue();
 
             WindPowerStationTestingPoint2 yfdlpoint=windPowerstationTestingPointService.getWindPowerStationTestingPoint2(entry.getKey(), Constant.TPOINT_WP_YFDL);
-            WindPowerStationTestingPoint2 nfdlpoint=windPowerstationTestingPointService.getWindPowerStationTestingPoint2(entry.getKey(), Constant.TPOINT_WP_YFDL);
+            WindPowerStationTestingPoint2 nfdlpoint=windPowerstationTestingPointService.getWindPowerStationTestingPoint2(entry.getKey(), Constant.TPOINT_WP_NFDL);
             double yfdl = realApiUtil.getRealData(yfdlpoint).getPointValueInDouble();
             double nfdl = realApiUtil.getRealData(nfdlpoint).getPointValueInDouble();
 

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

@@ -1843,7 +1843,7 @@ public class GenreSetPushDetailWpService {
             DataVo vo = entry.getValue();
 
             WindPowerStationTestingPoint2 yfdlpoint=windPowerstationTestingPointService.getWindPowerStationTestingPoint2(entry.getKey(), Constant.TPOINT_WP_YFDL);
-            WindPowerStationTestingPoint2 nfdlpoint=windPowerstationTestingPointService.getWindPowerStationTestingPoint2(entry.getKey(), Constant.TPOINT_WP_YFDL);
+            WindPowerStationTestingPoint2 nfdlpoint=windPowerstationTestingPointService.getWindPowerStationTestingPoint2(entry.getKey(), Constant.TPOINT_WP_NFDL);
 
             double yfdl = realApiUtil.getRealData(yfdlpoint).getPointValueInDouble();
             double nfdl = realApiUtil.getRealData(nfdlpoint).getPointValueInDouble();

+ 24 - 4
src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java

@@ -10,6 +10,7 @@ import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.MatrixVo;
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.service.*;
+import com.gyee.frame.service.weather.WeatherService;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
@@ -41,9 +42,13 @@ public class GenreSetPushService {
     private WpMttrAndMtbMonthService wpMttrAndMtbMonthService;
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+    @Resource
+    private WeatherService weatherService;
+
     private final String QS = "0";
     private final String FD = "-1";
     private final String GF = "-2";
+    private final String DEFAULT_FDC = "MHS_FDC";
     private final double YCFDLXS = 1.08;
     IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
 
@@ -75,12 +80,23 @@ public class GenreSetPushService {
             Double sjgl = 0.0;
             Double bzgl = 0.0;
             Double yfgl = 0.0;
+
+
+            Calendar cal2 = Calendar.getInstance();
+            cal2.add(Calendar.HOUR_OF_DAY, -1);
+            cal2.set(Calendar.MINUTE, 0);
+            cal2.set(Calendar.SECOND, 0);
+
+            Date beginDate = cal2.getTime();
+            cal2.add(Calendar.DAY_OF_MONTH, 1);
+            Date endDate = cal2.getTime();
 /*************************************************风场指标*************************************************************/
 
             Map<String, Object> fcmap = new HashMap<>();
 
             if (id.equals(QS) || id.equals(FD) || id.equals(GF)) {
 
+
                 //初始化场站信息
 
                 List<Windpowerstation> wplist = new ArrayList<>();
@@ -233,8 +249,12 @@ public class GenreSetPushService {
 
 /*************************************************风场指标*************************************************************/
 
+            Map<String, Object> tqmap= weatherService.getWeatherRealInfo(id);
+            map.put("tqmap", tqmap);
+
 /*************************************************基础指标*************************************************************/
-            Map<String, Double> jczbmap = new HashMap<>();
+            Map<String, Object> jczbmap = new HashMap<>();
+
 
 
             if (InitialRunner.wpmap.containsKey(id)) {
@@ -387,8 +407,8 @@ public class GenreSetPushService {
 
             //预测发电上限
             if (null != zjrl) {
-                double rfdlsx = zjrl * 24;
-                double yfdlsx = zjrl * 24 * daynum;
+                double rfdlsx = zjrl;
+                double yfdlsx = zjrl* daynum;
                 jczbmap.put("rfdlsx", MathUtil.twoBit(rfdlsx));
                 jczbmap.put("yfdlsx", MathUtil.twoBit(yfdlsx));
             }
@@ -938,7 +958,7 @@ public class GenreSetPushService {
             Double nfdljh = 0.0;
 
             //Double yfdltemp = jczbmap.get("yfdl");
-            Double nfdl = jczbmap.get("nfdl");
+            Double nfdl = (Double)jczbmap.get("nfdl");
 
             yfdljh = gxkmap.get("yfdljh");
             nfdljh = gxkmap.get("nfdljh");

+ 242 - 31
src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java

@@ -64,6 +64,7 @@ public class WtInfoPushService {
 
             if (InitialRunner.wtmap.containsKey(id)) {
 
+                Map<String, String[]> namemap = new HashMap<String, String[]>();
                 Windturbine wt = InitialRunner.wtmap.get(id);
 
                 map.put("model", wt.getModelid());
@@ -138,6 +139,27 @@ public class WtInfoPushService {
                 keyls.add("GL");// 平均风速功率
                 keyls.add("FDJZS");//风机转数
                 keyls.add("HJWD");////环境温度
+
+                namemap.put("FJKYL",new String[]{"可利用率","%","ai",null});
+                namemap.put("RFDL",new String[]{"日发电量","kwh","ai",null});
+                namemap.put("LLGL",new String[]{"风机理论功率","kw","ai",null});
+                namemap.put("YFGL",new String[]{"风机应发功率","kw","ai",null});
+                namemap.put("LLFDL",new String[]{"日理论发电量","kwh","ai",null});
+                namemap.put("YFDL",new String[]{"日应发电量","kwh","ai",null});
+                namemap.put("FJZT",new String[]{"风机状态","","ai",null});
+                namemap.put("GZSS",new String[]{"故障损失电量","kwh","ai",null});
+                namemap.put("JXSS",new String[]{"检修损失电量","kwh","ai",null});
+                namemap.put("XNSS",new String[]{"性能损失电量","kwh","ai",null});
+                namemap.put("XDSS",new String[]{"限电损失电量","kwh","ai",null});
+                namemap.put("SLSS",new String[]{"场内受累","kwh","ai",null});
+                namemap.put("RJXSSDL",new String[]{"日场内受累检修","kwh","ai",null});
+                namemap.put("RQFSSDL",new String[]{"场外受累电网","kwh","ai",null});
+                namemap.put("RXDSSDL",new String[]{"场外受累天气","kwh","ai",null});
+                namemap.put("FS",new String[]{"风速","m/s","ai",null});
+                namemap.put("GL",new String[]{"功率","kw","ai",null});
+                namemap.put("FDJZS",new String[]{"风机转数","rpm","ai",null});
+                namemap.put("HJWD",new String[]{"环境温度","°c","ai",null});
+
 /*********************************************************************变桨*********************************************************************************/
 
                 List<String> uids = new ArrayList<>();
@@ -192,6 +214,28 @@ public class WtInfoPushService {
 
 
 
+                namemap.put("RYBMQ1",new String[]{"冗余编码器1","","ai",null});
+                namemap.put("RYBMQ2",new String[]{"冗余编码器2","","ai",null});
+                namemap.put("RYBMQ3",new String[]{"冗余编码器3","","ai",null});
+                namemap.put("BJSD1",new String[]{"变桨速度1","","ai",null});
+                namemap.put("BJSD2",new String[]{"变桨速度2","","ai",null});
+                namemap.put("BJSD3",new String[]{"变桨速度3","","ai",null});
+                namemap.put("U1YZDL",new String[]{"U1项绕组电流","A","ai",null});
+                namemap.put("U2YZDL",new String[]{"U2项绕组电流","A","ai",null});
+                namemap.put("U3YZDL",new String[]{"U3项绕组电流","A","ai",null});
+                namemap.put("U1YZDY",new String[]{"U1项绕组电压","V","ai",null});
+                namemap.put("U2YZDY",new String[]{"U2项绕组电压","V","ai",null});
+                namemap.put("U3YZDY",new String[]{"U3项绕组电压","V","ai",null});
+
+                namemap.put("YP1XW91",new String[]{"叶片1的91度限位","","di",null});
+                namemap.put("YP2XW91",new String[]{"叶片2的91度限位","","di",null});
+                namemap.put("YP3XW91",new String[]{"叶片3的91度限位","","di",null});
+                namemap.put("YP1XW95",new String[]{"叶片1的95度限位","","di",null});
+                namemap.put("YP2XW95",new String[]{"叶片2的95度限位","","di",null});
+                namemap.put("YP3XW95",new String[]{"叶片3的95度限位","","di",null});
+
+
+
                 initialpoint(id, zbls, keyls, bjnamemap,uids,msls);
 
 
@@ -265,6 +309,25 @@ public class WtInfoPushService {
                 InitalDiMap(id, zbls, keyls, clxnamemap, unicodels, unmsls);
 
 
+                namemap.put("RHYLWRKYL",new String[]{"润滑油滤网入口压力","bar","ai",null});
+                namemap.put("RHYLWCKYL",new String[]{"润滑油滤网出口压力","bar","ai",null});
+                namemap.put("CLXSRZ1WD",new String[]{"齿轮箱输入轴1温度","°c","ai",null});
+                namemap.put("CLXRHYJRBH",new String[]{"齿轮箱输入轴2温度","°c","ai",null});
+                namemap.put("CLXRHYLWYC",new String[]{"齿轮箱油温","°c","ai",null});
+                namemap.put("CLXRKYW",new String[]{"齿轮箱入口油温","°c","ai",null});
+
+                namemap.put("CLXYW",new String[]{"齿轮箱油位ok","","di",null});
+                namemap.put("CLXRHYYL",new String[]{"齿轮箱润滑油压力ok","","di",null});
+                namemap.put("CLXRHBDJBH",new String[]{"齿轮箱润滑泵电机保护ok","","di",null});
+                namemap.put("CLXRHYJRBH",new String[]{"齿轮箱润滑油加热保护ok","","di",null});
+                namemap.put("CLXRHYLWYC",new String[]{"齿轮箱润滑油滤网压差ok","","di",null});
+                namemap.put("CLXYJRQBH",new String[]{"齿轮箱油加热器保护ok","","di",null});
+                namemap.put("QDCLXRHJRQ",new String[]{"启动齿轮箱润滑加热器","","di",null});
+                namemap.put("QDCLXRHGSBA",new String[]{"启动齿轮箱润滑高速泵a","","di",null});
+                namemap.put("QDCLXRHGSBB",new String[]{"启动齿轮箱润滑高速泵b","","di",null});
+                namemap.put("QDCLXYBJRQ",new String[]{"启动齿轮箱油泵加热器","","di",null});
+
+
 /***********************************************************************发电机********************************************************************************/
 
                 msls=new ArrayList<>();
@@ -335,6 +398,30 @@ public class WtInfoPushService {
 
                 InitalDiMap(id, zbls, keyls, fdjnamemap, unicodels, unmsls);
 
+
+
+                namemap.put("U1YZWD",new String[]{"U1绕组温度","°c","ai",null});
+                namemap.put("V1YZWD",new String[]{"V1绕组温度","°c","ai",null});
+                namemap.put("W1YZWD",new String[]{"W1绕组温度","°c","ai",null});
+                namemap.put("FDJZCAWD",new String[]{"发电机轴承A温度","°c","ai",null});
+                namemap.put("FDJZCBWD",new String[]{"发电机轴承B温度","°c","ai",null});
+                namemap.put("FDJLQFWD",new String[]{"发电机冷却风温度","°c","ai",null});
+                namemap.put("FDJHHWD",new String[]{"发电机滑环温度","°c","ai",null});
+
+
+                namemap.put("FDJJRQBHZC",new String[]{"发电机加热器保护正常","","di",null});
+                namemap.put("QDFDJJRQ",new String[]{"启动发电机加热器","","di",null});
+                namemap.put("FDJDSMS",new String[]{"发电机电刷磨损ok","","di",null});
+                namemap.put("QDKLFS1",new String[]{"启动空冷风扇1","","di",null});
+                namemap.put("QDKLFS2",new String[]{"启动空冷风扇2","","di",null});
+                namemap.put("KLFSBH1",new String[]{"空冷风扇保护1正常","","di",null});
+                namemap.put("KLFSBH2",new String[]{"空冷风扇保护2正常","","di",null});
+                namemap.put("QDSLFS1",new String[]{"启动水冷风扇1","","di",null});
+                namemap.put("QDSLFSBH1",new String[]{"水冷风扇保护1正常","","di",null});
+                namemap.put("LQSYL",new String[]{"冷却水压力ok","","di",null});
+                namemap.put("FDJRHYBYW",new String[]{"发电机润滑油泵液位ok","","di",null});
+                namemap.put("QDFDJRHYB",new String[]{"启动发电机润滑油泵","","di",null});
+
 /*********************************************************************偏航**********************************************************************************/
 
 
@@ -399,6 +486,31 @@ public class WtInfoPushService {
                 unmsls.add("PHDJ4BH");
 
                 InitalDiMap(id, zbls, keyls, phnamemap, unicodels, unmsls);
+
+
+
+                namemap.put("DFJD",new String[]{"对风角度","","ai",null});
+                namemap.put("PHWZ",new String[]{"偏航位置","","ai",null});
+
+
+                namemap.put("PHZJX",new String[]{"偏航左极限位置","","di",null});
+                namemap.put("PHYJX",new String[]{"偏航右极限位置","","di",null});
+                namemap.put("PHRQDQZC",new String[]{"偏航软启动器正常","","di",null});
+                namemap.put("PHDSCDK",new String[]{"左偏航动作","","di",null});
+                namemap.put("YPHDZ",new String[]{"偏航电刹车打开","","di",null});
+                namemap.put("PHRQDQDZ",new String[]{"偏航软启动器动作","","di",null});
+                namemap.put("PHRQDQSN",new String[]{"偏航软启动器使能","","di",null});
+                namemap.put("PHBMQZL",new String[]{"偏航编码器置零","","di",null});
+                namemap.put("JLDZ",new String[]{"解缆动作","","di",null});
+                namemap.put("PHCGQMTOK",new String[]{"偏航传感器mtOK","","di",null});
+                namemap.put("PHCGQOK",new String[]{"偏航传感器OK","","di",null});
+                namemap.put("PHZCRHYW",new String[]{"偏航轴承润滑液位ok","","di",null});
+                namemap.put("PHRHBZCBH",new String[]{"偏航润滑泵轴承保护ok","","di",null});
+                namemap.put("PHDJ1BH",new String[]{"偏航电机1保护OK","","di",null});
+                namemap.put("PHDJ2BH",new String[]{"偏航电机2保护OK","","di",null});
+                namemap.put("PHDJ3BH",new String[]{"偏航电机3保护OK","","di",null});
+                namemap.put("PHDJ4BH",new String[]{"偏航电机4保护OK","","di",null});
+
 /****************************************************************液压***************************************************************************************/
 
                 msls=new ArrayList<>();
@@ -432,6 +544,19 @@ public class WtInfoPushService {
                 unmsls.add("YYYJRQBH");
 
                 InitalDiMap(id, zbls, keyls, yynamemap, unicodels, unmsls);
+
+
+                namemap.put("YYXTYY",new String[]{"液压系统油压","bar","ai",null});
+                namemap.put("ZZSCXTYY",new String[]{"转子刹车系统液压","bar","ai",null});
+                namemap.put("FDJLQSWD",new String[]{"液压油温","°c","ai",null});
+                namemap.put("YYYW",new String[]{"液压系统油压","bar","ai",null});
+
+                namemap.put("YYYWDCX",new String[]{"液压油温度超限","","di",null});
+                namemap.put("YYYYW",new String[]{"液压油液位ok","","di",null});
+                namemap.put("YLSCYY",new String[]{"叶轮刹车液压ok","","di",null});
+                namemap.put("YYBDJBH",new String[]{"液压泵电机保护","","di",null});
+                namemap.put("YYYJRQBH",new String[]{"液压油加热器保护","","di",null});
+
 /***********************************************************************机舱********************************************************************************/
 
 
@@ -530,17 +655,54 @@ public class WtInfoPushService {
 
                 InitalDiMap(id, zbls, keyls, jcnamemap, unicodels, unmsls);
 
-/*******************************************************************************************************************************************************/
 
-                Map<String, Double> jczbmap = new HashMap<>();
-                Map<String, Double> bjmap = new HashMap<>();
-                Map<String, Double> clxmap = new HashMap<>();
-                Map<String, Double> fdjmap = new HashMap<>();
-                Map<String, Double> phmap = new HashMap<>();
-                Map<String, Double> yymap = new HashMap<>();
-                Map<String, Double> jcmap = new HashMap<>();
+                namemap.put("YPWZ1",new String[]{"叶片位置1","","ai",null});
+                namemap.put("YPWZ2",new String[]{"叶片位置2","","ai",null});
+                namemap.put("YPWZ3",new String[]{"叶片位置3","","ai",null});
+                namemap.put("FJSSFS",new String[]{"风机实时风速","m/s","ai",null});
+                namemap.put("FJGL",new String[]{"风机功率","kw","ai",null});
+                namemap.put("GLYS",new String[]{"功率因数","Kvar","ai",null});
+                namemap.put("BJJD1",new String[]{"变桨角度1","度","ai",null});
+                namemap.put("FJPL",new String[]{"风机频率","Hz","ai",null});
+                namemap.put("WGGL",new String[]{"无功功率","kw","ai",null});
+                namemap.put("FJFX",new String[]{"风机风向","度","ai",null});
+                namemap.put("YLZS",new String[]{"叶轮转速","rpm","ai",null});
+                namemap.put("FDJZS",new String[]{"发电机转速","rpm","ai",null});
+                namemap.put("JCWWD",new String[]{"机舱外温度","°c","ai",null});
+                namemap.put("JCWD",new String[]{"机舱温度","°c","ai",null});
+                namemap.put("TDGWD",new String[]{"塔底柜温度","°c","ai",null});
+                namemap.put("JCGWD",new String[]{"机舱柜温度","°c","ai",null});
+
+
+                namemap.put("YYYYW2",new String[]{"液压油液位ok","","di",null});
+                namemap.put("YYYWDCX2",new String[]{"液压油温度超限","","di",null});
+                namemap.put("YLSCYY2",new String[]{"叶轮刹车液压ok","","di",null});
+                namemap.put("YYBDJBH2",new String[]{"液压泵电机保护","","di",null});
+                namemap.put("YYYJRQBH2",new String[]{"液压油加热器保护","","di",null});
+                namemap.put("CLXYW2",new String[]{"齿轮箱油位ok","","di",null});
+                namemap.put("CLXRHYYL2",new String[]{"齿轮箱润滑油压力ok","","di",null});
+                namemap.put("CLXRHYJRBH2",new String[]{"齿轮箱润滑油泵保护开关故障","","di",null});
+                namemap.put("FDJJRQBHZC2",new String[]{"发电机加热器保护正常","","di",null});
+                namemap.put("LQSYL2",new String[]{"冷却水压力ok","","di",null});
 
 
+/*******************************************************************************************************************************************************/
+
+                  Map<String, Object> jczbmap = new HashMap<>();
+//                    Map<String, Object> bjmap = new HashMap<>();
+//                    Map<String, Object> clxmap = new HashMap<>();
+//                    Map<String, Object> fdjmap = new HashMap<>();
+//                    Map<String, Object> phmap = new HashMap<>();
+//                    Map<String, Object> yymap = new HashMap<>();
+//                    Map<String, Object> jcmap = new HashMap<>();
+
+                List<Object> bjls=new ArrayList<>();
+                List<Object> clxls=new ArrayList<>();
+                List<Object> fdjls=new ArrayList<>();
+                List<Object> phls=new ArrayList<>();
+                List<Object> yyls=new ArrayList<>();
+                List<Object> jcls=new ArrayList<>();
+
                 List<PointData> zblist = realApiUtil.getRealData(zbls);
 
 
@@ -593,37 +755,95 @@ public class WtInfoPushService {
                         if(bjnamemap.containsKey(keyls.get(i)))
                         {
                             int num=bjnamemap.get(keyls.get(i));
-                            bjmap.put(keyls.get(i), MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));//
+
+                            if(namemap.containsKey(keyls.get(i)))
+                            {
+                                String[] temparr=namemap.get(keyls.get(i));
+                                temparr[3]=String.valueOf(MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));
+                               // bjmap.put(keyls.get(i),temparr);//
+                                bjls.add(temparr);
+                            }
+
                         }
 
                         if(clxnamemap.containsKey(keyls.get(i)))
                         {
                             int num=clxnamemap.get(keyls.get(i));
-                            clxmap.put(keyls.get(i), MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));//
+
+                            if(namemap.containsKey(keyls.get(i)))
+                            {
+                                String[] temparr=namemap.get(keyls.get(i));
+                                temparr[3]=String.valueOf(MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));
+                               // clxmap.put(keyls.get(i),temparr);//
+                                clxls.add(temparr);
+                            }
                         }
 
                         if(fdjnamemap.containsKey(keyls.get(i)))
                         {
                             int num=fdjnamemap.get(keyls.get(i));
-                            fdjmap.put(keyls.get(i), MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));//
+
+                            if(namemap.containsKey(keyls.get(i)))
+                            {
+                                String[] temparr=namemap.get(keyls.get(i));
+                                temparr[3]=String.valueOf(MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));
+//                                fdjmap.put(keyls.get(i),temparr);//
+                                fdjls.add(temparr);
+                            }
                         }
 
                         if(phnamemap.containsKey(keyls.get(i)))
                         {
                             int num=phnamemap.get(keyls.get(i));
-                            phmap.put(keyls.get(i), MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));//
+
+                            if(namemap.containsKey(keyls.get(i)))
+                            {
+                                String[] temparr=namemap.get(keyls.get(i));
+                                temparr[3]=String.valueOf(MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));
+//                                phmap.put(keyls.get(i),temparr);//
+                                phls.add(temparr);
+                            }
+
                         }
 
                         if(yynamemap.containsKey(keyls.get(i)))
                         {
                             int num=yynamemap.get(keyls.get(i));
-                            yymap.put(keyls.get(i), MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));//
+
+                            if(namemap.containsKey(keyls.get(i)))
+                            {
+                                String[] temparr=namemap.get(keyls.get(i));
+                                temparr[3]=String.valueOf(MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));
+//                                yymap.put(keyls.get(i),temparr);//
+                                yyls.add(temparr);
+                            }
+
                         }
 
                         if(jcnamemap.containsKey(keyls.get(i)))
                         {
                             int num=jcnamemap.get(keyls.get(i));
-                            jcmap.put(keyls.get(i), MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));//
+
+                            if(namemap.containsKey(keyls.get(i)))
+                            {
+                                String[] temparr=namemap.get(keyls.get(i));
+                                if (keyls.get(i).equals("FDJZS")) {
+                                    Equipmentmodel model = InitialRunner.mlmap.get(wt.getModelid());
+                                    Double fdjzs = (zblist.get(num).getPointValueInDouble());
+                                    if (model.getPowerproduction() == 2000) {
+                                        temparr[3]=String.valueOf(StringUtils.round(fdjzs * 9.55, 2));
+                                    } else {
+                                        temparr[3]=String.valueOf(StringUtils.round(fdjzs, 2));
+                                    }
+                                }else{
+                                    temparr[3]=String.valueOf(MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));
+                                }
+
+//                                jcmap.put(keyls.get(i),temparr);//
+                                jcls.add(temparr);
+                            }
+
+
                         }
                     }
 
@@ -644,16 +864,6 @@ public class WtInfoPushService {
 /**************************************************************机舱***********************************************************************************/
 
 
-                    if (jcnamemap.containsKey(Constant.TPOINT_WT_FDJZS)) {
-                        Equipmentmodel model = InitialRunner.mlmap.get(wt.getModelid());
-                        int num=jcnamemap.get(Constant.TPOINT_WT_FDJZS);
-                        Double fdjzs = (zblist.get(num).getPointValueInDouble());
-                        if (model.getPowerproduction() == 2000) {
-                            jcmap.put("FDJZS", StringUtils.round(fdjzs * 9.55, 2));// 发电机转速
-                        } else {
-                            jcmap.put("FDJZS", fdjzs);// 发电机转速
-                        }
-                    }
 
 
  /**************************************************************基础指标***********************************************************************************/
@@ -662,18 +872,19 @@ public class WtInfoPushService {
                 if(InitialRunner.mlmap.containsKey(wt.getModelid()))
                 {
                     Equipmentmodel model=InitialRunner.mlmap.get(wt.getModelid());
-                    jcmap.put("zjrl",model.getPowerproduction());
+
+                    jcls.add(new String[]{"装机容量","","ai",String.valueOf(model.getPowerproduction())});
                 }
 
                 map.put("jczbmap", jczbmap);
-                map.put("bjmap", bjmap);
-                map.put("clxmap", clxmap);
+                map.put("bjmap", bjls);
+                map.put("clxmap", clxls);
 
-                map.put("fdjmap", fdjmap);
-                map.put("phmap", phmap);
+                map.put("fdjmap", fdjls);
+                map.put("phmap", phls);
 
-                map.put("yymap", yymap);
-                map.put("jcmap", jcmap);
+                map.put("yymap", yyls);
+                map.put("jcmap", jcls);
 
 /**********************************************************************************************************************************************************/
 

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

@@ -91,10 +91,10 @@ spring :
     host: 10.155.32.4
     password: gdnxfd123
     pool:
-      max-active: 8
-      max-idle: 8
-      max-wait: -1
-      min-idle: 0
+      maxTotal: 20
+      maxIdle: 20
+      maxwait: 60000
+      minIdle: 10
     port: 6379
     timeout: 60000
 #mybatis:

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

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

+ 4 - 4
src/test/java/test/HealthOperationTest.java

@@ -37,16 +37,16 @@ public class HealthOperationTest {
 //        Map<String, Object> map =healthOperationController.countStop("1");
 //        Map<String, Object> map2 =healthOperationController.countWpwarn("1");
 //        Map<String, Object> map3 =healthOperationController.countWpOrProStatus("1");
-//        Map<String, Object> map4 =healthOperationController.findWpOrProStatusForHistory("1","1");
-//        Map<String, Object> map5 =healthOperationController.findWpOrProStatusForHistory("1","2");
+        Map<String, Object> map4 =healthOperationController.findWpOrProStatusForHistory("1","1");
+        Map<String, Object> map5 =healthOperationController.findWpOrProStatusForHistory("1","2");
 //        System.out.println(map);
 
 
         Map<String, Object> map =healthOperationController.countStop("2");
         Map<String, Object> map2 =healthOperationController.countWpwarn("2");
         Map<String, Object> map3 =healthOperationController.countWpOrProStatus("2");
-        Map<String, Object> map4 =healthOperationController.findWpOrProStatusForHistory("2","1");
-        Map<String, Object> map5 =healthOperationController.findWpOrProStatusForHistory("2","2");
+        Map<String, Object> map42 =healthOperationController.findWpOrProStatusForHistory("2","1");
+        Map<String, Object> map52 =healthOperationController.findWpOrProStatusForHistory("2","2");
         System.out.println(map);
 //
 //        Map<String, Object> map =healthMainController.findWpMap("MHS_FDC");

+ 7 - 7
src/test/java/test/HealthTest.java

@@ -35,16 +35,16 @@ public class HealthTest {
         HealthMainController healthMainController= SpringUtils.getBean("healthMainController");
 
         HealthSubController healthSubController= SpringUtils.getBean("healthSubController");
-//        Map<String, Object> map =healthMainController.findAllChart("0","12","1");
+//        Map<String, Object> map =healthMainController.findAllMap();
+////
+////
+////        System.out.println(map);
 //
-//
-//        System.out.println(map);
-//
-//        Map<String, Object> map =healthMainController.findWpMap("MHS_FDC");
+//        Map<String, Object> map1 =healthMainController.findWpMap("MHS_FDC");
 
 //        Map<String, Object> map =healthMainController.findHealthMatrixMap();
 //
-//        System.out.println(map);
+//       System.out.println(map);
 //
 //
 //        Map<String, Object> map =healthMainController.findWpMap("MHS_FDC");
@@ -79,7 +79,7 @@ public class HealthTest {
 //        System.out.println(map1.size());
 
 
-        Map<String, Object> map1 =healthSubController.findWtHealthInfo(wtid);
+        Map<String, Object> map1 =healthSubController.findWtHisValueForBj(wtid);
         System.out.println(map1.size());
         System.out.println("***************************************************************************************");
 

+ 21 - 18
src/test/java/test/RecommenTest.java

@@ -4,14 +4,11 @@ import com.gyee.SpringbootStart;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.recommen.RecommenController;
-import com.gyee.frame.model.auto.Wobugeq;
-import com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
 import java.util.Calendar;
 import java.util.Date;
-import java.util.List;
 
 public class RecommenTest {
 
@@ -90,10 +87,16 @@ public class RecommenTest {
 //        System.out.println("**********************************************************************************");
 //
 //
-//        System.out.println("**********************************************************************************");
-//        AjaxResult ajaxResult = recommenController.findAllChartjz("MHS_FDC","2");
+        System.out.println("**********************************************************************************");
+        AjaxResult ajaxResult1 = recommenController.findAllChartjz("MHS_FDC","2");
+        AjaxResult ajaxResult2 = recommenController.findAllChartjz("MHS01_GC","2");
+        AjaxResult ajaxResult3 = recommenController.findAllChartjz("MHS01_XL","2");
+        AjaxResult ajaxResult4 = recommenController.findAllChartjz("MG01_01","2");
+
+
+        System.out.println("**********************************************************************************");
 //
-//        map.put("yslchart", yslchart);
+//       map.put("yslchart", yslchart);
 //        map.put("lslchart", lslchart);
 //        map.put("cslchart", cslchart);
 //        map.put("lvchart", lvchart);
@@ -150,18 +153,18 @@ public class RecommenTest {
 //        System.out.println(test);
 //
 //        System.out.println("**********************************************************************************");
-        Tablepar tablepar = new Tablepar();
-        tablepar.setPageNum(1);
-        tablepar.setPageSize(10);
-       AjaxResult ajaxResult2 = recommenController.findWobugeqByLocation(tablepar,"02055002");
-
-        List<Wobugeq> test2=(List<Wobugeq>)ajaxResult2.get("data");
-
-        for(Wobugeq wtd:test2)
-        {
-            System.out.println(wtd.getBugnum()+"----------------"+wtd.getArrivaltime()+"----------------"+wtd.getProdtdeptopinion());
-        }
-        System.out.println("**********************************************************************************");
+//        Tablepar tablepar = new Tablepar();
+//        tablepar.setPageNum(1);
+//        tablepar.setPageSize(10);
+//       AjaxResult ajaxResult2 = recommenController.findWobugeqByLocation(tablepar,"02055002");
+//
+//        List<Wobugeq> test2=(List<Wobugeq>)ajaxResult2.get("data");
+//
+//        for(Wobugeq wtd:test2)
+//        {
+//            System.out.println(wtd.getBugnum()+"----------------"+wtd.getArrivaltime()+"----------------"+wtd.getProdtdeptopinion());
+//        }
+//        System.out.println("**********************************************************************************");
 //
 //        AjaxResult ajaxResult2 = recommenController.unfinishedList(null,null,"2016-08-22","2020-08-22");
 //

+ 95 - 0
src/test/java/test/WeatherServiceTest.java

@@ -0,0 +1,95 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.weather.WeatherService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Map;
+
+public class WeatherServiceTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+        Calendar c = Calendar.getInstance();
+
+        c.set(Calendar.HOUR_OF_DAY, 0);
+        c.set(Calendar.MINUTE, 0);
+        c.set(Calendar.SECOND, 0);
+        c.set(Calendar.MILLISECOND, 0);
+        c.set(Calendar.DAY_OF_MONTH,24);
+        c.set(Calendar.MONTH,2);
+        c.set(Calendar.YEAR,2021);
+
+        Date date = c.getTime();
+
+        String wtid="MG01_01";
+        WeatherService weatherService= SpringUtils.getBean("weatherService");
+
+
+
+        Map<String, Object> map1= weatherService.getWeatherRealInfo("0");
+        Map<String, Object> map2= weatherService.getWeatherRealInfo("-1");
+        Map<String, Object> map3= weatherService.getWeatherRealInfo("-2");
+        Map<String, Object> map4= weatherService.getWeatherRealInfo("MHS_FDC");
+        Map<String, Object> map5= weatherService.getWeatherRealInfo("MHS02_GC");
+        Map<String, Object> map6= weatherService.getWeatherRealInfo("MHS04_XL");
+        System.out.println(map1);
+//
+//        Map<String, Object> map =healthMainController.findWpMap("MHS_FDC");
+
+//        Map<String, Object> map =healthMainController.findHealthMatrixMap();
+//
+//        System.out.println(map);
+//
+//
+//        Map<String, Object> map =healthMainController.findWpMap("MHS_FDC");
+//
+//
+//        System.out.println(map);
+//
+//        Map<String, Object> map =healthMainController.findHealthMatrixMap();
+//
+//
+//        System.out.println(map);
+//
+//
+//        Map<String, Object> map =healthSubController.findPartHealthInfo(wtid);
+//
+//
+//        System.out.println(map);
+
+
+
+//        Map<String, Object> map1 =healthSubController.initalGzjfx(wtid);
+//        Map<String, Object> map2 =healthSubController.initalYjfx(wtid);
+//        Map<String, Object> map3 =healthSubController.initalYxfx(wtid);
+//        Map<String, Object> map4 =healthSubController.initalXnfx(wtid);
+//        Map<String, Object> map5 =healthSubController.initalShutdown(wtid);
+//        Map<String, Object> map6 =healthSubController.findJudgmentList(wtid);
+//        Map<String, Object> map7 =healthSubController.findQxpcList(wtid);
+//        Map<String, Object> map8 =healthSubController.findWdList(wtid);
+//
+//        Map<String, Object> map1 =healthSubController.gadaytop5(wtid);
+//        Map<String, Object> map2 =healthSubController.queryStopTop10(wtid);
+//        System.out.println(map1.size());
+
+
+//        Map<String, Object> map1 =healthSubController.hsFjValueIndex(wtid);
+//        System.out.println(map1.size());
+        System.out.println("***************************************************************************************");
+
+
+    }
+
+
+
+
+}