Sfoglia il codice sorgente

开发值际对标管理接口

shilin 4 anni fa
parent
commit
6fdbabce5b
23 ha cambiato i file con 6669 aggiunte e 41 eliminazioni
  1. 14 3
      src/main/java/com/gyee/frame/common/spring/InitialRunner.java
  2. 232 4
      src/main/java/com/gyee/frame/controller/contrast/ContrastController.java
  3. 97 0
      src/main/java/com/gyee/frame/mapper/auto/ShutdowneventMapper.java
  4. 96 0
      src/main/java/com/gyee/frame/mapper/auto/WarningMapper.java
  5. 641 0
      src/main/java/com/gyee/frame/model/auto/Shutdownevent.java
  6. 1564 0
      src/main/java/com/gyee/frame/model/auto/ShutdowneventExample.java
  7. 575 0
      src/main/java/com/gyee/frame/model/auto/Warning.java
  8. 1433 0
      src/main/java/com/gyee/frame/model/auto/WarningExample.java
  9. 196 0
      src/main/java/com/gyee/frame/model/custom/ShutdowneventVo.java
  10. 153 0
      src/main/java/com/gyee/frame/service/ShutdowneventService.java
  11. 95 0
      src/main/java/com/gyee/frame/service/WarningService.java
  12. 33 1
      src/main/java/com/gyee/frame/service/Windpowerinfoday3Service.java
  13. 72 0
      src/main/java/com/gyee/frame/service/contrast/ContrastWtService.java
  14. 407 28
      src/main/java/com/gyee/frame/service/contrast/ContrastZjService.java
  15. 1 0
      src/main/java/com/gyee/frame/util/BenchmarkUtil.java
  16. 11 0
      src/main/java/com/gyee/frame/util/DateUtils.java
  17. 32 1
      src/main/java/com/gyee/frame/util/StringUtils.java
  18. 1 1
      src/main/resources/application-dev.yml
  19. 2 2
      src/main/resources/mybatis-generator.xml
  20. 493 0
      src/main/resources/mybatis/auto/ShutdowneventMapper.xml
  21. 461 0
      src/main/resources/mybatis/auto/WarningMapper.xml
  22. 1 1
      src/test/java/test/ContrastTest.java
  23. 59 0
      src/test/java/test/PowercompareTest.java

