Browse Source

单机信息总览图表接口

shilin 4 years ago
parent
commit
506f9ebb85
30 changed files with 517 additions and 109 deletions
  1. 13 8
      pom.xml
  2. 46 0
      src/main/java/com/gyee/frame/common/cache/ApplicationContextHolder.java
  3. 72 0
      src/main/java/com/gyee/frame/common/cache/MybatisRedisCache.java
  4. 52 0
      src/main/java/com/gyee/frame/common/cache/RedisConfig.java
  5. 1 0
      src/main/java/com/gyee/frame/controller/benchmarking/BenchmarkingController.java
  6. 46 0
      src/main/java/com/gyee/frame/controller/singleanalysis/SingleAnalysisController.java
  7. 12 0
      src/main/java/com/gyee/frame/model/custom/SingleAnalysisVo.java
  8. 1 1
      src/main/java/com/gyee/frame/service/WindTurbineInfoDay2Service.java
  9. 1 1
      src/main/java/com/gyee/frame/service/Windturbineinfoday3Service.java
  10. 1 1
      src/main/java/com/gyee/frame/service/WindturbineinfodayService.java
  11. 1 1
      src/main/java/com/gyee/frame/service/WindturbinethewindinfoService.java
  12. 135 0
      src/main/java/com/gyee/frame/service/singleanalysis/SingleAnalysisService.java
  13. 3 2
      src/main/resources/application-dev.yml
  14. 15 6
      src/main/resources/application.yml
  15. 7 7
      src/main/resources/mybatis/auto/ShutdowneventMapper.xml
  16. 7 7
      src/main/resources/mybatis/auto/StatetransitionratesMapper.xml
  17. 1 0
      src/main/resources/mybatis/auto/WindTurbineInfoDay2Mapper.xml
  18. 8 7
      src/main/resources/mybatis/auto/WindTurbineInfoDayMapper.xml
  19. 8 7
      src/main/resources/mybatis/auto/Windpowerinfoday3Mapper.xml
  20. 1 0
      src/main/resources/mybatis/auto/WindpowerinfodayMapper.xml
  21. 7 7
      src/main/resources/mybatis/auto/WindturbineStatusDayStatisticsMapper.xml
  22. 7 7
      src/main/resources/mybatis/auto/WindturbineanalysisdayMapper.xml
  23. 7 7
      src/main/resources/mybatis/auto/WindturbinecurvefittingMapper.xml
  24. 7 7
      src/main/resources/mybatis/auto/WindturbinecurvefittingmonthMapper.xml
  25. 8 7
      src/main/resources/mybatis/auto/Windturbineinfoday3Mapper.xml
  26. 7 7
      src/main/resources/mybatis/auto/Windturbineinfodaytop3Mapper.xml
  27. 7 7
      src/main/resources/mybatis/auto/WindturbinepowercurvefittingMapper.xml
  28. 7 7
      src/main/resources/mybatis/auto/WindturbinethewindinfoMapper.xml
  29. 2 2
      src/test/java/test/BenchmarkingTest.java
  30. 27 3
      src/test/java/test/SingleAnalysisTest.java

+ 13 - 8
pom.xml

@@ -38,11 +38,11 @@
 			<artifactId>mybatis-spring-boot-starter</artifactId>
 			<version>1.3.2</version>
 		</dependency>
-		<dependency>
-			<groupId>org.mybatis.caches</groupId>
-			<artifactId>mybatis-ehcache</artifactId>
-			<version>1.2.1</version>
-		</dependency>
+<!--		<dependency>-->
+<!--			<groupId>org.mybatis.caches</groupId>-->
+<!--			<artifactId>mybatis-ehcache</artifactId>-->
+<!--			<version>1.2.1</version>-->
+<!--		</dependency>-->
 		<!-- SpringBoot 测试 -->
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
@@ -249,10 +249,15 @@
 			<artifactId>tomcat-embed-websocket</artifactId>
 			<version>${tomcat.version}</version>
 		</dependency>
+<!--		<dependency>-->
+<!--			<groupId>redis.clients</groupId>-->
+<!--			<artifactId>jedis</artifactId>-->
+<!--			<version>2.9.0</version>-->
+<!--		</dependency>-->
+
 		<dependency>
-			<groupId>redis.clients</groupId>
-			<artifactId>jedis</artifactId>
-			<version>2.9.0</version>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-data-redis</artifactId>
 		</dependency>
 	</dependencies>
 

