Browse Source

测试功能接口并修复BUG

shilin 4 years ago
parent
commit
bfbae561ac

+ 0 - 40
src/main/java/com/gyee/frame/common/conf/RedisConfig.java

@@ -1,40 +0,0 @@
-package com.gyee.frame.common.conf;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import redis.clients.jedis.JedisPool;
-import redis.clients.jedis.JedisPoolConfig;
-
-/**
- * 读取项目相关配置
- * 
- * @author gyee
- */
-
-@Configuration
-@ConfigurationProperties(prefix = "redis")
-public class RedisConfig
-{
-    public static String redis_ip;
-    public static Integer redis_port;
-
-
-    @Bean(name = "cacheRedis")
-    public static JedisPool cacheRedis()  throws Exception{
-
-        JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
-        jedisPoolConfig.setMaxIdle(2000);
-        jedisPoolConfig.setMaxTotal(20000);
-        jedisPoolConfig.setMaxWaitMillis(5000);
-
-        // 是否启用pool的jmx管理功能, 默认true
-        jedisPoolConfig.setJmxEnabled(true);
-        JedisPool jedisPool = new JedisPool(jedisPoolConfig, redis_ip, redis_port);
-        return jedisPool;
-    }
-
-
-
-
-}

+ 85 - 58
src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -48,19 +48,30 @@ public class InitialRunner implements CommandLineRunner {
     private ModelPowerService modelPowerService;
 
 
-    public static List<Windpowerstation> wpallls = new ArrayList<Windpowerstation>(); // 风电场LIST集合
+    public static List<Windpowerstation> wpallls = new ArrayList<Windpowerstation>(); // 风电场LIST集合(包含光电电)
+    public static List<Project> pjallls = new ArrayList<Project>(); //项目LIST集合(包含光电电)
+    public static List<Line> lineallls = new ArrayList<Line>(); // 线路LIST集合(包含光电电)
+    public static List<Windturbine> wtallls = new ArrayList<Windturbine>(); // 风电机LIST集合(包含光电电)
+
     public static List<Windpowerstation> wpls = new ArrayList<Windpowerstation>(); // 风电场LIST集合
     public static List<Project> pjls = new ArrayList<Project>(); // 项目LIST集合
     public static List<Line> linels = new ArrayList<Line>(); // 线路LIST集合
     public static List<Windturbine> wtls = new ArrayList<Windturbine>(); // 风电机LIST集合
 
-    public static Map<String, Windpowerstation>  wpmap = new HashMap<String, Windpowerstation>();
+
+    public static Map<String, Windpowerstation>  wpmap = new HashMap<String, Windpowerstation>();//风场(包含光电电)
+    public static Map<String, Project> pjmap = new HashMap<String, Project>(); // 项目MAP(包含光电电)
+    public static Map<String, Line> lnmap = new HashMap<String, Line>(); // 线路(包含光电电)
+    public static Map<String, Windturbine>  wtmap = new HashMap<String, Windturbine>();//风机(包含光电电)
+
+
+
+
+
     public static Map<String, Warning2>  warningmap = new HashMap<String, Warning2>();
     public static Map<String, WarningClassify>  warningClassifymap = new HashMap<String, WarningClassify>();
     public static Map<String, Manufacturer>  manufacturermap = new HashMap<String, Manufacturer>();
-    public static Map<String, Project> pjmap = new HashMap<String, Project>(); // 项目MAP
-    public static Map<String, Line> lnmap = new HashMap<String, Line>(); // 线路
-    public static Map<String, Windturbine>  wtmap = new HashMap<String, Windturbine>();
+
     public static Map<String, List<Windturbine>> wp_wtmap = new HashMap<String, List<Windturbine>>();
     public static Map<String, List<Windturbine>> pj_wtmap = new HashMap<String, List<Windturbine>>();
     public static Map<String, List<Windturbine>> ln_wtmap = new HashMap<String, List<Windturbine>>();
@@ -98,23 +109,27 @@ public class InitialRunner implements CommandLineRunner {
         {
             for(Windpowerstation wp:wpallls)
             {
+                if(wp.getId().endsWith("FDC"))
+                {
+                    wpls.add(wp);
+                }
                 wpmap.put(wp.getId(),wp);
             }
         }
 
-        windpowerstationExample=new WindpowerstationExample();
-        windpowerstationExample.setOrderByClause("ordernum ASC");
-        windpowerstationExample.createCriteria().andIdNotLike("%GDC");
-        wpls= windpowerstationService.selectByExample(windpowerstationExample);
 
         ProjectExample projectExample=new ProjectExample();
         projectExample.setOrderByClause("ordernum ASC");
-        projectExample.createCriteria().andWindpowerstationidNotLike("%GDC");
-        pjls= projectService.selectByExample(projectExample);
+ //       projectExample.createCriteria().andWindpowerstationidNotLike("%GDC");
+        pjallls= projectService.selectByExample(projectExample);
 
-        if (!pjls.isEmpty()) {
-            for (Project pj : pjls) {
+        if (!pjallls.isEmpty()) {
+            for (Project pj : pjallls) {
                 pjmap.put(pj.getId(), pj);
+                if(pj.getWindpowerstationid().endsWith("FDC"))
+                {
+                    pjls.add(pj);
+                }
                 if (pjsmap.containsKey(pj.getWindpowerstationid())) {
                     List<Project> pjls = pjsmap.get(pj.getWindpowerstationid());
                     pjls.add(pj);
@@ -130,11 +145,19 @@ public class InitialRunner implements CommandLineRunner {
         LineExample lineExample=new LineExample();
         lineExample.setOrderByClause("ordernum ASC");
         lineExample.createCriteria().getAllCriteria();
-        linels= lineService.selectByExample(lineExample);
+        lineallls= lineService.selectByExample(lineExample);
 
-        if (!linels.isEmpty()) {
-            for (Line ln : linels) {
+        if (!lineallls.isEmpty()) {
+            for (Line ln : lineallls) {
                 lnmap.put(ln.getId(), ln);
+                if(pjmap.containsKey(ln.getProjectid()))
+                {
+                    Project pj=pjmap.get(ln.getProjectid());
+                    if(pj.getWindpowerstationid().endsWith("FDC"))
+                    {
+                        linels.add(ln);
+                    }
+                }
                 if (lnsmap.containsKey(ln.getProjectid())) {
                     List<Line> lnls = lnsmap.get(ln.getProjectid());
                     lnls.add(ln);
@@ -150,12 +173,16 @@ public class InitialRunner implements CommandLineRunner {
         WindturbineExample windturbineExample=new WindturbineExample();
         windturbineExample.setOrderByClause("id ASC");
         windturbineExample.createCriteria().andWindpowerstationidNotLike("%GDC");
-        wtls= windturbineService.selectByExample(windturbineExample);
+        wtallls= windturbineService.selectByExample(windturbineExample);
 
-        if(!wtls.isEmpty())
+        if(!wtallls.isEmpty())
         {
-            for(Windturbine wt:wtls)
+            for(Windturbine wt:wtallls)
             {
+                if(wt.getWindpowerstationid().endsWith("FDC"))
+                {
+                    wtls.add(wt);
+                }
                 wtmap.put(wt.getId(),wt);
             }
         }
@@ -235,45 +262,45 @@ public class InitialRunner implements CommandLineRunner {
         }
 
 
-        WindPowerStationTestingPoint2Example windPowerstationTestingPointExample=new WindPowerStationTestingPoint2Example();
-        windPowerstationTestingPointExample.createCriteria().getAllCriteria();
-        List<WindPowerStationTestingPoint2> wpPointlist= windPowerstationTestingPointService.selectByExample(windPowerstationTestingPointExample);
-
-        Map<String,WindPowerStationTestingPoint2> items=null;
-        if(wpPointlist!=null && !wpPointlist.isEmpty()){
-            for(int i=0;i<wpPointlist.size();i++){
-                WindPowerStationTestingPoint2 point=wpPointlist.get(i);
-                if(stationPointmap.containsKey(point.getWindpowerstationid())){
-                    items=stationPointmap.get(point.getWindpowerstationid());
-                    items.put(point.getUniformcode(), point);
-                }
-                else{
-                    items=new HashMap<String,WindPowerStationTestingPoint2>();
-                    stationPointmap.put(point.getWindpowerstationid(), items);
-                    items.put(point.getUniformcode(), point);
-                }
-
-            }
-        }
-
-        WindTurbineTestingPointAi2Example windTurbineTestingPointAiExample=new WindTurbineTestingPointAi2Example();
-        windTurbineTestingPointAiExample.createCriteria().getAllCriteria();
-        List<WindTurbineTestingPointAi2> wtAilist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
-
-        Map<String, WindTurbineTestingPointAi2> map = null;
-
-        if(wtAilist != null && !wtAilist.isEmpty()){
-            for(WindTurbineTestingPointAi2 mp : wtAilist){
-                if(wtpAimap.containsKey(mp.getWindturbineid())){
-                    map = wtpAimap.get(mp.getWindturbineid());
-                    map.put(mp.getUniformcode(), mp);
-                }else{
-                    map = new HashMap<String, WindTurbineTestingPointAi2>();
-                    map.put(mp.getUniformcode(), mp);
-                    wtpAimap.put(mp.getWindturbineid(), map);
-                }
-            }
-        }
+//        WindPowerStationTestingPoint2Example windPowerstationTestingPointExample=new WindPowerStationTestingPoint2Example();
+//        windPowerstationTestingPointExample.createCriteria().getAllCriteria();
+//        List<WindPowerStationTestingPoint2> wpPointlist= windPowerstationTestingPointService.selectByExample(windPowerstationTestingPointExample);
+//
+//        Map<String,WindPowerStationTestingPoint2> items=null;
+//        if(wpPointlist!=null && !wpPointlist.isEmpty()){
+//            for(int i=0;i<wpPointlist.size();i++){
+//                WindPowerStationTestingPoint2 point=wpPointlist.get(i);
+//                if(stationPointmap.containsKey(point.getWindpowerstationid())){
+//                    items=stationPointmap.get(point.getWindpowerstationid());
+//                    items.put(point.getUniformcode(), point);
+//                }
+//                else{
+//                    items=new HashMap<String,WindPowerStationTestingPoint2>();
+//                    stationPointmap.put(point.getWindpowerstationid(), items);
+//                    items.put(point.getUniformcode(), point);
+//                }
+//
+//            }
+//        }
+//
+//        WindTurbineTestingPointAi2Example windTurbineTestingPointAiExample=new WindTurbineTestingPointAi2Example();
+//        windTurbineTestingPointAiExample.createCriteria().getAllCriteria();
+//        List<WindTurbineTestingPointAi2> wtAilist= windTurbineTestingPointAiService.selectByExample(windTurbineTestingPointAiExample);
+//
+//        Map<String, WindTurbineTestingPointAi2> map = null;
+//
+//        if(wtAilist != null && !wtAilist.isEmpty()){
+//            for(WindTurbineTestingPointAi2 mp : wtAilist){
+//                if(wtpAimap.containsKey(mp.getWindturbineid())){
+//                    map = wtpAimap.get(mp.getWindturbineid());
+//                    map.put(mp.getUniformcode(), mp);
+//                }else{
+//                    map = new HashMap<String, WindTurbineTestingPointAi2>();
+//                    map.put(mp.getUniformcode(), mp);
+//                    wtpAimap.put(mp.getWindturbineid(), map);
+//                }
+//            }
+//        }
 
         EquipmentmodelExample example=new EquipmentmodelExample();
         List<Equipmentmodel> mlls = equipmentmodelService.selectByExample(example);

+ 2 - 2
src/main/java/com/gyee/frame/controller/goodness/WindturbinegoodnessController.java

@@ -32,9 +32,9 @@ public class WindturbinegoodnessController {
      */
     @PostMapping("/windturbinegoodness")
     @ResponseBody
-    public AjaxResult windturbinegoodness(Tablepar tablepar, String wtId, String recorddate) {
+    public AjaxResult windturbinegoodness(Tablepar tablepar, String wpId, String recorddate) {
 
-        PageInfo<Windturbinegoodness> resultList = windturbinegoodnessService.windturbinegoodnessList(tablepar, wtId, recorddate);
+        PageInfo<Windturbinegoodness> resultList = windturbinegoodnessService.windturbinegoodnessList(tablepar, wpId, recorddate);
         if (resultList != null) {
             return AjaxResult.successData(AjaxStatus.success.code, resultList);
         } else {

+ 79 - 0
src/main/java/com/gyee/frame/controller/projectplan/ProjectPlanController.java

@@ -0,0 +1,79 @@
+package com.gyee.frame.controller.projectplan;
+
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.Inputoroutputspeedtotal;
+import com.gyee.frame.model.custom.ProjectPlanVo;
+import com.gyee.frame.service.ProjectPlanService;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Controller
+@RequestMapping("/projectplan")
+public class ProjectPlanController {
+
+    @Autowired
+    private ProjectPlanService projectPlanService;
+
+    /**计划发电量列表**/
+    @PostMapping("/getProjectPlanVo")
+    @ResponseBody
+    public AjaxResult getProjectPlanVo(String wpId, String pjId, String year)  {
+
+        List<ProjectPlanVo> vos=new ArrayList<>();
+        if (StringUtils.notEmp(year))
+        {
+            vos=projectPlanService.getProjectPlanVo(wpId, pjId, year);
+        }
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+        }
+
+    }
+
+    /**返回计划发电量修改对象**/
+    @PostMapping("/getSingleProjectPlan")
+    @ResponseBody
+    public AjaxResult getSingleProjectPlan(String projectid, String year) {
+
+        if (StringUtils.notEmp(projectid) && StringUtils.notEmp(year))
+        {
+            ProjectPlanVo  vo=projectPlanService.getSingleProjectPlan(projectid,year);
+
+            return AjaxResult.successData(AjaxStatus.success.code, vo);
+        }
+
+
+        return AjaxResult.successData(AjaxStatus.emptyresultset.code, new ProjectPlanVo());
+    }
+
+    /**计划发电量添加和修改**/
+    @PostMapping("/saveData")
+    @ResponseBody
+    public AjaxResult saveData(ProjectPlanVo vo) {
+
+        List<Inputoroutputspeedtotal> vos=new ArrayList<>();
+        if (StringUtils.notEmp(vo))
+        {
+
+           int value=projectPlanService.saveData(vo);
+            return AjaxResult.successData(AjaxStatus.success.code, value);
+        }
+
+        return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+
+    }
+
+
+
+}

+ 1 - 1
src/main/java/com/gyee/frame/model/auto/WindpowerstationthewindinfoExample.java

@@ -1,6 +1,6 @@
 package com.gyee.frame.model.auto;
 
-import java.math.Double;
+
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;

+ 18 - 19
src/main/java/com/gyee/frame/model/auto/Windturbinegoodness.java

@@ -1,7 +1,6 @@
 package com.gyee.frame.model.auto;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 import java.util.Date;
 
 public class Windturbinegoodness implements Serializable {
@@ -30,7 +29,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    private BigDecimal daygoodness;
+    private Double daygoodness;
 
     /**
      *
@@ -39,7 +38,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    private BigDecimal monthgoodness;
+    private Double monthgoodness;
 
     /**
      *
@@ -48,7 +47,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    private BigDecimal yeargoodness;
+    private Double yeargoodness;
 
     /**
      *
@@ -111,7 +110,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    private BigDecimal dayspeed;
+    private Double dayspeed;
 
     /**
      *
@@ -120,7 +119,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    private BigDecimal monthspeed;
+    private Double monthspeed;
 
     /**
      *
@@ -129,7 +128,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    private BigDecimal yearspeed;
+    private Double yearspeed;
 
     /**
      * This field was generated by MyBatis Generator.
@@ -195,7 +194,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public BigDecimal getDaygoodness() {
+    public Double getDaygoodness() {
         return daygoodness;
     }
 
@@ -207,7 +206,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public void setDaygoodness(BigDecimal daygoodness) {
+    public void setDaygoodness(Double daygoodness) {
         this.daygoodness = daygoodness;
     }
 
@@ -219,7 +218,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public BigDecimal getMonthgoodness() {
+    public Double getMonthgoodness() {
         return monthgoodness;
     }
 
@@ -231,7 +230,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public void setMonthgoodness(BigDecimal monthgoodness) {
+    public void setMonthgoodness(Double monthgoodness) {
         this.monthgoodness = monthgoodness;
     }
 
@@ -243,7 +242,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public BigDecimal getYeargoodness() {
+    public Double getYeargoodness() {
         return yeargoodness;
     }
 
@@ -255,7 +254,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public void setYeargoodness(BigDecimal yeargoodness) {
+    public void setYeargoodness(Double yeargoodness) {
         this.yeargoodness = yeargoodness;
     }
 
@@ -411,7 +410,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public BigDecimal getDayspeed() {
+    public Double getDayspeed() {
         return dayspeed;
     }
 
@@ -423,7 +422,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public void setDayspeed(BigDecimal dayspeed) {
+    public void setDayspeed(Double dayspeed) {
         this.dayspeed = dayspeed;
     }
 
@@ -435,7 +434,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public BigDecimal getMonthspeed() {
+    public Double getMonthspeed() {
         return monthspeed;
     }
 
@@ -447,7 +446,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public void setMonthspeed(BigDecimal monthspeed) {
+    public void setMonthspeed(Double monthspeed) {
         this.monthspeed = monthspeed;
     }
 
@@ -459,7 +458,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public BigDecimal getYearspeed() {
+    public Double getYearspeed() {
         return yearspeed;
     }
 
@@ -471,7 +470,7 @@ public class Windturbinegoodness implements Serializable {
      *
      * @mbg.generated
      */
-    public void setYearspeed(BigDecimal yearspeed) {
+    public void setYearspeed(Double yearspeed) {
         this.yearspeed = yearspeed;
     }
 }

+ 60 - 61
src/main/java/com/gyee/frame/model/auto/WindturbinegoodnessExample.java

@@ -1,6 +1,5 @@
 package com.gyee.frame.model.auto;
 
-import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
@@ -363,52 +362,52 @@ public class WindturbinegoodnessExample {
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessEqualTo(BigDecimal value) {
+        public Criteria andDaygoodnessEqualTo(Double value) {
             addCriterion("dayGoodness =", value, "daygoodness");
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessNotEqualTo(BigDecimal value) {
+        public Criteria andDaygoodnessNotEqualTo(Double value) {
             addCriterion("dayGoodness <>", value, "daygoodness");
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessGreaterThan(BigDecimal value) {
+        public Criteria andDaygoodnessGreaterThan(Double value) {
             addCriterion("dayGoodness >", value, "daygoodness");
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andDaygoodnessGreaterThanOrEqualTo(Double value) {
             addCriterion("dayGoodness >=", value, "daygoodness");
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessLessThan(BigDecimal value) {
+        public Criteria andDaygoodnessLessThan(Double value) {
             addCriterion("dayGoodness <", value, "daygoodness");
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andDaygoodnessLessThanOrEqualTo(Double value) {
             addCriterion("dayGoodness <=", value, "daygoodness");
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessIn(List<BigDecimal> values) {
+        public Criteria andDaygoodnessIn(List<Double> values) {
             addCriterion("dayGoodness in", values, "daygoodness");
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessNotIn(List<BigDecimal> values) {
+        public Criteria andDaygoodnessNotIn(List<Double> values) {
             addCriterion("dayGoodness not in", values, "daygoodness");
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andDaygoodnessBetween(Double value1, Double value2) {
             addCriterion("dayGoodness between", value1, value2, "daygoodness");
             return (Criteria) this;
         }
 
-        public Criteria andDaygoodnessNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andDaygoodnessNotBetween(Double value1, Double value2) {
             addCriterion("dayGoodness not between", value1, value2, "daygoodness");
             return (Criteria) this;
         }
@@ -423,52 +422,52 @@ public class WindturbinegoodnessExample {
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessEqualTo(BigDecimal value) {
+        public Criteria andMonthgoodnessEqualTo(Double value) {
             addCriterion("monthGoodness =", value, "monthgoodness");
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessNotEqualTo(BigDecimal value) {
+        public Criteria andMonthgoodnessNotEqualTo(Double value) {
             addCriterion("monthGoodness <>", value, "monthgoodness");
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessGreaterThan(BigDecimal value) {
+        public Criteria andMonthgoodnessGreaterThan(Double value) {
             addCriterion("monthGoodness >", value, "monthgoodness");
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andMonthgoodnessGreaterThanOrEqualTo(Double value) {
             addCriterion("monthGoodness >=", value, "monthgoodness");
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessLessThan(BigDecimal value) {
+        public Criteria andMonthgoodnessLessThan(Double value) {
             addCriterion("monthGoodness <", value, "monthgoodness");
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andMonthgoodnessLessThanOrEqualTo(Double value) {
             addCriterion("monthGoodness <=", value, "monthgoodness");
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessIn(List<BigDecimal> values) {
+        public Criteria andMonthgoodnessIn(List<Double> values) {
             addCriterion("monthGoodness in", values, "monthgoodness");
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessNotIn(List<BigDecimal> values) {
+        public Criteria andMonthgoodnessNotIn(List<Double> values) {
             addCriterion("monthGoodness not in", values, "monthgoodness");
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andMonthgoodnessBetween(Double value1, Double value2) {
             addCriterion("monthGoodness between", value1, value2, "monthgoodness");
             return (Criteria) this;
         }
 
-        public Criteria andMonthgoodnessNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andMonthgoodnessNotBetween(Double value1, Double value2) {
             addCriterion("monthGoodness not between", value1, value2, "monthgoodness");
             return (Criteria) this;
         }
@@ -483,52 +482,52 @@ public class WindturbinegoodnessExample {
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessEqualTo(BigDecimal value) {
+        public Criteria andYeargoodnessEqualTo(Double value) {
             addCriterion("yearGoodness =", value, "yeargoodness");
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessNotEqualTo(BigDecimal value) {
+        public Criteria andYeargoodnessNotEqualTo(Double value) {
             addCriterion("yearGoodness <>", value, "yeargoodness");
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessGreaterThan(BigDecimal value) {
+        public Criteria andYeargoodnessGreaterThan(Double value) {
             addCriterion("yearGoodness >", value, "yeargoodness");
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andYeargoodnessGreaterThanOrEqualTo(Double value) {
             addCriterion("yearGoodness >=", value, "yeargoodness");
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessLessThan(BigDecimal value) {
+        public Criteria andYeargoodnessLessThan(Double value) {
             addCriterion("yearGoodness <", value, "yeargoodness");
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andYeargoodnessLessThanOrEqualTo(Double value) {
             addCriterion("yearGoodness <=", value, "yeargoodness");
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessIn(List<BigDecimal> values) {
+        public Criteria andYeargoodnessIn(List<Double> values) {
             addCriterion("yearGoodness in", values, "yeargoodness");
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessNotIn(List<BigDecimal> values) {
+        public Criteria andYeargoodnessNotIn(List<Double> values) {
             addCriterion("yearGoodness not in", values, "yeargoodness");
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andYeargoodnessBetween(Double value1, Double value2) {
             addCriterion("yearGoodness between", value1, value2, "yeargoodness");
             return (Criteria) this;
         }
 
-        public Criteria andYeargoodnessNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andYeargoodnessNotBetween(Double value1, Double value2) {
             addCriterion("yearGoodness not between", value1, value2, "yeargoodness");
             return (Criteria) this;
         }
@@ -923,52 +922,52 @@ public class WindturbinegoodnessExample {
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedEqualTo(BigDecimal value) {
+        public Criteria andDayspeedEqualTo(Double value) {
             addCriterion("dayspeed =", value, "dayspeed");
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedNotEqualTo(BigDecimal value) {
+        public Criteria andDayspeedNotEqualTo(Double value) {
             addCriterion("dayspeed <>", value, "dayspeed");
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedGreaterThan(BigDecimal value) {
+        public Criteria andDayspeedGreaterThan(Double value) {
             addCriterion("dayspeed >", value, "dayspeed");
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andDayspeedGreaterThanOrEqualTo(Double value) {
             addCriterion("dayspeed >=", value, "dayspeed");
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedLessThan(BigDecimal value) {
+        public Criteria andDayspeedLessThan(Double value) {
             addCriterion("dayspeed <", value, "dayspeed");
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andDayspeedLessThanOrEqualTo(Double value) {
             addCriterion("dayspeed <=", value, "dayspeed");
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedIn(List<BigDecimal> values) {
+        public Criteria andDayspeedIn(List<Double> values) {
             addCriterion("dayspeed in", values, "dayspeed");
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedNotIn(List<BigDecimal> values) {
+        public Criteria andDayspeedNotIn(List<Double> values) {
             addCriterion("dayspeed not in", values, "dayspeed");
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andDayspeedBetween(Double value1, Double value2) {
             addCriterion("dayspeed between", value1, value2, "dayspeed");
             return (Criteria) this;
         }
 
-        public Criteria andDayspeedNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andDayspeedNotBetween(Double value1, Double value2) {
             addCriterion("dayspeed not between", value1, value2, "dayspeed");
             return (Criteria) this;
         }
@@ -983,52 +982,52 @@ public class WindturbinegoodnessExample {
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedEqualTo(BigDecimal value) {
+        public Criteria andMonthspeedEqualTo(Double value) {
             addCriterion("monthspeed =", value, "monthspeed");
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedNotEqualTo(BigDecimal value) {
+        public Criteria andMonthspeedNotEqualTo(Double value) {
             addCriterion("monthspeed <>", value, "monthspeed");
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedGreaterThan(BigDecimal value) {
+        public Criteria andMonthspeedGreaterThan(Double value) {
             addCriterion("monthspeed >", value, "monthspeed");
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andMonthspeedGreaterThanOrEqualTo(Double value) {
             addCriterion("monthspeed >=", value, "monthspeed");
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedLessThan(BigDecimal value) {
+        public Criteria andMonthspeedLessThan(Double value) {
             addCriterion("monthspeed <", value, "monthspeed");
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andMonthspeedLessThanOrEqualTo(Double value) {
             addCriterion("monthspeed <=", value, "monthspeed");
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedIn(List<BigDecimal> values) {
+        public Criteria andMonthspeedIn(List<Double> values) {
             addCriterion("monthspeed in", values, "monthspeed");
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedNotIn(List<BigDecimal> values) {
+        public Criteria andMonthspeedNotIn(List<Double> values) {
             addCriterion("monthspeed not in", values, "monthspeed");
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andMonthspeedBetween(Double value1, Double value2) {
             addCriterion("monthspeed between", value1, value2, "monthspeed");
             return (Criteria) this;
         }
 
-        public Criteria andMonthspeedNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andMonthspeedNotBetween(Double value1, Double value2) {
             addCriterion("monthspeed not between", value1, value2, "monthspeed");
             return (Criteria) this;
         }
@@ -1043,52 +1042,52 @@ public class WindturbinegoodnessExample {
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedEqualTo(BigDecimal value) {
+        public Criteria andYearspeedEqualTo(Double value) {
             addCriterion("yearspeed =", value, "yearspeed");
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedNotEqualTo(BigDecimal value) {
+        public Criteria andYearspeedNotEqualTo(Double value) {
             addCriterion("yearspeed <>", value, "yearspeed");
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedGreaterThan(BigDecimal value) {
+        public Criteria andYearspeedGreaterThan(Double value) {
             addCriterion("yearspeed >", value, "yearspeed");
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andYearspeedGreaterThanOrEqualTo(Double value) {
             addCriterion("yearspeed >=", value, "yearspeed");
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedLessThan(BigDecimal value) {
+        public Criteria andYearspeedLessThan(Double value) {
             addCriterion("yearspeed <", value, "yearspeed");
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andYearspeedLessThanOrEqualTo(Double value) {
             addCriterion("yearspeed <=", value, "yearspeed");
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedIn(List<BigDecimal> values) {
+        public Criteria andYearspeedIn(List<Double> values) {
             addCriterion("yearspeed in", values, "yearspeed");
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedNotIn(List<BigDecimal> values) {
+        public Criteria andYearspeedNotIn(List<Double> values) {
             addCriterion("yearspeed not in", values, "yearspeed");
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andYearspeedBetween(Double value1, Double value2) {
             addCriterion("yearspeed between", value1, value2, "yearspeed");
             return (Criteria) this;
         }
 
-        public Criteria andYearspeedNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andYearspeedNotBetween(Double value1, Double value2) {
             addCriterion("yearspeed not between", value1, value2, "yearspeed");
             return (Criteria) this;
         }

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

@@ -120,11 +120,12 @@ public class InputoroutputspeedtotalService implements BaseService<Inputoroutput
 			if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate)) {
 
 				InputoroutputspeedtotalExample.Criteria criteria =example.createCriteria();
-				example.createCriteria().andWindpowerstationidEqualTo(wpId);
+				criteria.andWindpowerstationidEqualTo(wpId);
 
-				list = inputoroutputspeedtotalMapper.selectByExample(example);
 				Date endDate= DateUtils.addDays(recorddate,1);
 				criteria.andRecorddateGreaterThanOrEqualTo(recorddate).andRecorddateLessThan(endDate);
+				list = inputoroutputspeedtotalMapper.selectByExample(example);
+
 			} else {
 				list = new ArrayList<>();
 			}
@@ -146,11 +147,11 @@ public class InputoroutputspeedtotalService implements BaseService<Inputoroutput
 			if (StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate)) {
 
 				InputoroutputspeedtotalExample.Criteria criteria =example.createCriteria();
-				example.createCriteria().andWindturbineidEqualTo(wtId);
-
-				list = inputoroutputspeedtotalMapper.selectByExample(example);
+				criteria.andWindturbineidEqualTo(wtId);
 				Date endDate= DateUtils.addDays(recorddate,1);
 				criteria.andRecorddateGreaterThanOrEqualTo(recorddate).andRecorddateLessThan(endDate);
+				list = inputoroutputspeedtotalMapper.selectByExample(example);
+
 			} else {
 				list = new ArrayList<>();
 			}

+ 40 - 36
src/main/java/com/gyee/frame/service/ProjectPlanService.java

@@ -4,6 +4,7 @@ import com.gyee.frame.common.base.BaseService;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.ProjectPlanMapper;
+import com.gyee.frame.model.auto.Project;
 import com.gyee.frame.model.auto.ProjectPlan;
 import com.gyee.frame.model.auto.ProjectPlanExample;
 import com.gyee.frame.model.custom.ProjectPlanVo;
@@ -100,26 +101,26 @@ public class ProjectPlanService implements BaseService<ProjectPlan, ProjectPlanE
     public List<ProjectPlanVo> getProjectPlanVo(String wpId, String pjId, String year) {
 
 
-        List<ProjectPlanVo> list = new ArrayList<>();
+		List<ProjectPlanVo> list = new ArrayList<>();
 
 
-        ProjectPlanExample example = new ProjectPlanExample();
-        example.setOrderByClause("projectid asc");
-
-        ProjectPlanExample.Criteria criteria = example.createCriteria();
-        if (StringUtils.notEmp(wpId)) {
-            example.createCriteria().andWindpoweridEqualTo(wpId);
-        }
-        if (StringUtils.notEmp(pjId)) {
-            example.createCriteria().andProjectidEqualTo(pjId);
-        }
-        if (StringUtils.notEmp(year)) {
-            example.createCriteria().andYearEqualTo(year);
-        }
+		ProjectPlanExample example = new ProjectPlanExample();
+		example.setOrderByClause("projectid asc");
+
+		ProjectPlanExample.Criteria criteria = example.createCriteria();
+		if (StringUtils.notEmp(wpId)) {
+			criteria.andWindpoweridEqualTo(wpId);
+		}
+		if (StringUtils.notEmp(pjId)) {
+			criteria.andProjectidEqualTo(pjId);
+		}
+		if (StringUtils.notEmp(year)) {
+			criteria.andYearEqualTo(year);
+		}
 
 		List<ProjectPlan> ls = projectPlanMapper.selectByExample(example);
 
-        if(!list.isEmpty())
+		if(!ls.isEmpty())
 		{
 			for(ProjectPlan pp:ls)
 			{
@@ -131,16 +132,17 @@ public class ProjectPlanService implements BaseService<ProjectPlan, ProjectPlanE
 				event.setProjectid(pp.getProjectid());
 				event.setWindpower(pp.getWindpowerid());
 				event.setYear(pp.getYear());
-				event.setProjectName(InitialRunner.pjmap.get(event.getProjectid()).getName());
-				event.setWindpowerName(InitialRunner.wpmap.get(event.getWindpower()).getName());
-			}
-		}
-
-        return list;
+				if(InitialRunner.pjmap.containsKey(pp.getProjectid()))
+				{
+					Project project=InitialRunner.pjmap.get(pp.getProjectid());
+					event.setProjectName(project.getName());
+				}
 
-    }
+				event.setWindpowerName(InitialRunner.wpmap.get(pp.getWindpowerid()).getName());
+				list.add(event);
+			}
 
-	public List<ProjectPlanVo> getProjectPlanVo(List<ProjectPlanVo> list,String year) {
+		}
 
 		String currentWindpowerStation="",currentProject="";
 		Map<String,ProjectPlanVo> retValue=new TreeMap<String,ProjectPlanVo>();
@@ -298,16 +300,16 @@ public class ProjectPlanService implements BaseService<ProjectPlan, ProjectPlanE
 		ProjectPlanExample.Criteria criteria = example.createCriteria();
 
 		if (StringUtils.notEmp(projectid)) {
-			example.createCriteria().andProjectidEqualTo(projectid);
+			criteria.andProjectidEqualTo(projectid);
 		}
 
 		if (StringUtils.notEmp(year)) {
-			example.createCriteria().andYearEqualTo(year);
+			criteria.andYearEqualTo(year);
 		}
 
 		List<ProjectPlan> ls = projectPlanMapper.selectByExample(example);
 
-		if(!list.isEmpty())
+		if(!ls.isEmpty())
 		{
 			for(ProjectPlan pp:ls)
 			{
@@ -319,8 +321,9 @@ public class ProjectPlanService implements BaseService<ProjectPlan, ProjectPlanE
 				event.setProjectid(pp.getProjectid());
 				event.setWindpower(pp.getWindpowerid());
 				event.setYear(pp.getYear());
-				event.setProjectName(InitialRunner.pjmap.get(event.getProjectid()).getName());
-				event.setWindpowerName(InitialRunner.wpmap.get(event.getWindpower()).getName());
+				event.setProjectName(InitialRunner.pjmap.get(pp.getProjectid()).getName());
+				event.setWindpowerName(InitialRunner.wpmap.get(pp.getWindpowerid()).getName());
+				list.add(event);
 			}
 		}
 
@@ -387,13 +390,12 @@ public class ProjectPlanService implements BaseService<ProjectPlan, ProjectPlanE
 		example.setOrderByClause("month asc");
 
 		ProjectPlanExample.Criteria criteria = example.createCriteria();
-
 		if (StringUtils.notEmp(vo.getProjectid())) {
-			example.createCriteria().andProjectidEqualTo(vo.getProjectid());
+			criteria.andProjectidEqualTo(vo.getProjectid());
 		}
 
 		if (StringUtils.notEmp(vo.getYear())) {
-			example.createCriteria().andYearEqualTo(vo.getYear());
+			criteria.andYearEqualTo(vo.getYear());
 		}
 
 		List<ProjectPlan> ls = projectPlanMapper.selectByExample(example);
@@ -407,27 +409,29 @@ public class ProjectPlanService implements BaseService<ProjectPlan, ProjectPlanE
 
 		List<ProjectPlan> list=new ArrayList<ProjectPlan>();
 
-		for(int i=0;i<12;i++)
+		for(int i=1;i<13;i++)
 		{
 			ProjectPlan po=new ProjectPlan();
+			po.setProjectid(vo.getProjectid());
 			po.setWindpowerid(vo.getWindpower());
 			po.setYear(vo.getYear());
-			po.setMonth(String.valueOf(++i));
+			po.setMonth(String.valueOf(i));
 			list.add(po);
 		}
 
 		ProjectPlan po=new ProjectPlan();
+		po.setProjectid(vo.getProjectid());
 		po.setWindpowerid(vo.getWindpower());
 		po.setYear(vo.getYear());
 		list.add(po);
 
 		for(ProjectPlan pp:list)
 		{
-			if(StringUtils.empty(vo.getMonth())){
+			if(StringUtils.empty(pp.getMonth())){
 				pp.setGeneratingcapacity(vo.getGeneratingcapacity());
 			}
 			else{
-				int index=Integer.parseInt(vo.getMonth());
+				int index=Integer.parseInt(pp.getMonth());
 				switch(index){
 					case 1:
 						pp.setGeneratingcapacity(vo.getGc01());
@@ -470,7 +474,7 @@ public class ProjectPlanService implements BaseService<ProjectPlan, ProjectPlanE
 		}
 
 		int value=0;
-		for(ProjectPlan pp:ls)
+		for(ProjectPlan pp:list)
 		{
 			value=insertSelective(pp);
 		}

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

@@ -120,7 +120,7 @@ public class WindturbinecurvefittingmonthService implements BaseService<Windturb
 		cal.setTime(date);
 
 		criteria.andYearEqualTo(String.valueOf(cal.get(Calendar.YEAR)));
-		criteria.andYearEqualTo(String.valueOf(cal.get(Calendar.MONTH)+1));
+		criteria.andMonthEqualTo(String.valueOf(cal.get(Calendar.MONTH)+1));
 
 
 		list= windturbinecurvefittingmonthMapper.selectByExample(example);

+ 0 - 73
src/main/java/com/gyee/frame/util/JedisPoolUtil.java

@@ -1,73 +0,0 @@
-package com.gyee.frame.util;
-
-import com.gyee.frame.model.custom.PointData;
-import org.apache.commons.collections.map.LinkedMap;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Component;
-import redis.clients.jedis.Jedis;
-import redis.clients.jedis.JedisPool;
-import redis.clients.jedis.Pipeline;
-import redis.clients.jedis.Response;
-
-import javax.annotation.Resource;
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * ClassName:JedisPool <br/>
- *
- * @author 石林
- * @see
- * @since JDK 1.8
- */
-@Component
-public class JedisPoolUtil {
-
-    @Resource
-    @Qualifier("cacheRedis")
-    private JedisPool jedisPool;// 非切片连接池
-
-
-    /**
-     * 释放jedis资源
-     *
-     * @param jedis
-     */
-    public static void returnResource(final Jedis jedis) {
-        if (jedis != null) {
-            jedis.close();
-        }
-    }
-
-    public PointData getRealData(String code) throws IOException {
-
-        PointData po = new PointData();
-
-
-
-        Map<String, Response<String>> resmap = new LinkedMap();
-
-        Jedis jedis = jedisPool.getResource();
-
-        Pipeline pipelined = jedis.pipelined();
-
-
-        resmap.put(code, pipelined.get(code));
-
-        pipelined.sync();
-
-        String result = resmap.get(code).get();
-
-
-
-
-
-
-        returnResource(jedis);
-
-        return po;
-
-
-    }
-
-}

+ 8 - 11
src/test/java/test/CompareTest.java

@@ -1,17 +1,14 @@
 package test;
 
 import com.gyee.SpringbootStart;
-import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.compare.CompareController;
-import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
 import java.util.Calendar;
 import java.util.Date;
-import java.util.List;
 
 public class CompareTest {
 
@@ -65,14 +62,14 @@ public class CompareTest {
 //        }
 //        System.out.println("***************************************************************************************");
 //
-        AjaxResult ajaxResult =compareController.compareDayChat(wtid,date);
-
-        List<DataVo> test3=(List<DataVo>)ajaxResult.get("data");
-
-        for(DataVo wtd:test3)
-        {
-            System.out.println(wtd.getValue1()+"----------------"+wtd.getSpeed());
-        }
+//        AjaxResult ajaxResult =compareController.compareDayChat(wtid,date);
+//
+//        List<DataVo> test3=(List<DataVo>)ajaxResult.get("data");
+//
+//        for(DataVo wtd:test3)
+//        {
+//            System.out.println(wtd.getValue1()+"----------------"+wtd.getSpeed());
+//        }
 //        System.out.println("***************************************************************************************");
 //
 

+ 17 - 17
src/test/java/test/ContrastTest.java

@@ -33,7 +33,7 @@ public class ContrastTest {
 
         Date beginDate = c.getTime();
 
-        String wpid=null;
+        String wpid="MHS_FDC";
 
         ContrastController contrastController= SpringUtils.getBean("contrastController");
 //
@@ -54,14 +54,14 @@ public class ContrastTest {
 //        }
 //        System.out.println("/***********************************************/");
 
-        AjaxResult ajaxResult2 = contrastController.benchmarkLnList(tablepar,wpid,"","2021-01-01 00:00:00","2021-01-04 00:00:00");
-
-        List<BenchMarkVo> test2=(List<BenchMarkVo>)ajaxResult2.get("data");
-        for(BenchMarkVo wtd:test2)
-        {
-            System.out.println(wtd.getDxklylnum()+"----------------"+wtd.getDxklyl()+"----------------"+wtd.getEdfshgl());
-        }
-        System.out.println("/***********************************************/");
+//        AjaxResult ajaxResult2 = contrastController.benchmarkLnList(tablepar,wpid,"","2021-01-01 00:00:00","2021-01-04 00:00:00");
+//
+//        List<BenchMarkVo> test2=(List<BenchMarkVo>)ajaxResult2.get("data");
+//        for(BenchMarkVo wtd:test2)
+//        {
+//            System.out.println(wtd.getDxklylnum()+"----------------"+wtd.getDxklyl()+"----------------"+wtd.getEdfshgl());
+//        }
+//        System.out.println("/***********************************************/");
 
 //        AjaxResult ajaxResult = contrastController.findWpPowerOutChat(wpid,"2021-01-01 00:00:00","2021-01-04 00:00:00");
 //        List<DataVo> test=(List<DataVo>)ajaxResult.get("data");
@@ -70,14 +70,14 @@ public class ContrastTest {
 //            System.out.println(wtd.getValue1()+"----------------"+wtd.getValue2());
 //        }
 
-//        AjaxResult ajaxResult = contrastController.benchmarkWtList(tablepar,wpid,null,"2021-01-01 00:00:00","2021-01-04 00:00:00");
-//
-//        List<BenchMarkVo> test=(List<BenchMarkVo>)ajaxResult.get("data");
-//        for(BenchMarkVo wtd:test)
-//        {
-//            System.out.println(wtd.getDxklyl()+"----------------"+wtd.getEdfshgl());
-//        }
-//        System.out.println(test);
+        AjaxResult ajaxResult = contrastController.benchmarkWtList(tablepar,wpid,null,"2021-01-01","2021-01-02");
+
+        List<BenchMarkVo> test=(List<BenchMarkVo>)ajaxResult.get("data");
+        for(BenchMarkVo wtd:test)
+        {
+            System.out.println(wtd.getDxklyl()+"----------------"+wtd.getEdfshgl());
+        }
+        System.out.println(test);
     }
 
 

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

@@ -0,0 +1,93 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.controller.goodness.WindturbineGoodnessDetailController;
+import com.gyee.frame.model.auto.Windturbineanalysisday;
+import com.gyee.frame.model.custom.Tablepar;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Calendar;
+import java.util.Date;
+
+public class GoodnessTest {
+
+    @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.DAY_OF_MONTH,2);
+        c.set(Calendar.MONTH,0);
+        c.set(Calendar.YEAR,2021);
+
+        Date date = c.getTime();
+
+        String wpid="MHS_FDC";
+        String wtid="MG01_02";
+
+//        WindturbinegoodnessController windturbinegoodnessController= SpringUtils.getBean("windturbinegoodnessController");
+        WindturbineGoodnessDetailController windturbineGoodnessDetailController= SpringUtils.getBean("windturbineGoodnessDetailController");
+////
+//
+//        AjaxResult ajaxResult = dayBenchmarkingController.gadaylist(wpid,"2021-01-01");
+//
+//        List<Windturbineinfodaytop3> test=(List<Windturbineinfodaytop3>)ajaxResult.get("data");
+
+        Tablepar tablepar=new Tablepar();
+        tablepar.setPageNum(1);
+        tablepar.setPageSize(10);
+
+//        AjaxResult ajaxResult =windturbinegoodnessController.windturbinegoodness(tablepar,wtid,"2021-01-02");
+//
+//        PageInfo<Windturbinegoodness> test=(PageInfo<Windturbinegoodness>)ajaxResult.get("data");
+//
+//        for(Windturbinegoodness wtd:test.getList())
+//        {
+//            System.out.println(wtd.getDaytop()+"----------------"+wtd.getDaygoodness()+"----------------"+wtd.getDayspeed());
+//        }
+
+        AjaxResult ajaxResult =windturbineGoodnessDetailController.wadAjax(wtid,"2021-01-02");
+
+        Windturbineanalysisday wtd=(Windturbineanalysisday)ajaxResult.get("data");
+
+        System.out.println(wtd.getWindturbineid()+"----------------"+wtd.getC1()+"----------------"+wtd.getC2());
+
+//        ajaxResult =compareController.fzyDay(wtid,date);
+//
+//        Map<String, Object> test2=(Map<String, Object>)ajaxResult.get("data");
+//        System.out.println(String.valueOf(test2.get("jfpl")));
+//        List<ValueVo> vos =(List<ValueVo>)test2.get("data");
+//
+//        for(ValueVo wtd:vos)
+//        {
+//            System.out.println(wtd.getName()+"----------------"+wtd.getValue()+"----------------"+wtd.getData1());
+//        }
+//        System.out.println("***************************************************************************************");
+//
+//        AjaxResult ajaxResult =compareController.compareDayChat(wtid,date);
+//
+//        List<DataVo> test3=(List<DataVo>)ajaxResult.get("data");
+//
+//        for(DataVo wtd:test3)
+//        {
+//            System.out.println(wtd.getValue1()+"----------------"+wtd.getSpeed());
+//        }
+//        System.out.println("***************************************************************************************");
+//
+
+    }
+
+
+
+
+}

+ 60 - 0
src/test/java/test/OutputspeedTest.java

@@ -0,0 +1,60 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.controller.outputspeed.OutputSpeedController;
+import com.gyee.frame.model.auto.Inputoroutputspeedtotal;
+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 OutputspeedTest {
+
+    @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.DAY_OF_MONTH,2);
+        c.set(Calendar.MONTH,0);
+        c.set(Calendar.YEAR,2021);
+
+        Date date = c.getTime();
+
+        String wpId="MHS_FDC";
+
+        OutputSpeedController outputSpeedController= SpringUtils.getBean("outputSpeedController");
+
+
+        Tablepar tablepar=new Tablepar();
+        tablepar.setPageNum(1);
+        tablepar.setPageSize(10);
+
+        AjaxResult ajaxResult =outputSpeedController.outputSpeedlist(tablepar,wpId,"2021-01-02");
+
+        List<Inputoroutputspeedtotal> test=(List<Inputoroutputspeedtotal>)ajaxResult.get("data");
+        for(Inputoroutputspeedtotal wtd:test)
+        {
+            System.out.println(wtd.getDayinputbig()+"----------------"+wtd.getDayinputbigmin()+"----------------"+wtd.getDayinputbigmax());
+        }
+
+
+
+    }
+
+
+
+
+}

+ 64 - 0
src/test/java/test/ProjectPlanTest.java

@@ -0,0 +1,64 @@
+package test;
+
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.controller.projectplan.ProjectPlanController;
+import com.gyee.frame.model.custom.ProjectPlanVo;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+
+@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
+public class ProjectPlanTest {
+
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+        String wpId="MHS_FDC";
+        String pjId="MHS01_GC";
+        String year="2021";
+
+        ProjectPlanController projectPlanController= SpringUtils.getBean("projectPlanController");
+
+
+
+
+//        AjaxResult ajaxResult =projectPlanController.getProjectPlanVo(null,null,"2021");
+//
+//        List<ProjectPlanVo> test=(List<ProjectPlanVo>)ajaxResult.get("data");
+//        for(ProjectPlanVo wtd:test)
+//        {
+//            System.out.println(wtd.getGc01()+ wtd.getGc02()+ wtd.getGc03()+ wtd.getGc04()+wtd.getGc05()+wtd.getGc06()+
+//                    wtd.getGc07()+wtd.getGc08()+wtd.getGc09()+wtd.getGc10()+wtd.getGc11()+wtd.getGc12()+wtd.getGeneratingcapacity()+
+//                    wtd.getWindpower()+wtd.getProjectid()
+//                    );
+//        }
+
+        AjaxResult ajaxResult =projectPlanController.getSingleProjectPlan(pjId,year);
+
+        ProjectPlanVo wtd=(ProjectPlanVo)ajaxResult.get("data");
+        System.out.println(wtd.getGc01()+ wtd.getGc02()+ wtd.getGc03()+ wtd.getGc04()+wtd.getGc05()+wtd.getGc06()+
+                wtd.getGc07()+wtd.getGc08()+wtd.getGc09()+wtd.getGc10()+wtd.getGc11()+wtd.getGc12()+wtd.getGeneratingcapacity()+
+                wtd.getWindpower()+wtd.getProjectid()
+        );
+
+        wtd.setGc01("111");
+        wtd.setGc02("222");
+
+        AjaxResult valeu=projectPlanController.saveData(wtd);
+
+       int temp=(Integer)valeu.get("data");
+       System.out.println(temp);
+    }
+
+
+
+
+
+}