+ 14 - 3
src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -34,7 +34,8 @@ public class InitialRunner implements CommandLineRunner {
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
     @Resource
     private WindturbinepowercurvefittingService windturbinepowercurvefittingService;
-
+    @Resource
+    private WarningService warningService;
     public static List<Windpowerstation> wpallls = new ArrayList<Windpowerstation>(); // 风电场LIST集合
     public static List<Windpowerstation> wpls = new ArrayList<Windpowerstation>(); // 风电场LIST集合
     public static List<Project> pjls = new ArrayList<Project>(); // 项目LIST集合
@@ -42,6 +43,7 @@ public class InitialRunner implements CommandLineRunner {
     public static List<Windturbine> wtls = new ArrayList<Windturbine>(); // 风电机LIST集合
 
     public static Map<String, Windpowerstation>  wpmap = new HashMap<String, Windpowerstation>();
+    public static Map<String, Warning>  warningmap = new HashMap<String, Warning>();
     public static Map<String, Project> pjmap = new HashMap<String, Project>(); // 项目MAP
     public static Map<String, Windturbine>  wtmap = new HashMap<String, Windturbine>();
     public static Map<String, List<Windturbine>> wp_wtmap = new HashMap<String, List<Windturbine>>();
@@ -131,8 +133,17 @@ public class InitialRunner implements CommandLineRunner {
 //            }
 //        }
 
-
-        if(wtls!=null && !wtls.isEmpty()){
+//        WarningExample warningExample=new WarningExample();
+//        warningExample.setOrderByClause("id ASC");
+//        List<Warning> warnls= warningService.selectByExample(warningExample);
+//
+//        if(warnls!=null && !warnls.isEmpty()) {
+//            for(int i=0;i<warnls.size();i++){
+//                Warning warning=warnls.get(i);
+//                warningmap.put(warning.getId(),warning);
+//            }
+//        }
+            if(wtls!=null && !wtls.isEmpty()){
 
             for(int i=0;i<wtls.size();i++){
 

+ 232 - 4
src/main/java/com/gyee/frame/controller/contrast/ContrastController.java

@@ -3,10 +3,12 @@ package com.gyee.frame.controller.contrast;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.model.custom.BenchMarkVo;
+import com.gyee.frame.model.custom.ConditionVo;
 import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.service.contrast.ContrastWpService;
 import com.gyee.frame.service.contrast.ContrastWtService;
+import com.gyee.frame.service.contrast.ContrastZjService;
 import com.gyee.frame.util.BenchmarkUtil;
 import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
@@ -18,9 +20,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
 
 @Controller
 @RequestMapping("/contrast")
@@ -30,6 +32,8 @@ public class ContrastController {
     private ContrastWpService contrastWpService;
     @Resource
     private ContrastWtService contrastWtService;
+    @Resource
+    private ContrastZjService contrastZjService;
     /**
      * 查询风机列表信息
      **/
@@ -142,7 +146,7 @@ public class ContrastController {
     }
 
     /**
-     * 查询五损风机列表信息
+     * 查询风机列表信息
      **/
     @PostMapping("/benchmarkWtList")
     @ResponseBody
@@ -201,7 +205,98 @@ public class ContrastController {
        // List<BenchMarkVo> vos =contrastWtService.benchmarkWtList(wpId,wtId,beginDate, endDate);
         if (StringUtils.notEmp(wpId) && StringUtils.notEmp(year) && StringUtils.notEmp(month) && StringUtils.notEmp(zjs)) {
 
+            contrastZjService.addBenchmarkZj(request, wpId, year, month, zjs);
+        }
+
+        if (null != request.getSession().getAttribute("bmvos")) {
+            vos = (List<BenchMarkVo>) request.getSession().getAttribute("bmvos");
+        } else {
+            vos =new ArrayList<>();
+
+        }
+
+        if (vos != null && !vos.isEmpty()) {
+            BenchmarkUtil bu = new BenchmarkUtil();
+            vos = bu.getBenchMarkOrder(vos);
+            //默认综合排序,不需要从新排序,除非指定字段排序
+            if(StringUtils.notEmp(tablepar) && StringUtils.isNotEmpty(tablepar.getOrderByColumn()) )
+            {
+                vos = bu.getBenchMarkOrder(vos,tablepar);
+            }
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+        }
+
+    }
+
+    /**
+     * 值际对标列表
+     **/
+    @PostMapping("/benchmarkZjList")
+    @ResponseBody
+    public AjaxResult benchmarkZjList(HttpServletRequest request,Tablepar tablepar) {
+
+        List<BenchMarkVo> vos=null;
+
+        if (null != request.getSession().getAttribute("bmvos")) {
+            vos = (List<BenchMarkVo>) request.getSession().getAttribute("bmvos");
+        } else {
+            vos =new ArrayList<>();
+
+        }
+
+        if (vos != null && !vos.isEmpty()) {
+            BenchmarkUtil bu = new BenchmarkUtil();
+            vos = bu.getBenchMarkOrder(vos);
+            //默认综合排序,不需要从新排序,除非指定字段排序
+            if(StringUtils.notEmp(tablepar) && StringUtils.isNotEmpty(tablepar.getOrderByColumn()) )
+            {
+                vos = bu.getBenchMarkOrder(vos,tablepar);
+            }
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.emptyresultset.code, vos);
+        }
+
+    }
+
+
+    /**
+     * 查询值际风机列表信息
+     **/
+    @PostMapping("/benchmarkZjWtList")
+    @ResponseBody
+    public AjaxResult benchmarkZjWtList(HttpServletRequest request,Tablepar tablepar, String cid) {
+        List<BenchMarkVo> vos=new ArrayList<>();
+        Map<String, List<ConditionVo>> ctmap = null;
+        if (null != request.getSession().getAttribute("bmwtvos")) {
+            ctmap = (Map<String, List<ConditionVo>>) request.getSession().getAttribute("bmwtvos");
+        } else {
+            ctmap = new HashMap<String, List<ConditionVo>>();
+        }
+
+        if (StringUtils.notEmp(cid) && ctmap.containsKey(cid)) {
+            List<ConditionVo> ctvos = ctmap.get(cid);
+            Map<String, BenchMarkVo> bmmap = new HashMap<String, BenchMarkVo>();
+            for (ConditionVo ct : ctvos) {
+
+                String wpId = ct.getWpId();
+                String beginDate = DateUtils.format(ct.getBeginDate());
+                String endDate =DateUtils.format(ct.getEndDate());
+
+                bmmap=contrastWtService.benchmarkZjInWtList(wpId,null,beginDate,endDate);
+            }
 
+            Set<Map.Entry<String, BenchMarkVo>> set = bmmap.entrySet();
+            for (Iterator<Map.Entry<String, BenchMarkVo>> it = set.iterator(); it.hasNext();) {
+                Map.Entry<String, BenchMarkVo> entry = (Map.Entry<String, BenchMarkVo>) it.next();
+                // System.out.println(entry.getKey() + "--->" +
+                // entry.getValue());
+                BenchMarkVo bm = entry.getValue();
+                totalBenchmarkInfo(bm);
+                vos.add(bm);
+            }
         }
 
         if (vos != null && !vos.isEmpty()) {
@@ -218,5 +313,138 @@ public class ContrastController {
         }
 
     }
+
+
+    private void totalBenchmarkInfo(BenchMarkVo bm) {
+        double scadafdl = bm.getScadafdl(); // scada发电量
+        double qfss = bm.getQfss();// 欠发损失发电量
+        double gzss = bm.getGzss();// 故障损失发电量
+        double whss = bm.getWhss();// 维护损失发电量
+        double xdss = bm.getXdss();// 限电损失发电量
+        double llfdl = scadafdl + qfss + gzss + whss + xdss;// 理论发电量
+
+        if (llfdl != 0) {
+            double temp = xdss;
+
+            BigDecimal b1 = new BigDecimal(temp);
+            BigDecimal b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 弃风率
+            bm.setQfl(temp);
+            temp = qfss;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 性能损失率
+            bm.setXnssl(temp);
+
+            temp = gzss;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 故障损失率
+            bm.setGzssl(temp);
+
+            temp = whss;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 检修损失率
+            bm.setJxssl(temp);
+            temp = 0;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 受累损失率
+            bm.setSlssl(temp);
+            temp = scadafdl;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 风能利用率
+            bm.setFnlyl(temp);
+            // 受累损失电量
+            bm.setSlssl(0.0);
+        } else {
+            // temp 风能利用率
+            bm.setFnlyl(0.0);
+            // temp 故障损失率
+            bm.setGzssl(0.0);
+            // temp 检修损失率
+            bm.setJxssl(0.0);
+            // temp 弃风率
+            bm.setQfl(0.0);
+            // temp 受累损失率
+            bm.setSlssl(0.0);
+            // 受累损失电量
+            bm.setSlssl(0.0);
+            // temp 性能损失率
+            bm.setXnssl(0.0);
+        }
+
+        if (bm.getFwzcs() != 0) {
+
+            double temp1 = bm.getFwcs();// 5分钟复位及时次数
+            double temp2 = bm.getFwzcs();// 总复位次数
+
+            double temp = 0;
+
+            BigDecimal b1 = new BigDecimal(temp1);
+            BigDecimal b2 = new BigDecimal(temp2);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 复位及时率
+            bm.setFwjsl(temp);
+        } else {
+            bm.setFwjsl(100.0);
+        }
+
+        if (bm.getZtzcs() != 0) {
+
+            double temp1 = bm.getZtcs();// 小于3米5分钟转换及时次数
+            double temp2 = bm.getZtzcs();// 小于3米状态转换总次数
+
+            double temp = 0;
+
+            BigDecimal b1 = new BigDecimal(temp1);
+            BigDecimal b2 = new BigDecimal(temp2);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+
+            // temp 状态转换及时率
+            bm.setZtzhjsl(temp);
+        } else {
+            bm.setZtzhjsl(100.0);
+        }
+
+        if (bm.getXqzcs() != 0) {
+
+            double temp1 = bm.getXqcs();// 消缺及时次数
+            double temp2 = bm.getXqzcs();// 故障总次数
+
+            double temp = 0;
+
+            BigDecimal b1 = new BigDecimal(temp1);
+            BigDecimal b2 = new BigDecimal(temp2);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+
+            // temp 消缺及时率
+            bm.setXqjsl(temp);
+        } else {
+            bm.setXqjsl(100.0);
+        }
+    }
 }
 

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

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

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

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

+ 641 - 0
src/main/java/com/gyee/frame/model/auto/Shutdownevent.java

@@ -0,0 +1,641 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Shutdownevent implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.id
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.windPowerStationId
+     *
+     * @mbg.generated
+     */
+    private String windpowerstationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.windTurbineId
+     *
+     * @mbg.generated
+     */
+    private String windturbineid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.stopTime
+     *
+     * @mbg.generated
+     */
+    private Date stoptime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.startTime
+     *
+     * @mbg.generated
+     */
+    private Date starttime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.stopHours
+     *
+     * @mbg.generated
+     */
+    private Double stophours;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.lossPower
+     *
+     * @mbg.generated
+     */
+    private Double losspower;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.stopTypeId
+     *
+     * @mbg.generated
+     */
+    private String stoptypeid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.isHandle
+     *
+     * @mbg.generated
+     */
+    private Short ishandle;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.warningId
+     *
+     * @mbg.generated
+     */
+    private String warningid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.projectId
+     *
+     * @mbg.generated
+     */
+    private String projectid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.handleWay
+     *
+     * @mbg.generated
+     */
+    private String handleway;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.faultView
+     *
+     * @mbg.generated
+     */
+    private String faultview;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.statusCode
+     *
+     * @mbg.generated
+     */
+    private Integer statuscode;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.mainId
+     *
+     * @mbg.generated
+     */
+    private String mainid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.resetRate
+     *
+     * @mbg.generated
+     */
+    private String resetrate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.stateRate
+     *
+     * @mbg.generated
+     */
+    private String staterate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.failRate
+     *
+     * @mbg.generated
+     */
+    private String failrate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column shutdownevent.warningRecordsId
+     *
+     * @mbg.generated
+     */
+    private Integer warningrecordsid;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table shutdownevent
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.id
+     *
+     * @return the value of shutdownevent.id
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.id
+     *
+     * @param id the value for shutdownevent.id
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.windPowerStationId
+     *
+     * @return the value of shutdownevent.windPowerStationId
+     *
+     * @mbg.generated
+     */
+    public String getWindpowerstationid() {
+        return windpowerstationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.windPowerStationId
+     *
+     * @param windpowerstationid the value for shutdownevent.windPowerStationId
+     *
+     * @mbg.generated
+     */
+    public void setWindpowerstationid(String windpowerstationid) {
+        this.windpowerstationid = windpowerstationid == null ? null : windpowerstationid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.windTurbineId
+     *
+     * @return the value of shutdownevent.windTurbineId
+     *
+     * @mbg.generated
+     */
+    public String getWindturbineid() {
+        return windturbineid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.windTurbineId
+     *
+     * @param windturbineid the value for shutdownevent.windTurbineId
+     *
+     * @mbg.generated
+     */
+    public void setWindturbineid(String windturbineid) {
+        this.windturbineid = windturbineid == null ? null : windturbineid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.stopTime
+     *
+     * @return the value of shutdownevent.stopTime
+     *
+     * @mbg.generated
+     */
+    public Date getStoptime() {
+        return stoptime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.stopTime
+     *
+     * @param stoptime the value for shutdownevent.stopTime
+     *
+     * @mbg.generated
+     */
+    public void setStoptime(Date stoptime) {
+        this.stoptime = stoptime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.startTime
+     *
+     * @return the value of shutdownevent.startTime
+     *
+     * @mbg.generated
+     */
+    public Date getStarttime() {
+        return starttime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.startTime
+     *
+     * @param starttime the value for shutdownevent.startTime
+     *
+     * @mbg.generated
+     */
+    public void setStarttime(Date starttime) {
+        this.starttime = starttime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.stopHours
+     *
+     * @return the value of shutdownevent.stopHours
+     *
+     * @mbg.generated
+     */
+    public Double getStophours() {
+        return stophours;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.stopHours
+     *
+     * @param stophours the value for shutdownevent.stopHours
+     *
+     * @mbg.generated
+     */
+    public void setStophours(Double stophours) {
+        this.stophours = stophours;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.lossPower
+     *
+     * @return the value of shutdownevent.lossPower
+     *
+     * @mbg.generated
+     */
+    public Double getLosspower() {
+        return losspower;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.lossPower
+     *
+     * @param losspower the value for shutdownevent.lossPower
+     *
+     * @mbg.generated
+     */
+    public void setLosspower(Double losspower) {
+        this.losspower = losspower;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.stopTypeId
+     *
+     * @return the value of shutdownevent.stopTypeId
+     *
+     * @mbg.generated
+     */
+    public String getStoptypeid() {
+        return stoptypeid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.stopTypeId
+     *
+     * @param stoptypeid the value for shutdownevent.stopTypeId
+     *
+     * @mbg.generated
+     */
+    public void setStoptypeid(String stoptypeid) {
+        this.stoptypeid = stoptypeid == null ? null : stoptypeid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.isHandle
+     *
+     * @return the value of shutdownevent.isHandle
+     *
+     * @mbg.generated
+     */
+    public Short getIshandle() {
+        return ishandle;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.isHandle
+     *
+     * @param ishandle the value for shutdownevent.isHandle
+     *
+     * @mbg.generated
+     */
+    public void setIshandle(Short ishandle) {
+        this.ishandle = ishandle;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.warningId
+     *
+     * @return the value of shutdownevent.warningId
+     *
+     * @mbg.generated
+     */
+    public String getWarningid() {
+        return warningid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.warningId
+     *
+     * @param warningid the value for shutdownevent.warningId
+     *
+     * @mbg.generated
+     */
+    public void setWarningid(String warningid) {
+        this.warningid = warningid == null ? null : warningid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.projectId
+     *
+     * @return the value of shutdownevent.projectId
+     *
+     * @mbg.generated
+     */
+    public String getProjectid() {
+        return projectid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.projectId
+     *
+     * @param projectid the value for shutdownevent.projectId
+     *
+     * @mbg.generated
+     */
+    public void setProjectid(String projectid) {
+        this.projectid = projectid == null ? null : projectid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.handleWay
+     *
+     * @return the value of shutdownevent.handleWay
+     *
+     * @mbg.generated
+     */
+    public String getHandleway() {
+        return handleway;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.handleWay
+     *
+     * @param handleway the value for shutdownevent.handleWay
+     *
+     * @mbg.generated
+     */
+    public void setHandleway(String handleway) {
+        this.handleway = handleway == null ? null : handleway.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.faultView
+     *
+     * @return the value of shutdownevent.faultView
+     *
+     * @mbg.generated
+     */
+    public String getFaultview() {
+        return faultview;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.faultView
+     *
+     * @param faultview the value for shutdownevent.faultView
+     *
+     * @mbg.generated
+     */
+    public void setFaultview(String faultview) {
+        this.faultview = faultview == null ? null : faultview.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.statusCode
+     *
+     * @return the value of shutdownevent.statusCode
+     *
+     * @mbg.generated
+     */
+    public Integer getStatuscode() {
+        return statuscode;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.statusCode
+     *
+     * @param statuscode the value for shutdownevent.statusCode
+     *
+     * @mbg.generated
+     */
+    public void setStatuscode(Integer statuscode) {
+        this.statuscode = statuscode;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.mainId
+     *
+     * @return the value of shutdownevent.mainId
+     *
+     * @mbg.generated
+     */
+    public String getMainid() {
+        return mainid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.mainId
+     *
+     * @param mainid the value for shutdownevent.mainId
+     *
+     * @mbg.generated
+     */
+    public void setMainid(String mainid) {
+        this.mainid = mainid == null ? null : mainid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.resetRate
+     *
+     * @return the value of shutdownevent.resetRate
+     *
+     * @mbg.generated
+     */
+    public String getResetrate() {
+        return resetrate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.resetRate
+     *
+     * @param resetrate the value for shutdownevent.resetRate
+     *
+     * @mbg.generated
+     */
+    public void setResetrate(String resetrate) {
+        this.resetrate = resetrate == null ? null : resetrate.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.stateRate
+     *
+     * @return the value of shutdownevent.stateRate
+     *
+     * @mbg.generated
+     */
+    public String getStaterate() {
+        return staterate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.stateRate
+     *
+     * @param staterate the value for shutdownevent.stateRate
+     *
+     * @mbg.generated
+     */
+    public void setStaterate(String staterate) {
+        this.staterate = staterate == null ? null : staterate.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.failRate
+     *
+     * @return the value of shutdownevent.failRate
+     *
+     * @mbg.generated
+     */
+    public String getFailrate() {
+        return failrate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.failRate
+     *
+     * @param failrate the value for shutdownevent.failRate
+     *
+     * @mbg.generated
+     */
+    public void setFailrate(String failrate) {
+        this.failrate = failrate == null ? null : failrate.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column shutdownevent.warningRecordsId
+     *
+     * @return the value of shutdownevent.warningRecordsId
+     *
+     * @mbg.generated
+     */
+    public Integer getWarningrecordsid() {
+        return warningrecordsid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column shutdownevent.warningRecordsId
+     *
+     * @param warningrecordsid the value for shutdownevent.warningRecordsId
+     *
+     * @mbg.generated
+     */
+    public void setWarningrecordsid(Integer warningrecordsid) {
+        this.warningrecordsid = warningrecordsid;
+    }
+}

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


+ 575 - 0
src/main/java/com/gyee/frame/model/auto/Warning.java

@@ -0,0 +1,575 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+public class Warning implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.id
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.levelId
+     *
+     * @mbg.generated
+     */
+    private String levelid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.manufacturerCode
+     *
+     * @mbg.generated
+     */
+    private String manufacturercode;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.englishText
+     *
+     * @mbg.generated
+     */
+    private String englishtext;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.chineseText
+     *
+     * @mbg.generated
+     */
+    private String chinesetext;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.parentId
+     *
+     * @mbg.generated
+     */
+    private String parentid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.isLeaf
+     *
+     * @mbg.generated
+     */
+    private Short isleaf;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.sequenceNumber
+     *
+     * @mbg.generated
+     */
+    private Integer sequencenumber;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.characteristic
+     *
+     * @mbg.generated
+     */
+    private String characteristic;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.modelId
+     *
+     * @mbg.generated
+     */
+    private String modelid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.codeName
+     *
+     * @mbg.generated
+     */
+    private String codename;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.ednaValue
+     *
+     * @mbg.generated
+     */
+    private Integer ednavalue;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.display
+     *
+     * @mbg.generated
+     */
+    private Integer display;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.warningClassifyId
+     *
+     * @mbg.generated
+     */
+    private String warningclassifyid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.isreset
+     *
+     * @mbg.generated
+     */
+    private BigDecimal isreset;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.standardTime
+     *
+     * @mbg.generated
+     */
+    private BigDecimal standardtime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column warning.warningtypeid
+     *
+     * @mbg.generated
+     */
+    private String warningtypeid;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table warning
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.id
+     *
+     * @return the value of warning.id
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.id
+     *
+     * @param id the value for warning.id
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.levelId
+     *
+     * @return the value of warning.levelId
+     *
+     * @mbg.generated
+     */
+    public String getLevelid() {
+        return levelid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.levelId
+     *
+     * @param levelid the value for warning.levelId
+     *
+     * @mbg.generated
+     */
+    public void setLevelid(String levelid) {
+        this.levelid = levelid == null ? null : levelid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.manufacturerCode
+     *
+     * @return the value of warning.manufacturerCode
+     *
+     * @mbg.generated
+     */
+    public String getManufacturercode() {
+        return manufacturercode;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.manufacturerCode
+     *
+     * @param manufacturercode the value for warning.manufacturerCode
+     *
+     * @mbg.generated
+     */
+    public void setManufacturercode(String manufacturercode) {
+        this.manufacturercode = manufacturercode == null ? null : manufacturercode.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.englishText
+     *
+     * @return the value of warning.englishText
+     *
+     * @mbg.generated
+     */
+    public String getEnglishtext() {
+        return englishtext;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.englishText
+     *
+     * @param englishtext the value for warning.englishText
+     *
+     * @mbg.generated
+     */
+    public void setEnglishtext(String englishtext) {
+        this.englishtext = englishtext == null ? null : englishtext.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.chineseText
+     *
+     * @return the value of warning.chineseText
+     *
+     * @mbg.generated
+     */
+    public String getChinesetext() {
+        return chinesetext;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.chineseText
+     *
+     * @param chinesetext the value for warning.chineseText
+     *
+     * @mbg.generated
+     */
+    public void setChinesetext(String chinesetext) {
+        this.chinesetext = chinesetext == null ? null : chinesetext.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.parentId
+     *
+     * @return the value of warning.parentId
+     *
+     * @mbg.generated
+     */
+    public String getParentid() {
+        return parentid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.parentId
+     *
+     * @param parentid the value for warning.parentId
+     *
+     * @mbg.generated
+     */
+    public void setParentid(String parentid) {
+        this.parentid = parentid == null ? null : parentid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.isLeaf
+     *
+     * @return the value of warning.isLeaf
+     *
+     * @mbg.generated
+     */
+    public Short getIsleaf() {
+        return isleaf;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.isLeaf
+     *
+     * @param isleaf the value for warning.isLeaf
+     *
+     * @mbg.generated
+     */
+    public void setIsleaf(Short isleaf) {
+        this.isleaf = isleaf;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.sequenceNumber
+     *
+     * @return the value of warning.sequenceNumber
+     *
+     * @mbg.generated
+     */
+    public Integer getSequencenumber() {
+        return sequencenumber;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.sequenceNumber
+     *
+     * @param sequencenumber the value for warning.sequenceNumber
+     *
+     * @mbg.generated
+     */
+    public void setSequencenumber(Integer sequencenumber) {
+        this.sequencenumber = sequencenumber;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.characteristic
+     *
+     * @return the value of warning.characteristic
+     *
+     * @mbg.generated
+     */
+    public String getCharacteristic() {
+        return characteristic;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.characteristic
+     *
+     * @param characteristic the value for warning.characteristic
+     *
+     * @mbg.generated
+     */
+    public void setCharacteristic(String characteristic) {
+        this.characteristic = characteristic == null ? null : characteristic.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.modelId
+     *
+     * @return the value of warning.modelId
+     *
+     * @mbg.generated
+     */
+    public String getModelid() {
+        return modelid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.modelId
+     *
+     * @param modelid the value for warning.modelId
+     *
+     * @mbg.generated
+     */
+    public void setModelid(String modelid) {
+        this.modelid = modelid == null ? null : modelid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.codeName
+     *
+     * @return the value of warning.codeName
+     *
+     * @mbg.generated
+     */
+    public String getCodename() {
+        return codename;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.codeName
+     *
+     * @param codename the value for warning.codeName
+     *
+     * @mbg.generated
+     */
+    public void setCodename(String codename) {
+        this.codename = codename == null ? null : codename.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.ednaValue
+     *
+     * @return the value of warning.ednaValue
+     *
+     * @mbg.generated
+     */
+    public Integer getEdnavalue() {
+        return ednavalue;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.ednaValue
+     *
+     * @param ednavalue the value for warning.ednaValue
+     *
+     * @mbg.generated
+     */
+    public void setEdnavalue(Integer ednavalue) {
+        this.ednavalue = ednavalue;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.display
+     *
+     * @return the value of warning.display
+     *
+     * @mbg.generated
+     */
+    public Integer getDisplay() {
+        return display;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.display
+     *
+     * @param display the value for warning.display
+     *
+     * @mbg.generated
+     */
+    public void setDisplay(Integer display) {
+        this.display = display;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.warningClassifyId
+     *
+     * @return the value of warning.warningClassifyId
+     *
+     * @mbg.generated
+     */
+    public String getWarningclassifyid() {
+        return warningclassifyid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.warningClassifyId
+     *
+     * @param warningclassifyid the value for warning.warningClassifyId
+     *
+     * @mbg.generated
+     */
+    public void setWarningclassifyid(String warningclassifyid) {
+        this.warningclassifyid = warningclassifyid == null ? null : warningclassifyid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.isreset
+     *
+     * @return the value of warning.isreset
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getIsreset() {
+        return isreset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.isreset
+     *
+     * @param isreset the value for warning.isreset
+     *
+     * @mbg.generated
+     */
+    public void setIsreset(BigDecimal isreset) {
+        this.isreset = isreset;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.standardTime
+     *
+     * @return the value of warning.standardTime
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getStandardtime() {
+        return standardtime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.standardTime
+     *
+     * @param standardtime the value for warning.standardTime
+     *
+     * @mbg.generated
+     */
+    public void setStandardtime(BigDecimal standardtime) {
+        this.standardtime = standardtime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column warning.warningtypeid
+     *
+     * @return the value of warning.warningtypeid
+     *
+     * @mbg.generated
+     */
+    public String getWarningtypeid() {
+        return warningtypeid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column warning.warningtypeid
+     *
+     * @param warningtypeid the value for warning.warningtypeid
+     *
+     * @mbg.generated
+     */
+    public void setWarningtypeid(String warningtypeid) {
+        this.warningtypeid = warningtypeid == null ? null : warningtypeid.trim();
+    }
+}

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


+ 196 - 0
src/main/java/com/gyee/frame/model/custom/ShutdowneventVo.java

@@ -0,0 +1,196 @@
+
+package com.gyee.frame.model.custom;
+
+import com.gyee.frame.common.spring.Constant;
+
+import java.util.Date;
+
+
+
+
+public class ShutdowneventVo {
+	
+	private String id;
+	private String windPowerStationId;
+	private String wpName;
+	private String windTurbineId;
+	private String wtName;
+	private Date stopTime;
+	private Date startTime;
+	private Double stopHours;
+	private Double lossPower;
+	private String stopTypeId;
+	private String stopTypeName;
+	private Boolean isHandle;
+	private String warningId;
+	private String warnDesc;
+	private String projectid;
+	private String projectName;
+	private String handleWay;
+	private String faultView;
+	private String stopTime2;
+	private String startTime2;
+	private Integer statusCode;
+	private String modelId;
+	private String modelCode;
+	private String taskStatus;
+	
+	
+	public String getTaskStatus() {
+		return taskStatus;
+	}
+	public void setTaskStatus(String taskStatus) {
+		this.taskStatus = taskStatus;
+	}
+	public String getModelId() {
+    	return modelId;
+    }
+	public void setModelId(String modelId) {
+    	this.modelId = modelId;
+    }
+	public String getModelCode() {
+    	return modelCode;
+    }
+	public void setModelCode(String modelCode) {
+    	this.modelCode = modelCode;
+    }
+
+	public String getId() {
+    	return id;
+    }
+	public void setId(String id) {
+    	this.id = id;
+    }
+	public String getWindPowerStationId() {
+		return windPowerStationId;
+	}
+	public void setWindPowerStationId(String windPowerStationId) {
+		this.windPowerStationId = windPowerStationId;
+	}
+	public String getWpName() {
+		return wpName;
+	}
+	public void setWpName(String wpName) {
+		this.wpName = wpName;
+	}
+	public String getWindTurbineId() {
+		return windTurbineId;
+	}
+	public void setWindTurbineId(String windTurbineId) {
+		this.windTurbineId = windTurbineId;
+	}
+	public String getWtName() {
+		return wtName;
+	}
+	public void setWtName(String wtName) {
+		this.wtName = wtName;
+	}
+	public Date getStopTime() {
+		return stopTime;
+	}
+	public void setStopTime(Date stopTime) {
+		this.stopTime = stopTime;
+	}
+	public Date getStartTime() {
+		return startTime;
+	}
+	public void setStartTime(Date startTime) {
+		this.startTime = startTime;
+	}
+	public Double getStopHours() {
+		return stopHours;
+	}
+	public void setStopHours(Double stopHours) {
+		this.stopHours = stopHours;
+	}
+	public Double getLossPower() {
+		return lossPower;
+	}
+	public void setLossPower(Double lossPower) {
+		this.lossPower = lossPower;
+	}
+	public String getStopTypeId() {
+		return stopTypeId;
+	}
+	public void setStopTypeId(String stopTypeId) {
+		this.stopTypeId = stopTypeId;
+	}
+	public Boolean getIsHandle() {
+		return isHandle;
+	}
+	public void setIsHandle(Boolean isHandle) {
+		this.isHandle = isHandle;
+	}
+	public String getWarningId() {
+		return warningId;
+	}
+	public void setWarningId(String warningId) {
+		this.warningId = warningId;
+	}
+	public String getWarnDesc() {
+		return warnDesc;
+	}
+	public void setWarnDesc(String warnDesc) {
+		this.warnDesc = warnDesc;
+	}
+	public String getProjectid() {
+		return projectid;
+	}
+	public void setProjectid(String projectid) {
+		this.projectid = projectid;
+	}
+	public String getProjectName() {
+		return projectName;
+	}
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
+	public String getStopTypeName() {
+		return stopTypeName;
+	}
+	public void setStopTypeName(String stopTypeName) {
+		this.stopTypeName = stopTypeName;
+	}
+	public String getHandleWay() {
+		return handleWay;
+	}
+	public void setHandleWay(String handleWay) {
+		this.handleWay = handleWay;
+	}
+	public String getFaultView() {
+		return faultView;
+	}
+	public void setFaultView(String faultView) {
+		this.faultView = faultView;
+	}
+	public String getStopTime2() {
+		return stopTime2;
+	}
+	public void setStopTime2(String stopTime2) {
+		this.stopTime2 = stopTime2;
+	}
+	public String getStartTime2() {
+		return startTime2;
+	}
+	public void setStartTime2(String startTime2) {
+		this.startTime2 = startTime2;
+	}
+	public Integer getStatusCode() {
+		return statusCode;
+	}
+	public void setStatusCode(Integer statusCode) {
+		this.statusCode = statusCode;
+	}
+	public String getStatusName(){
+		String result = null;
+		if(statusCode != null){
+			if(statusCode==2){
+				result = Constant.FAULT_NAME;
+			}else if(statusCode==4){
+				result = Constant.MAINTENANCE_NAME;
+			}
+		}
+		return result;
+	}
+	
+}	

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

@@ -0,0 +1,153 @@
+package com.gyee.frame.service;
+
+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.ShutdowneventMapper;
+import com.gyee.frame.model.auto.Shutdownevent;
+import com.gyee.frame.model.auto.ShutdowneventExample;
+import com.gyee.frame.model.custom.ShutdowneventVo;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+
+@Service
+public class ShutdowneventService implements BaseService<Shutdownevent, ShutdowneventExample> {
+	@Autowired
+	private ShutdowneventMapper shutdowneventMapper;
+	
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			ShutdowneventExample example=new ShutdowneventExample();
+			example.createCriteria().andIdIn(lista);
+			return shutdowneventMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public Shutdownevent selectByPrimaryKey(String id) {
+				
+			return shutdowneventMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(Shutdownevent record) {
+		return shutdowneventMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Shutdownevent record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return shutdowneventMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(Shutdownevent record, ShutdowneventExample example) {
+		
+		return shutdowneventMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(Shutdownevent record, ShutdowneventExample example) {
+		
+		return shutdowneventMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Shutdownevent> selectByExample(ShutdowneventExample example) {
+		
+		return shutdowneventMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(ShutdowneventExample example) {
+		
+		return shutdowneventMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(ShutdowneventExample example) {
+		
+		return shutdowneventMapper.deleteByExample(example);
+	}
+
+	public List<ShutdowneventVo> queryEvents(String wpId, String wtId, Date beginDate, Date endDate, String type) {
+
+		List<Shutdownevent> list=new ArrayList<>();
+
+		ShutdowneventExample example=new ShutdowneventExample();
+		example.setOrderByClause("windPowerStationId ASC");
+
+		ShutdowneventExample.Criteria criteria =example.createCriteria();
+
+		if(StringUtils.isNotEmpty(wpId))
+		{
+			criteria.andWindpowerstationidEqualTo(wpId);
+		}
+		if(StringUtils.isNotEmpty(wtId))
+		{
+			criteria.andWindturbineidEqualTo(wtId);
+		}
+
+		if(StringUtils.isNotEmpty(type))
+		{
+			criteria.andStatuscodeEqualTo(Integer.valueOf(type));
+		}
+		if(beginDate!=null && endDate!=null ){
+			criteria.andStoptimeGreaterThanOrEqualTo(beginDate).andStoptimeLessThanOrEqualTo(endDate);
+		}
+
+		list= shutdowneventMapper.selectByExample(example);
+		List<ShutdowneventVo> sdelist=new ArrayList<>();
+
+		if(null!=list && !list.isEmpty())
+		{
+			for(Shutdownevent sde:list)
+			{
+				ShutdowneventVo event = new ShutdowneventVo();
+				event.setId(sde.getId());
+
+				event.setWindPowerStationId(sde.getWindpowerstationid());
+				event.setWpName(InitialRunner.wpmap.get(sde.getWindpowerstationid()).getName());
+				event.setWindTurbineId(sde.getWindturbineid());
+				event.setWtName(InitialRunner.wtmap.get(sde.getWindturbineid()).getCode());
+				event.setWarningId(sde.getWarningid());
+
+				event.setStartTime(sde.getStarttime());
+				event.setStopTime(sde.getStoptime());
+				event.setStopHours(sde.getStophours());
+				event.setStopTypeId(sde.getStoptypeid());
+				event.setStatusCode(sde.getStatuscode());
+				sdelist.add(event);
+			}
+		}
+
+		return sdelist;
+
+	}
+}

+ 95 - 0
src/main/java/com/gyee/frame/service/WarningService.java

@@ -0,0 +1,95 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.WarningMapper;
+import com.gyee.frame.model.auto.Warning;
+import com.gyee.frame.model.auto.WarningExample;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+
+@Service
+public class WarningService implements BaseService<Warning, WarningExample> {
+	@Autowired
+	private WarningMapper warningMapper;
+	
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			WarningExample example=new WarningExample();
+			example.createCriteria().andIdIn(lista);
+			return warningMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public Warning selectByPrimaryKey(String id) {
+				
+			return warningMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(Warning record) {
+		return warningMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Warning record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return warningMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(Warning record, WarningExample example) {
+		
+		return warningMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(Warning record, WarningExample example) {
+		
+		return warningMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Warning> selectByExample(WarningExample example) {
+		
+		return warningMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WarningExample example) {
+		
+		return warningMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WarningExample example) {
+		
+		return warningMapper.deleteByExample(example);
+	}
+	
+
+}

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

@@ -383,7 +383,7 @@ public class Windpowerinfoday3Service implements BaseService<Windpowerinfoday3,
 				List<Line> pwls = InitialRunner.linels;
 				Map<String, Project> pjmap = InitialRunner.pjmap;
 				for (int i = 0; i < pwls.size(); i++) {
-					if (pjmap.get(pwls.get(i).getProjectid()).getWindpowerstationid().endsWith("FDC")) {
+					if (pjmap.containsKey(pwls.get(i).getProjectid()) && pjmap.get(pwls.get(i).getProjectid()).getWindpowerstationid().endsWith("FDC")) {
 						Windpowerinfoday3 wpd = (Windpowerinfoday3) map.get(pwls.get(i).getCode());
 						double lyl = 0.0;
 						if (wpd.getTotal() != 0) {
@@ -696,4 +696,36 @@ public class Windpowerinfoday3Service implements BaseService<Windpowerinfoday3,
 
 	}
 
+
+	public List<Windpowerinfoday3> getWindpowerinfoday3(String wpid, Date beginDate, Date endDate,String location) {
+
+
+		List<Windpowerinfoday3> list=new ArrayList<>();
+
+		Windpowerinfoday3Example example=new Windpowerinfoday3Example();
+		example.setOrderByClause("windpowerstationid ASC");
+
+		Windpowerinfoday3Example.Criteria criteria =example.createCriteria();
+
+		if(StringUtils.isNotEmpty(wpid))
+		{
+			criteria.andForeignkeyidEqualTo(wpid);
+		}
+
+		if(beginDate!=null && endDate!=null ){
+			criteria.andRecorddateGreaterThanOrEqualTo(beginDate).andRecorddateLessThanOrEqualTo(endDate);
+		}
+		if(StringUtils.isNotEmpty(location))
+		{
+			criteria.andLocationEqualTo(location);
+		}
+
+		criteria.andForeignkeyidLike("%FDC");
+
+
+
+		list= windpowerinfoday3Mapper.selectByExample(example);
+		return list;
+
+	}
 }

+ 72 - 0
src/main/java/com/gyee/frame/service/contrast/ContrastWtService.java

@@ -471,4 +471,76 @@ public class ContrastWtService {
 		}
 		return vos;
 	}
+
+	public Map<String, BenchMarkVo> benchmarkZjInWtList( String wpId,String wtId, String beginDate, String endDate) {
+		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+		Map<String, BenchMarkVo> bmmap=new HashMap<>();
+		Date begin=DateUtils.parseDate(beginDate);
+		Date end=DateUtils.parseDate(endDate);
+		// 获得复位及时率、状态转换及时率数据
+		Map<String, Statetransitionrates> stmap = statetransitionratesService.getStatetransitionratesByWtTotal(wpId, begin, end, 1);
+		// 获得消缺及时率数据
+		Map<String, FaultEliminateDefects> fdmap = faultEliminateDefectsService.getFaultEliminateDefectsByWtTotal(wpId, begin, end, 1);
+
+
+		List<Windturbineinfoday3> ls =windturbineinfoday3Service.getWindturbineinfoday3(wpId,wtId, begin, end) ;
+
+		Map<String, Windturbine> wtmap = InitialRunner.wtmap;
+
+		if (!ls.isEmpty()) {
+			for (Windturbineinfoday3 wd : ls) {
+
+				if (bmmap.containsKey(wd.getWindturbineid())) {
+					BenchMarkVo bm = bmmap.get(wd.getWindturbineid());
+					bm.setScadafdl(bm.getScadafdl() + wd.getDaydl2());
+					bm.setGzss(bm.getGzss() + wd.getDaynhgzssdl());
+					bm.setWhss(bm.getWhss() + wd.getDaynhwhssdl());
+					bm.setQfss(bm.getQfss() + wd.getDaynhqfdl());
+					bm.setXdss(bm.getXdss() + wd.getDaynhxdssdl());
+					bmmap.put(wd.getWindturbineid(), bm);
+				} else {
+					BenchMarkVo bm = new BenchMarkVo();
+					intialBenchMarkTemp(bm);
+					bm.setScadafdl(bm.getScadafdl() + wd.getDaydl2());
+					bm.setGzss(bm.getGzss() + wd.getDaynhgzssdl());
+					bm.setWhss(bm.getWhss() + wd.getDaynhwhssdl());
+					bm.setQfss(bm.getQfss() + wd.getDaynhqfdl());
+					bm.setXdss(bm.getXdss() + wd.getDaynhxdssdl());
+					if (wtmap.containsKey(wd.getWindturbineid())) {
+						Windturbine wt = wtmap.get(wd.getWindturbineid());
+						// bm.setWtName(wt.getName());
+						bm.setWtName(wt.getCode());
+					}
+					bm.setWtId(wd.getWindturbineid());
+
+					if (stmap.containsKey(wd.getWindturbineid())) {
+						Statetransitionrates st = stmap.get(wd.getWindturbineid());
+
+						Double temp1 = st.getTimerate1();// 小于3米5分钟转换及时次数
+						Double temp2 = st.getTimerate13();// 小于3米状态转换总次数
+						bm.setZtcs(bm.getZtcs() + temp1.intValue());
+						bm.setZtzcs(bm.getZtzcs() + temp2.intValue());
+						temp1 = st.getTimerate16();// 5分钟复位及时次数
+						temp2 = st.getTimerate20();// 总复位次数
+						bm.setFwcs(bm.getFwcs() + temp1.intValue());
+						bm.setFwzcs(bm.getFwzcs() + temp2.intValue());
+					}
+					if (fdmap.containsKey(wd.getWindturbineid())) {
+						FaultEliminateDefects fd = fdmap.get(wd.getWindturbineid());
+
+						Integer temp1 = fd.getRightcount();// 消缺及时次数
+						Integer temp2 = fd.getFaultcount();// 故障次数
+
+						bm.setXqcs(bm.getXqcs() + temp1.intValue());
+						bm.setXqzcs(bm.getXqzcs() + temp2.intValue());
+
+					}
+					bmmap.put(wd.getWindturbineid(), bm);
+
+				}
+
+			}
+		}
+		return bmmap;
+	}
 }

+ 407 - 28
src/main/java/com/gyee/frame/service/contrast/ContrastZjService.java

@@ -1,22 +1,24 @@
 package com.gyee.frame.service.contrast;
 
 import com.gyee.frame.common.spring.InitialRunner;
-import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.BenchMarkVo;
 import com.gyee.frame.model.custom.ConditionVo;
-import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.model.custom.ShutdowneventVo;
 import com.gyee.frame.service.FaultEliminateDefectsService;
+import com.gyee.frame.service.ShutdowneventService;
 import com.gyee.frame.service.StatetransitionratesService;
 import com.gyee.frame.service.Windpowerinfoday3Service;
+import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
 
 
 @Service
@@ -27,11 +29,15 @@ public class ContrastZjService {
     private FaultEliminateDefectsService faultEliminateDefectsService;
     @Autowired
     private StatetransitionratesService statetransitionratesService;
+    @Autowired
+    private ShutdowneventService shutdowneventService;
+
 
 
-    public List<BenchMarkVo> benchmarkZjList(HttpServletRequest request, Tablepar tablepar, String wpId, String year, String month, String zjs) {
-        List<BenchMarkVo> vos = new ArrayList<>();
+    public void addBenchmarkZj(HttpServletRequest request,  String wpId, String year, String month, String zjs) {
 
+
+        String pattern = "yyyy-MM-dd";
         if (StringUtils.notEmp(wpId) && StringUtils.notEmp(zjs)) {
             Map<String, Windpowerstation> wpmap = InitialRunner.wpmap;
 
@@ -48,16 +54,66 @@ public class ContrastZjService {
                     }
                     intialBenchMarkTemp(bm);
 
-//                    initialDateInfo(pattern, str, bm);// 获得开始结束时间
-//
-//                    ConditionVo vo = new ConditionVo();
-//                    vo.setBeginDate(beginDate);
-//                    vo.setEndDate(endDate);
-//                    vo.setWpId(wpId);
-//                    ctvos.add(vo);
-//
-//                    setBenchMarkInfo(bm);// 统计值际数据
-//                    setBenchMark(bm, ctvos, str);
+                    Date beginDate=new Date();
+                    Date endDate=new Date();
+                    // 获得开始结束时间
+                    int yearnumber = Integer.valueOf(year);
+                    int monthnumber = Integer.valueOf(month)-1;
+
+
+                    Calendar cal = Calendar.getInstance();
+
+                    cal.set(Calendar.YEAR,yearnumber);
+                    cal.set(Calendar.MONTH,monthnumber);
+
+                    int maxday = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
+
+                    StringBuilder sb = new StringBuilder();
+
+
+                    switch (str) {
+                        case "1":
+                            sb.append(year).append("-").append(month).append("-").append("01");
+                            beginDate = StringUtils.toDate(String.valueOf(sb), pattern);
+                            sb.setLength(0);
+                            sb.append(year).append("-").append(month).append("-").append("10");
+                            endDate = StringUtils.toDate(String.valueOf(sb), pattern);
+
+                            bm.setZjDate(String.valueOf(sb));
+
+                            break;
+                        case "2":
+
+                            sb.append(year).append("-").append(month).append("-").append("11");
+                            beginDate = StringUtils.toDate(String.valueOf(sb), pattern);
+                            sb.setLength(0);
+                            sb.append(year).append("-").append(month).append("-").append("20");
+                            endDate = StringUtils.toDate(String.valueOf(sb), pattern);
+
+                            bm.setZjDate(String.valueOf(sb));
+                            break;
+                        case "3":
+
+                            sb.append(year).append("-").append(month).append("-").append("21");
+                            beginDate = StringUtils.toDate(String.valueOf(sb), pattern);
+                            sb.setLength(0);
+                            sb.append(year).append("-").append(month).append("-").append(maxday);
+                            endDate = StringUtils.toDate(String.valueOf(sb), pattern);
+
+                            bm.setZjDate(String.valueOf(sb));
+                            break;
+                        default:
+                            break;
+                    }
+
+                    ConditionVo vo = new ConditionVo();
+                    vo.setBeginDate(beginDate);
+                    vo.setEndDate(endDate);
+                    vo.setWpId(wpId);
+                    ctvos.add(vo);
+
+                    setBenchMarkInfo(bm,wpId, beginDate, endDate);// 统计值际数据
+                    setBenchMark(bm, ctvos, str,request);
                 }
             } else {
                 BenchMarkVo bm = new BenchMarkVo();
@@ -67,24 +123,257 @@ public class ContrastZjService {
                     bm.setWpName(wp.getName());
                 }
                 intialBenchMarkTemp(bm);
-//                initialDateInfo(pattern, zjs, bm);// 获得开始结束时间
-//
-//                ConditionVo vo = new ConditionVo();
-//                vo.setBeginDate(beginDate);
-//                vo.setEndDate(endDate);
-//                vo.setWpId(wpId);
-//                ctvos.add(vo);
-//
-//                setBenchMarkInfo(bm);// 统计值际数据
-//                setBenchMark(bm, ctvos, zjs);
+                Date beginDate=new Date();
+                Date endDate=new Date();
+               // 获得开始结束时间
+                int yearnumber = Integer.valueOf(year);
+                int monthnumber = Integer.valueOf(month)-1;
+
+
+                Calendar cal = Calendar.getInstance();
+
+                cal.set(Calendar.YEAR,yearnumber);
+                cal.set(Calendar.MONTH,monthnumber);
+
+                int maxday = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
+
+                StringBuilder sb = new StringBuilder();
+
+
+                switch (zjs) {
+                    case "1":
+                        sb.append(year).append("-").append(month).append("-").append("01");
+                        beginDate = StringUtils.toDate(String.valueOf(sb), pattern);
+                        sb.setLength(0);
+                        sb.append(year).append("-").append(month).append("-").append("10");
+                        endDate = StringUtils.toDate(String.valueOf(sb), pattern);
+
+                        bm.setZjDate(String.valueOf(sb));
+
+                        break;
+                    case "2":
+
+                        sb.append(year).append("-").append(month).append("-").append("11");
+                        beginDate = StringUtils.toDate(String.valueOf(sb), pattern);
+                        sb.setLength(0);
+                        sb.append(year).append("-").append(month).append("-").append("20");
+                        endDate = StringUtils.toDate(String.valueOf(sb), pattern);
+
+                        bm.setZjDate(String.valueOf(sb));
+                        break;
+                    case "3":
+
+                        sb.append(year).append("-").append(month).append("-").append("21");
+                        beginDate = StringUtils.toDate(String.valueOf(sb), pattern);
+                        sb.setLength(0);
+                        sb.append(year).append("-").append(month).append("-").append(maxday);
+                        endDate = StringUtils.toDate(String.valueOf(sb), pattern);
+
+                        bm.setZjDate(String.valueOf(sb));
+                        break;
+                    default:
+                        break;
+                }
+                ConditionVo vo = new ConditionVo();
+                vo.setBeginDate(beginDate);
+                vo.setEndDate(endDate);
+                vo.setWpId(wpId);
+                ctvos.add(vo);
+
+                setBenchMarkInfo(bm,wpId, beginDate, endDate);// 统计值际数据
+                setBenchMark(bm, ctvos, zjs,request);
             }
 
         }
 
-        return vos;
     }
 
 
+    private void setBenchMark(BenchMarkVo bm, List<ConditionVo> ctvos, String str,HttpServletRequest request) {
+        totalBenchmarkInfo(bm);// 统计值际计算指标
+
+        bm.setCid(StringUtils.getUUID());
+        List<BenchMarkVo> vos=null;
+
+
+        switch (str) {
+            case "1":
+                bm.setZjName("一值");
+                break;
+            case "2":
+                bm.setZjName("二值");
+                break;
+            case "3":
+                bm.setZjName("三值");
+                break;
+            default:
+                break;
+        }
+
+        if (null != request.getSession().getAttribute("bmvos")) {
+            vos = (List<BenchMarkVo>) request.getSession().getAttribute("bmvos");
+        } else {
+            vos = new ArrayList<BenchMarkVo>();
+        }
+        vos.add(bm);
+
+        request.getSession().setAttribute("bmvos", vos);
+
+        Map<String, List<ConditionVo>> ctmap = null;
+        if (null != request.getSession().getAttribute("bmwtvos")) {
+            ctmap = (Map<String, List<ConditionVo>>) request.getSession().getAttribute("bmwtvos");
+
+            ctmap.put(bm.getCid(), ctvos);
+        } else {
+            ctmap = new HashMap<String, List<ConditionVo>>();
+
+            ctmap.put(bm.getCid(), ctvos);
+        }
+
+        request.getSession().setAttribute("bmwtvos", ctmap);
+    }
+
+    private void totalBenchmarkInfo(BenchMarkVo bm) {
+        // double scadafdl = bm.getScadafdl(); // scada发电量
+        // double qfss = bm.getQfss();// 欠发损失发电量
+        // double gzss = bm.getGzss();// 故障损失发电量
+        // double whss = bm.getWhss();// 维护损失发电量
+        // double xdss = bm.getXdss();// 限电损失发电量
+
+        double scadafdl = null != bm.getScadafdl() ? (new BigDecimal(bm.getScadafdl()).divide(new BigDecimal(1), 2, RoundingMode.HALF_UP).doubleValue()) : 0; // scada发电量
+        double qfss = null != bm.getQfss() ? (new BigDecimal(bm.getQfss()).divide(new BigDecimal(1), 2, RoundingMode.HALF_UP).doubleValue()) : 0;// 欠发损失发电量
+        double gzss = null != bm.getGzss() ? (new BigDecimal(bm.getGzss()).divide(new BigDecimal(1), 2, RoundingMode.HALF_UP).doubleValue()) : 0;// 故障损失发电量
+        double whss = null != bm.getWhss() ? (new BigDecimal(bm.getWhss()).divide(new BigDecimal(1), 2, RoundingMode.HALF_UP).doubleValue()) : 0;// 维护损失发电量
+        double xdss = null != bm.getXdss() ? (new BigDecimal(bm.getXdss()).divide(new BigDecimal(1), 2, RoundingMode.HALF_UP).doubleValue()) : 0;// 限电损失发电量
+
+        double llfdl = scadafdl + qfss + gzss + whss + xdss;// 理论发电量
+
+        if (llfdl != 0) {
+            double temp = xdss;
+
+            BigDecimal b1 = new BigDecimal(temp);
+            BigDecimal b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 弃风率
+            bm.setQfl(temp);
+            temp = qfss;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 性能损失率
+            bm.setXnssl(temp);
+
+            temp = gzss;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 故障损失率
+            bm.setGzssl(temp);
+
+            temp = whss;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 检修损失率
+            bm.setJxssl(temp);
+            temp = 0;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 受累损失率
+            bm.setSlssl(temp);
+            temp = scadafdl;
+
+            b1 = new BigDecimal(temp);
+            b2 = new BigDecimal(llfdl);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 风能利用率
+            bm.setFnlyl(temp);
+            // 受累损失电量
+            bm.setSlssl(0.0);
+        } else {
+            // temp 风能利用率
+            bm.setFnlyl(0.0);
+            // temp 故障损失率
+            bm.setGzssl(0.0);
+            // temp 检修损失率
+            bm.setJxssl(0.0);
+            // temp 弃风率
+            bm.setQfl(0.0);
+            // temp 受累损失率
+            bm.setSlssl(0.0);
+            // 受累损失电量
+            bm.setSlssl(0.0);
+            // temp 性能损失率
+            bm.setXnssl(0.0);
+        }
+
+        if (bm.getFwzcs() != 0) {
+
+            double temp1 = bm.getFwcs();// 5分钟复位及时次数
+            double temp2 = bm.getFwzcs();// 总复位次数
+
+            double temp = 0;
+
+            BigDecimal b1 = new BigDecimal(temp1);
+            BigDecimal b2 = new BigDecimal(temp2);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+            // temp 复位及时率
+            bm.setFwjsl(temp);
+        } else {
+            bm.setFwjsl(100.0);
+        }
+
+        if (bm.getZtzcs() != 0) {
+
+            double temp1 = bm.getZtcs();// 小于3米5分钟转换及时次数
+            double temp2 = bm.getZtzcs();// 小于3米状态转换总次数
+
+            double temp = 0;
+
+            BigDecimal b1 = new BigDecimal(temp1);
+            BigDecimal b2 = new BigDecimal(temp2);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+
+            // temp 状态转换及时率
+            bm.setZtzhjsl(temp);
+        } else {
+            bm.setZtzhjsl(100.0);
+        }
+
+        if (bm.getXqzcs() != 0) {
+
+            double temp1 = bm.getXqcs();// 消缺及时次数
+            double temp2 = bm.getXqzcs();// 故障总次数
+
+            double temp = 0;
+
+            BigDecimal b1 = new BigDecimal(temp1);
+            BigDecimal b2 = new BigDecimal(temp2);
+
+            temp = b1.divide(b2, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+
+            // temp 消缺及时率
+            bm.setXqjsl(temp);
+        } else {
+            bm.setXqjsl(100.0);
+        }
+    }
+
+
+
     private void intialBenchMarkTemp(BenchMarkVo bm) {
         bm.setScadafdl(0.0);
         bm.setGzss(0.0);
@@ -101,4 +390,94 @@ public class ContrastZjService {
         bm.setGzcs(0);
         bm.setFjts(0);
     }
+
+
+    private void setBenchMarkInfo(BenchMarkVo bm,String wpId, Date beginDate, Date endDate) {
+        // 获得复位及时率、状态转换及时率数据
+        Map<String, Statetransitionrates> stmap = statetransitionratesService.getStatetransitionratesByWpTotal(wpId, beginDate, endDate);
+        // 获得消缺及时率数据
+        Map<String, FaultEliminateDefects> fdmap = faultEliminateDefectsService.getFaultEliminateDefectsByWpTotal(wpId, beginDate, endDate);
+
+        int gzcs = 0;// 故障次数
+        int fjts = 0;// 风机台数
+        double gzcsradio = 0.0;// 故障率
+
+        Map<String, List<Windturbine>> wtsmap = InitialRunner.wp_wtmap;
+        if (wtsmap.containsKey(wpId)) {
+            List<Windturbine> wtls = wtsmap.get(wpId);
+            fjts = wtls.size();
+            // 获得故障次数集合
+            List<ShutdowneventVo> sels = shutdowneventService.queryEvents(wpId, null, beginDate, endDate, "2");
+            int daynum = DateUtils.daysDiff(beginDate, endDate);
+            gzcs = sels.size();
+
+            bm.setGzcs(bm.getGzcs() + gzcs);
+            bm.setFjts(bm.getFjts() + fjts * daynum);
+            // bm.setFjts(bm.getFjts() + fjts);
+            if (bm.getFjts() != 0) {
+                gzcsradio = new BigDecimal(bm.getGzcs()).divide(new BigDecimal(bm.getFjts()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)).doubleValue();
+                if (gzcsradio > 100.0) {
+                    gzcsradio = 100.0;
+                }
+                bm.setGzcsradio(gzcsradio);
+            }
+
+        }
+
+
+        List<Windpowerinfoday3> ls = windpowerinfoday3Service.getWindpowerinfoday3(wpId, beginDate, endDate,"windpower");
+
+        Windpowerinfoday3 w = new Windpowerinfoday3();
+        w.setDaynhxdssdl(0.0);
+        w.setDaynhgzssdl(0.0);
+        w.setDaynhwhssdl(0.0);
+        w.setDaynhqfdl(0.0);
+        w.setDaydl2(0.0);
+
+        if (!ls.isEmpty()) {
+            for (Windpowerinfoday3 wd : ls) {
+
+                w.setWindpowerstationid(wd.getWindpowerstationid());
+                double losspower1 = null != wd.getDaynhxdssdl() ? wd.getDaynhxdssdl() : 0.0;
+                double losspower2 = null != wd.getDaynhgzssdl() ? wd.getDaynhgzssdl() : 0.0;
+                double losspower3 = null != wd.getDaynhwhssdl() ? wd.getDaynhwhssdl() : 0.0;
+                double losspower4 = null != wd.getDaynhqfdl() ? wd.getDaynhqfdl() : 0.0;
+                double scadafdl = null != wd.getDaydl2() ? wd.getDaydl2() : 0; // scada发电量
+
+                w.setDaynhxdssdl(w.getDaynhxdssdl() + losspower1);
+                w.setDaynhgzssdl(w.getDaynhgzssdl() + losspower2);
+                w.setDaynhwhssdl(w.getDaynhwhssdl() + losspower3);
+                w.setDaynhqfdl(w.getDaynhqfdl() + losspower4);
+                w.setDaydl2(w.getDaydl2() + scadafdl);
+            }
+        }
+
+        bm.setScadafdl(bm.getScadafdl() + (new BigDecimal(w.getDaydl2()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue()));
+        bm.setGzss(bm.getGzss() + (new BigDecimal(w.getDaynhgzssdl()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue()));
+        bm.setWhss(bm.getWhss() + (new BigDecimal(w.getDaynhwhssdl()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue()));
+        bm.setQfss(bm.getQfss() + (new BigDecimal(w.getDaynhqfdl()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue()));
+        bm.setXdss(bm.getXdss() + (new BigDecimal(w.getDaynhxdssdl()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue()));
+        if (stmap.containsKey(wpId)) {
+            Statetransitionrates st = stmap.get(wpId);
+
+            Double temp1 = st.getTimerate1();// 小于3米5分钟转换及时次数
+            Double temp2 = st.getTimerate13();// 小于3米状态转换总次数
+            bm.setZtcs(bm.getZtcs() + temp1.intValue());
+            bm.setZtzcs(bm.getZtzcs() + temp2.intValue());
+            temp1 = st.getTimerate16();// 5分钟复位及时次数
+            temp2 = st.getTimerate20();// 总复位次数
+            bm.setFwcs(bm.getFwcs() + temp1.intValue());
+            bm.setFwzcs(bm.getFwzcs() + temp2.intValue());
+        }
+        if (fdmap.containsKey(wpId)) {
+            FaultEliminateDefects fd = fdmap.get(wpId);
+
+            Integer temp1 = fd.getRightcount();// 消缺及时次数
+            Integer temp2 = fd.getFaultcount();// 故障次数
+
+            bm.setXqcs(bm.getXqcs() + temp1.intValue());
+            bm.setXqzcs(bm.getXqzcs() + temp2.intValue());
+
+        }
+    }
 }

+ 1 - 0
src/main/java/com/gyee/frame/util/BenchmarkUtil.java

@@ -12,6 +12,7 @@ import com.gyee.frame.model.custom.BenchMarkVo;
 import com.gyee.frame.model.custom.Tablepar;
 
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;

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

@@ -195,4 +195,15 @@ public class DateUtils  extends org.apache.commons.lang3.time.DateUtils{
         cal.set(Calendar.MILLISECOND, 0);
         return cal.getTime();
     }
+
+    /**
+     * 计算两个时间之间差的天数(取整后)
+     *
+     * @param d1
+     * @param d2
+     * @return
+     */
+    public static int daysDiff(Date d1, Date d2) {
+        return (int) Math.floor(Math.abs((d1.getTime() - d2.getTime())) / (60 * 60 * 24 * 1000));
+    }
 }

+ 32 - 1
src/main/java/com/gyee/frame/util/StringUtils.java

@@ -5,9 +5,12 @@ import org.apache.commons.lang.text.StrBuilder;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Collection;
+import java.util.Date;
 import java.util.Map;
-
+import java.util.UUID;
 
 
 /**
@@ -480,4 +483,32 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
         return new BigDecimal(num).setScale(digit, RoundingMode.HALF_UP).doubleValue();
     }
+    /**
+     * 将字符串解析为Date类型
+     *
+     * @param date
+     * @param pattern
+     * @return
+     */
+    public static Date toDate(String date, String pattern) {
+        SimpleDateFormat format = new SimpleDateFormat(pattern);
+        try {
+            return format.parse(date);
+        } catch (ParseException e) {
+            throw new RuntimeException(String.format("Failed to parse the String [%s] to Date.", date), e);
+        }
+    }
+    /**
+     *
+     * @方法名称: getUUID
+     * @描述: 获得UUID
+     * @参数 @return
+     * @返回值 String
+     * @抛出异常
+     */
+    public static String getUUID() {
+        String s = UUID.randomUUID().toString();
+        // 去掉“-”符号
+        return s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18) + s.substring(19, 23) + s.substring(24);
+    }
 }

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

@@ -7,7 +7,7 @@ spring:
     druid:
      #主库数据源
      master:
-        url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC
+        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

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

@@ -102,7 +102,7 @@
         </table>-->
 
 
-        <table tableName='Statetransitionrates' domainObjectName='Statetransitionrates'/>
-        <table tableName='FaultEliminateDefects' domainObjectName='FaultEliminateDefects'/>
+        <table tableName='Shutdownevent' domainObjectName='Shutdownevent'/>
+        <table tableName='Warning' domainObjectName='Warning'/>
     </context>
 </generatorConfiguration>

+ 493 - 0
src/main/resources/mybatis/auto/ShutdowneventMapper.xml

@@ -0,0 +1,493 @@
+<?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">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Shutdownevent">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="windPowerStationId" jdbcType="VARCHAR" property="windpowerstationid" />
+    <result column="windTurbineId" jdbcType="VARCHAR" property="windturbineid" />
+    <result column="stopTime" jdbcType="TIMESTAMP" property="stoptime" />
+    <result column="startTime" jdbcType="TIMESTAMP" property="starttime" />
+    <result column="stopHours" jdbcType="DECIMAL" property="stophours" />
+    <result column="lossPower" jdbcType="DECIMAL" property="losspower" />
+    <result column="stopTypeId" jdbcType="VARCHAR" property="stoptypeid" />
+    <result column="isHandle" jdbcType="SMALLINT" property="ishandle" />
+    <result column="warningId" jdbcType="VARCHAR" property="warningid" />
+    <result column="projectId" jdbcType="VARCHAR" property="projectid" />
+    <result column="handleWay" jdbcType="VARCHAR" property="handleway" />
+    <result column="faultView" jdbcType="VARCHAR" property="faultview" />
+    <result column="statusCode" jdbcType="INTEGER" property="statuscode" />
+    <result column="mainId" jdbcType="VARCHAR" property="mainid" />
+    <result column="resetRate" jdbcType="VARCHAR" property="resetrate" />
+    <result column="stateRate" jdbcType="VARCHAR" property="staterate" />
+    <result column="failRate" jdbcType="VARCHAR" property="failrate" />
+    <result column="warningRecordsId" jdbcType="INTEGER" property="warningrecordsid" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    id, windPowerStationId, windTurbineId, stopTime, startTime, stopHours, lossPower, 
+    stopTypeId, isHandle, warningId, projectId, handleWay, faultView, statusCode, mainId, 
+    resetRate, stateRate, failRate, warningRecordsId
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.ShutdowneventExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from shutdownevent
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from shutdownevent
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from shutdownevent
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.ShutdowneventExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from shutdownevent
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Shutdownevent">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into shutdownevent (id, windPowerStationId, windTurbineId, 
+      stopTime, startTime, stopHours, 
+      lossPower, stopTypeId, isHandle, 
+      warningId, projectId, handleWay, 
+      faultView, statusCode, mainId, 
+      resetRate, stateRate, failRate, 
+      warningRecordsId)
+    values (#{id,jdbcType=VARCHAR}, #{windpowerstationid,jdbcType=VARCHAR}, #{windturbineid,jdbcType=VARCHAR}, 
+      #{stoptime,jdbcType=TIMESTAMP}, #{starttime,jdbcType=TIMESTAMP}, #{stophours,jdbcType=DECIMAL}, 
+      #{losspower,jdbcType=DECIMAL}, #{stoptypeid,jdbcType=VARCHAR}, #{ishandle,jdbcType=SMALLINT}, 
+      #{warningid,jdbcType=VARCHAR}, #{projectid,jdbcType=VARCHAR}, #{handleway,jdbcType=VARCHAR}, 
+      #{faultview,jdbcType=VARCHAR}, #{statuscode,jdbcType=INTEGER}, #{mainid,jdbcType=VARCHAR}, 
+      #{resetrate,jdbcType=VARCHAR}, #{staterate,jdbcType=VARCHAR}, #{failrate,jdbcType=VARCHAR}, 
+      #{warningrecordsid,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Shutdownevent">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into shutdownevent
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="windpowerstationid != null">
+        windPowerStationId,
+      </if>
+      <if test="windturbineid != null">
+        windTurbineId,
+      </if>
+      <if test="stoptime != null">
+        stopTime,
+      </if>
+      <if test="starttime != null">
+        startTime,
+      </if>
+      <if test="stophours != null">
+        stopHours,
+      </if>
+      <if test="losspower != null">
+        lossPower,
+      </if>
+      <if test="stoptypeid != null">
+        stopTypeId,
+      </if>
+      <if test="ishandle != null">
+        isHandle,
+      </if>
+      <if test="warningid != null">
+        warningId,
+      </if>
+      <if test="projectid != null">
+        projectId,
+      </if>
+      <if test="handleway != null">
+        handleWay,
+      </if>
+      <if test="faultview != null">
+        faultView,
+      </if>
+      <if test="statuscode != null">
+        statusCode,
+      </if>
+      <if test="mainid != null">
+        mainId,
+      </if>
+      <if test="resetrate != null">
+        resetRate,
+      </if>
+      <if test="staterate != null">
+        stateRate,
+      </if>
+      <if test="failrate != null">
+        failRate,
+      </if>
+      <if test="warningrecordsid != null">
+        warningRecordsId,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="windpowerstationid != null">
+        #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbineid != null">
+        #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="stoptime != null">
+        #{stoptime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="starttime != null">
+        #{starttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="stophours != null">
+        #{stophours,jdbcType=DECIMAL},
+      </if>
+      <if test="losspower != null">
+        #{losspower,jdbcType=DECIMAL},
+      </if>
+      <if test="stoptypeid != null">
+        #{stoptypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="ishandle != null">
+        #{ishandle,jdbcType=SMALLINT},
+      </if>
+      <if test="warningid != null">
+        #{warningid,jdbcType=VARCHAR},
+      </if>
+      <if test="projectid != null">
+        #{projectid,jdbcType=VARCHAR},
+      </if>
+      <if test="handleway != null">
+        #{handleway,jdbcType=VARCHAR},
+      </if>
+      <if test="faultview != null">
+        #{faultview,jdbcType=VARCHAR},
+      </if>
+      <if test="statuscode != null">
+        #{statuscode,jdbcType=INTEGER},
+      </if>
+      <if test="mainid != null">
+        #{mainid,jdbcType=VARCHAR},
+      </if>
+      <if test="resetrate != null">
+        #{resetrate,jdbcType=VARCHAR},
+      </if>
+      <if test="staterate != null">
+        #{staterate,jdbcType=VARCHAR},
+      </if>
+      <if test="failrate != null">
+        #{failrate,jdbcType=VARCHAR},
+      </if>
+      <if test="warningrecordsid != null">
+        #{warningrecordsid,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.ShutdowneventExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from shutdownevent
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update shutdownevent
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windpowerstationid != null">
+        windPowerStationId = #{record.windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windturbineid != null">
+        windTurbineId = #{record.windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.stoptime != null">
+        stopTime = #{record.stoptime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.starttime != null">
+        startTime = #{record.starttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.stophours != null">
+        stopHours = #{record.stophours,jdbcType=DECIMAL},
+      </if>
+      <if test="record.losspower != null">
+        lossPower = #{record.losspower,jdbcType=DECIMAL},
+      </if>
+      <if test="record.stoptypeid != null">
+        stopTypeId = #{record.stoptypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.ishandle != null">
+        isHandle = #{record.ishandle,jdbcType=SMALLINT},
+      </if>
+      <if test="record.warningid != null">
+        warningId = #{record.warningid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.projectid != null">
+        projectId = #{record.projectid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.handleway != null">
+        handleWay = #{record.handleway,jdbcType=VARCHAR},
+      </if>
+      <if test="record.faultview != null">
+        faultView = #{record.faultview,jdbcType=VARCHAR},
+      </if>
+      <if test="record.statuscode != null">
+        statusCode = #{record.statuscode,jdbcType=INTEGER},
+      </if>
+      <if test="record.mainid != null">
+        mainId = #{record.mainid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.resetrate != null">
+        resetRate = #{record.resetrate,jdbcType=VARCHAR},
+      </if>
+      <if test="record.staterate != null">
+        stateRate = #{record.staterate,jdbcType=VARCHAR},
+      </if>
+      <if test="record.failrate != null">
+        failRate = #{record.failrate,jdbcType=VARCHAR},
+      </if>
+      <if test="record.warningrecordsid != null">
+        warningRecordsId = #{record.warningrecordsid,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update shutdownevent
+    set id = #{record.id,jdbcType=VARCHAR},
+      windPowerStationId = #{record.windpowerstationid,jdbcType=VARCHAR},
+      windTurbineId = #{record.windturbineid,jdbcType=VARCHAR},
+      stopTime = #{record.stoptime,jdbcType=TIMESTAMP},
+      startTime = #{record.starttime,jdbcType=TIMESTAMP},
+      stopHours = #{record.stophours,jdbcType=DECIMAL},
+      lossPower = #{record.losspower,jdbcType=DECIMAL},
+      stopTypeId = #{record.stoptypeid,jdbcType=VARCHAR},
+      isHandle = #{record.ishandle,jdbcType=SMALLINT},
+      warningId = #{record.warningid,jdbcType=VARCHAR},
+      projectId = #{record.projectid,jdbcType=VARCHAR},
+      handleWay = #{record.handleway,jdbcType=VARCHAR},
+      faultView = #{record.faultview,jdbcType=VARCHAR},
+      statusCode = #{record.statuscode,jdbcType=INTEGER},
+      mainId = #{record.mainid,jdbcType=VARCHAR},
+      resetRate = #{record.resetrate,jdbcType=VARCHAR},
+      stateRate = #{record.staterate,jdbcType=VARCHAR},
+      failRate = #{record.failrate,jdbcType=VARCHAR},
+      warningRecordsId = #{record.warningrecordsid,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Shutdownevent">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update shutdownevent
+    <set>
+      <if test="windpowerstationid != null">
+        windPowerStationId = #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbineid != null">
+        windTurbineId = #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="stoptime != null">
+        stopTime = #{stoptime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="starttime != null">
+        startTime = #{starttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="stophours != null">
+        stopHours = #{stophours,jdbcType=DECIMAL},
+      </if>
+      <if test="losspower != null">
+        lossPower = #{losspower,jdbcType=DECIMAL},
+      </if>
+      <if test="stoptypeid != null">
+        stopTypeId = #{stoptypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="ishandle != null">
+        isHandle = #{ishandle,jdbcType=SMALLINT},
+      </if>
+      <if test="warningid != null">
+        warningId = #{warningid,jdbcType=VARCHAR},
+      </if>
+      <if test="projectid != null">
+        projectId = #{projectid,jdbcType=VARCHAR},
+      </if>
+      <if test="handleway != null">
+        handleWay = #{handleway,jdbcType=VARCHAR},
+      </if>
+      <if test="faultview != null">
+        faultView = #{faultview,jdbcType=VARCHAR},
+      </if>
+      <if test="statuscode != null">
+        statusCode = #{statuscode,jdbcType=INTEGER},
+      </if>
+      <if test="mainid != null">
+        mainId = #{mainid,jdbcType=VARCHAR},
+      </if>
+      <if test="resetrate != null">
+        resetRate = #{resetrate,jdbcType=VARCHAR},
+      </if>
+      <if test="staterate != null">
+        stateRate = #{staterate,jdbcType=VARCHAR},
+      </if>
+      <if test="failrate != null">
+        failRate = #{failrate,jdbcType=VARCHAR},
+      </if>
+      <if test="warningrecordsid != null">
+        warningRecordsId = #{warningrecordsid,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Shutdownevent">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update shutdownevent
+    set windPowerStationId = #{windpowerstationid,jdbcType=VARCHAR},
+      windTurbineId = #{windturbineid,jdbcType=VARCHAR},
+      stopTime = #{stoptime,jdbcType=TIMESTAMP},
+      startTime = #{starttime,jdbcType=TIMESTAMP},
+      stopHours = #{stophours,jdbcType=DECIMAL},
+      lossPower = #{losspower,jdbcType=DECIMAL},
+      stopTypeId = #{stoptypeid,jdbcType=VARCHAR},
+      isHandle = #{ishandle,jdbcType=SMALLINT},
+      warningId = #{warningid,jdbcType=VARCHAR},
+      projectId = #{projectid,jdbcType=VARCHAR},
+      handleWay = #{handleway,jdbcType=VARCHAR},
+      faultView = #{faultview,jdbcType=VARCHAR},
+      statusCode = #{statuscode,jdbcType=INTEGER},
+      mainId = #{mainid,jdbcType=VARCHAR},
+      resetRate = #{resetrate,jdbcType=VARCHAR},
+      stateRate = #{staterate,jdbcType=VARCHAR},
+      failRate = #{failrate,jdbcType=VARCHAR},
+      warningRecordsId = #{warningrecordsid,jdbcType=INTEGER}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 461 - 0
src/main/resources/mybatis/auto/WarningMapper.xml

@@ -0,0 +1,461 @@
+<?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.WarningMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Warning">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="levelId" jdbcType="VARCHAR" property="levelid" />
+    <result column="manufacturerCode" jdbcType="VARCHAR" property="manufacturercode" />
+    <result column="englishText" jdbcType="VARCHAR" property="englishtext" />
+    <result column="chineseText" jdbcType="VARCHAR" property="chinesetext" />
+    <result column="parentId" jdbcType="VARCHAR" property="parentid" />
+    <result column="isLeaf" jdbcType="SMALLINT" property="isleaf" />
+    <result column="sequenceNumber" jdbcType="INTEGER" property="sequencenumber" />
+    <result column="characteristic" jdbcType="VARCHAR" property="characteristic" />
+    <result column="modelId" jdbcType="VARCHAR" property="modelid" />
+    <result column="codeName" jdbcType="VARCHAR" property="codename" />
+    <result column="ednaValue" jdbcType="INTEGER" property="ednavalue" />
+    <result column="display" jdbcType="INTEGER" property="display" />
+    <result column="warningClassifyId" jdbcType="VARCHAR" property="warningclassifyid" />
+    <result column="isreset" jdbcType="DECIMAL" property="isreset" />
+    <result column="standardTime" jdbcType="DECIMAL" property="standardtime" />
+    <result column="warningtypeid" jdbcType="VARCHAR" property="warningtypeid" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    id, levelId, manufacturerCode, englishText, chineseText, parentId, isLeaf, sequenceNumber, 
+    characteristic, modelId, codeName, ednaValue, display, warningClassifyId, isreset, 
+    standardTime, warningtypeid
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WarningExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from warning
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from warning
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from warning
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WarningExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from warning
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Warning">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into warning (id, levelId, manufacturerCode, 
+      englishText, chineseText, parentId, 
+      isLeaf, sequenceNumber, characteristic, 
+      modelId, codeName, ednaValue, 
+      display, warningClassifyId, isreset, 
+      standardTime, warningtypeid)
+    values (#{id,jdbcType=VARCHAR}, #{levelid,jdbcType=VARCHAR}, #{manufacturercode,jdbcType=VARCHAR}, 
+      #{englishtext,jdbcType=VARCHAR}, #{chinesetext,jdbcType=VARCHAR}, #{parentid,jdbcType=VARCHAR}, 
+      #{isleaf,jdbcType=SMALLINT}, #{sequencenumber,jdbcType=INTEGER}, #{characteristic,jdbcType=VARCHAR}, 
+      #{modelid,jdbcType=VARCHAR}, #{codename,jdbcType=VARCHAR}, #{ednavalue,jdbcType=INTEGER}, 
+      #{display,jdbcType=INTEGER}, #{warningclassifyid,jdbcType=VARCHAR}, #{isreset,jdbcType=DECIMAL}, 
+      #{standardtime,jdbcType=DECIMAL}, #{warningtypeid,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Warning">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into warning
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="levelid != null">
+        levelId,
+      </if>
+      <if test="manufacturercode != null">
+        manufacturerCode,
+      </if>
+      <if test="englishtext != null">
+        englishText,
+      </if>
+      <if test="chinesetext != null">
+        chineseText,
+      </if>
+      <if test="parentid != null">
+        parentId,
+      </if>
+      <if test="isleaf != null">
+        isLeaf,
+      </if>
+      <if test="sequencenumber != null">
+        sequenceNumber,
+      </if>
+      <if test="characteristic != null">
+        characteristic,
+      </if>
+      <if test="modelid != null">
+        modelId,
+      </if>
+      <if test="codename != null">
+        codeName,
+      </if>
+      <if test="ednavalue != null">
+        ednaValue,
+      </if>
+      <if test="display != null">
+        display,
+      </if>
+      <if test="warningclassifyid != null">
+        warningClassifyId,
+      </if>
+      <if test="isreset != null">
+        isreset,
+      </if>
+      <if test="standardtime != null">
+        standardTime,
+      </if>
+      <if test="warningtypeid != null">
+        warningtypeid,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="levelid != null">
+        #{levelid,jdbcType=VARCHAR},
+      </if>
+      <if test="manufacturercode != null">
+        #{manufacturercode,jdbcType=VARCHAR},
+      </if>
+      <if test="englishtext != null">
+        #{englishtext,jdbcType=VARCHAR},
+      </if>
+      <if test="chinesetext != null">
+        #{chinesetext,jdbcType=VARCHAR},
+      </if>
+      <if test="parentid != null">
+        #{parentid,jdbcType=VARCHAR},
+      </if>
+      <if test="isleaf != null">
+        #{isleaf,jdbcType=SMALLINT},
+      </if>
+      <if test="sequencenumber != null">
+        #{sequencenumber,jdbcType=INTEGER},
+      </if>
+      <if test="characteristic != null">
+        #{characteristic,jdbcType=VARCHAR},
+      </if>
+      <if test="modelid != null">
+        #{modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="codename != null">
+        #{codename,jdbcType=VARCHAR},
+      </if>
+      <if test="ednavalue != null">
+        #{ednavalue,jdbcType=INTEGER},
+      </if>
+      <if test="display != null">
+        #{display,jdbcType=INTEGER},
+      </if>
+      <if test="warningclassifyid != null">
+        #{warningclassifyid,jdbcType=VARCHAR},
+      </if>
+      <if test="isreset != null">
+        #{isreset,jdbcType=DECIMAL},
+      </if>
+      <if test="standardtime != null">
+        #{standardtime,jdbcType=DECIMAL},
+      </if>
+      <if test="warningtypeid != null">
+        #{warningtypeid,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WarningExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from warning
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update warning
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.levelid != null">
+        levelId = #{record.levelid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.manufacturercode != null">
+        manufacturerCode = #{record.manufacturercode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.englishtext != null">
+        englishText = #{record.englishtext,jdbcType=VARCHAR},
+      </if>
+      <if test="record.chinesetext != null">
+        chineseText = #{record.chinesetext,jdbcType=VARCHAR},
+      </if>
+      <if test="record.parentid != null">
+        parentId = #{record.parentid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.isleaf != null">
+        isLeaf = #{record.isleaf,jdbcType=SMALLINT},
+      </if>
+      <if test="record.sequencenumber != null">
+        sequenceNumber = #{record.sequencenumber,jdbcType=INTEGER},
+      </if>
+      <if test="record.characteristic != null">
+        characteristic = #{record.characteristic,jdbcType=VARCHAR},
+      </if>
+      <if test="record.modelid != null">
+        modelId = #{record.modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.codename != null">
+        codeName = #{record.codename,jdbcType=VARCHAR},
+      </if>
+      <if test="record.ednavalue != null">
+        ednaValue = #{record.ednavalue,jdbcType=INTEGER},
+      </if>
+      <if test="record.display != null">
+        display = #{record.display,jdbcType=INTEGER},
+      </if>
+      <if test="record.warningclassifyid != null">
+        warningClassifyId = #{record.warningclassifyid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.isreset != null">
+        isreset = #{record.isreset,jdbcType=DECIMAL},
+      </if>
+      <if test="record.standardtime != null">
+        standardTime = #{record.standardtime,jdbcType=DECIMAL},
+      </if>
+      <if test="record.warningtypeid != null">
+        warningtypeid = #{record.warningtypeid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update warning
+    set id = #{record.id,jdbcType=VARCHAR},
+      levelId = #{record.levelid,jdbcType=VARCHAR},
+      manufacturerCode = #{record.manufacturercode,jdbcType=VARCHAR},
+      englishText = #{record.englishtext,jdbcType=VARCHAR},
+      chineseText = #{record.chinesetext,jdbcType=VARCHAR},
+      parentId = #{record.parentid,jdbcType=VARCHAR},
+      isLeaf = #{record.isleaf,jdbcType=SMALLINT},
+      sequenceNumber = #{record.sequencenumber,jdbcType=INTEGER},
+      characteristic = #{record.characteristic,jdbcType=VARCHAR},
+      modelId = #{record.modelid,jdbcType=VARCHAR},
+      codeName = #{record.codename,jdbcType=VARCHAR},
+      ednaValue = #{record.ednavalue,jdbcType=INTEGER},
+      display = #{record.display,jdbcType=INTEGER},
+      warningClassifyId = #{record.warningclassifyid,jdbcType=VARCHAR},
+      isreset = #{record.isreset,jdbcType=DECIMAL},
+      standardTime = #{record.standardtime,jdbcType=DECIMAL},
+      warningtypeid = #{record.warningtypeid,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Warning">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update warning
+    <set>
+      <if test="levelid != null">
+        levelId = #{levelid,jdbcType=VARCHAR},
+      </if>
+      <if test="manufacturercode != null">
+        manufacturerCode = #{manufacturercode,jdbcType=VARCHAR},
+      </if>
+      <if test="englishtext != null">
+        englishText = #{englishtext,jdbcType=VARCHAR},
+      </if>
+      <if test="chinesetext != null">
+        chineseText = #{chinesetext,jdbcType=VARCHAR},
+      </if>
+      <if test="parentid != null">
+        parentId = #{parentid,jdbcType=VARCHAR},
+      </if>
+      <if test="isleaf != null">
+        isLeaf = #{isleaf,jdbcType=SMALLINT},
+      </if>
+      <if test="sequencenumber != null">
+        sequenceNumber = #{sequencenumber,jdbcType=INTEGER},
+      </if>
+      <if test="characteristic != null">
+        characteristic = #{characteristic,jdbcType=VARCHAR},
+      </if>
+      <if test="modelid != null">
+        modelId = #{modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="codename != null">
+        codeName = #{codename,jdbcType=VARCHAR},
+      </if>
+      <if test="ednavalue != null">
+        ednaValue = #{ednavalue,jdbcType=INTEGER},
+      </if>
+      <if test="display != null">
+        display = #{display,jdbcType=INTEGER},
+      </if>
+      <if test="warningclassifyid != null">
+        warningClassifyId = #{warningclassifyid,jdbcType=VARCHAR},
+      </if>
+      <if test="isreset != null">
+        isreset = #{isreset,jdbcType=DECIMAL},
+      </if>
+      <if test="standardtime != null">
+        standardTime = #{standardtime,jdbcType=DECIMAL},
+      </if>
+      <if test="warningtypeid != null">
+        warningtypeid = #{warningtypeid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Warning">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update warning
+    set levelId = #{levelid,jdbcType=VARCHAR},
+      manufacturerCode = #{manufacturercode,jdbcType=VARCHAR},
+      englishText = #{englishtext,jdbcType=VARCHAR},
+      chineseText = #{chinesetext,jdbcType=VARCHAR},
+      parentId = #{parentid,jdbcType=VARCHAR},
+      isLeaf = #{isleaf,jdbcType=SMALLINT},
+      sequenceNumber = #{sequencenumber,jdbcType=INTEGER},
+      characteristic = #{characteristic,jdbcType=VARCHAR},
+      modelId = #{modelid,jdbcType=VARCHAR},
+      codeName = #{codename,jdbcType=VARCHAR},
+      ednaValue = #{ednavalue,jdbcType=INTEGER},
+      display = #{display,jdbcType=INTEGER},
+      warningClassifyId = #{warningclassifyid,jdbcType=VARCHAR},
+      isreset = #{isreset,jdbcType=DECIMAL},
+      standardTime = #{standardtime,jdbcType=DECIMAL},
+      warningtypeid = #{warningtypeid,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

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

@@ -61,7 +61,7 @@ public class ContrastTest {
 //            System.out.println(wtd.getValue1()+"----------------"+wtd.getValue2());
 //        }
 
-        AjaxResult ajaxResult = contrastController.benchmarkLossWtList(tablepar,wpid,"2021-01-01 00:00:00","2021-01-04 00:00:00");
+        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)

+ 59 - 0
src/test/java/test/PowercompareTest.java

@@ -0,0 +1,59 @@
+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.powercompare.PowerCompareController;
+import com.gyee.frame.model.auto.Windpowerinfoday3;
+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 PowercompareTest {
+
+    @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,1);
+        c.set(Calendar.MONTH,0);
+        c.set(Calendar.YEAR,2021);
+
+        Date beginDate = c.getTime();
+
+        String wpid="MHS_FDC";
+
+        PowerCompareController powerCompareController= SpringUtils.getBean("powerCompareController");
+
+
+        Tablepar tablepar=new Tablepar();
+        tablepar.setPageNum(1);
+        tablepar.setPageSize(10);
+
+
+        AjaxResult ajaxResult = powerCompareController.powerAjaxAll("MHS_FDC","2021-01-01","2021-01-03","xl",null,null);
+
+        List<Windpowerinfoday3> test=(List<Windpowerinfoday3>)ajaxResult.get("data");
+        for(Windpowerinfoday3 wtd:test)
+        {
+            System.out.println(wtd.getLineid()+"----------------"+wtd.getLocation());
+        }
+        System.out.println(test);
+    }
+
+
+
+
+}