+ 46 - 0
src/main/java/com/gyee/frame/common/cache/ApplicationContextHolder.java

@@ -0,0 +1,46 @@
+package com.gyee.frame.common.cache;
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ApplicationContextHolder implements ApplicationContextAware {
+    private static ApplicationContext applicationContext;
+
+    @Override
+    public void setApplicationContext(ApplicationContext ctx) throws BeansException {
+        applicationContext = ctx;
+    }
+
+    /**
+     * Get application context from everywhere
+     *
+     * @return
+     */
+    public static ApplicationContext getApplicationContext() {
+        return applicationContext;
+    }
+
+    /**
+     * Get bean by class
+     *
+     * @param clazz
+     * @param <T>
+     * @return
+     */
+    public static <T> T getBean(Class<T> clazz) {
+        return applicationContext.getBean(clazz);
+    }
+
+    /**
+     * Get bean by class name
+     *
+     * @param name
+     * @param <T>
+     * @return
+     */
+    public static <T> T getBean(String name) {
+        return (T) applicationContext.getBean(name);
+    }
+}

+ 72 - 0
src/main/java/com/gyee/frame/common/cache/MybatisRedisCache.java

@@ -0,0 +1,72 @@
+package com.gyee.frame.common.cache;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.apache.ibatis.cache.Cache;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+public class MybatisRedisCache implements Cache {
+    private static final Logger log = LoggerFactory.getLogger(MybatisRedisCache.class);
+    private String id;
+    private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
+    //private static final long EXPIRE_TIME_IN_MINUTES = 30; // redis过期时间
+
+
+    public MybatisRedisCache(String id) {
+        this.id = id;
+    }
+
+    private RedisTemplate<Object, Object> getRedisTemplate(){
+        return ApplicationContextHolder.getBean("redisTemplate");
+    }
+
+    @Override
+    public String getId() {
+        return id;
+    }
+
+    @Override
+    public void putObject(Object key, Object value) {
+        RedisTemplate redisTemplate = getRedisTemplate();
+        redisTemplate.boundHashOps(getId()).put(key, value);
+        log.info("[结果放入到缓存中: " + key + "=" + value+" ]");
+
+    }
+
+    @Override
+    public Object getObject(Object key) {
+        RedisTemplate redisTemplate = getRedisTemplate();
+        Object value = redisTemplate.boundHashOps(getId()).get(key);
+        log.info("[从缓存中获取了: " + key + "=" + value+" ]");
+        return value;
+    }
+
+    @Override
+    public Object removeObject(Object key) {
+        RedisTemplate redisTemplate = getRedisTemplate();
+        Object value = redisTemplate.boundHashOps(getId()).delete(key);
+        log.info("[从缓存删除了: " + key + "=" + value+" ]");
+        return value;
+    }
+
+    @Override
+    public void clear() {
+        RedisTemplate redisTemplate = getRedisTemplate();
+        redisTemplate.delete(getId());
+        log.info("清空缓存!!!");
+    }
+
+    @Override
+    public int getSize() {
+        RedisTemplate redisTemplate = getRedisTemplate();
+        Long size = redisTemplate.boundHashOps(getId()).size();
+        return size == null ? 0 : size.intValue();
+    }
+
+    @Override
+    public ReadWriteLock getReadWriteLock() {
+        return readWriteLock;
+    }
+}

+ 52 - 0
src/main/java/com/gyee/frame/common/cache/RedisConfig.java

@@ -0,0 +1,52 @@
+package com.gyee.frame.common.cache;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+@Configuration
+public class RedisConfig {
+
+    @Autowired
+    private LettuceConnectionFactory connectionFactory;
+
+    @Bean
+    public RedisTemplate<String,Object> redisTemplate() {
+        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
+        initDomainRedisTemplate(redisTemplate, connectionFactory);
+        return redisTemplate;
+    }
+
+    /**
+     * 设置数据存入 redis 的序列化方式
+     * @param template
+     * @param factory
+     */
+    private void initDomainRedisTemplate(RedisTemplate<String, Object> template, LettuceConnectionFactory factory) {
+        // 定义 key 的序列化方式为 string
+        // 需要注意这里Key使用了 StringRedisSerializer,那么Key只能是String类型的,不能为Long,Integer,否则会报错抛异常。
+        StringRedisSerializer redisSerializer = new StringRedisSerializer();
+        template.setKeySerializer(redisSerializer);
+        // 定义 value 的序列化方式为 json
+        @SuppressWarnings({"rawtypes", "unchecked"})
+        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
+        ObjectMapper om = new ObjectMapper();
+        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
+        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+        jackson2JsonRedisSerializer.setObjectMapper(om);
+        template.setValueSerializer(jackson2JsonRedisSerializer);
+
+        //hash结构的key和value序列化方式
+        template.setHashKeySerializer(jackson2JsonRedisSerializer);
+        template.setHashValueSerializer(jackson2JsonRedisSerializer);
+        template.setEnableTransactionSupport(true);
+        template.setConnectionFactory(factory);
+    }
+}

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

