Explorar el Código

待机时间和连续无故障时间

xushili hace 2 años
padre
commit
d3d18fa5fc
Se han modificado 32 ficheros con 10189 adiciones y 6 borrados
  1. 9 0
      doc/风机无故障运行时间和待机时间.txt
  2. 7 0
      src/main/java/com/gyee/frame/common/feign/IAdapterService.java
  3. 62 1
      src/main/java/com/gyee/frame/controller/export/GoldenController.java
  4. 96 0
      src/main/java/com/gyee/frame/mapper/auto/EarlywarningAnalysisPushMapper.java
  5. 96 0
      src/main/java/com/gyee/frame/mapper/auto/MaintenanceAdviceMapper.java
  6. 101 0
      src/main/java/com/gyee/frame/mapper/auto/ScadafaultMapper.java
  7. 98 0
      src/main/java/com/gyee/frame/mapper/auto/StandbyTimeMapper.java
  8. 96 0
      src/main/java/com/gyee/frame/mapper/auto/StateDuratimeMapper.java
  9. 5 4
      src/main/java/com/gyee/frame/model/auto/Alarmsnap.java
  10. 610 0
      src/main/java/com/gyee/frame/model/auto/EarlywarningAnalysisPush.java
  11. 1504 0
      src/main/java/com/gyee/frame/model/auto/EarlywarningAnalysisPushExample.java
  12. 44 0
      src/main/java/com/gyee/frame/model/auto/FaultInfo.java
  13. 112 0
      src/main/java/com/gyee/frame/model/auto/MaintenanceAdvice.java
  14. 502 0
      src/main/java/com/gyee/frame/model/auto/MaintenanceAdviceExample.java
  15. 376 0
      src/main/java/com/gyee/frame/model/auto/Scadafault.java
  16. 1052 0
      src/main/java/com/gyee/frame/model/auto/ScadafaultExample.java
  17. 278 0
      src/main/java/com/gyee/frame/model/auto/StandbyTime.java
  18. 833 0
      src/main/java/com/gyee/frame/model/auto/StandbyTimeExample.java
  19. 444 0
      src/main/java/com/gyee/frame/model/auto/StateDuratime.java
  20. 1164 0
      src/main/java/com/gyee/frame/model/auto/StateDuratimeExample.java
  21. 13 0
      src/main/java/com/gyee/frame/model/config/WindturbineStandby.java
  22. 65 0
      src/main/java/com/gyee/frame/model/custom/export/PointDataDB.java
  23. 29 0
      src/main/java/com/gyee/frame/model/excel/AlarmStat.java
  24. 457 0
      src/main/java/com/gyee/frame/schdule/windturbinestatetime/TaskWindturbineStateTime.java
  25. 285 0
      src/main/java/com/gyee/frame/service/export/EarlywarnAnalysisPushService.java
  26. 9 1
      src/main/resources/application-dev.yml
  27. 478 0
      src/main/resources/mybatis/auto/EarlywarningAnalysisPushMapper.xml
  28. 241 0
      src/main/resources/mybatis/auto/MaintenanceAdviceMapper.xml
  29. 379 0
      src/main/resources/mybatis/auto/ScadafaultMapper.xml
  30. 327 0
      src/main/resources/mybatis/auto/StandbyTimeMapper.xml
  31. 398 0
      src/main/resources/mybatis/auto/StateDuratimeMapper.xml
  32. 19 0
      src/test/java/test/GetDataTest.java

+ 9 - 0
doc/风机无故障运行时间和待机时间.txt

@@ -0,0 +1,9 @@
+服务 TaskWindturbineStateTime
+连续无故障时间  表 STATEDURATIME  字段 duraminute 单位:小时
+待机时间  表 STANDBYTIME 字段 STANDBYHOURS 单位:分钟
+
+预警分析推送 服务 EarlywarnAnalysisPushService
+
+表 EARLYWARNINGANALYSISPUSH
+
+

+ 7 - 0
src/main/java/com/gyee/frame/common/feign/IAdapterService.java

@@ -2,6 +2,8 @@ package com.gyee.frame.common.feign;
 
 import com.alibaba.fastjson.JSONObject;
 import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.model.custom.export.PointDataDB;
 import com.gyee.frame.model.custom.export.TsPointData;
 import feign.Headers;
 import feign.Param;
@@ -29,6 +31,11 @@ public interface IAdapterService {
                                      @Param(value = "endTs") long endTs);
 
     @Headers({"Content-Type: application/json", "Accept: application/json"})
+    @RequestLine("GET /ts/history/raw?tagName={tagName}&startTs={startTs}&endTs={endTs}")
+    List<PointDataDB> getHistoryRawDB(@Param(value = "tagName") String tagName, @Param(value = "startTs") long startTs,
+                                    @Param(value = "endTs") long endTs);
+
+    @Headers({"Content-Type: application/json", "Accept: application/json"})
     @RequestLine("GET /ts/history/section?tagNames={tagNames}&ts={ts}")
     List<TsPointData> getHistorySection(@Param(value = "tagNames") String tagNames, @Param(value = "ts") long ts);
 

+ 62 - 1
src/main/java/com/gyee/frame/controller/export/GoldenController.java

@@ -1,9 +1,15 @@
 package com.gyee.frame.controller.export;
 
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.feign.RemoteServiceBuilder;
+import com.gyee.frame.model.auto.EarlywarningAnalysisPush;
+import com.gyee.frame.model.excel.AlarmStat;
 import com.gyee.frame.service.WindpowerstationService;
+import com.gyee.frame.service.export.EarlywarnAnalysisPushService;
 import com.gyee.frame.service.export.GoldenService;
 import com.gyee.frame.util.excel.FileUtils;
 import com.gyee.frame.util.excel.ZipUtils;
@@ -14,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.io.File;
+import java.lang.reflect.Type;
 import java.util.*;
 
 @RestController
@@ -25,11 +32,17 @@ public class GoldenController {
     private GoldenService goldenService;
     @Autowired
     private WindpowerstationService stationService;
+    @Autowired
+    private EarlywarnAnalysisPushService earlywarnAnalysisPushService;
 
-
+    @Autowired
+    private RemoteServiceBuilder remoteServiceBuilder;
     @Autowired
     FileUtils fileUtils;
 
+    private AjaxResult earlyWarning;
+    private String startdate;
+
 
     /**
      * 查询所有的场站
@@ -120,5 +133,53 @@ public class GoldenController {
         return result;
     }
 
+    /**
+     * 预警分析推
+     * @return
+     */
+    @GetMapping("/earlywarnanalysispush")
+    public AjaxResult earlywarnanalysispush() {
+        return earlywarnAnalysisPushService.getEarlywarnanalysispush(startdate,earlyWarning);
+    }
+
+    /**
+     * 预警分析推送间隔天数设置
+     * @param jgts
+     * @return
+     */
+    @GetMapping("/jgts/{jgts}")
+    public AjaxResult jgts(@PathVariable int jgts) {
+        EarlywarnAnalysisPushService.setJgts(jgts);
+        return AjaxResult.success();
+    }
+
+
+    @GetMapping(value = "/count/query/new2")
+    public AjaxResult querynew2(
+            @RequestParam String stationid,
+            @RequestParam String startdate,
+            @RequestParam String enddate
+    ) {
+        this.startdate = startdate;
+        earlyWarning = remoteServiceBuilder.earlyService().getEarlyWarning(stationid, startdate, enddate);
+        return earlyWarning;
+    }
+
+    @GetMapping("/getearlywarnanalysis")
+    public AjaxResult getEarlywarnanalysis(
+            @RequestParam String stationid,
+            @RequestParam String startdate,
+            @RequestParam String enddate
+    ) {
+        return AjaxResult.successData(200, earlywarnAnalysisPushService.getEarlywarnanalysis(stationid, startdate, enddate));
+    }
+
+    @PostMapping("/saveearlywarnanalysis")
+    public AjaxResult saveEarlywarnanalysis(List<EarlywarningAnalysisPush> analysisPushes){
+        if(earlywarnAnalysisPushService.saveEarlywarnanalysis(analysisPushes)>0){
+            return AjaxResult.success();
+        }
+        return AjaxResult.error("保存0条!");
+    }
 
 }

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

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

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

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

+ 101 - 0
src/main/java/com/gyee/frame/mapper/auto/ScadafaultMapper.java

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

+ 98 - 0
src/main/java/com/gyee/frame/mapper/auto/StandbyTimeMapper.java

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

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

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

+ 5 - 4
src/main/java/com/gyee/frame/model/auto/Alarmsnap.java

@@ -1,6 +1,7 @@
 package com.gyee.frame.model.auto;
 
 import java.io.Serializable;