@@ -57,6 +57,7 @@ public class BenchmarkingController {
         }
         PageInfo<Windturbineinfodaytop3> ls=windturbineinfodaytop3Service.gadaylistByPage(tablepar,wpId,tempDate);
 
+
         return	AjaxResult.successData(AjaxStatus.success.code,ls);
 
     }

+ 46 - 0
src/main/java/com/gyee/frame/controller/singleanalysis/SingleAnalysisController.java

@@ -123,4 +123,50 @@ public class SingleAnalysisController {
     }
 
 
+    /**
+     * 单机信息总览图表接口(3个)
+     * @param wtId
+     * @param year
+     * @param month
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/singleanalysisChart")
+    @ResponseBody
+    public AjaxResult singleanalysisChart(String wtId, String year, String month) throws Exception {
+
+        Map<String,List<SingleAnalysisVo>> map =new HashMap<>();
+
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(year) && StringUtils.notEmp(month)) {
+
+            Calendar cal = Calendar.getInstance();
+            cal.set(Calendar.HOUR_OF_DAY, 0);
+            cal.set(Calendar.MINUTE, 0);
+            cal.set(Calendar.SECOND, 0);
+            cal.set(Calendar.MILLISECOND,0);
+
+            cal.set(Calendar.YEAR, Integer.valueOf(year));
+            cal.set(Calendar.MONTH, Integer.valueOf(month) - 1);
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+            Date beginDate = cal.getTime();
+            cal.add(Calendar.MONTH, 1);
+            Date endDate = cal.getTime();
+
+            map =singleAnalysisService.SingleAnalysisListByWtIdDetiml(wtId,beginDate,endDate);
+
+        }
+
+//        map.put("ff",fdlfsls);//发电量和风速
+//        map.put("ws",wsls);//五项损失,绑定五个
+//        map.put("jd",jfpldjsjls);//静风频率和待机时间
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.emptyresultset.code, map);
+        }
+
+    }
+
+
 }

+ 12 - 0
src/main/java/com/gyee/frame/model/custom/SingleAnalysisVo.java

@@ -1,5 +1,7 @@
 package com.gyee.frame.model.custom;
 
+import java.util.Date;
+
 public class SingleAnalysisVo implements java.io.Serializable {
 
     /**
@@ -69,6 +71,16 @@ public class SingleAnalysisVo implements java.io.Serializable {
 	private Double fjrl;
 	//静风频率
 	private Double jfpl;
+	//日期
+	private Date recorddate;
+
+	public Date getRecorddate() {
+		return recorddate;
+	}
+
+	public void setRecorddate(Date recorddate) {
+		this.recorddate = recorddate;
+	}
 
 	public Double getJfpl() {
 		return jfpl;

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

@@ -133,7 +133,7 @@ public class WindTurbineInfoDay2Service implements BaseService<WindTurbineInfoDa
 		if (StringUtils.notEmp(wpId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
 
 			WindTurbineInfoDay2Example example=new WindTurbineInfoDay2Example();
-			example.setOrderByClause("recorddate DESC");
+			example.setOrderByClause("recorddate asc");
 
 			WindTurbineInfoDay2Example.Criteria criteria =example.createCriteria();
 

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

@@ -1453,7 +1453,7 @@ public class Windturbineinfoday3Service implements BaseService<Windturbineinfoda
         if (StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
 
             Windturbineinfoday3Example example=new Windturbineinfoday3Example();
-            example.setOrderByClause("recorddate DESC");
+            example.setOrderByClause("recorddate asc");
 
             Windturbineinfoday3Example.Criteria criteria =example.createCriteria();
 

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

@@ -288,7 +288,7 @@ public class WindturbineinfodayService implements BaseService<WindTurbineInfoDay
 		if (StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
 
 			WindTurbineInfoDayExample example=new WindTurbineInfoDayExample();
-			example.setOrderByClause("recorddate DESC");
+			example.setOrderByClause("recorddate asc");
 
 			WindTurbineInfoDayExample.Criteria criteria =example.createCriteria();
 

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

@@ -123,7 +123,7 @@ public class WindturbinethewindinfoService implements BaseService<Windturbinethe
 		if ( StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
 
 			WindturbinethewindinfoExample example = new WindturbinethewindinfoExample();
-
+			example.setOrderByClause("recorddate asc");
 
 			WindturbinethewindinfoExample.Criteria criteria =example.createCriteria();
 

+ 135 - 0
src/main/java/com/gyee/frame/service/singleanalysis/SingleAnalysisService.java

@@ -11,6 +11,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.*;
 
 
@@ -466,6 +467,140 @@ public class SingleAnalysisService {
     }
 
 
+    public Map<String,List<SingleAnalysisVo>> SingleAnalysisListByWtIdDetiml(String wtId, Date beginDate, Date endDate) {
+
+        Map<String,List<SingleAnalysisVo>> map=new HashMap<>();
+        List<SingleAnalysisVo> fdlfsls = new ArrayList<>();
+        List<SingleAnalysisVo> wsls = new ArrayList<>();
+        List<SingleAnalysisVo> jfpldjsjls = new ArrayList<>();
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+            List<Inputoroutputspeedtotal> iols = inputoroutputspeedtotalService.getInputoroutputspeedtotalbyWtId(wtId, beginDate, endDate);
+            List<WindTurbineInfoDay> wtdayls = windturbineinfodayService.getWindturbineinfodayListByWtId(wtId, beginDate, endDate);
+//            List<WindTurbineInfoDay2> wtday2ls = WindTurbineInfoDay2Service.getWindturbineinfoday2List(wtId, beginDate, endDate);
+            List<Windturbineinfoday3> wtday3ls = windturbineinfoday3Service.getWindturbineinfoday3ListBywtId(wtId, beginDate, endDate);
+            List<Windturbinethewindinfo> wtdls = windturbinethewindinfoService.getWindturbinethewindinfo(wtId, beginDate, endDate);
+
+            Windturbine wt = InitialRunner.wtmap.get(wtId);
+            Windpowerstation wp = InitialRunner.wpmap.get(wt.getWindpowerstationid());
+//            List<Windpowerinfoday> wpls = windpowerinfodayService.getWindpowerinfodayList(wp.getId(), beginDate, endDate);
+
+
+
+            double fdl = 0.0;//风机发电量
+            double yxxs = 0.0;//风机运行小时合计
+            double gzxs = 0.0;//风机故障小时合计
+            double jxxs = 0.0;//风机检修小时合计
+            double tjxs = 0.0;//风机停机小时合计
+            double zdxs = 0.0;//风机中断小时合计
+            double rlxs = 0.0;//风机日历小时合计
+            double fs = 0.0;//风机平均风速
+
+
+            double gzss = 0.0;//风机故障损失合计
+            double jxss = 0.0;//风机检修损失合计
+            double xdss = 0.0;//风机限电损失合计
+            double xnss = 0.0;//风机性能损失时合计
+            double slss = 0.0;//风机受累损失合计
+
+            double jfpl = 0.0;//风机小风切入
+
+
+            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+            Map<String,WindTurbineInfoDay> wtdmap=new HashMap<>();
+            if (StringUtils.notEmp(wtdayls) && !wtdayls.isEmpty()) {
+
+                for(WindTurbineInfoDay wtd:wtdayls)
+                {
+
+                    SingleAnalysisVo vo = new SingleAnalysisVo();
+                    fdl = null != wtd.getGeneratingcapacity2() ? wtd.getGeneratingcapacity2() : 0.0;//风机发电量合计
+                    yxxs = null != wtd.getRuntime() ? wtd.getRuntime() : 0.0;//风机运行小时合计
+                    gzxs = null != wtd.getFaulttime() ? wtd.getFaulttime() : 0.0;//风机故障小时合计
+                    jxxs = null != wtd.getMaintaintime() ? wtd.getMaintaintime() : 0.0;//风机检修小时合计
+                    tjxs = null != wtd.getStoptime() ? wtd.getStoptime() : 0.0;//风机停机小时合计
+                    zdxs = null != wtd.getInterrupttime() ? wtd.getInterrupttime() : 0.0;//风机中断小时合计
+                    rlxs = null != wtd.getDaycalendarhours() ? wtd.getDaycalendarhours() : 0.0;//风机日历小时合计
+                    fs = null != wtd.getSpeed() ? wtd.getSpeed() : 0.0;//风机平均风速
+
+                    vo.setWindPowerStationId(wt.getWindpowerstationid());
+                    vo.setWindPowerStationName(wp.getName());
+                    vo.setWindturbineName(wt.getName());
+                    vo.setWindturbineid(wt.getId());
+                    vo.setRecorddate(wtd.getRecorddate());
+
+                    vo.setFdl(StringUtils.round(fdl, 2));
+                    vo.setYxxs(StringUtils.round(yxxs, 2));
+                    vo.setGzxs(StringUtils.round(gzxs, 2));
+                    vo.setJxxs(StringUtils.round(jxxs, 2));
+                    vo.setTjxs(StringUtils.round(tjxs, 2));
+                    vo.setZdxs(StringUtils.round(zdxs, 2));
+                    vo.setRlxs(StringUtils.round(rlxs, 2));
+                    vo.setFs(StringUtils.round(fs, 2));
+                    fdlfsls.add(vo);
+                    wtdmap.put(df.format(wtd.getRecorddate()),wtd);
+                }
+
+            }
+
+            if (StringUtils.notEmp(wtday3ls) && StringUtils.notEmp(wtday3ls.get(0)) && !wtday3ls.isEmpty()) {
+                for(Windturbineinfoday3 wtd:wtday3ls) {
+
+                    SingleAnalysisVo vo = new SingleAnalysisVo();
+                    gzss = null != wtd.getDaynhxdssdl() ? wtd.getDaynhxdssdl() : 0.0;//风机故障损失合计
+                    jxss = null != wtd.getDaynhwhssdl() ? wtd.getDaynhwhssdl() : 0.0;//风机检修损失合计
+                    xdss = null != wtd.getDaynhxdssdl() ? wtd.getDaynhxdssdl() : 0.0;//风机限电损失合计
+                    xnss = null != wtd.getDaynhqfdl() ? wtd.getDaynhqfdl() : 0.0;//风机性能损失时合计
+                    slss = null != wtd.getDaynhcfdl() ? wtd.getDaynhcfdl() : 0.0;//风机受累损失合计
+
+                    vo.setWindPowerStationId(wt.getWindpowerstationid());
+                    vo.setWindPowerStationName(wp.getName());
+                    vo.setWindturbineName(wt.getName());
+                    vo.setWindturbineid(wt.getId());
+                    vo.setRecorddate(wtd.getRecorddate());
+
+                    vo.setGzss(gzss);
+                    vo.setJxss(jxss);
+                    vo.setXdss(xdss);
+                    vo.setXnss(xnss);
+                    vo.setSlss(slss);
+                    wsls.add(vo);
+                }
+
+            }
+
+
+            if (StringUtils.notEmp(wtdls) && !wtdls.isEmpty()) {
+
+                for(Windturbinethewindinfo wtd:wtdls) {
+
+                    SingleAnalysisVo vo = new SingleAnalysisVo();
+
+                    vo.setRecorddate(wtd.getRecorddate());
+                    jfpl = null != wtd.getCb() ? wtd.getCb() : 0.0;//静风频率
+                    vo.setWindPowerStationId(wt.getWindpowerstationid());
+                    vo.setWindPowerStationName(wp.getName());
+                    vo.setWindturbineName(wt.getName());
+                    vo.setWindturbineid(wt.getId());
+                    vo.setJfpl(StringUtils.round(jfpl, 2));
+                    if(wtdmap.containsKey(df.format(wtd.getRecorddate())))
+                    {
+                        WindTurbineInfoDay wtday=wtdmap.get(df.format(wtd.getRecorddate()));
+                        vo.setTjxs(wtday.getStoptime());
+                    }
+                    jfpldjsjls.add(vo);
+                }
+
+            }
+
+            map.put("ff",fdlfsls);//发电量和风速
+            map.put("ws",wsls);//五项损失,绑定五个
+            map.put("jd",jfpldjsjls);//静风频率和待机时间
+
+        }
+
+        return map;
+    }
     public SingleAnalysisVo SingleAnalysisListByWtId(SingleAnalysisVo vo1, SingleAnalysisVo vo2) {
 
         SingleAnalysisVo vo = new SingleAnalysisVo();

+ 3 - 2
src/main/resources/application-dev.yml

@@ -7,10 +7,11 @@ spring:
     druid:
      #主库数据源
      master:
-        url: jdbc:mysql://49.4.78.143:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
+        url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
         username: root
         password: 123456
-#        url: jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd  49.4.78.143
+
+#        url: jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd49.4.78.143
 #        username: nxfdprod
 #        password: gdnxfd123
 #        driver-class-name: oracle.jdbc.driver.OracleDriver

+ 15 - 6
src/main/resources/application.yml

@@ -82,6 +82,17 @@ spring :
   jackson:
     time-zone: GMT+8
     date-format: yyyy-MM-dd HH:mm:ss
+  redis:
+    database: 0
+    host: 127.0.0.1
+    password: ''
+    pool:
+      max-active: 8
+      max-idle: 8
+      max-wait: -1
+      min-idle: 0
+    port: 6379
+    timeout: 60000
 #mybatis:
 #  #配置mapper的扫描,找到所有的mapper.xml映射文件
 #  mapperLocations : classpath*:mybatis/*/*.xml
@@ -92,12 +103,10 @@ spring :
 #  #该配置项就是指将带有下划线的表字段映射为驼峰格式的实体类属性。
 #  configuration :
 #    map-underscore-to-camel-case : true
-redis :
-  redis_ip: 117.78.18.24
-  redis_port: 6379
-mybatis:
-  configuration :
-    cache-enabled: true
+#mybatis:
+#  configuration:
+#    #开启MyBatis的二级缓存
+#    cache-enabled: false
 #pagehelper分页插件
 pagehelper:
     helperDialect: mysql

+ 7 - 7
src/main/resources/mybatis/auto/ShutdowneventMapper.xml

@@ -1,13 +1,13 @@
 <?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.ShutdowneventMapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Shutdownevent">
     <!--
       WARNING - @mbg.generated

+ 7 - 7
src/main/resources/mybatis/auto/StatetransitionratesMapper.xml

@@ -1,13 +1,13 @@
 <?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.StatetransitionratesMapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Statetransitionrates">
     <!--
       WARNING - @mbg.generated

+ 1 - 0
src/main/resources/mybatis/auto/WindTurbineInfoDay2Mapper.xml

@@ -1,6 +1,7 @@
 <?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.WindTurbineInfoDay2Mapper">
+   <!--<cache type="com.gyee.frame.common.cache.MybatisRedisCache"/>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.WindTurbineInfoDay2">
     <!--
       WARNING - @mbg.generated