+import java.math.BigInteger;
 import java.util.Date;
 
 public class Alarmsnap implements Serializable {
@@ -11,7 +12,7 @@ public class Alarmsnap implements Serializable {
      *
      * @mbg.generated
      */
-    private Integer id;
+    private BigInteger id;
 
     /**
      *
@@ -200,8 +201,8 @@ public class Alarmsnap implements Serializable {
      *
      * @mbg.generated
      */
-    public Integer getId() {
-        return id;
+    public Long getId() {
+        return id.longValue();
     }
 
     /**
@@ -212,7 +213,7 @@ public class Alarmsnap implements Serializable {
      *
      * @mbg.generated
      */
-    public void setId(Integer id) {
+    public void setId(BigInteger id) {
         this.id = id;
     }
 

+ 610 - 0
src/main/java/com/gyee/frame/model/auto/EarlywarningAnalysisPush.java

@@ -0,0 +1,610 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Date;
+
+public class EarlywarningAnalysisPush implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.ID
+     *
+     * @mbg.generated
+     */
+    private Long id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.COUNTDAY
+     *
+     * @mbg.generated
+     */
+    private String countday;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.STATIONID
+     *
+     * @mbg.generated
+     */
+    private String stationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.STATIONNAME
+     *
+     * @mbg.generated
+     */
+    private String stationname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    private String windturbineid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.WINDTURBINENAME
+     *
+     * @mbg.generated
+     */
+    private String windturbinename;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.WARNGRAD
+     *
+     * @mbg.generated
+     */
+    private String warngrad;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.WARNNAME
+     *
+     * @mbg.generated
+     */
+    private String warnname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.WARNCOUNT
+     *
+     * @mbg.generated
+     */
+    private Integer warncount;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.WARNMINUTE
+     *
+     * @mbg.generated
+     */
+    private Double warnminute;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.SNAPID
+     *
+     * @mbg.generated
+     */
+    private Long snapid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.RELATEPARTS
+     *
+     * @mbg.generated
+     */
+    private String relateparts;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.RELATEPARTSTEXT
+     *
+     * @mbg.generated
+     */
+    private String relatepartstext;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.MAINTENANCEADVICEID
+     *
+     * @mbg.generated
+     */
+    private Long maintenanceadviceid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.REASONSPROBLEM
+     *
+     * @mbg.generated
+     */
+    private String reasonsproblem;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.BEHEBUNGCRAFT
+     *
+     * @mbg.generated
+     */
+    private String behebungcraft;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.LEFTOVERPROBLEM
+     *
+     * @mbg.generated
+     */
+    private String leftoverproblem;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column EARLYWARNINGANALYSISPUSH.COUNTTIME
+     *
+     * @mbg.generated
+     */
+    private Date counttime;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table EARLYWARNINGANALYSISPUSH
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.ID
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.ID
+     *
+     * @mbg.generated
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.ID
+     *
+     * @param id the value for EARLYWARNINGANALYSISPUSH.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.COUNTDAY
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.COUNTDAY
+     *
+     * @mbg.generated
+     */
+    public String getCountday() {
+        return countday;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.COUNTDAY
+     *
+     * @param countday the value for EARLYWARNINGANALYSISPUSH.COUNTDAY
+     *
+     * @mbg.generated
+     */
+    public void setCountday(String countday) {
+        this.countday = countday == null ? null : countday.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.STATIONID
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.STATIONID
+     *
+     * @mbg.generated
+     */
+    public String getStationid() {
+        return stationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.STATIONID
+     *
+     * @param stationid the value for EARLYWARNINGANALYSISPUSH.STATIONID
+     *
+     * @mbg.generated
+     */
+    public void setStationid(String stationid) {
+        this.stationid = stationid == null ? null : stationid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.STATIONNAME
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.STATIONNAME
+     *
+     * @mbg.generated
+     */
+    public String getStationname() {
+        return stationname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.STATIONNAME
+     *
+     * @param stationname the value for EARLYWARNINGANALYSISPUSH.STATIONNAME
+     *
+     * @mbg.generated
+     */
+    public void setStationname(String stationname) {
+        this.stationname = stationname == null ? null : stationname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.WINDTURBINEID
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    public String getWindturbineid() {
+        return windturbineid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.WINDTURBINEID
+     *
+     * @param windturbineid the value for EARLYWARNINGANALYSISPUSH.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 EARLYWARNINGANALYSISPUSH.WINDTURBINENAME
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.WINDTURBINENAME
+     *
+     * @mbg.generated
+     */
+    public String getWindturbinename() {
+        return windturbinename;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.WINDTURBINENAME
+     *
+     * @param windturbinename the value for EARLYWARNINGANALYSISPUSH.WINDTURBINENAME
+     *
+     * @mbg.generated
+     */
+    public void setWindturbinename(String windturbinename) {
+        this.windturbinename = windturbinename == null ? null : windturbinename.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.WARNGRAD
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.WARNGRAD
+     *
+     * @mbg.generated
+     */
+    public String getWarngrad() {
+        return warngrad;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.WARNGRAD
+     *
+     * @param warngrad the value for EARLYWARNINGANALYSISPUSH.WARNGRAD
+     *
+     * @mbg.generated
+     */
+    public void setWarngrad(String warngrad) {
+        this.warngrad = warngrad == null ? null : warngrad.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.WARNNAME
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.WARNNAME
+     *
+     * @mbg.generated
+     */
+    public String getWarnname() {
+        return warnname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.WARNNAME
+     *
+     * @param warnname the value for EARLYWARNINGANALYSISPUSH.WARNNAME
+     *
+     * @mbg.generated
+     */
+    public void setWarnname(String warnname) {
+        this.warnname = warnname == null ? null : warnname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.WARNCOUNT
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.WARNCOUNT
+     *
+     * @mbg.generated
+     */
+    public Integer getWarncount() {
+        return warncount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.WARNCOUNT
+     *
+     * @param warncount the value for EARLYWARNINGANALYSISPUSH.WARNCOUNT
+     *
+     * @mbg.generated
+     */
+    public void setWarncount(Integer warncount) {
+        this.warncount = warncount;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.WARNMINUTE
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.WARNMINUTE
+     *
+     * @mbg.generated
+     */
+    public Double getWarnminute() {
+        return warnminute;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.WARNMINUTE
+     *
+     * @param warnminute the value for EARLYWARNINGANALYSISPUSH.WARNMINUTE
+     *
+     * @mbg.generated
+     */
+    public void setWarnminute(Double warnminute) {
+        this.warnminute = warnminute;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.SNAPID
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.SNAPID
+     *
+     * @mbg.generated
+     */
+    public Long getSnapid() {
+        return snapid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.SNAPID
+     *
+     * @param snapid the value for EARLYWARNINGANALYSISPUSH.SNAPID
+     *
+     * @mbg.generated
+     */
+    public void setSnapid(Long snapid) {
+        this.snapid = snapid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.RELATEPARTS
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.RELATEPARTS
+     *
+     * @mbg.generated
+     */
+    public String getRelateparts() {
+        return relateparts;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.RELATEPARTS
+     *
+     * @param relateparts the value for EARLYWARNINGANALYSISPUSH.RELATEPARTS
+     *
+     * @mbg.generated
+     */
+    public void setRelateparts(String relateparts) {
+        this.relateparts = relateparts == null ? null : relateparts.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.RELATEPARTSTEXT
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.RELATEPARTSTEXT
+     *
+     * @mbg.generated
+     */
+    public String getRelatepartstext() {
+        return relatepartstext;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.RELATEPARTSTEXT
+     *
+     * @param relatepartstext the value for EARLYWARNINGANALYSISPUSH.RELATEPARTSTEXT
+     *
+     * @mbg.generated
+     */
+    public void setRelatepartstext(String relatepartstext) {
+        this.relatepartstext = relatepartstext == null ? null : relatepartstext.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.MAINTENANCEADVICEID
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.MAINTENANCEADVICEID
+     *
+     * @mbg.generated
+     */
+    public Long getMaintenanceadviceid() {
+        return maintenanceadviceid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.MAINTENANCEADVICEID
+     *
+     * @param maintenanceadviceid the value for EARLYWARNINGANALYSISPUSH.MAINTENANCEADVICEID
+     *
+     * @mbg.generated
+     */
+    public void setMaintenanceadviceid(Long maintenanceadviceid) {
+        this.maintenanceadviceid = maintenanceadviceid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.REASONSPROBLEM
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.REASONSPROBLEM
+     *
+     * @mbg.generated
+     */
+    public String getReasonsproblem() {
+        return reasonsproblem;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.REASONSPROBLEM
+     *
+     * @param reasonsproblem the value for EARLYWARNINGANALYSISPUSH.REASONSPROBLEM
+     *
+     * @mbg.generated
+     */
+    public void setReasonsproblem(String reasonsproblem) {
+        this.reasonsproblem = reasonsproblem == null ? null : reasonsproblem.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.BEHEBUNGCRAFT
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.BEHEBUNGCRAFT
+     *
+     * @mbg.generated
+     */
+    public String getBehebungcraft() {
+        return behebungcraft;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.BEHEBUNGCRAFT
+     *
+     * @param behebungcraft the value for EARLYWARNINGANALYSISPUSH.BEHEBUNGCRAFT
+     *
+     * @mbg.generated
+     */
+    public void setBehebungcraft(String behebungcraft) {
+        this.behebungcraft = behebungcraft == null ? null : behebungcraft.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.LEFTOVERPROBLEM
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.LEFTOVERPROBLEM
+     *
+     * @mbg.generated
+     */
+    public String getLeftoverproblem() {
+        return leftoverproblem;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.LEFTOVERPROBLEM
+     *
+     * @param leftoverproblem the value for EARLYWARNINGANALYSISPUSH.LEFTOVERPROBLEM
+     *
+     * @mbg.generated
+     */
+    public void setLeftoverproblem(String leftoverproblem) {
+        this.leftoverproblem = leftoverproblem == null ? null : leftoverproblem.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column EARLYWARNINGANALYSISPUSH.COUNTTIME
+     *
+     * @return the value of EARLYWARNINGANALYSISPUSH.COUNTTIME
+     *
+     * @mbg.generated
+     */
+    public Date getCounttime() {
+        return counttime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column EARLYWARNINGANALYSISPUSH.COUNTTIME
+     *
+     * @param counttime the value for EARLYWARNINGANALYSISPUSH.COUNTTIME
+     *
+     * @mbg.generated
+     */
+    public void setCounttime(Date counttime) {
+        this.counttime = counttime;
+    }
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1504 - 0
src/main/java/com/gyee/frame/model/auto/EarlywarningAnalysisPushExample.java


+ 44 - 0
src/main/java/com/gyee/frame/model/auto/FaultInfo.java

@@ -0,0 +1,44 @@
+package com.gyee.frame.model.auto;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class FaultInfo {
+    private long id;
+    //报警时间
+    private Date faultTime;
+    //对象类型
+    private int messageType;
+    //报警内容
+    private long snapID;
+
+    private String stationId;
+
+    private String projectId;
+
+    private String lineId;
+
+    private String windturbineId;
+    //报警对应故障编码
+    private long alertValue;
+    //报警级别
+    private String rank;
+
+    private String category1;
+
+    private String category2;
+
+    private String category3;
+
+    private boolean isOpened;
+
+    private String stationName;
+
+    private String windturbineName;
+
+    private String alertText;
+
+    private String modelId;
+}

+ 112 - 0
src/main/java/com/gyee/frame/model/auto/MaintenanceAdvice.java

@@ -0,0 +1,112 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+
+public class MaintenanceAdvice implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINTENANCEADVICE.ID
+     *
+     * @mbg.generated
+     */
+    private Long id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINTENANCEADVICE.ALERTTEXT
+     *
+     * @mbg.generated
+     */
+    private String alerttext;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column MAINTENANCEADVICE.MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    private String maintenanceadvice;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINTENANCEADVICE.ID
+     *
+     * @return the value of MAINTENANCEADVICE.ID
+     *
+     * @mbg.generated
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINTENANCEADVICE.ID
+     *
+     * @param id the value for MAINTENANCEADVICE.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINTENANCEADVICE.ALERTTEXT
+     *
+     * @return the value of MAINTENANCEADVICE.ALERTTEXT
+     *
+     * @mbg.generated
+     */
+    public String getAlerttext() {
+        return alerttext;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINTENANCEADVICE.ALERTTEXT
+     *
+     * @param alerttext the value for MAINTENANCEADVICE.ALERTTEXT
+     *
+     * @mbg.generated
+     */
+    public void setAlerttext(String alerttext) {
+        this.alerttext = alerttext == null ? null : alerttext.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column MAINTENANCEADVICE.MAINTENANCEADVICE
+     *
+     * @return the value of MAINTENANCEADVICE.MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public String getMaintenanceadvice() {
+        return maintenanceadvice;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column MAINTENANCEADVICE.MAINTENANCEADVICE
+     *
+     * @param maintenanceadvice the value for MAINTENANCEADVICE.MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public void setMaintenanceadvice(String maintenanceadvice) {
+        this.maintenanceadvice = maintenanceadvice == null ? null : maintenanceadvice.trim();
+    }
+}

+ 502 - 0
src/main/java/com/gyee/frame/model/auto/MaintenanceAdviceExample.java

@@ -0,0 +1,502 @@
+package com.gyee.frame.model.auto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MaintenanceAdviceExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public MaintenanceAdviceExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("ID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("ID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Short value) {
+            addCriterion("ID =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Short value) {
+            addCriterion("ID <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Short value) {
+            addCriterion("ID >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Short value) {
+            addCriterion("ID >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Short value) {
+            addCriterion("ID <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Short value) {
+            addCriterion("ID <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Short> values) {
+            addCriterion("ID in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Short> values) {
+            addCriterion("ID not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Short value1, Short value2) {
+            addCriterion("ID between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Short value1, Short value2) {
+            addCriterion("ID not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextIsNull() {
+            addCriterion("ALERTTEXT is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextIsNotNull() {
+            addCriterion("ALERTTEXT is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextEqualTo(String value) {
+            addCriterion("ALERTTEXT =", value, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextNotEqualTo(String value) {
+            addCriterion("ALERTTEXT <>", value, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextGreaterThan(String value) {
+            addCriterion("ALERTTEXT >", value, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextGreaterThanOrEqualTo(String value) {
+            addCriterion("ALERTTEXT >=", value, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextLessThan(String value) {
+            addCriterion("ALERTTEXT <", value, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextLessThanOrEqualTo(String value) {
+            addCriterion("ALERTTEXT <=", value, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextLike(String value) {
+            addCriterion("ALERTTEXT like", value, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextNotLike(String value) {
+            addCriterion("ALERTTEXT not like", value, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextIn(List<String> values) {
+            addCriterion("ALERTTEXT in", values, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextNotIn(List<String> values) {
+            addCriterion("ALERTTEXT not in", values, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextBetween(String value1, String value2) {
+            addCriterion("ALERTTEXT between", value1, value2, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andAlerttextNotBetween(String value1, String value2) {
+            addCriterion("ALERTTEXT not between", value1, value2, "alerttext");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceIsNull() {
+            addCriterion("MAINTENANCEADVICE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceIsNotNull() {
+            addCriterion("MAINTENANCEADVICE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceEqualTo(String value) {
+            addCriterion("MAINTENANCEADVICE =", value, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceNotEqualTo(String value) {
+            addCriterion("MAINTENANCEADVICE <>", value, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceGreaterThan(String value) {
+            addCriterion("MAINTENANCEADVICE >", value, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceGreaterThanOrEqualTo(String value) {
+            addCriterion("MAINTENANCEADVICE >=", value, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceLessThan(String value) {
+            addCriterion("MAINTENANCEADVICE <", value, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceLessThanOrEqualTo(String value) {
+            addCriterion("MAINTENANCEADVICE <=", value, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceLike(String value) {
+            addCriterion("MAINTENANCEADVICE like", value, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceNotLike(String value) {
+            addCriterion("MAINTENANCEADVICE not like", value, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceIn(List<String> values) {
+            addCriterion("MAINTENANCEADVICE in", values, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceNotIn(List<String> values) {
+            addCriterion("MAINTENANCEADVICE not in", values, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceBetween(String value1, String value2) {
+            addCriterion("MAINTENANCEADVICE between", value1, value2, "maintenanceadvice");
+            return (Criteria) this;
+        }
+
+        public Criteria andMaintenanceadviceNotBetween(String value1, String value2) {
+            addCriterion("MAINTENANCEADVICE not between", value1, value2, "maintenanceadvice");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated do_not_delete_during_merge
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table MAINTENANCEADVICE
+     *
+     * @mbg.generated
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 376 - 0
src/main/java/com/gyee/frame/model/auto/Scadafault.java

@@ -0,0 +1,376 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+
+public class Scadafault implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.ID
+     *
+     * @mbg.generated
+     */
+    private Short id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.POINTKEY
+     *
+     * @mbg.generated
+     */
+    private String pointkey;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.DESCRIPTION
+     *
+     * @mbg.generated
+     */
+    private String description;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.CATEGORY1
+     *
+     * @mbg.generated
+     */
+    private String category1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.CATEGORY2
+     *
+     * @mbg.generated
+     */
+    private String category2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.CATEGORY3
+     *
+     * @mbg.generated
+     */
+    private String category3;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.CATEGORY4
+     *
+     * @mbg.generated
+     */
+    private String category4;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.STATIONID
+     *
+     * @mbg.generated
+     */
+    private String stationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.DEVICEID
+     *
+     * @mbg.generated
+     */
+    private String deviceid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.RANK
+     *
+     * @mbg.generated
+     */
+    private String rank;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column SCADAFAULT.ENABLED
+     *
+     * @mbg.generated
+     */
+    private Short enabled;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table SCADAFAULT
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.ID
+     *
+     * @return the value of SCADAFAULT.ID
+     *
+     * @mbg.generated
+     */
+    public Short getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.ID
+     *
+     * @param id the value for SCADAFAULT.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Short id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.POINTKEY
+     *
+     * @return the value of SCADAFAULT.POINTKEY
+     *
+     * @mbg.generated
+     */
+    public String getPointkey() {
+        return pointkey;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.POINTKEY
+     *
+     * @param pointkey the value for SCADAFAULT.POINTKEY
+     *
+     * @mbg.generated
+     */
+    public void setPointkey(String pointkey) {
+        this.pointkey = pointkey == null ? null : pointkey.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.DESCRIPTION
+     *
+     * @return the value of SCADAFAULT.DESCRIPTION
+     *
+     * @mbg.generated
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.DESCRIPTION
+     *
+     * @param description the value for SCADAFAULT.DESCRIPTION
+     *
+     * @mbg.generated
+     */
+    public void setDescription(String description) {
+        this.description = description == null ? null : description.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.CATEGORY1
+     *
+     * @return the value of SCADAFAULT.CATEGORY1
+     *
+     * @mbg.generated
+     */
+    public String getCategory1() {
+        return category1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.CATEGORY1
+     *
+     * @param category1 the value for SCADAFAULT.CATEGORY1
+     *
+     * @mbg.generated
+     */
+    public void setCategory1(String category1) {
+        this.category1 = category1 == null ? null : category1.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.CATEGORY2
+     *
+     * @return the value of SCADAFAULT.CATEGORY2
+     *
+     * @mbg.generated
+     */
+    public String getCategory2() {
+        return category2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.CATEGORY2
+     *
+     * @param category2 the value for SCADAFAULT.CATEGORY2
+     *
+     * @mbg.generated
+     */
+    public void setCategory2(String category2) {
+        this.category2 = category2 == null ? null : category2.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.CATEGORY3
+     *
+     * @return the value of SCADAFAULT.CATEGORY3
+     *
+     * @mbg.generated
+     */
+    public String getCategory3() {
+        return category3;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.CATEGORY3
+     *
+     * @param category3 the value for SCADAFAULT.CATEGORY3
+     *
+     * @mbg.generated
+     */
+    public void setCategory3(String category3) {
+        this.category3 = category3 == null ? null : category3.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.CATEGORY4
+     *
+     * @return the value of SCADAFAULT.CATEGORY4
+     *
+     * @mbg.generated
+     */
+    public String getCategory4() {
+        return category4;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.CATEGORY4
+     *
+     * @param category4 the value for SCADAFAULT.CATEGORY4
+     *
+     * @mbg.generated
+     */
+    public void setCategory4(String category4) {
+        this.category4 = category4 == null ? null : category4.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.STATIONID
+     *
+     * @return the value of SCADAFAULT.STATIONID
+     *
+     * @mbg.generated
+     */
+    public String getStationid() {
+        return stationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.STATIONID
+     *
+     * @param stationid the value for SCADAFAULT.STATIONID
+     *
+     * @mbg.generated
+     */
+    public void setStationid(String stationid) {
+        this.stationid = stationid == null ? null : stationid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.DEVICEID
+     *
+     * @return the value of SCADAFAULT.DEVICEID
+     *
+     * @mbg.generated
+     */
+    public String getDeviceid() {
+        return deviceid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.DEVICEID
+     *
+     * @param deviceid the value for SCADAFAULT.DEVICEID
+     *
+     * @mbg.generated
+     */
+    public void setDeviceid(String deviceid) {
+        this.deviceid = deviceid == null ? null : deviceid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.RANK
+     *
+     * @return the value of SCADAFAULT.RANK
+     *
+     * @mbg.generated
+     */
+    public String getRank() {
+        return rank;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.RANK
+     *
+     * @param rank the value for SCADAFAULT.RANK
+     *
+     * @mbg.generated
+     */
+    public void setRank(String rank) {
+        this.rank = rank == null ? null : rank.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column SCADAFAULT.ENABLED
+     *
+     * @return the value of SCADAFAULT.ENABLED
+     *
+     * @mbg.generated
+     */
+    public Short getEnabled() {
+        return enabled;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column SCADAFAULT.ENABLED
+     *
+     * @param enabled the value for SCADAFAULT.ENABLED
+     *
+     * @mbg.generated
+     */
+    public void setEnabled(Short enabled) {
+        this.enabled = enabled;
+    }
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1052 - 0
src/main/java/com/gyee/frame/model/auto/ScadafaultExample.java


+ 278 - 0
src/main/java/com/gyee/frame/model/auto/StandbyTime.java

@@ -0,0 +1,278 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class StandbyTime implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STANDBYTIME.ID
+     *
+     * @mbg.generated
+     */
+    private Short id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STANDBYTIME.COUNTDAY
+     *
+     * @mbg.generated
+     */
+    private Date countday;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STANDBYTIME.STANDBYHOURS
+     *
+     * @mbg.generated
+     */
+    private Long standbyhours;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STANDBYTIME.STATIONID
+     *
+     * @mbg.generated
+     */
+    private String stationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STANDBYTIME.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    private String windturbineid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STANDBYTIME.MODELID
+     *
+     * @mbg.generated
+     */
+    private String modelid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STANDBYTIME.STATETYPE
+     *
+     * @mbg.generated
+     */
+    private String statetype;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STANDBYTIME.MESSAGE
+     *
+     * @mbg.generated
+     */
+    private String message;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STANDBYTIME.ID
+     *
+     * @return the value of STANDBYTIME.ID
+     *
+     * @mbg.generated
+     */
+    public Short getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STANDBYTIME.ID
+     *
+     * @param id the value for STANDBYTIME.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Short id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STANDBYTIME.COUNTDAY
+     *
+     * @return the value of STANDBYTIME.COUNTDAY
+     *
+     * @mbg.generated
+     */
+    public Date getCountday() {
+        return countday;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STANDBYTIME.COUNTDAY
+     *
+     * @param countday the value for STANDBYTIME.COUNTDAY
+     *
+     * @mbg.generated
+     */
+    public void setCountday(Date countday) {
+        this.countday = countday;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STANDBYTIME.STANDBYHOURS
+     *
+     * @return the value of STANDBYTIME.STANDBYHOURS
+     *
+     * @mbg.generated
+     */
+    public Long getStandbyhours() {
+        return standbyhours;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STANDBYTIME.STANDBYHOURS
+     *
+     * @param standbyhours the value for STANDBYTIME.STANDBYHOURS
+     *
+     * @mbg.generated
+     */
+    public void setStandbyhours(Long standbyhours) {
+        this.standbyhours = standbyhours;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STANDBYTIME.STATIONID
+     *
+     * @return the value of STANDBYTIME.STATIONID
+     *
+     * @mbg.generated
+     */
+    public String getStationid() {
+        return stationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STANDBYTIME.STATIONID
+     *
+     * @param stationid the value for STANDBYTIME.STATIONID
+     *
+     * @mbg.generated
+     */
+    public void setStationid(String stationid) {
+        this.stationid = stationid == null ? null : stationid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STANDBYTIME.WINDTURBINEID
+     *
+     * @return the value of STANDBYTIME.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    public String getWindturbineid() {
+        return windturbineid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STANDBYTIME.WINDTURBINEID
+     *
+     * @param windturbineid the value for STANDBYTIME.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 STANDBYTIME.MODELID
+     *
+     * @return the value of STANDBYTIME.MODELID
+     *
+     * @mbg.generated
+     */
+    public String getModelid() {
+        return modelid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STANDBYTIME.MODELID
+     *
+     * @param modelid the value for STANDBYTIME.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 STANDBYTIME.STATETYPE
+     *
+     * @return the value of STANDBYTIME.STATETYPE
+     *
+     * @mbg.generated
+     */
+    public String getStatetype() {
+        return statetype;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STANDBYTIME.STATETYPE
+     *
+     * @param statetype the value for STANDBYTIME.STATETYPE
+     *
+     * @mbg.generated
+     */
+    public void setStatetype(String statetype) {
+        this.statetype = statetype == null ? null : statetype.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STANDBYTIME.MESSAGE
+     *
+     * @return the value of STANDBYTIME.MESSAGE
+     *
+     * @mbg.generated
+     */
+    public String getMessage() {
+        return message;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STANDBYTIME.MESSAGE
+     *
+     * @param message the value for STANDBYTIME.MESSAGE
+     *
+     * @mbg.generated
+     */
+    public void setMessage(String message) {
+        this.message = message == null ? null : message.trim();
+    }
+}

+ 833 - 0
src/main/java/com/gyee/frame/model/auto/StandbyTimeExample.java

@@ -0,0 +1,833 @@
+package com.gyee.frame.model.auto;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class StandbyTimeExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public StandbyTimeExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("ID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("ID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Short value) {
+            addCriterion("ID =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Short value) {
+            addCriterion("ID <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Short value) {
+            addCriterion("ID >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Short value) {
+            addCriterion("ID >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Short value) {
+            addCriterion("ID <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Short value) {
+            addCriterion("ID <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Short> values) {
+            addCriterion("ID in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Short> values) {
+            addCriterion("ID not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Short value1, Short value2) {
+            addCriterion("ID between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Short value1, Short value2) {
+            addCriterion("ID not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayIsNull() {
+            addCriterion("COUNTDAY is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayIsNotNull() {
+            addCriterion("COUNTDAY is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayEqualTo(Date value) {
+            addCriterion("COUNTDAY =", value, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayNotEqualTo(Date value) {
+            addCriterion("COUNTDAY <>", value, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayGreaterThan(Date value) {
+            addCriterion("COUNTDAY >", value, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayGreaterThanOrEqualTo(Date value) {
+            addCriterion("COUNTDAY >=", value, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayLessThan(Date value) {
+            addCriterion("COUNTDAY <", value, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayLessThanOrEqualTo(Date value) {
+            addCriterion("COUNTDAY <=", value, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayIn(List<Date> values) {
+            addCriterion("COUNTDAY in", values, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayNotIn(List<Date> values) {
+            addCriterion("COUNTDAY not in", values, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayBetween(Date value1, Date value2) {
+            addCriterion("COUNTDAY between", value1, value2, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andCountdayNotBetween(Date value1, Date value2) {
+            addCriterion("COUNTDAY not between", value1, value2, "countday");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursIsNull() {
+            addCriterion("STANDBYHOURS is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursIsNotNull() {
+            addCriterion("STANDBYHOURS is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursEqualTo(Long value) {
+            addCriterion("STANDBYHOURS =", value, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursNotEqualTo(Long value) {
+            addCriterion("STANDBYHOURS <>", value, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursGreaterThan(Long value) {
+            addCriterion("STANDBYHOURS >", value, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursGreaterThanOrEqualTo(Long value) {
+            addCriterion("STANDBYHOURS >=", value, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursLessThan(Long value) {
+            addCriterion("STANDBYHOURS <", value, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursLessThanOrEqualTo(Long value) {
+            addCriterion("STANDBYHOURS <=", value, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursIn(List<Long> values) {
+            addCriterion("STANDBYHOURS in", values, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursNotIn(List<Long> values) {
+            addCriterion("STANDBYHOURS not in", values, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursBetween(Long value1, Long value2) {
+            addCriterion("STANDBYHOURS between", value1, value2, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStandbyhoursNotBetween(Long value1, Long value2) {
+            addCriterion("STANDBYHOURS not between", value1, value2, "standbyhours");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidIsNull() {
+            addCriterion("STATIONID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidIsNotNull() {
+            addCriterion("STATIONID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidEqualTo(String value) {
+            addCriterion("STATIONID =", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidNotEqualTo(String value) {
+            addCriterion("STATIONID <>", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidGreaterThan(String value) {
+            addCriterion("STATIONID >", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidGreaterThanOrEqualTo(String value) {
+            addCriterion("STATIONID >=", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidLessThan(String value) {
+            addCriterion("STATIONID <", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidLessThanOrEqualTo(String value) {
+            addCriterion("STATIONID <=", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidLike(String value) {
+            addCriterion("STATIONID like", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidNotLike(String value) {
+            addCriterion("STATIONID not like", value, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidIn(List<String> values) {
+            addCriterion("STATIONID in", values, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidNotIn(List<String> values) {
+            addCriterion("STATIONID not in", values, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidBetween(String value1, String value2) {
+            addCriterion("STATIONID between", value1, value2, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStationidNotBetween(String value1, String value2) {
+            addCriterion("STATIONID not between", value1, value2, "stationid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidIsNull() {
+            addCriterion("WINDTURBINEID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidIsNotNull() {
+            addCriterion("WINDTURBINEID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidEqualTo(String value) {
+            addCriterion("WINDTURBINEID =", value, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidNotEqualTo(String value) {
+            addCriterion("WINDTURBINEID <>", value, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidGreaterThan(String value) {
+            addCriterion("WINDTURBINEID >", value, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidGreaterThanOrEqualTo(String value) {
+            addCriterion("WINDTURBINEID >=", value, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidLessThan(String value) {
+            addCriterion("WINDTURBINEID <", value, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidLessThanOrEqualTo(String value) {
+            addCriterion("WINDTURBINEID <=", value, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidLike(String value) {
+            addCriterion("WINDTURBINEID like", value, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidNotLike(String value) {
+            addCriterion("WINDTURBINEID not like", value, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidIn(List<String> values) {
+            addCriterion("WINDTURBINEID in", values, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidNotIn(List<String> values) {
+            addCriterion("WINDTURBINEID not in", values, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidBetween(String value1, String value2) {
+            addCriterion("WINDTURBINEID between", value1, value2, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andWindturbineidNotBetween(String value1, String value2) {
+            addCriterion("WINDTURBINEID not between", value1, value2, "windturbineid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidIsNull() {
+            addCriterion("MODELID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidIsNotNull() {
+            addCriterion("MODELID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidEqualTo(String value) {
+            addCriterion("MODELID =", value, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidNotEqualTo(String value) {
+            addCriterion("MODELID <>", value, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidGreaterThan(String value) {
+            addCriterion("MODELID >", value, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidGreaterThanOrEqualTo(String value) {
+            addCriterion("MODELID >=", value, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidLessThan(String value) {
+            addCriterion("MODELID <", value, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidLessThanOrEqualTo(String value) {
+            addCriterion("MODELID <=", value, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidLike(String value) {
+            addCriterion("MODELID like", value, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidNotLike(String value) {
+            addCriterion("MODELID not like", value, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidIn(List<String> values) {
+            addCriterion("MODELID in", values, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidNotIn(List<String> values) {
+            addCriterion("MODELID not in", values, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidBetween(String value1, String value2) {
+            addCriterion("MODELID between", value1, value2, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelidNotBetween(String value1, String value2) {
+            addCriterion("MODELID not between", value1, value2, "modelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeIsNull() {
+            addCriterion("STATETYPE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeIsNotNull() {
+            addCriterion("STATETYPE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeEqualTo(String value) {
+            addCriterion("STATETYPE =", value, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeNotEqualTo(String value) {
+            addCriterion("STATETYPE <>", value, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeGreaterThan(String value) {
+            addCriterion("STATETYPE >", value, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeGreaterThanOrEqualTo(String value) {
+            addCriterion("STATETYPE >=", value, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeLessThan(String value) {
+            addCriterion("STATETYPE <", value, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeLessThanOrEqualTo(String value) {
+            addCriterion("STATETYPE <=", value, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeLike(String value) {
+            addCriterion("STATETYPE like", value, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeNotLike(String value) {
+            addCriterion("STATETYPE not like", value, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeIn(List<String> values) {
+            addCriterion("STATETYPE in", values, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeNotIn(List<String> values) {
+            addCriterion("STATETYPE not in", values, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeBetween(String value1, String value2) {
+            addCriterion("STATETYPE between", value1, value2, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatetypeNotBetween(String value1, String value2) {
+            addCriterion("STATETYPE not between", value1, value2, "statetype");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageIsNull() {
+            addCriterion("MESSAGE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageIsNotNull() {
+            addCriterion("MESSAGE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageEqualTo(String value) {
+            addCriterion("MESSAGE =", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageNotEqualTo(String value) {
+            addCriterion("MESSAGE <>", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageGreaterThan(String value) {
+            addCriterion("MESSAGE >", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageGreaterThanOrEqualTo(String value) {
+            addCriterion("MESSAGE >=", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageLessThan(String value) {
+            addCriterion("MESSAGE <", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageLessThanOrEqualTo(String value) {
+            addCriterion("MESSAGE <=", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageLike(String value) {
+            addCriterion("MESSAGE like", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageNotLike(String value) {
+            addCriterion("MESSAGE not like", value, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageIn(List<String> values) {
+            addCriterion("MESSAGE in", values, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageNotIn(List<String> values) {
+            addCriterion("MESSAGE not in", values, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageBetween(String value1, String value2) {
+            addCriterion("MESSAGE between", value1, value2, "message");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageNotBetween(String value1, String value2) {
+            addCriterion("MESSAGE not between", value1, value2, "message");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated do_not_delete_during_merge
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table STANDBYTIME
+     *
+     * @mbg.generated
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 444 - 0
src/main/java/com/gyee/frame/model/auto/StateDuratime.java

@@ -0,0 +1,444 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class StateDuratime implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.ID
+     *
+     * @mbg.generated
+     */
+    private Short id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.COUNTTTIME
+     *
+     * @mbg.generated
+     */
+    private Date countttime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.RECENTFAULTTIME
+     *
+     * @mbg.generated
+     */
+    private Date recentfaulttime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.DURAMINUTE
+     *
+     * @mbg.generated
+     */
+    private Long duraminute;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.STATIONID
+     *
+     * @mbg.generated
+     */
+    private String stationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    private String windturbineid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.PROJECTID
+     *
+     * @mbg.generated
+     */
+    private String projectid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.LINEID
+     *
+     * @mbg.generated
+     */
+    private String lineid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.STATIONNAME
+     *
+     * @mbg.generated
+     */
+    private String stationname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.WINDTURBINENAME
+     *
+     * @mbg.generated
+     */
+    private String windturbinename;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.MODELID
+     *
+     * @mbg.generated
+     */
+    private String modelid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.SNAPID
+     *
+     * @mbg.generated
+     */
+    private Long snapid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STATEDURATIME.MESSAGE
+     *
+     * @mbg.generated
+     */
+    private String message;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table STATEDURATIME
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.ID
+     *
+     * @return the value of STATEDURATIME.ID
+     *
+     * @mbg.generated
+     */
+    public Short getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.ID
+     *
+     * @param id the value for STATEDURATIME.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Short id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.COUNTTTIME
+     *
+     * @return the value of STATEDURATIME.COUNTTTIME
+     *
+     * @mbg.generated
+     */
+    public Date getCountttime() {
+        return countttime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.COUNTTTIME
+     *
+     * @param countttime the value for STATEDURATIME.COUNTTTIME
+     *
+     * @mbg.generated
+     */
+    public void setCountttime(Date countttime) {
+        this.countttime = countttime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.RECENTFAULTTIME
+     *
+     * @return the value of STATEDURATIME.RECENTFAULTTIME
+     *
+     * @mbg.generated
+     */
+    public Date getRecentfaulttime() {
+        return recentfaulttime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.RECENTFAULTTIME
+     *
+     * @param recentfaulttime the value for STATEDURATIME.RECENTFAULTTIME
+     *
+     * @mbg.generated
+     */
+    public void setRecentfaulttime(Date recentfaulttime) {
+        this.recentfaulttime = recentfaulttime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.DURAMINUTE
+     *
+     * @return the value of STATEDURATIME.DURAMINUTE
+     *
+     * @mbg.generated
+     */
+    public Long getDuraminute() {
+        return duraminute;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.DURAMINUTE
+     *
+     * @param duraminute the value for STATEDURATIME.DURAMINUTE
+     *
+     * @mbg.generated
+     */
+    public void setDuraminute(Long duraminute) {
+        this.duraminute = duraminute;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.STATIONID
+     *
+     * @return the value of STATEDURATIME.STATIONID
+     *
+     * @mbg.generated
+     */
+    public String getStationid() {
+        return stationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.STATIONID
+     *
+     * @param stationid the value for STATEDURATIME.STATIONID
+     *
+     * @mbg.generated
+     */
+    public void setStationid(String stationid) {
+        this.stationid = stationid == null ? null : stationid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.WINDTURBINEID
+     *
+     * @return the value of STATEDURATIME.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    public String getWindturbineid() {
+        return windturbineid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.WINDTURBINEID
+     *
+     * @param windturbineid the value for STATEDURATIME.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 STATEDURATIME.PROJECTID
+     *
+     * @return the value of STATEDURATIME.PROJECTID
+     *
+     * @mbg.generated
+     */
+    public String getProjectid() {
+        return projectid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.PROJECTID
+     *
+     * @param projectid the value for STATEDURATIME.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 STATEDURATIME.LINEID
+     *
+     * @return the value of STATEDURATIME.LINEID
+     *
+     * @mbg.generated
+     */
+    public String getLineid() {
+        return lineid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.LINEID
+     *
+     * @param lineid the value for STATEDURATIME.LINEID
+     *
+     * @mbg.generated
+     */
+    public void setLineid(String lineid) {
+        this.lineid = lineid == null ? null : lineid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.STATIONNAME
+     *
+     * @return the value of STATEDURATIME.STATIONNAME
+     *
+     * @mbg.generated
+     */
+    public String getStationname() {
+        return stationname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.STATIONNAME
+     *
+     * @param stationname the value for STATEDURATIME.STATIONNAME
+     *
+     * @mbg.generated
+     */
+    public void setStationname(String stationname) {
+        this.stationname = stationname == null ? null : stationname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.WINDTURBINENAME
+     *
+     * @return the value of STATEDURATIME.WINDTURBINENAME
+     *
+     * @mbg.generated
+     */
+    public String getWindturbinename() {
+        return windturbinename;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.WINDTURBINENAME
+     *
+     * @param windturbinename the value for STATEDURATIME.WINDTURBINENAME
+     *
+     * @mbg.generated
+     */
+    public void setWindturbinename(String windturbinename) {
+        this.windturbinename = windturbinename == null ? null : windturbinename.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.MODELID
+     *
+     * @return the value of STATEDURATIME.MODELID
+     *
+     * @mbg.generated
+     */
+    public String getModelid() {
+        return modelid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.MODELID
+     *
+     * @param modelid the value for STATEDURATIME.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 STATEDURATIME.SNAPID
+     *
+     * @return the value of STATEDURATIME.SNAPID
+     *
+     * @mbg.generated
+     */
+    public Long getSnapid() {
+        return snapid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.SNAPID
+     *
+     * @param snapid the value for STATEDURATIME.SNAPID
+     *
+     * @mbg.generated
+     */
+    public void setSnapid(Long snapid) {
+        this.snapid = snapid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STATEDURATIME.MESSAGE
+     *
+     * @return the value of STATEDURATIME.MESSAGE
+     *
+     * @mbg.generated
+     */
+    public String getMessage() {
+        return message;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STATEDURATIME.MESSAGE
+     *
+     * @param message the value for STATEDURATIME.MESSAGE
+     *
+     * @mbg.generated
+     */
+    public void setMessage(String message) {
+        this.message = message == null ? null : message.trim();
+    }
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1164 - 0
src/main/java/com/gyee/frame/model/auto/StateDuratimeExample.java


+ 13 - 0
src/main/java/com/gyee/frame/model/config/WindturbineStandby.java

@@ -0,0 +1,13 @@
+package com.gyee.frame.model.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Data
+public class WindturbineStandby {
+    private String station;
+    private String modelid;
+    private String DJ;
+    private String GZ;
+}

+ 65 - 0
src/main/java/com/gyee/frame/model/custom/export/PointDataDB.java

@@ -0,0 +1,65 @@
+package com.gyee.frame.model.custom.export;
+
+import cn.hutool.system.UserInfo;
+
+/**
+ * 测点数据
+ */
+public class PointDataDB {
+    /**
+     * 时间戳
+     */
+    private long ts;
+    /**
+     * 数据
+     */
+    private double doubleValue;
+    /**
+     * boolean 数据
+     */
+    private boolean booleanValue;
+    /**
+     * 状态
+     */
+    private int status;
+
+    public long getTs() {
+        return ts;
+    }
+
+    public void setTs(long ts) {
+        this.ts = ts;
+    }
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public double getValue() {
+        if (booleanValue) {
+            return 1;
+        }
+        return doubleValue;
+    }
+
+    public double getDoubleValue() {
+        return doubleValue;
+    }
+
+    public void setDoubleValue(double doubleValue) {
+        this.doubleValue = doubleValue;
+    }
+
+    public boolean getBooleanValue() {
+        return booleanValue;
+    }
+
+    public void setBooleanValue(boolean booleanValue) {
+        this.booleanValue = booleanValue;
+    }
+
+}

+ 29 - 0
src/main/java/com/gyee/frame/model/excel/AlarmStat.java

@@ -0,0 +1,29 @@
+package com.gyee.frame.model.excel;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class AlarmStat implements Serializable {
+
+    @JsonIgnore
+    private String rank="";
+
+    private Long snapId;
+
+    private String stationId;
+
+    private String windturbineId;
+
+    private String alertText;
+
+    private int count;
+
+    private double time;
+    //关联部件编号
+    private String relateParts;
+    //关联部件名称
+    private String relatePartsText;
+}

+ 457 - 0
src/main/java/com/gyee/frame/schdule/windturbinestatetime/TaskWindturbineStateTime.java

@@ -0,0 +1,457 @@
+package com.gyee.frame.schdule.windturbinestatetime;
+
+import com.gyee.frame.common.feign.IAdapterService;
+import com.gyee.frame.common.feign.RemoteServiceBuilder;
+import com.gyee.frame.mapper.auto.*;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.config.WindturbineStandby;
+import com.gyee.frame.model.custom.export.PointDataDB;
+import com.gyee.frame.model.custom.export.TsPointData;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+@Component
+public class TaskWindturbineStateTime {
+    @Resource
+    private ScadafaultMapper scadafaultMapper;
+    @Resource
+    private WindTurbineTestingPointAi2Mapper windTurbineTestingPointAi2Mapper;
+    @Resource
+    private WindTurbineTestingPointDi2Mapper windTurbineTestingPointDi2Mapper;
+    @Resource
+    private StateDuratimeMapper stateDuratimeMapper;
+    @Resource
+    private StandbyTimeMapper standbyTimeMapper;
+    @Resource
+    private RemoteServiceBuilder remoteServiceBuilder;
+
+    @Value("${windturbineStandby.GZ}")
+    private String gzUniformcode;
+    @Value("${windturbineStandby.DJ}")
+    private String djUniformcode;
+    @Value("${windturbineStandby.MTBFD}")
+    private long mtbfd;
+    @Value("${windturbineStandby.ZGZ}")
+    private String zgzUniformcode;
+
+    private int count = 0;
+    private List<WindTurbineTestingPointAi2> standbyCodes;
+    private List<WindTurbineTestingPointAi2> faultCodes;
+    private List<WindTurbineTestingPointDi2> zgzCodes;
+
+
+    @Scheduled(cron = "0 0 1 * * ?")
+    public void getStandbyTime() {
+
+        //List<StandbyTime> standbyTimes = new ArrayList<>();
+        Calendar thisDay = Calendar.getInstance();
+        thisDay.add(Calendar.DATE,-1);
+
+        Calendar begain = Calendar.getInstance();
+        begain.add(Calendar.DATE,-2);
+        Long latetime = getLatetime(thisDay);
+        Long earlytime = getEarlytime(thisDay);
+        //风机列表
+        List<WindTurbineTestingPointAi2> wttpai2s = getStandbyCodes();
+        for (WindTurbineTestingPointAi2 wttpai2 : wttpai2s) {
+            try {
+                Thread.sleep(38);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+            List<TsPointData> historyRaw = remoteServiceBuilder.ShardingService().getHistoryRaw(wttpai2.getId(), begain.getTimeInMillis(), latetime);
+            //当天第一个点
+            List<TsPointData> collect2 = historyRaw.stream().filter(tpd -> tpd.getTs() > earlytime).collect(Collectors.toList());
+            historyRaw = historyRaw.stream().sorted(Comparator.comparing(TsPointData::getTs).reversed()).collect(Collectors.toList());
+            //跨天(前一天倒数第一个点)
+            long standbytime = 0;//待机时间
+            List<TsPointData> collect1 = historyRaw.stream().filter(tpd -> tpd.getTs() < earlytime).limit(1).collect(Collectors.toList());
+
+            historyRaw = collect2.stream().sorted(Comparator.comparing(TsPointData::getTs).reversed()).collect(Collectors.toList());
+
+            if (collect1 != null && collect1.size() > 0) {
+                int ktq = (int) collect1.get(0).getDoubleValue();
+                if (collect2 == null || collect2.size() == 0) continue;
+                if (ktq == 0) {
+                    standbytime += collect2.get(0).getTs() - earlytime;
+                }
+            }
+
+            long standbyMoment = latetime;//待机时刻
+            //测点列表
+            for (TsPointData tsPointData : historyRaw) {
+                //点值
+                int doubleValue = (int) tsPointData.getDoubleValue();
+                if (doubleValue == 0) {
+                    standbytime += standbyMoment - tsPointData.getTs();
+                    standbyMoment = tsPointData.getTs();
+                } else {
+                    standbyMoment = tsPointData.getTs();
+                }
+            }
+
+            StandbyTime standbyTime = new StandbyTime();
+            standbyTime.setCountday(thisDay.getTime());
+            standbyTime.setStandbyhours(TimeUnit.MILLISECONDS.toMinutes(standbytime));
+            standbyTime.setStationid(wttpai2.getWindpowerstationid());
+            standbyTime.setWindturbineid(wttpai2.getWindturbineid());
+            standbyTime.setModelid(wttpai2.getModelid());
+            standbyTime.setStatetype("standby");
+
+            //standbyTimes.add(standbyTime);
+            standbyTimeMapper.insert(standbyTime);
+        }
+        //standbyTimeMapper.batchInsert(standbyTimes);
+    }
+
+    private Long getEarlytime(Calendar calcday) {
+        Calendar day = (Calendar)calcday.clone();
+        day.set(Calendar.HOUR_OF_DAY, 0);
+        day.set(Calendar.MINUTE, 0);
+        day.set(Calendar.SECOND, 0);
+        return day.getTimeInMillis();
+    }
+
+    private Long getLatetime(Calendar calcday) {
+        Calendar day = (Calendar)calcday.clone();
+        day.set(Calendar.HOUR_OF_DAY, 23);
+        day.set(Calendar.MINUTE, 59);
+        day.set(Calendar.SECOND, 59);
+        return day.getTimeInMillis();
+    }
+
+    public List<WindTurbineTestingPointAi2> getStandbyCodes() {
+        if (standbyCodes == null) {
+            WindTurbineTestingPointAi2Example wtspAi2Example = new WindTurbineTestingPointAi2Example();
+            wtspAi2Example.createCriteria().andUniformcodeEqualTo(djUniformcode);
+            standbyCodes = windTurbineTestingPointAi2Mapper.selectByExample(wtspAi2Example);
+        }
+        return standbyCodes;
+    }
+
+    public List<WindTurbineTestingPointDi2> getZgzCodes() {
+        if(zgzCodes==null){
+            WindTurbineTestingPointDi2Example wtspDi2Example = new WindTurbineTestingPointDi2Example();
+            wtspDi2Example.createCriteria().andUniformcodeEqualTo(zgzUniformcode).andModelidNotEqualTo("UP105-2000-S");
+            zgzCodes = windTurbineTestingPointDi2Mapper.selectByExample(wtspDi2Example);
+        }
+        return zgzCodes;
+    }
+
+    public List<WindTurbineTestingPointAi2> getFaultCodes() {
+        if (faultCodes == null) {
+            WindTurbineTestingPointAi2Example wtspAi2Example = new WindTurbineTestingPointAi2Example();
+            wtspAi2Example.createCriteria().andUniformcodeEqualTo(gzUniformcode);
+            faultCodes = windTurbineTestingPointAi2Mapper.selectByExample(wtspAi2Example);
+        }
+        return faultCodes;
+    }
+
+    @Scheduled(cron = "0 */3 * * * ?")
+    public void getFaultTime() {
+        if (count == 0) {
+            count++;
+            Calendar oldday = Calendar.getInstance();
+            oldday.add(Calendar.MONTH, -16);
+            getGZTime(oldday);
+        } else {
+            Calendar oldday = Calendar.getInstance();
+            oldday.add(Calendar.HOUR, -10);
+            getGZTime4(oldday);
+            getGZTime5(oldday);
+        }
+        /*for (int i = 0; i > -922; i--) {
+            Calendar thisDay = Calendar.getInstance();
+            thisDay.add(Calendar.DATE, i - 1);
+
+            Calendar begain = Calendar.getInstance();
+            begain.set(Calendar.HOUR_OF_DAY, 1);
+            begain.add(Calendar.DATE, i - 2);
+
+            getStandbyTime(thisDay, begain);
+
+            try {
+                Thread.sleep(8000);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+        }*/
+
+    }
+
+    private void getGZTime4(Calendar oldday) {
+        Calendar today = Calendar.getInstance();
+        List<WindTurbineTestingPointAi2> wttpai2s = getStandbyCodes();
+        wttpai2s=wttpai2s.stream().filter(wttpai2->wttpai2.getModel().equals("CCWE-1500") || wttpai2.getModel().equals("UP105")).collect(Collectors.toList());
+        for (WindTurbineTestingPointAi2 wttpai2 : wttpai2s) {
+            List<TsPointData> historyRaw = remoteServiceBuilder.ShardingService().getHistoryRaw(wttpai2.getId(), oldday.getTime().getTime(), today.getTime().getTime());
+            historyRaw = historyRaw.stream().sorted(Comparator.comparing(TsPointData::getTs).reversed()).collect(Collectors.toList());
+
+            long duration = 0;//故障时间
+            long noduration = 0;//无故障运行时间
+            Date nodurationtime = new Date();//最近真故障(超过3小时)解除时间
+            long faultTime = historyRaw.get(0).getTs();
+            //测点列表
+            for (TsPointData tsPointData : historyRaw) {
+                //点值
+                int doubleValue = (int) tsPointData.getDoubleValue();
+                if(doubleValue==4){
+                    continue;
+                }else if(doubleValue == 2){
+                    duration = faultTime - tsPointData.getTs();
+                    //超过3小时
+                    if (duration > mtbfd) {
+                        Calendar instance = Calendar.getInstance();
+                        instance.setTimeInMillis(faultTime);
+                        nodurationtime = instance.getTime();
+                        noduration = today.getTime().getTime() - faultTime;
+                        break;
+                    }
+                    faultTime = tsPointData.getTs();
+                }else {
+                    faultTime = tsPointData.getTs();
+                    continue;
+                }
+            }
+            if (noduration == 0) {
+                StateDuratimeExample sExample = new StateDuratimeExample();
+                sExample.createCriteria().andWindturbineidEqualTo(wttpai2.getWindturbineid());
+                List<StateDuratime> stateDuratimes = stateDuratimeMapper.selectByExample(sExample);
+                //当前时间-最近真故障解除时间
+                long l = today.getTime().getTime() - stateDuratimes.get(0).getRecentfaulttime().getTime();
+
+                StateDuratime stateDuratime = new StateDuratime();
+                stateDuratime.setDuraminute(TimeUnit.MILLISECONDS.toHours(l));
+
+                stateDuratimeMapper.updateByExampleSelective(stateDuratime, sExample);
+            } else {
+                StateDuratime stateDuratime = new StateDuratime();
+                stateDuratime.setCountttime(today.getTime());
+                stateDuratime.setDuraminute(TimeUnit.MILLISECONDS.toHours(noduration));
+                stateDuratime.setRecentfaulttime(nodurationtime);
+
+                StateDuratimeExample stateDuratimeExample = new StateDuratimeExample();
+                stateDuratimeExample.createCriteria().andWindturbineidEqualTo(wttpai2.getWindturbineid());
+                stateDuratimeMapper.updateByExampleSelective(stateDuratime, stateDuratimeExample);
+            }
+        }
+
+    }
+
+    private void getGZTime5(Calendar oldday) {
+        Calendar today = Calendar.getInstance();
+        List<WindTurbineTestingPointDi2> wttpdi2s = getZgzCodes();
+        for (WindTurbineTestingPointDi2 wttpdi2 : wttpdi2s) {
+            List<TsPointData> historyRaw = remoteServiceBuilder.ShardingService().getHistoryRaw(wttpdi2.getId(), oldday.getTime().getTime(), today.getTime().getTime());
+            historyRaw = historyRaw.stream().sorted(Comparator.comparing(TsPointData::getTs).reversed()).collect(Collectors.toList());
+
+            long duration = 0;//故障时间
+            long noduration = 0;//无故障运行时间
+            Date nodurationtime = new Date();//最近真故障(超过3小时)解除时间
+            long faultTime = historyRaw.get(0).getTs();
+            //测点列表
+            for (TsPointData tsPointData : historyRaw) {
+                //点值
+                int doubleValue = (int) tsPointData.getDoubleValue();
+                if(doubleValue==0){
+                    faultTime = tsPointData.getTs();
+                    continue;
+                }else if(doubleValue == 1){
+                    duration = faultTime - tsPointData.getTs();
+                    //超过3小时
+                    if (duration > mtbfd) {
+                        Calendar instance = Calendar.getInstance();
+                        instance.setTimeInMillis(faultTime);
+                        nodurationtime = instance.getTime();
+                        noduration = today.getTime().getTime() - faultTime;
+                        break;
+                    }
+                    faultTime = tsPointData.getTs();
+                }
+            }
+            if (noduration == 0) {
+                StateDuratimeExample sExample = new StateDuratimeExample();
+                sExample.createCriteria().andWindturbineidEqualTo(wttpdi2.getWindturbineid());
+                List<StateDuratime> stateDuratimes = stateDuratimeMapper.selectByExample(sExample);
+                //当前时间-最近真故障解除时间
+                long l = today.getTime().getTime() - stateDuratimes.get(0).getRecentfaulttime().getTime();
+
+                StateDuratime stateDuratime = new StateDuratime();
+                stateDuratime.setDuraminute(TimeUnit.MILLISECONDS.toHours(l));
+
+                stateDuratimeMapper.updateByExampleSelective(stateDuratime, sExample);
+            } else {
+                StateDuratime stateDuratime = new StateDuratime();
+                stateDuratime.setCountttime(today.getTime());
+                stateDuratime.setDuraminute(TimeUnit.MILLISECONDS.toHours(noduration));
+                stateDuratime.setRecentfaulttime(nodurationtime);
+
+                StateDuratimeExample stateDuratimeExample = new StateDuratimeExample();
+                stateDuratimeExample.createCriteria().andWindturbineidEqualTo(wttpdi2.getWindturbineid());
+                stateDuratimeMapper.updateByExampleSelective(stateDuratime, stateDuratimeExample);
+            }
+        }
+
+    }
+
+    private void getGZTime3(Calendar oldday) {
+        Calendar today = Calendar.getInstance();
+        List<WindTurbineTestingPointAi2> wttpai2s = getFaultCodes();
+        //每台风机
+        for (WindTurbineTestingPointAi2 wttpai2 : wttpai2s) {
+            List<TsPointData> historyRaw = remoteServiceBuilder.ShardingService().getHistoryRaw(wttpai2.getId(), oldday.getTime().getTime(), today.getTime().getTime());
+            historyRaw = historyRaw.stream().sorted(Comparator.comparing(TsPointData::getTs).reversed()).collect(Collectors.toList());
+
+            long duration = 0;//故障时间
+            long noduration = 0;//无故障运行时间
+            Date nodurationtime = new Date();//最近真故障(超过3小时)解除时间
+            long faultTime = historyRaw.get(0).getTs();
+            //测点列表
+            for (TsPointData tsPointData : historyRaw) {
+                //点值
+                int doubleValue = (int) tsPointData.getDoubleValue();
+                if (doubleValue == 0) {
+                    faultTime = tsPointData.getTs();
+                    continue;
+                } else if (doubleValue == 1) {
+                    duration = faultTime - tsPointData.getTs();
+                    //超过3小时
+                    if (duration > mtbfd) {
+                        //可以优化数据库
+                        Calendar instance = Calendar.getInstance();
+                        instance.setTimeInMillis(faultTime);
+                        nodurationtime = instance.getTime();
+                        noduration = today.getTime().getTime() - faultTime;
+                        break;
+                    }
+                    faultTime = tsPointData.getTs();
+                }
+            }
+
+            if (noduration == 0) {
+                noduration = today.getTime().getTime() - oldday.getTime().getTime();
+            }
+
+            StateDuratime stateDuratime = new StateDuratime();
+            stateDuratime.setCountttime(today.getTime());
+            stateDuratime.setDuraminute(TimeUnit.MILLISECONDS.toHours(noduration));
+            stateDuratime.setRecentfaulttime(nodurationtime);
+
+            StateDuratimeExample stateDuratimeExample = new StateDuratimeExample();
+            stateDuratimeExample.createCriteria().andWindturbineidEqualTo(wttpai2.getWindturbineid());
+            stateDuratimeMapper.updateByExampleSelective(stateDuratime, stateDuratimeExample);
+        }
+    }
+
+    private void getGZTime2(Calendar oldday) {
+        Calendar today = Calendar.getInstance();
+        List<FaultInfo> faultInfos = scadafaultMapper.selectByGZ(oldday.getTime());
+        //风机、故障列表
+        Map<String, List<FaultInfo>> faultInfoMap = faultInfos.stream().collect(Collectors.groupingBy(FaultInfo::getWindturbineId));
+        for (Map.Entry<String, List<FaultInfo>> faultInfoEntry : faultInfoMap.entrySet()) {
+
+            long duration = 0;//故障时间
+            long noduration = 0;//无故障运行时间
+            Date nodurationtime = new Date();//最近真故障(超过3小时)解除时间
+            Date faultTime = faultInfoEntry.getValue().get(0).getFaultTime();
+
+            for (FaultInfo faultInfo : faultInfoEntry.getValue()) {
+                if (faultInfo.getMessageType() == 3) {
+                    faultTime = faultInfo.getFaultTime();
+                    continue;
+                } else if (faultInfo.getMessageType() == 1) {
+                    duration = faultTime.getTime() - faultInfo.getFaultTime().getTime();
+                    //超过3小时
+                    if (duration > mtbfd) {
+                        nodurationtime = faultTime;
+                        noduration = today.getTime().getTime() - nodurationtime.getTime();
+                        break;
+                    }
+                    faultTime = faultInfo.getFaultTime();
+                }
+            }
+
+            if (noduration == 0) {
+                StateDuratimeExample sExample = new StateDuratimeExample();
+                sExample.createCriteria().andWindturbineidEqualTo(faultInfoEntry.getKey());
+                List<StateDuratime> stateDuratimes = stateDuratimeMapper.selectByExample(sExample);
+                //当前时间-最近真故障解除时间
+                long l = today.getTime().getTime() - stateDuratimes.get(0).getRecentfaulttime().getTime();
+
+                StateDuratime stateDuratime = new StateDuratime();
+                stateDuratime.setDuraminute(TimeUnit.MILLISECONDS.toHours(l));
+
+                StateDuratimeExample stateDuratimeExample = new StateDuratimeExample();
+                stateDuratimeExample.createCriteria().andWindturbineidEqualTo(faultInfoEntry.getKey());
+                stateDuratimeMapper.updateByExampleSelective(stateDuratime, stateDuratimeExample);
+            } else {
+                StateDuratime stateDuratime = new StateDuratime();
+                stateDuratime.setCountttime(today.getTime());
+                stateDuratime.setDuraminute(TimeUnit.MILLISECONDS.toHours(noduration));
+                stateDuratime.setRecentfaulttime(nodurationtime);
+
+                StateDuratimeExample stateDuratimeExample = new StateDuratimeExample();
+                stateDuratimeExample.createCriteria().andWindturbineidEqualTo(faultInfoEntry.getKey());
+                stateDuratimeMapper.updateByExampleSelective(stateDuratime, stateDuratimeExample);
+            }
+
+        }
+    }
+
+    private void getGZTime(Calendar oldday) {
+        Calendar today = Calendar.getInstance();
+        List<FaultInfo> faultInfos = scadafaultMapper.selectByGZ(oldday.getTime());
+        //风机、故障列表
+        Map<String, List<FaultInfo>> faultInfoMap = faultInfos.stream().collect(Collectors.groupingBy(FaultInfo::getWindturbineId));
+        for (Map.Entry<String, List<FaultInfo>> faultInfoEntry : faultInfoMap.entrySet()) {
+
+            long duration = 0;//故障时间
+            long noduration = 0;//无故障运行时间
+            Date nodurationtime = new Date();//最近真故障(超过3小时)解除时间
+            Date faultTime = faultInfoEntry.getValue().get(0).getFaultTime();
+
+            for (FaultInfo faultInfo : faultInfoEntry.getValue()) {
+                if (faultInfo.getMessageType() == 3) {
+                    faultTime = faultInfo.getFaultTime();
+                    continue;
+                } else if (faultInfo.getMessageType() == 1) {
+                    duration = faultTime.getTime() - faultInfo.getFaultTime().getTime();
+                    //超过3小时
+                    if (duration > mtbfd) {
+                        nodurationtime = faultTime;
+                        noduration = today.getTime().getTime() - nodurationtime.getTime();
+                        break;
+                    }
+                    faultTime = faultInfo.getFaultTime();
+                }
+            }
+
+            if (noduration == 0) {
+                noduration = today.getTime().getTime() - oldday.getTime().getTime();
+            }
+            StateDuratime stateDuratime = new StateDuratime();
+            stateDuratime.setCountttime(today.getTime());
+            stateDuratime.setDuraminute(TimeUnit.MILLISECONDS.toHours(noduration));
+            stateDuratime.setRecentfaulttime(nodurationtime);
+            stateDuratime.setSnapid(faultInfoEntry.getValue().get(0).getSnapID());
+
+            StateDuratimeExample stateDuratimeExample = new StateDuratimeExample();
+            stateDuratimeExample.createCriteria().andWindturbineidEqualTo(faultInfoEntry.getKey());
+            stateDuratimeMapper.updateByExampleSelective(stateDuratime, stateDuratimeExample);
+        }
+    }
+
+}

+ 285 - 0
src/main/java/com/gyee/frame/service/export/EarlywarnAnalysisPushService.java

@@ -0,0 +1,285 @@
+package com.gyee.frame.service.export;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
+import com.gyee.frame.common.conf.ExportConfig;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.mapper.auto.AlarmsnapMapper;
+import com.gyee.frame.mapper.auto.EarlywarningAnalysisPushMapper;
+import com.gyee.frame.mapper.auto.MaintenanceAdviceMapper;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.excel.AlarmStat;
+import org.apache.poi.xssf.streaming.SXSSFRow;
+import org.apache.poi.xssf.streaming.SXSSFSheet;
+import org.apache.poi.xssf.streaming.SXSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+@Service
+public class EarlywarnAnalysisPushService {
+
+    @Autowired
+    private ExportConfig exportConfig;
+    @Resource
+    private EarlywarningAnalysisPushMapper earlywarningAnalysisPushMapper;
+    @Resource
+    private AlarmsnapMapper alarmsnapMapper;
+    @Resource
+    private MaintenanceAdviceMapper maintenanceAdviceMapper;
+
+    private List<Alarmsnap> alarmsnaps;
+
+    private SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
+
+    private List<MaintenanceAdvice> maintenanceAdvice;
+    private Map<String, MaintenanceAdvice> maintenanceAdviceMap;
+
+    public List<MaintenanceAdvice> getMaintenanceAdvice() {
+        if(maintenanceAdvice==null){
+            MaintenanceAdviceExample example = new MaintenanceAdviceExample();
+            maintenanceAdvice=maintenanceAdviceMapper.selectByExample(example);
+        }
+        return maintenanceAdvice;
+    }
+
+    public List<Alarmsnap> getAlarmsnaps() {
+        if(alarmsnaps==null){
+            AlarmsnapExample alarmsnapExample = new AlarmsnapExample();
+            alarmsnaps = alarmsnapMapper.selectByExample(alarmsnapExample);
+        }
+        return alarmsnaps;
+    }
+
+    private static int jgts=7;
+
+    public static void setJgts(int jgts) {
+        EarlywarnAnalysisPushService.jgts = jgts;
+    }
+
+    public AjaxResult getEarlywarnanalysispush(String startdate, AjaxResult earlyWarning) {
+        if(earlyWarning==null) return AjaxResult.error("查询出错!");
+        String s = JSON.toJSONString(earlyWarning.get("data"));
+
+        Type type = new TypeReference<List<Map<String,List<AlarmStat>>>>() {}.getType();
+        List<Map<String,List<AlarmStat>>> list = JSON.parseObject(s, type);
+        List<AlarmStat> alarmstats = new ArrayList<>();
+
+        for (Map<String, List<AlarmStat>> stringListMap : list) {
+            for (List<AlarmStat> value : stringListMap.values()) {
+                alarmstats.addAll(value);
+            }
+        }
+
+        EarlywarningAnalysisPushExample example = new EarlywarningAnalysisPushExample();
+        example.createCriteria().andCountdayEqualTo(startdate).andStationidEqualTo(alarmstats.get(0).getStationId());
+        List<EarlywarningAnalysisPush> ewaspGet = earlywarningAnalysisPushMapper.selectByExample(example);
+
+        if(ewaspGet==null||ewaspGet.size()==0){
+            //获取推送的报警
+            List<AlarmStat> pushAlarmstats = getPushAlarmstat(startdate,alarmstats);
+            for (AlarmStat pushAlarmstat : pushAlarmstats) {
+                EarlywarningAnalysisPush ewaspCreate = createEarlywarningAnalysisPush(startdate, pushAlarmstat);
+                //加入检修建议ID
+                ewaspCreate.setMaintenanceadviceid(getMaintenanceAdviceMap().get(ewaspCreate.getWarnname()).getId());
+                ewaspGet.add(ewaspCreate);
+                earlywarningAnalysisPushMapper.insert(ewaspCreate);
+            }
+            createExcel(ewaspGet);
+        }else {
+            createExcel(ewaspGet);
+        }
+
+        return AjaxResult.successData(200,"http:\\\\10.155.32.4:8070\\zhfx\\excel\\"+ewaspGet.get(0).getStationid()+"预警分析推荐.xlsx");
+    }
+
+    private void createExcel(List<EarlywarningAnalysisPush> ewaps) {
+        SXSSFWorkbook workbook = new SXSSFWorkbook(9000);
+        SXSSFSheet sheet = workbook.createSheet("Sheet1");
+        SXSSFRow row = sheet.createRow(0);
+        row.createCell(0).setCellValue("日期");
+        row.createCell(1).setCellValue("场站");
+        row.createCell(2).setCellValue("风机");
+        row.createCell(3).setCellValue("预警等级");
+        row.createCell(4).setCellValue("预警名称");
+        row.createCell(5).setCellValue("预警次数");
+        row.createCell(6).setCellValue("持续时间");
+        row.createCell(7).setCellValue("部件名称");
+        row.createCell(8).setCellValue("问题原因");
+        row.createCell(9).setCellValue("消缺工艺");
+        row.createCell(10).setCellValue("遗留问题");
+        for (int i = 0; i < ewaps.size(); i++) {
+            SXSSFRow row1 = sheet.createRow(i + 1);
+            row1.createCell(0).setCellValue(ewaps.get(i).getCountday());
+            row1.createCell(1).setCellValue(ewaps.get(i).getStationid());
+            row1.createCell(2).setCellValue(ewaps.get(i).getWindturbineid());
+            row1.createCell(3).setCellValue(ewaps.get(i).getWarngrad());
+            row1.createCell(4).setCellValue(ewaps.get(i).getWarnname());
+            row1.createCell(5).setCellValue(ewaps.get(i).getWarncount());
+            row1.createCell(6).setCellValue(ewaps.get(i).getWarnminute());
+            row1.createCell(7).setCellValue(ewaps.get(i).getRelatepartstext());
+            row1.createCell(8).setCellValue(ewaps.get(i).getReasonsproblem());
+            row1.createCell(9).setCellValue(ewaps.get(i).getBehebungcraft());
+            row1.createCell(10).setCellValue(ewaps.get(i).getLeftoverproblem());
+        }
+        FileOutputStream out = null;
+        try {
+            out = new FileOutputStream(exportConfig.getExportpath()+ewaps.get(0).getStationid()+"\\预警分析推荐.xlsx");
+            //out = new FileOutputStream("D:\\预警分析推荐.xlsx");
+            workbook.write(out);
+            out.flush();
+            out.close();
+            workbook.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 生成推送信息
+     * @param startdate
+     * @param alarmStat
+     * @return
+     */
+    private EarlywarningAnalysisPush createEarlywarningAnalysisPush(String startdate, AlarmStat alarmStat) {
+        EarlywarningAnalysisPush eap = new EarlywarningAnalysisPush();
+        eap.setCountday(startdate);
+        eap.setStationid(alarmStat.getStationId());
+        eap.setWindturbineid(alarmStat.getWindturbineId());
+        eap.setWarnname(alarmStat.getAlertText());
+        eap.setWarncount(alarmStat.getCount());
+        eap.setWarnminute(alarmStat.getTime());
+        eap.setRelateparts(alarmStat.getRelateParts());
+        eap.setRelatepartstext(alarmStat.getRelatePartsText());
+        eap.setSnapid(alarmStat.getSnapId());
+        eap.setCounttime(getDate(startdate));
+        eap.setWarngrad(alarmStat.getRank());
+        return eap;
+    }
+
+    /**
+     * 预警分析推送
+     *
+     * @param startdate
+     * @param ass
+     * @return
+     */
+    private List<AlarmStat> getPushAlarmstat(String startdate, List<AlarmStat> ass) {
+        EarlywarningAnalysisPushExample example = new EarlywarningAnalysisPushExample();
+
+        Calendar instance1 = Calendar.getInstance();
+        Calendar instance2 = Calendar.getInstance();
+
+        Date date = getDate(startdate);
+
+        instance1.setTime(date);
+        instance1.add(Calendar.DATE,1);
+
+        instance2.setTime(date);
+        instance2.add(Calendar.DATE,-1*jgts);
+
+        example.createCriteria().andCounttimeBetween(instance2.getTime(), instance1.getTime());
+        List<EarlywarningAnalysisPush> ewaspGet = earlywarningAnalysisPushMapper.selectByExample(example);
+        List<Long> collectSnapid = ewaspGet.stream().map(eap -> eap.getSnapid()).collect(Collectors.toList());
+        //过滤SnapId不为空的、alertrule2配置有的、已经推荐过的
+        ass=ass.stream().filter(alarmStat -> alarmStat.getSnapId()!=null &&
+                        getMaintenanceAdviceMap().containsKey(alarmStat.getAlertText()) &&
+                !collectSnapid.contains(alarmStat.getSnapId())).collect(Collectors.toList());
+        //alarmsnap
+        Map<Long, Alarmsnap> alarmsnapMap = getAlarmsnaps().stream().collect(Collectors.toMap(Alarmsnap::getId, Function.identity()));
+        //加入等级
+        List<AlarmStat> alarmStatRemoves = new ArrayList<>();
+        for (AlarmStat alarmStat : ass) {
+            Alarmsnap alarmsnap = alarmsnapMap.get(alarmStat.getSnapId());
+            if (alarmsnap==null){
+                alarmStatRemoves.add(alarmStat);
+            }else if(alarmsnap.getRank()==null){
+                alarmStatRemoves.add(alarmStat);
+            }else {
+                alarmStat.setRank(alarmsnap.getRank());
+            }
+        }
+        //移除alarmsnap里面没有的snapid
+        ass.removeAll(alarmStatRemoves);
+        //排序 等级、次数、时间
+        List<AlarmStat> collect = ass.stream().sorted(
+                Comparator.comparing(AlarmStat::getRank,Comparator.reverseOrder())
+                        .thenComparing(AlarmStat::getCount,Comparator.reverseOrder())
+                        .thenComparing(AlarmStat::getTime,Comparator.reverseOrder())
+                ).collect(Collectors.toList());
+        List<AlarmStat> collect1 = collect.stream().filter(alarmStat -> alarmStat.getRank().equals("6")).limit(2).collect(Collectors.toList());
+        List<AlarmStat> collect2 = collect.stream().filter(alarmStat -> alarmStat.getRank().equals("4")).limit(2).collect(Collectors.toList());
+        List<AlarmStat> collect3 = collect.stream().filter(alarmStat -> alarmStat.getRank().equals("3")).limit(2).collect(Collectors.toList());
+
+        List<AlarmStat> alarmStats = new ArrayList<>();
+        alarmStats.addAll(collect1);
+        alarmStats.addAll(collect2);
+        alarmStats.addAll(collect3);
+        return alarmStats;
+    }
+
+    /**
+     *
+     * @return 检修建议报警名称、检修建议
+     */
+    private Map<String, MaintenanceAdvice> getMaintenanceAdviceMap() {
+        if(maintenanceAdviceMap==null){
+            maintenanceAdviceMap = getMaintenanceAdvice().stream().collect(Collectors.toMap(MaintenanceAdvice::getAlerttext, Function.identity()));
+        }
+        return maintenanceAdviceMap;
+    }
+
+    private Date getDate(String d){
+        Date parse = new Date();
+        try {
+            parse = simpleDateFormat.parse(d);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return parse;
+    }
+
+    public List<EarlywarningAnalysisPush> getEarlywarnanalysis(String stationid, String startdate, String enddate) {
+        EarlywarningAnalysisPushExample example = new EarlywarningAnalysisPushExample();
+
+        Date dates = new Date();
+        Date datee = new Date();
+        try {
+            dates=simpleDateFormat.parse(startdate);
+            datee=simpleDateFormat.parse(enddate);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+
+        if(stationid==null||stationid.isEmpty()){
+            example.createCriteria().andCounttimeBetween(dates,datee);
+        }else {
+            example.createCriteria().andStationidEqualTo(stationid).andCounttimeBetween(dates,datee);
+        }
+        return earlywarningAnalysisPushMapper.selectByExample(example);
+    }
+
+    public int saveEarlywarnanalysis(List<EarlywarningAnalysisPush> analysisPushes) {
+        int c = 0;
+        for (EarlywarningAnalysisPush analysisPush : analysisPushes) {
+            EarlywarningAnalysisPush earlywarningAnalysisPush = new EarlywarningAnalysisPush();
+            earlywarningAnalysisPush.setReasonsproblem(analysisPush.getReasonsproblem());
+            earlywarningAnalysisPush.setBehebungcraft(analysisPush.getBehebungcraft());
+            earlywarningAnalysisPush.setLeftoverproblem(analysisPush.getLeftoverproblem());
+
+            EarlywarningAnalysisPushExample example = new EarlywarningAnalysisPushExample();
+            example.createCriteria().andIdEqualTo(analysisPush.getId());
+            c+=earlywarningAnalysisPushMapper.updateByExampleSelective(earlywarningAnalysisPush,example);
+        }
+        return c;
+    }
+}

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

@@ -120,4 +120,12 @@ spring:
 #        merge-sql: true
 #      wall:
 #        config:
-#          multi-statement-allow: true
+#          multi-statement-allow: true
+
+windturbineStandby:
+  DJ: FJZT
+  GZ: NFDLZY_FXF
+  #总故障
+  ZGZ: DI139
+  #判定故障间隔时间 毫秒
+  MTBFD: 600000

+ 478 - 0
src/main/resources/mybatis/auto/EarlywarningAnalysisPushMapper.xml

@@ -0,0 +1,478 @@
+<?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.EarlywarningAnalysisPushMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.EarlywarningAnalysisPush">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="COUNTDAY" jdbcType="VARCHAR" property="countday" />
+    <result column="STATIONID" jdbcType="VARCHAR" property="stationid" />
+    <result column="STATIONNAME" jdbcType="VARCHAR" property="stationname" />
+    <result column="WINDTURBINEID" jdbcType="VARCHAR" property="windturbineid" />
+    <result column="WINDTURBINENAME" jdbcType="VARCHAR" property="windturbinename" />
+    <result column="WARNGRAD" jdbcType="VARCHAR" property="warngrad" />
+    <result column="WARNNAME" jdbcType="VARCHAR" property="warnname" />
+    <result column="WARNCOUNT" jdbcType="DECIMAL" property="warncount" />
+    <result column="WARNMINUTE" jdbcType="DECIMAL" property="warnminute" />
+    <result column="SNAPID" jdbcType="DECIMAL" property="snapid" />
+    <result column="RELATEPARTS" jdbcType="VARCHAR" property="relateparts" />
+    <result column="RELATEPARTSTEXT" jdbcType="VARCHAR" property="relatepartstext" />
+    <result column="MAINTENANCEADVICEID" jdbcType="DECIMAL" property="maintenanceadviceid" />
+    <result column="REASONSPROBLEM" jdbcType="VARCHAR" property="reasonsproblem" />
+    <result column="BEHEBUNGCRAFT" jdbcType="VARCHAR" property="behebungcraft" />
+    <result column="LEFTOVERPROBLEM" jdbcType="VARCHAR" property="leftoverproblem" />
+    <result column="COUNTTIME" jdbcType="TIMESTAMP" property="counttime" />
+  </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, COUNTDAY, STATIONID, STATIONNAME, WINDTURBINEID, WINDTURBINENAME, WARNGRAD, WARNNAME, 
+    WARNCOUNT, WARNMINUTE, SNAPID, RELATEPARTS, RELATEPARTSTEXT, MAINTENANCEADVICEID, 
+    REASONSPROBLEM, BEHEBUNGCRAFT, LEFTOVERPROBLEM, COUNTTIME
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.EarlywarningAnalysisPushExample" 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 EARLYWARNINGANALYSISPUSH
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from EARLYWARNINGANALYSISPUSH
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from EARLYWARNINGANALYSISPUSH
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.EarlywarningAnalysisPushExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from EARLYWARNINGANALYSISPUSH
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.EarlywarningAnalysisPush">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into EARLYWARNINGANALYSISPUSH (ID, COUNTDAY, STATIONID, 
+      STATIONNAME, WINDTURBINEID, WINDTURBINENAME, 
+      WARNGRAD, WARNNAME, WARNCOUNT, 
+      WARNMINUTE, SNAPID, RELATEPARTS, 
+      RELATEPARTSTEXT, MAINTENANCEADVICEID, REASONSPROBLEM, 
+      BEHEBUNGCRAFT, LEFTOVERPROBLEM, COUNTTIME
+      )
+    values (#{id,jdbcType=DECIMAL}, #{countday,jdbcType=VARCHAR}, #{stationid,jdbcType=VARCHAR}, 
+      #{stationname,jdbcType=VARCHAR}, #{windturbineid,jdbcType=VARCHAR}, #{windturbinename,jdbcType=VARCHAR}, 
+      #{warngrad,jdbcType=VARCHAR}, #{warnname,jdbcType=VARCHAR}, #{warncount,jdbcType=DECIMAL}, 
+      #{warnminute,jdbcType=DECIMAL}, #{snapid,jdbcType=DECIMAL}, #{relateparts,jdbcType=VARCHAR}, 
+      #{relatepartstext,jdbcType=VARCHAR}, #{maintenanceadviceid,jdbcType=DECIMAL}, #{reasonsproblem,jdbcType=VARCHAR}, 
+      #{behebungcraft,jdbcType=VARCHAR}, #{leftoverproblem,jdbcType=VARCHAR}, #{counttime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.EarlywarningAnalysisPush">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into EARLYWARNINGANALYSISPUSH
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="countday != null">
+        COUNTDAY,
+      </if>
+      <if test="stationid != null">
+        STATIONID,
+      </if>
+      <if test="stationname != null">
+        STATIONNAME,
+      </if>
+      <if test="windturbineid != null">
+        WINDTURBINEID,
+      </if>
+      <if test="windturbinename != null">
+        WINDTURBINENAME,
+      </if>
+      <if test="warngrad != null">
+        WARNGRAD,
+      </if>
+      <if test="warnname != null">
+        WARNNAME,
+      </if>
+      <if test="warncount != null">
+        WARNCOUNT,
+      </if>
+      <if test="warnminute != null">
+        WARNMINUTE,
+      </if>
+      <if test="snapid != null">
+        SNAPID,
+      </if>
+      <if test="relateparts != null">
+        RELATEPARTS,
+      </if>
+      <if test="relatepartstext != null">
+        RELATEPARTSTEXT,
+      </if>
+      <if test="maintenanceadviceid != null">
+        MAINTENANCEADVICEID,
+      </if>
+      <if test="reasonsproblem != null">
+        REASONSPROBLEM,
+      </if>
+      <if test="behebungcraft != null">
+        BEHEBUNGCRAFT,
+      </if>
+      <if test="leftoverproblem != null">
+        LEFTOVERPROBLEM,
+      </if>
+      <if test="counttime != null">
+        COUNTTIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="countday != null">
+        #{countday,jdbcType=VARCHAR},
+      </if>
+      <if test="stationid != null">
+        #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="stationname != null">
+        #{stationname,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbineid != null">
+        #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbinename != null">
+        #{windturbinename,jdbcType=VARCHAR},
+      </if>
+      <if test="warngrad != null">
+        #{warngrad,jdbcType=VARCHAR},
+      </if>
+      <if test="warnname != null">
+        #{warnname,jdbcType=VARCHAR},
+      </if>
+      <if test="warncount != null">
+        #{warncount,jdbcType=DECIMAL},
+      </if>
+      <if test="warnminute != null">
+        #{warnminute,jdbcType=DECIMAL},
+      </if>
+      <if test="snapid != null">
+        #{snapid,jdbcType=DECIMAL},
+      </if>
+      <if test="relateparts != null">
+        #{relateparts,jdbcType=VARCHAR},
+      </if>
+      <if test="relatepartstext != null">
+        #{relatepartstext,jdbcType=VARCHAR},
+      </if>
+      <if test="maintenanceadviceid != null">
+        #{maintenanceadviceid,jdbcType=DECIMAL},
+      </if>
+      <if test="reasonsproblem != null">
+        #{reasonsproblem,jdbcType=VARCHAR},
+      </if>
+      <if test="behebungcraft != null">
+        #{behebungcraft,jdbcType=VARCHAR},
+      </if>
+      <if test="leftoverproblem != null">
+        #{leftoverproblem,jdbcType=VARCHAR},
+      </if>
+      <if test="counttime != null">
+        #{counttime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.EarlywarningAnalysisPushExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from EARLYWARNINGANALYSISPUSH
+    <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 EARLYWARNINGANALYSISPUSH
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.countday != null">
+        COUNTDAY = #{record.countday,jdbcType=VARCHAR},
+      </if>
+      <if test="record.stationid != null">
+        STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.stationname != null">
+        STATIONNAME = #{record.stationname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windturbineid != null">
+        WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windturbinename != null">
+        WINDTURBINENAME = #{record.windturbinename,jdbcType=VARCHAR},
+      </if>
+      <if test="record.warngrad != null">
+        WARNGRAD = #{record.warngrad,jdbcType=VARCHAR},
+      </if>
+      <if test="record.warnname != null">
+        WARNNAME = #{record.warnname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.warncount != null">
+        WARNCOUNT = #{record.warncount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.warnminute != null">
+        WARNMINUTE = #{record.warnminute,jdbcType=DECIMAL},
+      </if>
+      <if test="record.snapid != null">
+        SNAPID = #{record.snapid,jdbcType=DECIMAL},
+      </if>
+      <if test="record.relateparts != null">
+        RELATEPARTS = #{record.relateparts,jdbcType=VARCHAR},
+      </if>
+      <if test="record.relatepartstext != null">
+        RELATEPARTSTEXT = #{record.relatepartstext,jdbcType=VARCHAR},
+      </if>
+      <if test="record.maintenanceadviceid != null">
+        MAINTENANCEADVICEID = #{record.maintenanceadviceid,jdbcType=DECIMAL},
+      </if>
+      <if test="record.reasonsproblem != null">
+        REASONSPROBLEM = #{record.reasonsproblem,jdbcType=VARCHAR},
+      </if>
+      <if test="record.behebungcraft != null">
+        BEHEBUNGCRAFT = #{record.behebungcraft,jdbcType=VARCHAR},
+      </if>
+      <if test="record.leftoverproblem != null">
+        LEFTOVERPROBLEM = #{record.leftoverproblem,jdbcType=VARCHAR},
+      </if>
+      <if test="record.counttime != null">
+        COUNTTIME = #{record.counttime,jdbcType=TIMESTAMP},
+      </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 EARLYWARNINGANALYSISPUSH
+    set ID = #{record.id,jdbcType=DECIMAL},
+      COUNTDAY = #{record.countday,jdbcType=VARCHAR},
+      STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      STATIONNAME = #{record.stationname,jdbcType=VARCHAR},
+      WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      WINDTURBINENAME = #{record.windturbinename,jdbcType=VARCHAR},
+      WARNGRAD = #{record.warngrad,jdbcType=VARCHAR},
+      WARNNAME = #{record.warnname,jdbcType=VARCHAR},
+      WARNCOUNT = #{record.warncount,jdbcType=DECIMAL},
+      WARNMINUTE = #{record.warnminute,jdbcType=DECIMAL},
+      SNAPID = #{record.snapid,jdbcType=DECIMAL},
+      RELATEPARTS = #{record.relateparts,jdbcType=VARCHAR},
+      RELATEPARTSTEXT = #{record.relatepartstext,jdbcType=VARCHAR},
+      MAINTENANCEADVICEID = #{record.maintenanceadviceid,jdbcType=DECIMAL},
+      REASONSPROBLEM = #{record.reasonsproblem,jdbcType=VARCHAR},
+      BEHEBUNGCRAFT = #{record.behebungcraft,jdbcType=VARCHAR},
+      LEFTOVERPROBLEM = #{record.leftoverproblem,jdbcType=VARCHAR},
+      COUNTTIME = #{record.counttime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.EarlywarningAnalysisPush">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update EARLYWARNINGANALYSISPUSH
+    <set>
+      <if test="countday != null">
+        COUNTDAY = #{countday,jdbcType=VARCHAR},
+      </if>
+      <if test="stationid != null">
+        STATIONID = #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="stationname != null">
+        STATIONNAME = #{stationname,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbineid != null">
+        WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbinename != null">
+        WINDTURBINENAME = #{windturbinename,jdbcType=VARCHAR},
+      </if>
+      <if test="warngrad != null">
+        WARNGRAD = #{warngrad,jdbcType=VARCHAR},
+      </if>
+      <if test="warnname != null">
+        WARNNAME = #{warnname,jdbcType=VARCHAR},
+      </if>
+      <if test="warncount != null">
+        WARNCOUNT = #{warncount,jdbcType=DECIMAL},
+      </if>
+      <if test="warnminute != null">
+        WARNMINUTE = #{warnminute,jdbcType=DECIMAL},
+      </if>
+      <if test="snapid != null">
+        SNAPID = #{snapid,jdbcType=DECIMAL},
+      </if>
+      <if test="relateparts != null">
+        RELATEPARTS = #{relateparts,jdbcType=VARCHAR},
+      </if>
+      <if test="relatepartstext != null">
+        RELATEPARTSTEXT = #{relatepartstext,jdbcType=VARCHAR},
+      </if>
+      <if test="maintenanceadviceid != null">
+        MAINTENANCEADVICEID = #{maintenanceadviceid,jdbcType=DECIMAL},
+      </if>
+      <if test="reasonsproblem != null">
+        REASONSPROBLEM = #{reasonsproblem,jdbcType=VARCHAR},
+      </if>
+      <if test="behebungcraft != null">
+        BEHEBUNGCRAFT = #{behebungcraft,jdbcType=VARCHAR},
+      </if>
+      <if test="leftoverproblem != null">
+        LEFTOVERPROBLEM = #{leftoverproblem,jdbcType=VARCHAR},
+      </if>
+      <if test="counttime != null">
+        COUNTTIME = #{counttime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.EarlywarningAnalysisPush">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update EARLYWARNINGANALYSISPUSH
+    set COUNTDAY = #{countday,jdbcType=VARCHAR},
+      STATIONID = #{stationid,jdbcType=VARCHAR},
+      STATIONNAME = #{stationname,jdbcType=VARCHAR},
+      WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
+      WINDTURBINENAME = #{windturbinename,jdbcType=VARCHAR},
+      WARNGRAD = #{warngrad,jdbcType=VARCHAR},
+      WARNNAME = #{warnname,jdbcType=VARCHAR},
+      WARNCOUNT = #{warncount,jdbcType=DECIMAL},
+      WARNMINUTE = #{warnminute,jdbcType=DECIMAL},
+      SNAPID = #{snapid,jdbcType=DECIMAL},
+      RELATEPARTS = #{relateparts,jdbcType=VARCHAR},
+      RELATEPARTSTEXT = #{relatepartstext,jdbcType=VARCHAR},
+      MAINTENANCEADVICEID = #{maintenanceadviceid,jdbcType=DECIMAL},
+      REASONSPROBLEM = #{reasonsproblem,jdbcType=VARCHAR},
+      BEHEBUNGCRAFT = #{behebungcraft,jdbcType=VARCHAR},
+      LEFTOVERPROBLEM = #{leftoverproblem,jdbcType=VARCHAR},
+      COUNTTIME = #{counttime,jdbcType=TIMESTAMP}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+</mapper>

+ 241 - 0
src/main/resources/mybatis/auto/MaintenanceAdviceMapper.xml

@@ -0,0 +1,241 @@
+<?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.MaintenanceAdviceMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.MaintenanceAdvice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="ALERTTEXT" jdbcType="VARCHAR" property="alerttext" />
+    <result column="MAINTENANCEADVICE" jdbcType="VARCHAR" property="maintenanceadvice" />
+  </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, ALERTTEXT, MAINTENANCEADVICE
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.MaintenanceAdviceExample" 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 MAINTENANCEADVICE
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from MAINTENANCEADVICE
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from MAINTENANCEADVICE
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.MaintenanceAdviceExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from MAINTENANCEADVICE
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.MaintenanceAdvice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into MAINTENANCEADVICE (ID, ALERTTEXT, MAINTENANCEADVICE
+      )
+    values (#{id,jdbcType=DECIMAL}, #{alerttext,jdbcType=VARCHAR}, #{maintenanceadvice,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.MaintenanceAdvice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into MAINTENANCEADVICE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="alerttext != null">
+        ALERTTEXT,
+      </if>
+      <if test="maintenanceadvice != null">
+        MAINTENANCEADVICE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="alerttext != null">
+        #{alerttext,jdbcType=VARCHAR},
+      </if>
+      <if test="maintenanceadvice != null">
+        #{maintenanceadvice,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.MaintenanceAdviceExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from MAINTENANCEADVICE
+    <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 MAINTENANCEADVICE
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.alerttext != null">
+        ALERTTEXT = #{record.alerttext,jdbcType=VARCHAR},
+      </if>
+      <if test="record.maintenanceadvice != null">
+        MAINTENANCEADVICE = #{record.maintenanceadvice,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 MAINTENANCEADVICE
+    set ID = #{record.id,jdbcType=DECIMAL},
+      ALERTTEXT = #{record.alerttext,jdbcType=VARCHAR},
+      MAINTENANCEADVICE = #{record.maintenanceadvice,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.MaintenanceAdvice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update MAINTENANCEADVICE
+    <set>
+      <if test="alerttext != null">
+        ALERTTEXT = #{alerttext,jdbcType=VARCHAR},
+      </if>
+      <if test="maintenanceadvice != null">
+        MAINTENANCEADVICE = #{maintenanceadvice,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.MaintenanceAdvice">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update MAINTENANCEADVICE
+    set ALERTTEXT = #{alerttext,jdbcType=VARCHAR},
+      MAINTENANCEADVICE = #{maintenanceadvice,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+</mapper>

+ 379 - 0
src/main/resources/mybatis/auto/ScadafaultMapper.xml

@@ -0,0 +1,379 @@
+<?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.ScadafaultMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Scadafault">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="POINTKEY" jdbcType="VARCHAR" property="pointkey" />
+    <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
+    <result column="CATEGORY1" jdbcType="VARCHAR" property="category1" />
+    <result column="CATEGORY2" jdbcType="VARCHAR" property="category2" />
+    <result column="CATEGORY3" jdbcType="VARCHAR" property="category3" />
+    <result column="CATEGORY4" jdbcType="VARCHAR" property="category4" />
+    <result column="STATIONID" jdbcType="VARCHAR" property="stationid" />
+    <result column="DEVICEID" jdbcType="VARCHAR" property="deviceid" />
+    <result column="RANK" jdbcType="VARCHAR" property="rank" />
+    <result column="ENABLED" jdbcType="DECIMAL" property="enabled" />
+  </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, POINTKEY, DESCRIPTION, CATEGORY1, CATEGORY2, CATEGORY3, CATEGORY4, STATIONID, 
+    DEVICEID, RANK, ENABLED
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.ScadafaultExample" 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 SCADAFAULT
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from SCADAFAULT
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from SCADAFAULT
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.ScadafaultExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from SCADAFAULT
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Scadafault">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into SCADAFAULT (ID, POINTKEY, DESCRIPTION, 
+      CATEGORY1, CATEGORY2, CATEGORY3, 
+      CATEGORY4, STATIONID, DEVICEID, 
+      RANK, ENABLED)
+    values (#{id,jdbcType=DECIMAL}, #{pointkey,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, 
+      #{category1,jdbcType=VARCHAR}, #{category2,jdbcType=VARCHAR}, #{category3,jdbcType=VARCHAR}, 
+      #{category4,jdbcType=VARCHAR}, #{stationid,jdbcType=VARCHAR}, #{deviceid,jdbcType=VARCHAR}, 
+      #{rank,jdbcType=VARCHAR}, #{enabled,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Scadafault">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into SCADAFAULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="pointkey != null">
+        POINTKEY,
+      </if>
+      <if test="description != null">
+        DESCRIPTION,
+      </if>
+      <if test="category1 != null">
+        CATEGORY1,
+      </if>
+      <if test="category2 != null">
+        CATEGORY2,
+      </if>
+      <if test="category3 != null">
+        CATEGORY3,
+      </if>
+      <if test="category4 != null">
+        CATEGORY4,
+      </if>
+      <if test="stationid != null">
+        STATIONID,
+      </if>
+      <if test="deviceid != null">
+        DEVICEID,
+      </if>
+      <if test="rank != null">
+        RANK,
+      </if>
+      <if test="enabled != null">
+        ENABLED,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="pointkey != null">
+        #{pointkey,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="category1 != null">
+        #{category1,jdbcType=VARCHAR},
+      </if>
+      <if test="category2 != null">
+        #{category2,jdbcType=VARCHAR},
+      </if>
+      <if test="category3 != null">
+        #{category3,jdbcType=VARCHAR},
+      </if>
+      <if test="category4 != null">
+        #{category4,jdbcType=VARCHAR},
+      </if>
+      <if test="stationid != null">
+        #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="deviceid != null">
+        #{deviceid,jdbcType=VARCHAR},
+      </if>
+      <if test="rank != null">
+        #{rank,jdbcType=VARCHAR},
+      </if>
+      <if test="enabled != null">
+        #{enabled,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.ScadafaultExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from SCADAFAULT
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+
+    <select id="selectByGZ" resultType="com.gyee.frame.model.auto.FaultInfo">
+      SELECT
+        h.id,h.faultTime,h.messageType,h.snapID,s.stationId,s.projectId,s.lineId,
+            s.windturbineId,s.alertValue,s.rank,s.category1,s.category2,s.category3,
+            s.isOpened,s.stationName,s.windturbineName,s.alertText,s.modelId
+      FROM
+        faulthistory h left join faultsnap s on h.snapid = s.id
+      where s.category2='GZ'
+        AND h.faultTime >= #{faulttime}
+      order by h.faultTime desc
+    </select>
+
+    <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update SCADAFAULT
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.pointkey != null">
+        POINTKEY = #{record.pointkey,jdbcType=VARCHAR},
+      </if>
+      <if test="record.description != null">
+        DESCRIPTION = #{record.description,jdbcType=VARCHAR},
+      </if>
+      <if test="record.category1 != null">
+        CATEGORY1 = #{record.category1,jdbcType=VARCHAR},
+      </if>
+      <if test="record.category2 != null">
+        CATEGORY2 = #{record.category2,jdbcType=VARCHAR},
+      </if>
+      <if test="record.category3 != null">
+        CATEGORY3 = #{record.category3,jdbcType=VARCHAR},
+      </if>
+      <if test="record.category4 != null">
+        CATEGORY4 = #{record.category4,jdbcType=VARCHAR},
+      </if>
+      <if test="record.stationid != null">
+        STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.deviceid != null">
+        DEVICEID = #{record.deviceid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.rank != null">
+        RANK = #{record.rank,jdbcType=VARCHAR},
+      </if>
+      <if test="record.enabled != null">
+        ENABLED = #{record.enabled,jdbcType=DECIMAL},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update SCADAFAULT
+    set ID = #{record.id,jdbcType=DECIMAL},
+      POINTKEY = #{record.pointkey,jdbcType=VARCHAR},
+      DESCRIPTION = #{record.description,jdbcType=VARCHAR},
+      CATEGORY1 = #{record.category1,jdbcType=VARCHAR},
+      CATEGORY2 = #{record.category2,jdbcType=VARCHAR},
+      CATEGORY3 = #{record.category3,jdbcType=VARCHAR},
+      CATEGORY4 = #{record.category4,jdbcType=VARCHAR},
+      STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      DEVICEID = #{record.deviceid,jdbcType=VARCHAR},
+      RANK = #{record.rank,jdbcType=VARCHAR},
+      ENABLED = #{record.enabled,jdbcType=DECIMAL}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Scadafault">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update SCADAFAULT
+    <set>
+      <if test="pointkey != null">
+        POINTKEY = #{pointkey,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        DESCRIPTION = #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="category1 != null">
+        CATEGORY1 = #{category1,jdbcType=VARCHAR},
+      </if>
+      <if test="category2 != null">
+        CATEGORY2 = #{category2,jdbcType=VARCHAR},
+      </if>
+      <if test="category3 != null">
+        CATEGORY3 = #{category3,jdbcType=VARCHAR},
+      </if>
+      <if test="category4 != null">
+        CATEGORY4 = #{category4,jdbcType=VARCHAR},
+      </if>
+      <if test="stationid != null">
+        STATIONID = #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="deviceid != null">
+        DEVICEID = #{deviceid,jdbcType=VARCHAR},
+      </if>
+      <if test="rank != null">
+        RANK = #{rank,jdbcType=VARCHAR},
+      </if>
+      <if test="enabled != null">
+        ENABLED = #{enabled,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Scadafault">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update SCADAFAULT
+    set POINTKEY = #{pointkey,jdbcType=VARCHAR},
+      DESCRIPTION = #{description,jdbcType=VARCHAR},
+      CATEGORY1 = #{category1,jdbcType=VARCHAR},
+      CATEGORY2 = #{category2,jdbcType=VARCHAR},
+      CATEGORY3 = #{category3,jdbcType=VARCHAR},
+      CATEGORY4 = #{category4,jdbcType=VARCHAR},
+      STATIONID = #{stationid,jdbcType=VARCHAR},
+      DEVICEID = #{deviceid,jdbcType=VARCHAR},
+      RANK = #{rank,jdbcType=VARCHAR},
+      ENABLED = #{enabled,jdbcType=DECIMAL}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+</mapper>

+ 327 - 0
src/main/resources/mybatis/auto/StandbyTimeMapper.xml

@@ -0,0 +1,327 @@
+<?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.StandbyTimeMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.StandbyTime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="COUNTDAY" jdbcType="TIMESTAMP" property="countday" />
+    <result column="STANDBYHOURS" jdbcType="DECIMAL" property="standbyhours" />
+    <result column="STATIONID" jdbcType="VARCHAR" property="stationid" />
+    <result column="WINDTURBINEID" jdbcType="VARCHAR" property="windturbineid" />
+    <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
+    <result column="STATETYPE" jdbcType="VARCHAR" property="statetype" />
+    <result column="MESSAGE" jdbcType="VARCHAR" property="message" />
+  </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, COUNTDAY, STANDBYHOURS, STATIONID, WINDTURBINEID, MODELID, STATETYPE, MESSAGE
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.StandbyTimeExample" 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 STANDBYTIME
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from STANDBYTIME
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from STANDBYTIME
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.StandbyTimeExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from STANDBYTIME
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.StandbyTime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into STANDBYTIME (ID, COUNTDAY, STANDBYHOURS, 
+      STATIONID, WINDTURBINEID, MODELID, 
+      STATETYPE, MESSAGE)
+    values (#{id,jdbcType=DECIMAL}, #{countday,jdbcType=TIMESTAMP}, #{standbyhours,jdbcType=DECIMAL}, 
+      #{stationid,jdbcType=VARCHAR}, #{windturbineid,jdbcType=VARCHAR}, #{modelid,jdbcType=VARCHAR}, 
+      #{statetype,jdbcType=VARCHAR}, #{message,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.StandbyTime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into STANDBYTIME
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="countday != null">
+        COUNTDAY,
+      </if>
+      <if test="standbyhours != null">
+        STANDBYHOURS,
+      </if>
+      <if test="stationid != null">
+        STATIONID,
+      </if>
+      <if test="windturbineid != null">
+        WINDTURBINEID,
+      </if>
+      <if test="modelid != null">
+        MODELID,
+      </if>
+      <if test="statetype != null">
+        STATETYPE,
+      </if>
+      <if test="message != null">
+        MESSAGE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="countday != null">
+        #{countday,jdbcType=TIMESTAMP},
+      </if>
+      <if test="standbyhours != null">
+        #{standbyhours,jdbcType=DECIMAL},
+      </if>
+      <if test="stationid != null">
+        #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbineid != null">
+        #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="modelid != null">
+        #{modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="statetype != null">
+        #{statetype,jdbcType=VARCHAR},
+      </if>
+      <if test="message != null">
+        #{message,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.StandbyTimeExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from STANDBYTIME
+    <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 STANDBYTIME
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.countday != null">
+        COUNTDAY = #{record.countday,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.standbyhours != null">
+        STANDBYHOURS = #{record.standbyhours,jdbcType=DECIMAL},
+      </if>
+      <if test="record.stationid != null">
+        STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windturbineid != null">
+        WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.modelid != null">
+        MODELID = #{record.modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.statetype != null">
+        STATETYPE = #{record.statetype,jdbcType=VARCHAR},
+      </if>
+      <if test="record.message != null">
+        MESSAGE = #{record.message,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 STANDBYTIME
+    set ID = #{record.id,jdbcType=DECIMAL},
+      COUNTDAY = #{record.countday,jdbcType=TIMESTAMP},
+      STANDBYHOURS = #{record.standbyhours,jdbcType=DECIMAL},
+      STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      MODELID = #{record.modelid,jdbcType=VARCHAR},
+      STATETYPE = #{record.statetype,jdbcType=VARCHAR},
+      MESSAGE = #{record.message,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.StandbyTime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update STANDBYTIME
+    <set>
+      <if test="countday != null">
+        COUNTDAY = #{countday,jdbcType=TIMESTAMP},
+      </if>
+      <if test="standbyhours != null">
+        STANDBYHOURS = #{standbyhours,jdbcType=DECIMAL},
+      </if>
+      <if test="stationid != null">
+        STATIONID = #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbineid != null">
+        WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="modelid != null">
+        MODELID = #{modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="statetype != null">
+        STATETYPE = #{statetype,jdbcType=VARCHAR},
+      </if>
+      <if test="message != null">
+        MESSAGE = #{message,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.StandbyTime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update STANDBYTIME
+    set COUNTDAY = #{countday,jdbcType=TIMESTAMP},
+      STANDBYHOURS = #{standbyhours,jdbcType=DECIMAL},
+      STATIONID = #{stationid,jdbcType=VARCHAR},
+      WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
+      MODELID = #{modelid,jdbcType=VARCHAR},
+      STATETYPE = #{statetype,jdbcType=VARCHAR},
+      MESSAGE = #{message,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+
+  <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="false">
+    insert into STANDBYTIME (ID, COUNTDAY, STANDBYHOURS, STATIONID, WINDTURBINEID, MODELID, STATETYPE, MESSAGE)
+    <foreach collection="list" item="item" index="index" separator="union all" >
+      ( select
+      #{item.id}, #{item.countday}, #{item.standbyhours}, #{item.stationid},#{item.windturbineid},#{item.modelid},#{item.statetype},#{item.message}
+      from dual )
+    </foreach>
+  </insert>
+</mapper>

+ 398 - 0
src/main/resources/mybatis/auto/StateDuratimeMapper.xml

@@ -0,0 +1,398 @@
+<?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.StateDuratimeMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.StateDuratime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="COUNTTTIME" jdbcType="TIMESTAMP" property="countttime" />
+    <result column="RECENTFAULTTIME" jdbcType="TIMESTAMP" property="recentfaulttime" />
+    <result column="DURAMINUTE" jdbcType="DECIMAL" property="duraminute" />
+    <result column="STATIONID" jdbcType="VARCHAR" property="stationid" />
+    <result column="WINDTURBINEID" jdbcType="VARCHAR" property="windturbineid" />
+    <result column="PROJECTID" jdbcType="VARCHAR" property="projectid" />
+    <result column="LINEID" jdbcType="VARCHAR" property="lineid" />
+    <result column="STATIONNAME" jdbcType="VARCHAR" property="stationname" />
+    <result column="WINDTURBINENAME" jdbcType="VARCHAR" property="windturbinename" />
+    <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
+    <result column="SNAPID" jdbcType="DECIMAL" property="snapid" />
+    <result column="MESSAGE" jdbcType="VARCHAR" property="message" />
+  </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, COUNTTTIME, RECENTFAULTTIME, DURAMINUTE, STATIONID, WINDTURBINEID, PROJECTID, 
+    LINEID, STATIONNAME, WINDTURBINENAME, MODELID, SNAPID, MESSAGE
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.StateDuratimeExample" 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 STATEDURATIME
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from STATEDURATIME
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from STATEDURATIME
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.StateDuratimeExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from STATEDURATIME
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.StateDuratime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into STATEDURATIME (ID, COUNTTTIME, RECENTFAULTTIME, 
+      DURAMINUTE, STATIONID, WINDTURBINEID, 
+      PROJECTID, LINEID, STATIONNAME, 
+      WINDTURBINENAME, MODELID, SNAPID, 
+      MESSAGE)
+    values (#{id,jdbcType=DECIMAL}, #{countttime,jdbcType=TIMESTAMP}, #{recentfaulttime,jdbcType=TIMESTAMP}, 
+      #{duraminute,jdbcType=DECIMAL}, #{stationid,jdbcType=VARCHAR}, #{windturbineid,jdbcType=VARCHAR}, 
+      #{projectid,jdbcType=VARCHAR}, #{lineid,jdbcType=VARCHAR}, #{stationname,jdbcType=VARCHAR}, 
+      #{windturbinename,jdbcType=VARCHAR}, #{modelid,jdbcType=VARCHAR}, #{snapid,jdbcType=DECIMAL}, 
+      #{message,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.StateDuratime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into STATEDURATIME
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="countttime != null">
+        COUNTTTIME,
+      </if>
+      <if test="recentfaulttime != null">
+        RECENTFAULTTIME,
+      </if>
+      <if test="duraminute != null">
+        DURAMINUTE,
+      </if>
+      <if test="stationid != null">
+        STATIONID,
+      </if>
+      <if test="windturbineid != null">
+        WINDTURBINEID,
+      </if>
+      <if test="projectid != null">
+        PROJECTID,
+      </if>
+      <if test="lineid != null">
+        LINEID,
+      </if>
+      <if test="stationname != null">
+        STATIONNAME,
+      </if>
+      <if test="windturbinename != null">
+        WINDTURBINENAME,
+      </if>
+      <if test="modelid != null">
+        MODELID,
+      </if>
+      <if test="snapid != null">
+        SNAPID,
+      </if>
+      <if test="message != null">
+        MESSAGE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="countttime != null">
+        #{countttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="recentfaulttime != null">
+        #{recentfaulttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="duraminute != null">
+        #{duraminute,jdbcType=DECIMAL},
+      </if>
+      <if test="stationid != null">
+        #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbineid != null">
+        #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="projectid != null">
+        #{projectid,jdbcType=VARCHAR},
+      </if>
+      <if test="lineid != null">
+        #{lineid,jdbcType=VARCHAR},
+      </if>
+      <if test="stationname != null">
+        #{stationname,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbinename != null">
+        #{windturbinename,jdbcType=VARCHAR},
+      </if>
+      <if test="modelid != null">
+        #{modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="snapid != null">
+        #{snapid,jdbcType=DECIMAL},
+      </if>
+      <if test="message != null">
+        #{message,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.StateDuratimeExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from STATEDURATIME
+    <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 STATEDURATIME
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.countttime != null">
+        COUNTTTIME = #{record.countttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.recentfaulttime != null">
+        RECENTFAULTTIME = #{record.recentfaulttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.duraminute != null">
+        DURAMINUTE = #{record.duraminute,jdbcType=DECIMAL},
+      </if>
+      <if test="record.stationid != null">
+        STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windturbineid != null">
+        WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.projectid != null">
+        PROJECTID = #{record.projectid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.lineid != null">
+        LINEID = #{record.lineid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.stationname != null">
+        STATIONNAME = #{record.stationname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windturbinename != null">
+        WINDTURBINENAME = #{record.windturbinename,jdbcType=VARCHAR},
+      </if>
+      <if test="record.modelid != null">
+        MODELID = #{record.modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.snapid != null">
+        SNAPID = #{record.snapid,jdbcType=DECIMAL},
+      </if>
+      <if test="record.message != null">
+        MESSAGE = #{record.message,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 STATEDURATIME
+    set ID = #{record.id,jdbcType=DECIMAL},
+      COUNTTTIME = #{record.countttime,jdbcType=TIMESTAMP},
+      RECENTFAULTTIME = #{record.recentfaulttime,jdbcType=TIMESTAMP},
+      DURAMINUTE = #{record.duraminute,jdbcType=DECIMAL},
+      STATIONID = #{record.stationid,jdbcType=VARCHAR},
+      WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      PROJECTID = #{record.projectid,jdbcType=VARCHAR},
+      LINEID = #{record.lineid,jdbcType=VARCHAR},
+      STATIONNAME = #{record.stationname,jdbcType=VARCHAR},
+      WINDTURBINENAME = #{record.windturbinename,jdbcType=VARCHAR},
+      MODELID = #{record.modelid,jdbcType=VARCHAR},
+      SNAPID = #{record.snapid,jdbcType=DECIMAL},
+      MESSAGE = #{record.message,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.StateDuratime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update STATEDURATIME
+    <set>
+      <if test="countttime != null">
+        COUNTTTIME = #{countttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="recentfaulttime != null">
+        RECENTFAULTTIME = #{recentfaulttime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="duraminute != null">
+        DURAMINUTE = #{duraminute,jdbcType=DECIMAL},
+      </if>
+      <if test="stationid != null">
+        STATIONID = #{stationid,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbineid != null">
+        WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="projectid != null">
+        PROJECTID = #{projectid,jdbcType=VARCHAR},
+      </if>
+      <if test="lineid != null">
+        LINEID = #{lineid,jdbcType=VARCHAR},
+      </if>
+      <if test="stationname != null">
+        STATIONNAME = #{stationname,jdbcType=VARCHAR},
+      </if>
+      <if test="windturbinename != null">
+        WINDTURBINENAME = #{windturbinename,jdbcType=VARCHAR},
+      </if>
+      <if test="modelid != null">
+        MODELID = #{modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="snapid != null">
+        SNAPID = #{snapid,jdbcType=DECIMAL},
+      </if>
+      <if test="message != null">
+        MESSAGE = #{message,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.StateDuratime">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update STATEDURATIME
+    set COUNTTTIME = #{countttime,jdbcType=TIMESTAMP},
+      RECENTFAULTTIME = #{recentfaulttime,jdbcType=TIMESTAMP},
+      DURAMINUTE = #{duraminute,jdbcType=DECIMAL},
+      STATIONID = #{stationid,jdbcType=VARCHAR},
+      WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
+      PROJECTID = #{projectid,jdbcType=VARCHAR},
+      LINEID = #{lineid,jdbcType=VARCHAR},
+      STATIONNAME = #{stationname,jdbcType=VARCHAR},
+      WINDTURBINENAME = #{windturbinename,jdbcType=VARCHAR},
+      MODELID = #{modelid,jdbcType=VARCHAR},
+      SNAPID = #{snapid,jdbcType=DECIMAL},
+      MESSAGE = #{message,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+</mapper>

+ 19 - 0
src/test/java/test/GetDataTest.java

@@ -0,0 +1,19 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.AgcService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+public class GetDataTest {
+    @SneakyThrows
+    public static void main(String[] args) {
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        AgcService agcService= SpringUtils.getBean("agcService");
+
+    }
+}