+ 8 - 7
src/main/resources/mybatis/auto/WindTurbineInfoDayMapper.xml

@@ -1,13 +1,14 @@
 <?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.WindTurbineInfoDayMapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
+   <!--<cache type="com.gyee.frame.common.cache.MybatisRedisCache"/>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.WindTurbineInfoDay">
     <!--
       WARNING - @mbg.generated

+ 8 - 7
src/main/resources/mybatis/auto/Windpowerinfoday3Mapper.xml

@@ -1,13 +1,14 @@
 <?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.Windpowerinfoday3Mapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
+   <!--<cache type="com.gyee.frame.common.cache.MybatisRedisCache"/>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windpowerinfoday3">
     <!--
       WARNING - @mbg.generated

+ 1 - 0
src/main/resources/mybatis/auto/WindpowerinfodayMapper.xml

@@ -1,6 +1,7 @@
 <?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.WindpowerinfodayMapper">
+   <!--<cache type="com.gyee.frame.common.cache.MybatisRedisCache"/>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windpowerinfoday">
     <!--
       WARNING - @mbg.generated

+ 7 - 7
src/main/resources/mybatis/auto/WindturbineStatusDayStatisticsMapper.xml

@@ -1,13 +1,13 @@
 <?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.WindturbineStatusDayStatisticsMapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.WindturbineStatusDayStatistics">
     <!--
       WARNING - @mbg.generated

+ 7 - 7
src/main/resources/mybatis/auto/WindturbineanalysisdayMapper.xml

@@ -1,13 +1,13 @@
 <?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.WindturbineanalysisdayMapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windturbineanalysisday">
     <!--
       WARNING - @mbg.generated

+ 7 - 7
src/main/resources/mybatis/auto/WindturbinecurvefittingMapper.xml

@@ -1,13 +1,13 @@
 <?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.WindturbinecurvefittingMapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windturbinecurvefitting">
     <!--
       WARNING - @mbg.generated

+ 7 - 7
src/main/resources/mybatis/auto/WindturbinecurvefittingmonthMapper.xml

@@ -1,13 +1,13 @@
 <?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.WindturbinecurvefittingmonthMapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windturbinecurvefittingmonth">
     <!--
       WARNING - @mbg.generated

+ 8 - 7
src/main/resources/mybatis/auto/Windturbineinfoday3Mapper.xml

@@ -1,13 +1,14 @@
 <?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.Windturbineinfoday3Mapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
+   <!--<cache type="com.gyee.frame.common.cache.MybatisRedisCache"/>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windturbineinfoday3">
     <!--
       WARNING - @mbg.generated

+ 7 - 7
src/main/resources/mybatis/auto/Windturbineinfodaytop3Mapper.xml

@@ -1,13 +1,13 @@
 <?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.Windturbineinfodaytop3Mapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windturbineinfodaytop3">
     <!--
       WARNING - @mbg.generated

+ 7 - 7
src/main/resources/mybatis/auto/WindturbinepowercurvefittingMapper.xml

@@ -1,13 +1,13 @@
 <?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.WindturbinepowercurvefittingMapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windturbinepowercurvefitting">
     <!--
       WARNING - @mbg.generated

+ 7 - 7
src/main/resources/mybatis/auto/WindturbinethewindinfoMapper.xml

@@ -1,13 +1,13 @@
 <?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.WindturbinethewindinfoMapper">
-  <cache type="org.mybatis.caches.ehcache.EhcacheCache">
-    <property name="timeToIdleSeconds" value="60"></property><!--&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;-->
-    <property name="timeToLiveSeconds" value="160"></property><!--&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;-->
-    <property name="maxEntriesLocalHeap" value="1000"></property>
-    <property name="maxEntriesLocalDisk" value="10000000"></property>
-    <property name="memoryStoreEvictionPolicy" value="LRU"></property>
-  </cache>
+<!--  <cache type="org.mybatis.caches.ehcache.EhcacheCache">-->
+<!--    <property name="timeToIdleSeconds" value="60"></property>&lt;!&ndash;&lt;!&ndash;当缓存闲置60秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="timeToLiveSeconds" value="160"></property>&lt;!&ndash;&lt;!&ndash;缓存存在160秒后销毁&ndash;&gt;&ndash;&gt;-->
+<!--    <property name="maxEntriesLocalHeap" value="1000"></property>-->
+<!--    <property name="maxEntriesLocalDisk" value="10000000"></property>-->
+<!--    <property name="memoryStoreEvictionPolicy" value="LRU"></property>-->
+<!--  </cache>-->
   <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windturbinethewindinfo">
     <!--
       WARNING - @mbg.generated

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

@@ -35,7 +35,7 @@ public class BenchmarkingTest {
 
         String wpid="MHS_FDC";
 
-        BenchmarkingController dayBenchmarkingController= SpringUtils.getBean("dayBenchmarkingController");
+        BenchmarkingController benchmarkingController= SpringUtils.getBean("benchmarkingController");
 //
 //        AjaxResult ajaxResult = dayBenchmarkingController.gadaylist(wpid,"2021-01-01");
 //
@@ -45,7 +45,7 @@ public class BenchmarkingTest {
         tablepar.setPageNum(1);
         tablepar.setPageSize(10);
 
-        AjaxResult ajaxResult = dayBenchmarkingController.gadaylistByPage(tablepar,wpid,"2021-01-01");
+        AjaxResult ajaxResult = benchmarkingController.gadaylistByPage(tablepar,wpid,"2021-01-01");
 
         PageInfo<Windturbineinfodaytop3> test=(PageInfo<Windturbineinfodaytop3>)ajaxResult.get("data");
         for(Windturbineinfodaytop3 wtd:test.getList())

+ 27 - 3
src/test/java/test/SingleAnalysisTest.java

@@ -4,10 +4,12 @@ import com.gyee.SpringbootStart;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.singleanalysis.SingleAnalysisController;
+import com.gyee.frame.model.custom.SingleAnalysisVo;
 import com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
+import java.util.List;
 import java.util.Map;
 
 public class SingleAnalysisTest {
@@ -43,14 +45,36 @@ public class SingleAnalysisTest {
 //        }
 
 
-        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
-
-        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        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());
+        }
     }