Sfoglia il codice sorgente

修正沙盘主页和功能页面

shilin 3 anni fa
parent
commit
aa41f7f655
48 ha cambiato i file con 5133 aggiunte e 114 eliminazioni
  1. 33 3
      src/main/java/com/gyee/frame/common/spring/InitialRunner.java
  2. 165 1
      src/main/java/com/gyee/frame/controller/health/HealthSubController.java
  3. 47 0
      src/main/java/com/gyee/frame/controller/knowledge/KnowledgeController.java
  4. 72 0
      src/main/java/com/gyee/frame/controller/monitor/SandtableController.java
  5. 18 0
      src/main/java/com/gyee/frame/controller/yaw/YawController.java
  6. 9 1
      src/main/java/com/gyee/frame/mapper/auto/Alertrule2Mapper.java
  7. 96 0
      src/main/java/com/gyee/frame/mapper/auto/AlertrulefailureMapper.java
  8. 4 0
      src/main/java/com/gyee/frame/mapper/auto/RecommenmainMapper.java
  9. 4 0
      src/main/java/com/gyee/frame/mapper/auto/RecommenmainMsSqlMapper.java
  10. 4 0
      src/main/java/com/gyee/frame/mapper/auto/WindPowerStationTestingPoint2Mapper.java
  11. 2 0
      src/main/java/com/gyee/frame/mapper/auto/Windturbineinfodaytop2Mapper.java
  12. 96 0
      src/main/java/com/gyee/frame/mapper/auto/WindturbinepartsMapper.java
  13. 3 0
      src/main/java/com/gyee/frame/mapper/auto/WobugeqMapper.java
  14. 278 0
      src/main/java/com/gyee/frame/model/auto/Alertrulefailure.java
  15. 853 0
      src/main/java/com/gyee/frame/model/auto/AlertrulefailureExample.java
  16. 20 21
      src/main/java/com/gyee/frame/model/auto/ShutdowneventExample.java
  17. 145 0
      src/main/java/com/gyee/frame/model/auto/Windturbineparts.java
  18. 572 0
      src/main/java/com/gyee/frame/model/auto/WindturbinepartsExample.java
  19. 31 0
      src/main/java/com/gyee/frame/model/custom/AlarmTotalVo.java
  20. 79 0
      src/main/java/com/gyee/frame/model/custom/RecommenmainVo.java
  21. 39 0
      src/main/java/com/gyee/frame/service/Alertrule2ervice.java
  22. 113 0
      src/main/java/com/gyee/frame/service/AlertrulefailureService.java
  23. 21 12
      src/main/java/com/gyee/frame/service/FaultPlaybackService.java
  24. 11 0
      src/main/java/com/gyee/frame/service/P3DeviceFaultService.java
  25. 23 1
      src/main/java/com/gyee/frame/service/RecommenmainMsSqlService.java
  26. 128 5
      src/main/java/com/gyee/frame/service/RecommenmainService.java
  27. 99 33
      src/main/java/com/gyee/frame/service/ShutdowneventService.java
  28. 23 0
      src/main/java/com/gyee/frame/service/WindPowerstationTestingPointService.java
  29. 15 0
      src/main/java/com/gyee/frame/service/Windturbineinfodaytop2Service.java
  30. 117 0
      src/main/java/com/gyee/frame/service/WindturbinepartsService.java
  31. 14 0
      src/main/java/com/gyee/frame/service/WobugeqService.java
  32. 123 0
      src/main/java/com/gyee/frame/service/knowledge/KnowledgeService.java
  33. 32 0
      src/main/java/com/gyee/frame/service/weather/WeatherDay5Service.java
  34. 435 20
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java
  35. 567 0
      src/main/java/com/gyee/frame/service/websocket/SandtableService.java
  36. 2 2
      src/main/resources/mybatis-generator.xml
  37. 19 0
      src/main/resources/mybatis/auto/Alertrule2Mapper.xml
  38. 318 0
      src/main/resources/mybatis/auto/AlertrulefailureMapper.xml
  39. 13 0
      src/main/resources/mybatis/auto/RecommenmainMapper.xml
  40. 12 0
      src/main/resources/mybatis/auto/RecommenmainMsSqlMapper.xml
  41. 16 0
      src/main/resources/mybatis/auto/WindPowerStationTestingPoint2Mapper.xml
  42. 25 8
      src/main/resources/mybatis/auto/Windturbineinfodaytop2Mapper.xml
  43. 256 0
      src/main/resources/mybatis/auto/WindturbinepartsMapper.xml
  44. 5 0
      src/main/resources/mybatis/auto/WobugeqMapper.xml
  45. 3 4
      src/test/java/test/GenreSetPushTest.java
  46. 2 3
      src/test/java/test/HealthTest.java
  47. 84 0
      src/test/java/test/SandtableServiceTest.java
  48. 87 0
      src/test/java/test/WindPowerstationTestingPointServiceTest.java

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

@@ -58,6 +58,10 @@ public class InitialRunner implements CommandLineRunner {
 //    private TaosMapService taosMapService;
     @Resource
     private WindTurbineTestingPointaiyjService windTurbineTestingPointaiyjService;
+    @Resource
+    private Alertrule2ervice alertrule2ervice;
+    @Resource
+    private WindturbinepartsService windturbinepartsService;
 
     public static List<Windpowerstation> wpallls = new ArrayList<Windpowerstation>(); // 风电场LIST集合(包含光电电)
     public static List<Project> pjallls = new ArrayList<Project>(); //项目LIST集合(包含光电电)
@@ -71,6 +75,10 @@ public class InitialRunner implements CommandLineRunner {
     public static List<Line> linels = new ArrayList<Line>(); // 线路LIST集合
     public static List<Windturbine> wtls = new ArrayList<Windturbine>(); // 风电机LIST集合
 
+    public static List< Alertrule2> alertrulels = new ArrayList< Alertrule2>(); // 自定义报警规则LIST集合
+
+
+    public static Map<String,  Alertrule2> alertrulemap = new HashMap<String,  Alertrule2>();//自定义报警规则MAP
 
     public static Map<String, Windpowerstation> wpmap = new HashMap<String, Windpowerstation>();//风场(包含光电电)
     public static Map<String, Project> pjmap = new HashMap<String, Project>(); // 项目MAP(包含光电电)
@@ -80,8 +88,9 @@ public class InitialRunner implements CommandLineRunner {
     public static Map<String, Stoptype> stoptypemap = new HashMap<String, Stoptype>();//停机类型
     public static List<Warning2> warnls = new ArrayList<Warning2>(); // 报警LIST集合
     public static Map<String, Warning2> warningmap = new HashMap<String, Warning2>();// 报警MAP集合
-
-    public static Map<String, Map<String, List<Warning2>>> warnmodelmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,<报警类型,报警集合>>
+    public static List<Windturbineparts> windturbinepartsls = new ArrayList<Windturbineparts>();
+    public static Map<String, Windturbineparts> windturbinepartsmap = new HashMap<String, Windturbineparts>();
+    public static Map<String, Map<String, List<Warning2>>> warnmodelmap = new HashMap<>();
     public static Map<String, List<Warning2>> warnmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,报警集合>
     public static List<WarningClassify> warningClassls = new ArrayList<WarningClassify>(); //报警类型列表
     public static Map<String, WarningClassify> warningClassifymap = new HashMap<String, WarningClassify>();
@@ -105,6 +114,8 @@ public class InitialRunner implements CommandLineRunner {
     public static Map<String, Map<String, WindTurbineTestingPointaiyj>> wtpAiyjmap = new HashMap<String, Map<String, WindTurbineTestingPointaiyj>>();// 风电机测点AI表--针对风机预警
     public static Map<String, Map<String, Object>> appendYcglMap = new HashMap<String, Map<String, Object>>();// 预测功率追加
 
+
+    public static Map<String,Integer> wppointnummap=new HashMap<>();
     Map<String, Object> ycmap = new HashMap<>();
 
 
@@ -127,6 +138,25 @@ public class InitialRunner implements CommandLineRunner {
 
         appendYcglMap.put("QS_FDC", ycmap);
 
+        List< Alertrule2> alertrulels =alertrule2ervice.getAlertruleAllList();
+        if(!alertrulels.isEmpty())
+        {
+            for(Alertrule2 ar:alertrulels)
+            {
+                alertrulemap.put(ar.getName(),ar);
+            }
+        }
+
+        windturbinepartsls=windturbinepartsService.findAll();
+        if(!windturbinepartsls.isEmpty())
+        {
+            for(Windturbineparts wp:windturbinepartsls)
+            {
+                windturbinepartsmap.put(wp.getId(),wp);
+            }
+
+        }
+
 
 
 //        List<TaosMap> taosls=taosMapService.findTaosMap();
@@ -466,7 +496,7 @@ public class InitialRunner implements CommandLineRunner {
                 }
             }
         }
-
+        wppointnummap= windPowerstationTestingPointService.getWpPointTotal();
     }
 
 }

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

@@ -31,7 +31,6 @@ public class HealthSubController {
     private WeatherDay5Service weatherDay5Service;
 
 
-
     @PostMapping("/findWtHealthInfo")
     @ResponseBody
     @ApiOperation(value = "获取健康管理风机信息", notes = "获取健康管理风机信息")
@@ -82,6 +81,85 @@ public class HealthSubController {
             map.put("qxpcls",qxpcls);
             map.put("wdls",wdls);
             map.put("jkls",jkls);
+
+
+
+        }
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+    @PostMapping("/findWtHealthInfo1")
+    @ResponseBody
+    @ApiOperation(value = "获取健康管理风机信息", notes = "获取健康管理风机信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
+    })
+    public AjaxResult findWtHealthInfo1(String wtId) throws Exception {
+
+
+        Map<String, Object>  map = new HashMap<>();
+
+        if(StringUtils.notEmp(wtId))
+        {
+
+
+            Calendar cal = Calendar.getInstance();
+
+            Date recodedate = DateUtils.truncate(cal.getTime());
+//            //获取故障类型和风机健康得分
+//            Map<String,String>  stoptypemap = healthSubService.findWtInfo(wtId);
+//            //获取健康管理风机部件基础信息
+//            Map<String, Map<String, Object>>  partmap = healthSubService.findPartHealthInfo(wtId);
+//            //故障数据统计
+//            List<GzfxVo>  gzls = healthSubService.initalGzjfx(wtId,recodedate);
+//            //预警数据统计
+//            List<YjfxVo>  yjls = healthSubService.initalYjfx(wtId,recodedate);
+//            //部件运行数据
+//            List<YxfxVo>  bjyxls = healthSubService.initalYxfx(wtId,recodedate);
+//            //获得日、月等级评估
+//            List<XnfxVo>  djpgls = healthSubService.initalXnfx(wtId,cal);
+//            //当日停机
+//            List<ShutdowneventVo>  stopls = healthSubService.initalShutdown(wtId);
+//            //各个区间曲线偏差率
+//            List<QxpcVo>  qxpcls = healthSubService.findQxpcList(wtId);
+//            //温度范围
+//            List<YxfxVo>  wdls = healthSubService.findWdList(wtId);
+//            //获得健康评价列表
+//            List<ValueVo>  jkls = healthSubService.findJudgmentList(wtId);
+//
+//
+//            map.put("stoptypemap",stoptypemap);
+//            map.put("partmap",partmap);
+//            map.put("gzls",gzls);
+//            map.put("yjls",yjls);
+//            map.put("bjyxls",bjyxls);
+//            map.put("djpgls",djpgls);
+//            map.put("stopls",stopls);
+//            map.put("qxpcls",qxpcls);
+//            map.put("wdls",wdls);
+//            map.put("jkls",jkls);
+
+            //获取故障类型和风机健康得分
+            Map<String,String>  stoptypemap = healthSubService.findWtInfo(wtId);
+            //获取健康管理风机部件基础信息
+            Map<String, Map<String, Object>>  partmap = healthSubService.findPartHealthInfo(wtId);
+            //故障数据统计
+            List<GzfxVo>  gzls = healthSubService.initalGzjfx(wtId,recodedate);
+            //预警数据统计
+            List<YjfxVo>  yjls = healthSubService.initalYjfx(wtId,recodedate);
+
+
+            map.put("stoptypemap",stoptypemap);
+            map.put("partmap",partmap);
+            map.put("gzls",gzls);
+            map.put("yjls",yjls);
+
         }
 
         if (null!=map) {
@@ -94,6 +172,92 @@ public class HealthSubController {
 
 /********************************************************************************************************/
 
+
+@PostMapping("/findWtHealthInfo2")
+@ResponseBody
+@ApiOperation(value = "获取健康管理风机信息", notes = "获取健康管理风机信息")
+@ApiImplicitParams({
+        @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
+})
+public AjaxResult findWtHealthInfo2(String wtId) throws Exception {
+
+
+    Map<String, Object>  map = new HashMap<>();
+
+    if(StringUtils.notEmp(wtId))
+    {
+
+
+        Calendar cal = Calendar.getInstance();
+
+        Date recodedate = DateUtils.truncate(cal.getTime());
+
+        //部件运行数据
+        List<YxfxVo>  bjyxls = healthSubService.initalYxfx(wtId,recodedate);
+        //获得日、月等级评估
+        List<XnfxVo>  djpgls = healthSubService.initalXnfx(wtId,cal);
+        //当日停机
+        List<ShutdowneventVo>  stopls = healthSubService.initalShutdown(wtId);
+
+
+        map.put("bjyxls",bjyxls);
+        map.put("djpgls",djpgls);
+        map.put("stopls",stopls);
+
+    }
+
+    if (null!=map) {
+        return AjaxResult.successData(AjaxStatus.success.code, map);
+    } else {
+        return AjaxResult.successData(AjaxStatus.error.code, map);
+    }
+
+}
+
+    /********************************************************************************************************/
+
+    @PostMapping("/findWtHealthInfo3")
+    @ResponseBody
+    @ApiOperation(value = "获取健康管理风机信息", notes = "获取健康管理风机信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")
+    })
+    public AjaxResult findWtHealthInfo3(String wtId) throws Exception {
+
+
+        Map<String, Object>  map = new HashMap<>();
+
+        if(StringUtils.notEmp(wtId))
+        {
+
+
+            Calendar cal = Calendar.getInstance();
+
+            Date recodedate = DateUtils.truncate(cal.getTime());
+
+            //各个区间曲线偏差率
+            List<QxpcVo>  qxpcls = healthSubService.findQxpcList(wtId);
+            //温度范围
+            List<YxfxVo>  wdls = healthSubService.findWdList(wtId);
+            //获得健康评价列表
+            List<ValueVo>  jkls = healthSubService.findJudgmentList(wtId);
+
+
+            map.put("qxpcls",qxpcls);
+            map.put("wdls",wdls);
+            map.put("jkls",jkls);
+        }
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+    /********************************************************************************************************/
+
     @PostMapping("/gadaytop5")
     @ResponseBody
     @ApiOperation(value = "获得等级评估前5数据", notes = "获得等级评估前5数据")

+ 47 - 0
src/main/java/com/gyee/frame/controller/knowledge/KnowledgeController.java

@@ -0,0 +1,47 @@
+package com.gyee.frame.controller.knowledge;
+
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.service.knowledge.KnowledgeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+@Controller
+@RequestMapping("/knowledge")
+@Api(value = "专家知识", tags = "专家知识")
+public class KnowledgeController {
+
+    private static final String format = "yyyy-MM-dd HH:mm";
+    @Resource
+    private KnowledgeService knowledgeService;
+
+
+    @PostMapping("/getAlertruleAllList")
+    @ResponseBody
+    @ApiOperation(value = "专家知识统计", notes = "专家知识统计")
+    @ApiImplicitParams({})
+
+    public AjaxResult getAlertruleAllList() throws Exception {
+
+        Map<String,Object> map=new HashMap<>();
+
+        map=knowledgeService.getAlertruleAllList();
+
+
+        if (null != map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        }
+
+    }
+}

+ 72 - 0
src/main/java/com/gyee/frame/controller/monitor/SandtableController.java

@@ -0,0 +1,72 @@
+package com.gyee.frame.controller.monitor;
+
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.service.websocket.SandtableService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.Map;
+
+@Controller
+@RequestMapping("/sandtable")
+@Api(value = "沙盘监视" ,tags =  "沙盘监视")
+public class SandtableController {
+
+    @Resource
+    private SandtableService sandtableService;
+
+
+
+    @PostMapping("/findWtInfo")
+    @ResponseBody
+    @ApiOperation(value = "风机信息", notes = "风场信息")
+    @ApiImplicitParams({@ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query")
+    })
+
+    public AjaxResult findSandtableInfo(String wpId) throws Exception {
+
+
+        Map<String, Object> map=  new HashMap<>();
+
+
+        map=sandtableService.findSandtableInfo(wpId);
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+    @PostMapping("/judgeWpHealth")
+    @ResponseBody
+    @ApiOperation(value = "风场健康情况", notes = "风场健康情况")
+
+    public AjaxResult judgeWpHealth() throws Exception {
+
+
+        Map<String, Object> map=  new HashMap<>();
+
+
+        map=sandtableService.judgeWpHealth();
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, map);
+        }
+
+    }
+
+
+}

+ 18 - 0
src/main/java/com/gyee/frame/controller/yaw/YawController.java

@@ -2,6 +2,7 @@ package com.gyee.frame.controller.yaw;
 
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.custom.YawValuesVo;
 import com.gyee.frame.model.custom.YawVo;
 import com.gyee.frame.service.yaw.YawService;
@@ -20,7 +21,9 @@ import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 @Controller
 @RequestMapping("/yaw")
@@ -193,6 +196,21 @@ public class YawController {
 
     }
 
+    @PostMapping("/getWppointnum")
+    @ResponseBody
+    @ApiOperation(value = "获得数据查询测点数量统计", notes = "获得数据查询测点数量统计")
+    @ApiImplicitParams({})
+
+    public AjaxResult getWppointnum() throws Exception {
+
+        Map<String,Integer> wppointnummap=new HashMap<>();
 
+        wppointnummap= InitialRunner.wppointnummap;
+        if (null != wppointnummap) {
+            return AjaxResult.successData(AjaxStatus.success.code, wppointnummap);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, wppointnummap);
+        }
 
+    }
 }

+ 9 - 1
src/main/java/com/gyee/frame/mapper/auto/Alertrule2Mapper.java

@@ -2,9 +2,12 @@ package com.gyee.frame.mapper.auto;
 
 import com.gyee.frame.model.auto.Alertrule2;
 import com.gyee.frame.model.auto.Alertrule2Example;
-import java.util.List;
+import com.gyee.frame.model.custom.AlarmTotalVo;
+import com.gyee.frame.model.custom.SimpleVo;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 public interface Alertrule2Mapper {
     /**
      * This method was generated by MyBatis Generator.
@@ -93,4 +96,9 @@ public interface Alertrule2Mapper {
      * @mbg.generated
      */
     int updateByPrimaryKey(Alertrule2 record);
+
+    List<AlarmTotalVo> getAlarmTotal(@Param("wtId") String wtId, @Param("beginDate") String beginDate, @Param("endDate") String endDate);
+    List<SimpleVo> getAlarmTypenum();
+
+
 }

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

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

+ 4 - 0
src/main/java/com/gyee/frame/mapper/auto/RecommenmainMapper.java

@@ -2,6 +2,7 @@ package com.gyee.frame.mapper.auto;
 
 import com.gyee.frame.model.auto.Recommenmain;
 import com.gyee.frame.model.auto.RecommenmainExample;
+import com.gyee.frame.model.custom.RecommenmainVo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
@@ -98,4 +99,7 @@ public interface RecommenmainMapper {
 
     List<Recommenmain> getRecommenmainDay(@Param("ismain") String ismain,@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
 
+    List<RecommenmainVo> getRecommenmainTotal(@Param("wpId") String wpId, @Param("beginDate") String beginDate, @Param("endDate") String endDate);
+
+
 }

+ 4 - 0
src/main/java/com/gyee/frame/mapper/auto/RecommenmainMsSqlMapper.java

@@ -2,6 +2,7 @@ package com.gyee.frame.mapper.auto;
 
 import com.gyee.frame.model.auto.RecommenmainMsSql;
 import com.gyee.frame.model.auto.RecommenmainMsSqlExample;
+import com.gyee.frame.model.custom.SimpleVo;
 import com.gyee.frame.model.custom.WoBugEqVo;
 import org.apache.ibatis.annotations.Param;
 
@@ -100,4 +101,7 @@ public interface RecommenmainMsSqlMapper {
     List<WoBugEqVo> unfinishedList(@Param("wpId") String wpId, @Param("wtId") String wtId, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
     List<WoBugEqVo> finishedList(@Param("wpId") String wpId, @Param("wtId") String wtId, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
 
+
+    List<SimpleVo> totalList(@Param("wpId") String wpId,@Param("wtId") String wtId, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
+
 }

+ 4 - 0
src/main/java/com/gyee/frame/mapper/auto/WindPowerStationTestingPoint2Mapper.java

@@ -2,6 +2,7 @@ package com.gyee.frame.mapper.auto;
 
 import com.gyee.frame.model.auto.WindPowerStationTestingPoint2;
 import com.gyee.frame.model.auto.WindPowerStationTestingPoint2Example;
+import com.gyee.frame.model.custom.SimpleVo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -94,4 +95,7 @@ public interface WindPowerStationTestingPoint2Mapper {
      * @mbg.generated
      */
     int updateByPrimaryKey(WindPowerStationTestingPoint2 record);
+
+    List<SimpleVo> getWpPointTotal(@Param("wpId") String wpId, @Param("type") String type);
+
 }

+ 2 - 0
src/main/java/com/gyee/frame/mapper/auto/Windturbineinfodaytop2Mapper.java

@@ -94,4 +94,6 @@ public interface Windturbineinfodaytop2Mapper {
      * @mbg.generated
      */
     int updateByPrimaryKey(Windturbineinfodaytop2 record);
+
+    List<Windturbineinfodaytop2> getWindturbineinfodaytop2List(@Param("wpId") String wpId, @Param("year") Integer year, @Param("month") Integer month);
 }

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

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

+ 3 - 0
src/main/java/com/gyee/frame/mapper/auto/WobugeqMapper.java

@@ -3,8 +3,10 @@ package com.gyee.frame.mapper.auto;
 import com.gyee.frame.model.auto.Wobugeq;
 import com.gyee.frame.model.auto.WobugeqExample;
 import com.gyee.frame.model.custom.MainTrackVo;
+import com.gyee.frame.model.custom.SimpleVo;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Date;
 import java.util.List;
 
 public interface WobugeqMapper {
@@ -101,6 +103,7 @@ public interface WobugeqMapper {
 
     List<MainTrackVo> findDuration();
 
+    List<SimpleVo> totalNum(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
 
 
 }

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

@@ -0,0 +1,278 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+public class Alertrulefailure implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column ALERTRULEFAILURE.ID
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column ALERTRULEFAILURE.TID
+     *
+     * @mbg.generated
+     */
+    private String tid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column ALERTRULEFAILURE.GZPC
+     *
+     * @mbg.generated
+     */
+    private String gzpc;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column ALERTRULEFAILURE.GZYY
+     *
+     * @mbg.generated
+     */
+    private String gzyy;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column ALERTRULEFAILURE.GQJ
+     *
+     * @mbg.generated
+     */
+    private String gqj;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column ALERTRULEFAILURE.XQSC
+     *
+     * @mbg.generated
+     */
+    private BigDecimal xqsc;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column ALERTRULEFAILURE.NAME
+     *
+     * @mbg.generated
+     */
+    private String name;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column ALERTRULEFAILURE.MODEL
+     *
+     * @mbg.generated
+     */
+    private String model;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column ALERTRULEFAILURE.ID
+     *
+     * @return the value of ALERTRULEFAILURE.ID
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column ALERTRULEFAILURE.ID
+     *
+     * @param id the value for ALERTRULEFAILURE.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column ALERTRULEFAILURE.TID
+     *
+     * @return the value of ALERTRULEFAILURE.TID
+     *
+     * @mbg.generated
+     */
+    public String getTid() {
+        return tid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column ALERTRULEFAILURE.TID
+     *
+     * @param tid the value for ALERTRULEFAILURE.TID
+     *
+     * @mbg.generated
+     */
+    public void setTid(String tid) {
+        this.tid = tid == null ? null : tid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column ALERTRULEFAILURE.GZPC
+     *
+     * @return the value of ALERTRULEFAILURE.GZPC
+     *
+     * @mbg.generated
+     */
+    public String getGzpc() {
+        return gzpc;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column ALERTRULEFAILURE.GZPC
+     *
+     * @param gzpc the value for ALERTRULEFAILURE.GZPC
+     *
+     * @mbg.generated
+     */
+    public void setGzpc(String gzpc) {
+        this.gzpc = gzpc == null ? null : gzpc.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column ALERTRULEFAILURE.GZYY
+     *
+     * @return the value of ALERTRULEFAILURE.GZYY
+     *
+     * @mbg.generated
+     */
+    public String getGzyy() {
+        return gzyy;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column ALERTRULEFAILURE.GZYY
+     *
+     * @param gzyy the value for ALERTRULEFAILURE.GZYY
+     *
+     * @mbg.generated
+     */
+    public void setGzyy(String gzyy) {
+        this.gzyy = gzyy == null ? null : gzyy.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column ALERTRULEFAILURE.GQJ
+     *
+     * @return the value of ALERTRULEFAILURE.GQJ
+     *
+     * @mbg.generated
+     */
+    public String getGqj() {
+        return gqj;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column ALERTRULEFAILURE.GQJ
+     *
+     * @param gqj the value for ALERTRULEFAILURE.GQJ
+     *
+     * @mbg.generated
+     */
+    public void setGqj(String gqj) {
+        this.gqj = gqj == null ? null : gqj.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column ALERTRULEFAILURE.XQSC
+     *
+     * @return the value of ALERTRULEFAILURE.XQSC
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getXqsc() {
+        return xqsc;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column ALERTRULEFAILURE.XQSC
+     *
+     * @param xqsc the value for ALERTRULEFAILURE.XQSC
+     *
+     * @mbg.generated
+     */
+    public void setXqsc(BigDecimal xqsc) {
+        this.xqsc = xqsc;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column ALERTRULEFAILURE.NAME
+     *
+     * @return the value of ALERTRULEFAILURE.NAME
+     *
+     * @mbg.generated
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column ALERTRULEFAILURE.NAME
+     *
+     * @param name the value for ALERTRULEFAILURE.NAME
+     *
+     * @mbg.generated
+     */
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column ALERTRULEFAILURE.MODEL
+     *
+     * @return the value of ALERTRULEFAILURE.MODEL
+     *
+     * @mbg.generated
+     */
+    public String getModel() {
+        return model;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column ALERTRULEFAILURE.MODEL
+     *
+     * @param model the value for ALERTRULEFAILURE.MODEL
+     *
+     * @mbg.generated
+     */
+    public void setModel(String model) {
+        this.model = model == null ? null : model.trim();
+    }
+}

+ 853 - 0
src/main/java/com/gyee/frame/model/auto/AlertrulefailureExample.java

@@ -0,0 +1,853 @@
+package com.gyee.frame.model.auto;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+public class AlertrulefailureExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    public AlertrulefailureExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table ALERTRULEFAILURE
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table ALERTRULEFAILURE
+     *
+     * @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 ALERTRULEFAILURE
+     *
+     * @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 ALERTRULEFAILURE
+     *
+     * @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 ALERTRULEFAILURE
+     *
+     * @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 ALERTRULEFAILURE
+     *
+     * @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(String value) {
+            addCriterion("ID =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("ID <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("ID >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("ID >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("ID <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("ID <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("ID like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("ID not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("ID in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("ID not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("ID between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("ID not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidIsNull() {
+            addCriterion("TID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidIsNotNull() {
+            addCriterion("TID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidEqualTo(String value) {
+            addCriterion("TID =", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidNotEqualTo(String value) {
+            addCriterion("TID <>", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidGreaterThan(String value) {
+            addCriterion("TID >", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidGreaterThanOrEqualTo(String value) {
+            addCriterion("TID >=", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidLessThan(String value) {
+            addCriterion("TID <", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidLessThanOrEqualTo(String value) {
+            addCriterion("TID <=", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidLike(String value) {
+            addCriterion("TID like", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidNotLike(String value) {
+            addCriterion("TID not like", value, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidIn(List<String> values) {
+            addCriterion("TID in", values, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidNotIn(List<String> values) {
+            addCriterion("TID not in", values, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidBetween(String value1, String value2) {
+            addCriterion("TID between", value1, value2, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTidNotBetween(String value1, String value2) {
+            addCriterion("TID not between", value1, value2, "tid");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcIsNull() {
+            addCriterion("GZPC is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcIsNotNull() {
+            addCriterion("GZPC is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcEqualTo(String value) {
+            addCriterion("GZPC =", value, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcNotEqualTo(String value) {
+            addCriterion("GZPC <>", value, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcGreaterThan(String value) {
+            addCriterion("GZPC >", value, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcGreaterThanOrEqualTo(String value) {
+            addCriterion("GZPC >=", value, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcLessThan(String value) {
+            addCriterion("GZPC <", value, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcLessThanOrEqualTo(String value) {
+            addCriterion("GZPC <=", value, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcLike(String value) {
+            addCriterion("GZPC like", value, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcNotLike(String value) {
+            addCriterion("GZPC not like", value, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcIn(List<String> values) {
+            addCriterion("GZPC in", values, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcNotIn(List<String> values) {
+            addCriterion("GZPC not in", values, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcBetween(String value1, String value2) {
+            addCriterion("GZPC between", value1, value2, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzpcNotBetween(String value1, String value2) {
+            addCriterion("GZPC not between", value1, value2, "gzpc");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyIsNull() {
+            addCriterion("GZYY is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyIsNotNull() {
+            addCriterion("GZYY is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyEqualTo(String value) {
+            addCriterion("GZYY =", value, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyNotEqualTo(String value) {
+            addCriterion("GZYY <>", value, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyGreaterThan(String value) {
+            addCriterion("GZYY >", value, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyGreaterThanOrEqualTo(String value) {
+            addCriterion("GZYY >=", value, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyLessThan(String value) {
+            addCriterion("GZYY <", value, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyLessThanOrEqualTo(String value) {
+            addCriterion("GZYY <=", value, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyLike(String value) {
+            addCriterion("GZYY like", value, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyNotLike(String value) {
+            addCriterion("GZYY not like", value, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyIn(List<String> values) {
+            addCriterion("GZYY in", values, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyNotIn(List<String> values) {
+            addCriterion("GZYY not in", values, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyBetween(String value1, String value2) {
+            addCriterion("GZYY between", value1, value2, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGzyyNotBetween(String value1, String value2) {
+            addCriterion("GZYY not between", value1, value2, "gzyy");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjIsNull() {
+            addCriterion("GQJ is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjIsNotNull() {
+            addCriterion("GQJ is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjEqualTo(String value) {
+            addCriterion("GQJ =", value, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjNotEqualTo(String value) {
+            addCriterion("GQJ <>", value, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjGreaterThan(String value) {
+            addCriterion("GQJ >", value, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjGreaterThanOrEqualTo(String value) {
+            addCriterion("GQJ >=", value, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjLessThan(String value) {
+            addCriterion("GQJ <", value, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjLessThanOrEqualTo(String value) {
+            addCriterion("GQJ <=", value, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjLike(String value) {
+            addCriterion("GQJ like", value, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjNotLike(String value) {
+            addCriterion("GQJ not like", value, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjIn(List<String> values) {
+            addCriterion("GQJ in", values, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjNotIn(List<String> values) {
+            addCriterion("GQJ not in", values, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjBetween(String value1, String value2) {
+            addCriterion("GQJ between", value1, value2, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andGqjNotBetween(String value1, String value2) {
+            addCriterion("GQJ not between", value1, value2, "gqj");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscIsNull() {
+            addCriterion("XQSC is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscIsNotNull() {
+            addCriterion("XQSC is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscEqualTo(BigDecimal value) {
+            addCriterion("XQSC =", value, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscNotEqualTo(BigDecimal value) {
+            addCriterion("XQSC <>", value, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscGreaterThan(BigDecimal value) {
+            addCriterion("XQSC >", value, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscGreaterThanOrEqualTo(BigDecimal value) {
+            addCriterion("XQSC >=", value, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscLessThan(BigDecimal value) {
+            addCriterion("XQSC <", value, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscLessThanOrEqualTo(BigDecimal value) {
+            addCriterion("XQSC <=", value, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscIn(List<BigDecimal> values) {
+            addCriterion("XQSC in", values, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscNotIn(List<BigDecimal> values) {
+            addCriterion("XQSC not in", values, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("XQSC between", value1, value2, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andXqscNotBetween(BigDecimal value1, BigDecimal value2) {
+            addCriterion("XQSC not between", value1, value2, "xqsc");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("NAME is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("NAME is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("NAME =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("NAME <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("NAME >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("NAME >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("NAME <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("NAME <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("NAME like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("NAME not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("NAME in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("NAME not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("NAME between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("NAME not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelIsNull() {
+            addCriterion("MODEL is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelIsNotNull() {
+            addCriterion("MODEL is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelEqualTo(String value) {
+            addCriterion("MODEL =", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelNotEqualTo(String value) {
+            addCriterion("MODEL <>", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelGreaterThan(String value) {
+            addCriterion("MODEL >", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelGreaterThanOrEqualTo(String value) {
+            addCriterion("MODEL >=", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelLessThan(String value) {
+            addCriterion("MODEL <", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelLessThanOrEqualTo(String value) {
+            addCriterion("MODEL <=", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelLike(String value) {
+            addCriterion("MODEL like", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelNotLike(String value) {
+            addCriterion("MODEL not like", value, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelIn(List<String> values) {
+            addCriterion("MODEL in", values, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelNotIn(List<String> values) {
+            addCriterion("MODEL not in", values, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelBetween(String value1, String value2) {
+            addCriterion("MODEL between", value1, value2, "model");
+            return (Criteria) this;
+        }
+
+        public Criteria andModelNotBetween(String value1, String value2) {
+            addCriterion("MODEL not between", value1, value2, "model");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table ALERTRULEFAILURE
+     *
+     * @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 ALERTRULEFAILURE
+     *
+     * @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);
+        }
+    }
+}

+ 20 - 21
src/main/java/com/gyee/frame/model/auto/ShutdowneventExample.java

@@ -1,6 +1,5 @@
 package com.gyee.frame.model.auto;
 
-import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -536,52 +535,52 @@ public class ShutdowneventExample {
             return (Criteria) this;
         }
 
-        public Criteria andStophoursEqualTo(BigDecimal value) {
+        public Criteria andStophoursEqualTo(Double value) {
             addCriterion("stopHours =", value, "stophours");
             return (Criteria) this;
         }
 
-        public Criteria andStophoursNotEqualTo(BigDecimal value) {
+        public Criteria andStophoursNotEqualTo(Double value) {
             addCriterion("stopHours <>", value, "stophours");
             return (Criteria) this;
         }
 
-        public Criteria andStophoursGreaterThan(BigDecimal value) {
+        public Criteria andStophoursGreaterThan(Double value) {
             addCriterion("stopHours >", value, "stophours");
             return (Criteria) this;
         }
 
-        public Criteria andStophoursGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andStophoursGreaterThanOrEqualTo(Double value) {
             addCriterion("stopHours >=", value, "stophours");
             return (Criteria) this;
         }
 
-        public Criteria andStophoursLessThan(BigDecimal value) {
+        public Criteria andStophoursLessThan(Double value) {
             addCriterion("stopHours <", value, "stophours");
             return (Criteria) this;
         }
 
-        public Criteria andStophoursLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andStophoursLessThanOrEqualTo(Double value) {
             addCriterion("stopHours <=", value, "stophours");
             return (Criteria) this;
         }
 
-        public Criteria andStophoursIn(List<BigDecimal> values) {
+        public Criteria andStophoursIn(List<Double> values) {
             addCriterion("stopHours in", values, "stophours");
             return (Criteria) this;
         }
 
-        public Criteria andStophoursNotIn(List<BigDecimal> values) {
+        public Criteria andStophoursNotIn(List<Double> values) {
             addCriterion("stopHours not in", values, "stophours");
             return (Criteria) this;
         }
 
-        public Criteria andStophoursBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andStophoursBetween(Double value1, Double value2) {
             addCriterion("stopHours between", value1, value2, "stophours");
             return (Criteria) this;
         }
 
-        public Criteria andStophoursNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andStophoursNotBetween(Double value1, Double value2) {
             addCriterion("stopHours not between", value1, value2, "stophours");
             return (Criteria) this;
         }
@@ -596,52 +595,52 @@ public class ShutdowneventExample {
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerEqualTo(BigDecimal value) {
+        public Criteria andLosspowerEqualTo(Double value) {
             addCriterion("lossPower =", value, "losspower");
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerNotEqualTo(BigDecimal value) {
+        public Criteria andLosspowerNotEqualTo(Double value) {
             addCriterion("lossPower <>", value, "losspower");
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerGreaterThan(BigDecimal value) {
+        public Criteria andLosspowerGreaterThan(Double value) {
             addCriterion("lossPower >", value, "losspower");
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andLosspowerGreaterThanOrEqualTo(Double value) {
             addCriterion("lossPower >=", value, "losspower");
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerLessThan(BigDecimal value) {
+        public Criteria andLosspowerLessThan(Double value) {
             addCriterion("lossPower <", value, "losspower");
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andLosspowerLessThanOrEqualTo(Double value) {
             addCriterion("lossPower <=", value, "losspower");
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerIn(List<BigDecimal> values) {
+        public Criteria andLosspowerIn(List<Double> values) {
             addCriterion("lossPower in", values, "losspower");
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerNotIn(List<BigDecimal> values) {
+        public Criteria andLosspowerNotIn(List<Double> values) {
             addCriterion("lossPower not in", values, "losspower");
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andLosspowerBetween(Double value1, Double value2) {
             addCriterion("lossPower between", value1, value2, "losspower");
             return (Criteria) this;
         }
 
-        public Criteria andLosspowerNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andLosspowerNotBetween(Double value1, Double value2) {
             addCriterion("lossPower not between", value1, value2, "losspower");
             return (Criteria) this;
         }

+ 145 - 0
src/main/java/com/gyee/frame/model/auto/Windturbineparts.java

@@ -0,0 +1,145 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+
+public class Windturbineparts implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINE_PARTS.ID
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINE_PARTS.NAME
+     *
+     * @mbg.generated
+     */
+    private String name;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINE_PARTS.PARTCODE
+     *
+     * @mbg.generated
+     */
+    private String partcode;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINE_PARTS.ENABLED
+     *
+     * @mbg.generated
+     */
+    private Short enabled;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINE_PARTS.ID
+     *
+     * @return the value of WINDTURBINE_PARTS.ID
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINE_PARTS.ID
+     *
+     * @param id the value for WINDTURBINE_PARTS.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINE_PARTS.NAME
+     *
+     * @return the value of WINDTURBINE_PARTS.NAME
+     *
+     * @mbg.generated
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINE_PARTS.NAME
+     *
+     * @param name the value for WINDTURBINE_PARTS.NAME
+     *
+     * @mbg.generated
+     */
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINE_PARTS.PARTCODE
+     *
+     * @return the value of WINDTURBINE_PARTS.PARTCODE
+     *
+     * @mbg.generated
+     */
+    public String getPartcode() {
+        return partcode;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINE_PARTS.PARTCODE
+     *
+     * @param partcode the value for WINDTURBINE_PARTS.PARTCODE
+     *
+     * @mbg.generated
+     */
+    public void setPartcode(String partcode) {
+        this.partcode = partcode == null ? null : partcode.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINE_PARTS.ENABLED
+     *
+     * @return the value of WINDTURBINE_PARTS.ENABLED
+     *
+     * @mbg.generated
+     */
+    public Short getEnabled() {
+        return enabled;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINE_PARTS.ENABLED
+     *
+     * @param enabled the value for WINDTURBINE_PARTS.ENABLED
+     *
+     * @mbg.generated
+     */
+    public void setEnabled(Short enabled) {
+        this.enabled = enabled;
+    }
+}

+ 572 - 0
src/main/java/com/gyee/frame/model/auto/WindturbinepartsExample.java

@@ -0,0 +1,572 @@
+package com.gyee.frame.model.auto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class WindturbinepartsExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    public WindturbinepartsExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @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 WINDTURBINE_PARTS
+     *
+     * @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 WINDTURBINE_PARTS
+     *
+     * @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 WINDTURBINE_PARTS
+     *
+     * @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 WINDTURBINE_PARTS
+     *
+     * @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(String value) {
+            addCriterion("ID =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("ID <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("ID >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("ID >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("ID <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("ID <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("ID like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("ID not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("ID in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("ID not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("ID between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("ID not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("NAME is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("NAME is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("NAME =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("NAME <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("NAME >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("NAME >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("NAME <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("NAME <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("NAME like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("NAME not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("NAME in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("NAME not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("NAME between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("NAME not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeIsNull() {
+            addCriterion("PARTCODE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeIsNotNull() {
+            addCriterion("PARTCODE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeEqualTo(String value) {
+            addCriterion("PARTCODE =", value, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeNotEqualTo(String value) {
+            addCriterion("PARTCODE <>", value, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeGreaterThan(String value) {
+            addCriterion("PARTCODE >", value, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeGreaterThanOrEqualTo(String value) {
+            addCriterion("PARTCODE >=", value, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeLessThan(String value) {
+            addCriterion("PARTCODE <", value, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeLessThanOrEqualTo(String value) {
+            addCriterion("PARTCODE <=", value, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeLike(String value) {
+            addCriterion("PARTCODE like", value, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeNotLike(String value) {
+            addCriterion("PARTCODE not like", value, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeIn(List<String> values) {
+            addCriterion("PARTCODE in", values, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeNotIn(List<String> values) {
+            addCriterion("PARTCODE not in", values, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeBetween(String value1, String value2) {
+            addCriterion("PARTCODE between", value1, value2, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andPartcodeNotBetween(String value1, String value2) {
+            addCriterion("PARTCODE not between", value1, value2, "partcode");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledIsNull() {
+            addCriterion("ENABLED is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledIsNotNull() {
+            addCriterion("ENABLED is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledEqualTo(Short value) {
+            addCriterion("ENABLED =", value, "enabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledNotEqualTo(Short value) {
+            addCriterion("ENABLED <>", value, "enabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledGreaterThan(Short value) {
+            addCriterion("ENABLED >", value, "enabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledGreaterThanOrEqualTo(Short value) {
+            addCriterion("ENABLED >=", value, "enabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledLessThan(Short value) {
+            addCriterion("ENABLED <", value, "enabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledLessThanOrEqualTo(Short value) {
+            addCriterion("ENABLED <=", value, "enabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledIn(List<Short> values) {
+            addCriterion("ENABLED in", values, "enabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledNotIn(List<Short> values) {
+            addCriterion("ENABLED not in", values, "enabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledBetween(Short value1, Short value2) {
+            addCriterion("ENABLED between", value1, value2, "enabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnabledNotBetween(Short value1, Short value2) {
+            addCriterion("ENABLED not between", value1, value2, "enabled");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table WINDTURBINE_PARTS
+     *
+     * @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 WINDTURBINE_PARTS
+     *
+     * @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);
+        }
+    }
+}

+ 31 - 0
src/main/java/com/gyee/frame/model/custom/AlarmTotalVo.java

@@ -0,0 +1,31 @@
+package com.gyee.frame.model.custom;
+
+public class AlarmTotalVo {
+    private String wpId;
+    private String wtId;
+    private String name;
+
+    public String getWpId() {
+        return wpId;
+    }
+
+    public void setWpId(String wpId) {
+        this.wpId = wpId;
+    }
+
+    public String getWtId() {
+        return wtId;
+    }
+
+    public void setWtId(String wtId) {
+        this.wtId = wtId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 79 - 0
src/main/java/com/gyee/frame/model/custom/RecommenmainVo.java

@@ -0,0 +1,79 @@
+package com.gyee.frame.model.custom;
+
+import java.util.Date;
+
+public class RecommenmainVo {
+
+	private String wtId;
+	private Integer nums;
+	private String typeId;
+	private Date recodedate;
+	private String  typename;
+	private String  reason;
+	private String  operation;
+	private double speed;
+
+	public double getSpeed() {
+		return speed;
+	}
+
+	public void setSpeed(double speed) {
+		this.speed = speed;
+	}
+
+	public String getWtId() {
+		return wtId;
+	}
+
+	public void setWtId(String wtId) {
+		this.wtId = wtId;
+	}
+
+	public Integer getNums() {
+		return nums;
+	}
+
+	public void setNums(Integer nums) {
+		this.nums = nums;
+	}
+
+	public String getReason() {
+		return reason;
+	}
+
+	public void setReason(String reason) {
+		this.reason = reason;
+	}
+
+	public String getOperation() {
+		return operation;
+	}
+
+	public void setOperation(String operation) {
+		this.operation = operation;
+	}
+
+	public String getTypeId() {
+		return typeId;
+	}
+
+	public void setTypeId(String typeId) {
+		this.typeId = typeId;
+	}
+
+	public String getTypename() {
+		return typename;
+	}
+
+	public void setTypename(String typename) {
+		this.typename = typename;
+	}
+
+	public Date getRecodedate() {
+		return recodedate;
+	}
+
+	public void setRecodedate(Date recodedate) {
+		this.recodedate = recodedate;
+	}
+}

+ 39 - 0
src/main/java/com/gyee/frame/service/Alertrule2ervice.java

@@ -7,12 +7,17 @@ import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.Alertrule2Mapper;
 import com.gyee.frame.model.auto.Alertrule2;
 import com.gyee.frame.model.auto.Alertrule2Example;
+import com.gyee.frame.model.custom.AlarmTotalVo;
+import com.gyee.frame.model.custom.SimpleVo;
 import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.SnowflakeIdWorker;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 
@@ -196,4 +201,38 @@ public class Alertrule2ervice implements BaseService<Alertrule2, Alertrule2Examp
 
 	}
 
+
+    public  List<Alertrule2> getAlertruleAllList() {
+
+        Alertrule2Example example = new Alertrule2Example();
+
+        List<Alertrule2> vos = alertrule2Mapper.selectByExample(example);
+
+
+        return vos;
+
+    }
+
+    public List<AlarmTotalVo> getAlertruleAllList(String wtId,Date beginDate, Date endDate)
+    {
+        List<AlarmTotalVo> vos=new ArrayList<>();
+        if(StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate))
+        {
+
+
+            PageHelper.startPage(1, 1);
+            vos=alertrule2Mapper.getAlarmTotal(wtId, DateUtils.format(beginDate), DateUtils.format(endDate));
+            PageInfo<AlarmTotalVo> pageInfo = new PageInfo<AlarmTotalVo>(vos);
+            vos=pageInfo.getList();
+        }
+        return  vos;
+    }
+
+
+    public  List<SimpleVo> getAlarmTypenum()
+    {
+        List<SimpleVo> ls=new ArrayList<>();
+        ls=alertrule2Mapper.getAlarmTypenum();
+        return ls;
+    }
 }

+ 113 - 0
src/main/java/com/gyee/frame/service/AlertrulefailureService.java

@@ -0,0 +1,113 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.AlertrulefailureMapper;
+import com.gyee.frame.model.auto.Alertrulefailure;
+import com.gyee.frame.model.auto.AlertrulefailureExample;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 线路 AlertrulefailureService
+ * @Title: AlertrulefailureService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class AlertrulefailureService implements BaseService<Alertrulefailure, AlertrulefailureExample> {
+	@Resource
+	private AlertrulefailureMapper AlertrulefailureMapper;
+
+	private final String QS = "0";
+	private final String FD = "-1";
+	private final String GF = "-2";
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			AlertrulefailureExample example=new AlertrulefailureExample();
+			example.createCriteria().andIdIn(lista);
+			return AlertrulefailureMapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public Alertrulefailure selectByPrimaryKey(String id) {
+				
+			return AlertrulefailureMapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(Alertrulefailure record) {
+		return AlertrulefailureMapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Alertrulefailure record) {
+				
+
+				
+		return AlertrulefailureMapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(Alertrulefailure record, AlertrulefailureExample example) {
+		
+		return AlertrulefailureMapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(Alertrulefailure record, AlertrulefailureExample example) {
+		
+		return AlertrulefailureMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Alertrulefailure> selectByExample(AlertrulefailureExample example) {
+		
+		return AlertrulefailureMapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(AlertrulefailureExample example) {
+		
+		return AlertrulefailureMapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(AlertrulefailureExample example) {
+		
+		return AlertrulefailureMapper.deleteByExample(example);
+	}
+
+	public List<Alertrulefailure> findAll() {
+
+		List<Alertrulefailure> list=new ArrayList<>();
+
+		AlertrulefailureExample example=new AlertrulefailureExample();
+		list= AlertrulefailureMapper.selectByExample(example);
+		return list;
+
+	}
+
+
+}

+ 21 - 12
src/main/java/com/gyee/frame/service/FaultPlaybackService.java

@@ -57,6 +57,16 @@ public class FaultPlaybackService  {
         int length=36;//原来720
         String[] datetime = new String[length];
 
+        Calendar  c = Calendar.getInstance();
+        c.setTime(stopTime);
+        for(int i=0;i<length;i++)
+        {
+            SimpleDateFormat df1 =new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
+
+            datetime[i] = df1.format(c.getTime());
+            c.add(Calendar.SECOND,20);
+        }
+
         for (int i = 0; i < pointids.length; i++) {
 
 
@@ -74,36 +84,35 @@ public class FaultPlaybackService  {
                         }
                         if (!ails.isEmpty()) {
                             for (int j = 0; j < length; j++) {
-                                cal.setTimeInMillis(ails.get(j).getPointTime() * 1000);
-                                SimpleDateFormat df1 =new SimpleDateFormat("yyyy-MM-dd HH-mm");
-
-                                datetime[j] = df1.format(cal.getTime());
+//                                cal.setTimeInMillis(ails.get(j).getPointTime() * 1000);
+//                                SimpleDateFormat df1 =new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
+//                                datetime[j] = df1.format(cal.getTime());
                                 value[j] = String.valueOf(StringUtils.round(ails.get(j).getPointValueInDouble(), 2));
                             }
                         }
                         namemap.put(pointids[i], di.getName());
-                        timemap.put("datetime", datetime);
+//                        timemap.put("datetime", datetime);
                         points[i]=value;
                     }
                 }else
                 {
                     WindTurbineTestingPointAi2 ai =windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtId, pointids[i]);
                     String[] value = new String[length];
-                    if (null != ai) {
+                    if (null != ai && StringUtils.notEmp(ai.getId())) {
 
                         List<PointData> ails = realApiUtil.getHistoryDatasSnap(ai, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long)length, 20L);
 
                         if (!ails.isEmpty()) {
                             for (int j = 0; j < length; j++) {
-                                SimpleDateFormat df1 =new SimpleDateFormat("yyyy-MM-dd HH-mm");
-
-                                cal.setTimeInMillis(ails.get(j).getPointTime() * 1000);
-                                datetime[j] = df1.format(cal.getTime());
+//                                SimpleDateFormat df1 =new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
+//
+//                                cal.setTimeInMillis(ails.get(j).getPointTime() * 1000);
+//                                datetime[j] = df1.format(cal.getTime());
                                 value[j] = String.valueOf(StringUtils.round(ails.get(j).getPointValueInDouble(), 2));
                             }
                         }
                         namemap.put(pointids[i], ai.getName());
-                        timemap.put("datetime", datetime);
+//                        timemap.put("datetime", datetime);
                         points[i]=value;
                     }
                 }
@@ -113,7 +122,7 @@ public class FaultPlaybackService  {
         }
 
         resultmap.put("datas", datamap);
-        resultmap.put("datetime", timemap.get("datetime"));
+        resultmap.put("datetime", datetime);
         resultmap.put("names", namemap);
 
         return resultmap;

+ 11 - 0
src/main/java/com/gyee/frame/service/P3DeviceFaultService.java

@@ -152,4 +152,15 @@ public class P3DeviceFaultService implements BaseService<P3DeviceFault, P3Device
         return pageInfo;
 
     }
+
+    public List<P3DeviceFault> findAll() {
+
+        P3DeviceFaultExample example = new P3DeviceFaultExample();
+
+        List<P3DeviceFault> list =p3DeviceFaultMapper.selectByExample(example);
+
+        return list;
+
+
+    }
 }

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

@@ -7,11 +7,12 @@ import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.RecommenmainMsSqlMapper;
 import com.gyee.frame.model.auto.RecommenmainMsSql;
 import com.gyee.frame.model.auto.RecommenmainMsSqlExample;
+import com.gyee.frame.model.custom.SimpleVo;
 import com.gyee.frame.model.custom.WoBugEqVo;
 import com.gyee.frame.util.StringUtils;
-import javax.annotation.Resource;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -163,4 +164,25 @@ public class RecommenmainMsSqlService implements BaseService<RecommenmainMsSql,
 		return list;
 
 	}
+
+	@DataSource(value = DataSourceType.TICKET)
+	public int totalList(String wpId,String wtId, Date beginDate, Date endDate) {
+
+		int num=0;
+		List<SimpleVo> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+
+			list= recommenmainMsSqlMapper.totalList(wpId,wtId, beginDate, endDate);
+
+			if(!list.isEmpty())
+			{
+				num=list.get(0).getValue();
+			}
+		}
+		return num;
+
+	}
+
 }

+ 128 - 5
src/main/java/com/gyee/frame/service/RecommenmainService.java

@@ -1,17 +1,21 @@
 package com.gyee.frame.service;
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.RecommenmainMapper;
 import com.gyee.frame.model.auto.Recommenmain;
 import com.gyee.frame.model.auto.RecommenmainExample;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.RecommenmainVo;
+import com.gyee.frame.util.DateUtils;
 import com.gyee.frame.util.StringUtils;
-import javax.annotation.Resource;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import javax.annotation.Resource;
+import java.util.*;
 
 /**
  * 线路 RecommenmainService
@@ -25,8 +29,10 @@ import java.util.List;
 public class RecommenmainService implements BaseService<Recommenmain, RecommenmainExample> {
 	@Resource
 	private RecommenmainMapper recommenmainMapper;
-	
 
+	private final String QS = "0";
+	private final String FD = "-1";
+	private final String GF = "-2";
 
 	@Override
 	public int deleteByPrimaryKey(String ids) {
@@ -163,6 +169,123 @@ public class RecommenmainService implements BaseService<Recommenmain, Recommenma
 
 	}
 
+	public Recommenmain getRecommenmain(String wtId, Date beginDate, Date endDate) {
+
+
+		Recommenmain po=new Recommenmain();
+
+		if (StringUtils.notEmp(wtId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+			PageHelper.startPage(1, 1);
+			RecommenmainExample example=new RecommenmainExample();
+			example.setOrderByClause("recodedate desc");
+
+			RecommenmainExample.Criteria criteria =example.createCriteria();
+			criteria.andWtidEqualTo(wtId);
+			criteria.andRecodedateGreaterThanOrEqualTo(beginDate).andRecodedateLessThan(endDate);
+
+
+
+			List<Recommenmain> list= recommenmainMapper.selectByExample(example);
+
+			PageInfo<Recommenmain> pageInfo = new PageInfo<Recommenmain>(list);
+
+			if(!pageInfo.getList().isEmpty())
+			{
+				po=pageInfo.getList().get(0);
+			}
+
+
+		}
+		return po;
+
+	}
+
+	public List<RecommenmainVo> getRecommenmainTopList(String wpId, Date beginDate, Date endDate) {
+
+
+		List<RecommenmainVo> list=new ArrayList<>();
+
+		if (StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+			PageHelper.startPage(1, 5);
+
+			list= recommenmainMapper.getRecommenmainTotal(wpId, DateUtils.format(beginDate),DateUtils.format(endDate));
+
+			PageInfo<RecommenmainVo> pageInfo = new PageInfo<RecommenmainVo>(list);
+
+			if(!pageInfo.getList().isEmpty())
+			{
+				list=pageInfo.getList();
+			}
 
 
+		}
+		return list;
+
+	}
+
+
+
+	public int getRecommenmainnum(String id, Date beginDate, Date endDate) {
+
+
+		int rmnum=0;
+
+		if (StringUtils.notEmp(id) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
+
+
+			RecommenmainExample example=new RecommenmainExample();
+			example.setOrderByClause("recodedate desc");
+
+			RecommenmainExample.Criteria criteria =example.createCriteria();
+
+
+			List<String> wtidls=new ArrayList<>();
+			if (id.equals(GF))
+			{
+				return 0;
+			}else if (InitialRunner.wpmap.containsKey(id)) {
+				for(Windturbine wt:InitialRunner.wp_wtmap.get(id))
+				{
+					wtidls.add(wt.getId());
+				}
+			} else if (InitialRunner.pjmap.containsKey(id)) {
+				for(Windturbine wt:InitialRunner.pj_wtmap.get(id))
+				{
+					wtidls.add(wt.getId());
+				}
+			} else if (InitialRunner.lnmap.containsKey(id)) {
+				for(Windturbine wt:InitialRunner.ln_wtmap.get(id))
+				{
+					wtidls.add(wt.getId());
+				}
+			}
+
+
+			if(!wtidls.isEmpty())
+			{
+				criteria.andWtidIn(wtidls);
+			}
+			criteria.andRecodedateGreaterThanOrEqualTo(beginDate).andRecodedateLessThan(endDate);
+			List<Recommenmain> list= recommenmainMapper.selectByExample(example);
+
+			Set<String> set=new HashSet<>();
+
+			if(!list.isEmpty())
+			{
+				for(Recommenmain rm:list)
+				{
+					set.add(rm.getWtid());
+				}
+				rmnum=set.size();
+			}
+
+
+
+		}
+		return rmnum;
+
+	}
+
 }

+ 99 - 33
src/main/java/com/gyee/frame/service/ShutdowneventService.java

@@ -10,6 +10,7 @@ import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.ShutdowneventVo;
 import com.gyee.frame.model.custom.SimpleVo;
 import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.MathUtil;
 import com.gyee.frame.util.SnowflakeIdWorker;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Service;
@@ -211,61 +212,127 @@ public class ShutdowneventService implements BaseService<Shutdownevent, Shutdown
 
 	}
 
-	/**
-	 * 获取MTTR和MTBF
-	 * @param wtIds
-	 * @return
-	 */
-	public Map<String,Object> queryMttrAndMtbf(List<String> wtIds) {
-
-		Map<String,Object> map=new HashMap<>();
-		List<Shutdownevent> list=new ArrayList<>();
 
+	public List<ShutdowneventVo> queryWpStopTop5(String wpId) {
 
-		Calendar c = Calendar.getInstance();
-		// c.add(Calendar.MONTH, 0);
-		c.set(Calendar.DAY_OF_MONTH, 1);
-		c.set(Calendar.HOUR_OF_DAY, 0);
-		c.set(Calendar.MINUTE, 0);
-		c.set(Calendar.SECOND, 0);
-		c.set(Calendar.MILLISECOND, 0);
+		List<Shutdownevent> list=new ArrayList<>();
 
-		Date beginDate=c.getTime();
-		c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
-		Date endDate=c.getTime();
 		ShutdowneventExample example=new ShutdowneventExample();
 		example.setOrderByClause(" StopTime ASC");
 
-		int daynum=c.get(Calendar.DAY_OF_MONTH);
 		ShutdowneventExample.Criteria criteria =example.createCriteria();
 
-		if(StringUtils.isNotEmpty(wtIds))
+		if(StringUtils.isNotEmpty(wpId))
 		{
-			criteria.andWindturbineidIn(wtIds);
+			criteria.andWindpowerstationidEqualTo(wpId);
 		}
-		criteria.andStoptimeGreaterThanOrEqualTo(beginDate).andStoptimeLessThanOrEqualTo(endDate);
 		criteria.andStophoursIsNotNull();
 		criteria.andStoptypeidNotEqualTo("wh");
+		criteria.andStoptypeidNotEqualTo("gzbmq");
+		criteria.andStoptypeidNotEqualTo("other");
+		criteria.andStophoursLessThan(Double.valueOf(24*7));
+		PageHelper.startPage(0, 5);
+
 
 		list= shutdowneventMapper.selectByExample(example);
 
+		PageInfo<Shutdownevent> pageInfo = new PageInfo<Shutdownevent>(list);
 
-		double stophours=0.0;
+		List<ShutdowneventVo> sdelist=new ArrayList<>();
 
-		if(!list.isEmpty())
+		if(null!=list && !list.isEmpty())
 		{
 			for(Shutdownevent sde:list)
 			{
-				stophours=stophours+sde.getStophours();
+				ShutdowneventVo event = new ShutdowneventVo();
+				event.setId(sde.getId());
+
+				event.setWindPowerStationId(sde.getWindpowerstationid());
+				event.setWpName(InitialRunner.wpmap.get(sde.getWindpowerstationid()).getName());
+				event.setWindTurbineId(sde.getWindturbineid());
+				event.setWtName(InitialRunner.wtmap.get(sde.getWindturbineid()).getCode());
+				event.setWarningId(sde.getWarningid());
+
+				if(InitialRunner.stoptypemap.containsKey(sde.getStoptypeid()))
+				{
+					Stoptype stoptype=InitialRunner.stoptypemap.get(sde.getStoptypeid());
+					event.setWarnDesc(stoptype.getName());
+				}
+				event.setStartTime(sde.getStarttime());
+				event.setStopTime(sde.getStoptime());
+				event.setStopHours(sde.getStophours());
+				event.setStopTypeId(sde.getStoptypeid());
+				event.setStatusCode(sde.getStatuscode());
+				sdelist.add(event);
+			}
+		}
+
+		return sdelist;
+
+	}
+	/**
+	 * 获取MTTR和MTBF
+	 * @param wtIds
+	 * @return
+	 */
+	public Map<String,Object> queryMttrAndMtbf(List<String> wtIds,Date recodedate) {
+
+		Map<String,Object> map=new HashMap<>();
+
+
+		if(StringUtils.notEmp(recodedate) && StringUtils.notEmp(wtIds) && !wtIds.isEmpty())
+		{
+			List<Shutdownevent> list=new ArrayList<>();
+
+
+			Calendar c = Calendar.getInstance();
+
+			c.set(Calendar.DAY_OF_MONTH, 1);
+			c.set(Calendar.HOUR_OF_DAY, 0);
+			c.set(Calendar.MINUTE, 0);
+			c.set(Calendar.SECOND, 0);
+			c.set(Calendar.MILLISECOND, 0);
+
+			Date beginDate=c.getTime();
+			c.setTime(recodedate);
+			Date endDate=c.getTime();
+			ShutdowneventExample example=new ShutdowneventExample();
+			example.setOrderByClause(" StopTime ASC");
+
+			int daynum=c.get(Calendar.DAY_OF_MONTH);
+			ShutdowneventExample.Criteria criteria =example.createCriteria();
+
+			if(StringUtils.isNotEmpty(wtIds))
+			{
+				criteria.andWindturbineidIn(wtIds);
 			}
+			criteria.andStoptimeGreaterThanOrEqualTo(beginDate).andStoptimeLessThanOrEqualTo(endDate);
+			criteria.andStophoursIsNotNull();
+		//	criteria.andStoptypeidNotEqualTo("wh");
+			criteria.andStoptypeidNotEqualTo("other");
+			criteria.andStoptypeidNotEqualTo("gzbmq");
+			criteria.andStophoursLessThan(Double.valueOf(24*7));
+			list= shutdowneventMapper.selectByExample(example);
+
 
+			double stophours=0.0;
 
-			double mttr= new BigDecimal(stophours).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP).doubleValue();
-			map.put("mttr",mttr);
-			int dayhours=daynum*24*list.size();
-			double stophoursall=dayhours-stophours;
-			double mtbf = new BigDecimal(stophoursall).divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP).doubleValue();;// 平均间隔时间
-			map.put("mtbf",mtbf);
+			if(!list.isEmpty())
+			{
+				for(Shutdownevent sde:list)
+				{
+					stophours=stophours+sde.getStophours();
+				}
+
+
+				double mttr= new BigDecimal(stophours).divide(new BigDecimal(list.size()), 0, RoundingMode.HALF_UP).doubleValue();
+				map.put("mttr",mttr);
+				int dayhours=daynum*24*wtIds.size();
+				double stophoursall=dayhours-stophours;
+				double mtbf = new BigDecimal(stophoursall).divide(new BigDecimal(list.size()), 0, RoundingMode.HALF_UP).doubleValue();;// 平均间隔时间
+				map.put("mtbf",mtbf);
+				map.put("mttf", MathUtil.twoBit(mtbf-mttr));
+			}
 		}
 
 		return map;
@@ -274,7 +341,6 @@ public class ShutdowneventService implements BaseService<Shutdownevent, Shutdown
 
 
 
-
 	/**
 	 * 获取七天内各个风场停机统计
 	 * @return

+ 23 - 0
src/main/java/com/gyee/frame/service/WindPowerstationTestingPointService.java

@@ -8,12 +8,15 @@ import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.WindPowerStationTestingPoint2Mapper;
 import com.gyee.frame.model.auto.WindPowerStationTestingPoint2;
 import com.gyee.frame.model.auto.WindPowerStationTestingPoint2Example;
+import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.custom.SimpleVo;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.util.SnowflakeIdWorker;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -177,5 +180,25 @@ public class WindPowerstationTestingPointService implements BaseService<WindPowe
 		return point;
 	}
 
+	public Map<String,Integer> getWpPointTotal(){
+		Map<String,Integer> map=new HashMap<>();
+		for(Windpowerstation wp:InitialRunner.wpallls)
+		{
+			String str=wp.getId().substring(0,wp.getId().indexOf("_"));
+			List<SimpleVo> vos=windPowerStationTestingPoint2Mapper.getWpPointTotal(str,null);
+			if(!vos.isEmpty())
+			{
+				SimpleVo vo=vos.get(0);
+				map.put(wp.getId(),vo.getValue());
+			}
 
+		}
+		List<SimpleVo> vos=windPowerStationTestingPoint2Mapper.getWpPointTotal(null,"jsfw");
+		if(!vos.isEmpty())
+		{
+			SimpleVo vo=vos.get(0);
+			map.put("JSFW",vo.getValue());
+		}
+		return map;
+	}
 }

+ 15 - 0
src/main/java/com/gyee/frame/service/Windturbineinfodaytop2Service.java

@@ -501,4 +501,19 @@ public class Windturbineinfodaytop2Service implements BaseService<Windturbineinf
 
 		return new ArrayList<>();
 	}
+
+	public  List<Windturbineinfodaytop2> getWindturbineinfodaytop2List(String wpId,int year,int month)
+	{
+		List<Windturbineinfodaytop2> vos=new ArrayList<>();
+
+		if(StringUtils.notEmp(year) && StringUtils.notEmp(month))
+		{
+			PageHelper.startPage(1, 5);
+			vos=windturbineinfodaytop2Mapper.getWindturbineinfodaytop2List(wpId,year,month);
+			PageInfo<Windturbineinfodaytop2> pageInfo = new PageInfo<Windturbineinfodaytop2>(vos);
+			vos=pageInfo.getList();
+		}
+
+		return vos;
+	}
 }

+ 117 - 0
src/main/java/com/gyee/frame/service/WindturbinepartsService.java

@@ -0,0 +1,117 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.support.Convert;
+import com.gyee.frame.mapper.auto.WindturbinepartsMapper;
+import com.gyee.frame.model.auto.Windturbineparts;
+import com.gyee.frame.model.auto.WindturbinepartsExample;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 风机信息表 WindturbinepartsService
+ * @Title: WindturbinepartsService.java 
+ * @Package com.gyee.frame.service 
+ **/
+@Service
+public class WindturbinepartsService implements BaseService<Windturbineparts, WindturbinepartsExample> {
+	@Resource
+	private WindturbinepartsMapper windturbinepartsMapper;
+
+
+
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+
+			List<String> lista=Convert.toListStrArray(ids);
+			WindturbinepartsExample example=new WindturbinepartsExample();
+			example.createCriteria().andIdIn(lista);
+			return windturbinepartsMapper.deleteByExample(example);
+
+
+	}
+
+
+	@Override
+	public Windturbineparts selectByPrimaryKey(String id) {
+
+	 	if(StringUtils.isNotEmpty(id))
+		{
+			return windturbinepartsMapper.selectByPrimaryKey(id);
+
+		}
+	 	return new Windturbineparts();
+
+	}
+
+
+	@Override
+	public int updateByPrimaryKeySelective(Windturbineparts record) {
+		return windturbinepartsMapper.updateByPrimaryKeySelective(record);
+	}
+
+
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(Windturbineparts record) {
+
+//		//添加雪花主键id
+//		record.setId(SnowflakeIdWorker.getUUID());
+
+
+		return windturbinepartsMapper.insertSelective(record);
+	}
+
+
+	@Override
+	public int updateByExampleSelective(Windturbineparts record, WindturbinepartsExample example) {
+
+		return windturbinepartsMapper.updateByExampleSelective(record, example);
+	}
+
+
+	@Override
+	public int updateByExample(Windturbineparts record, WindturbinepartsExample example) {
+
+		return windturbinepartsMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<Windturbineparts> selectByExample(WindturbinepartsExample example) {
+
+		return windturbinepartsMapper.selectByExample(example);
+	}
+
+
+	@Override
+	public long countByExample(WindturbinepartsExample example) {
+
+		return windturbinepartsMapper.countByExample(example);
+	}
+
+
+	@Override
+	public int deleteByExample(WindturbinepartsExample example) {
+
+		return windturbinepartsMapper.deleteByExample(example);
+	}
+
+	public List<Windturbineparts> findAll() {
+
+
+		List<Windturbineparts> list=null;
+
+		WindturbinepartsExample example=new WindturbinepartsExample();
+		list= windturbinepartsMapper.selectByExample(example);
+		return list;
+
+	}
+
+
+}

+ 14 - 0
src/main/java/com/gyee/frame/service/WobugeqService.java

@@ -8,6 +8,7 @@ import com.gyee.frame.mapper.auto.WobugeqMapper;
 import com.gyee.frame.model.auto.Wobugeq;
 import com.gyee.frame.model.auto.WobugeqExample;
 import com.gyee.frame.model.custom.MainTrackVo;
+import com.gyee.frame.model.custom.SimpleVo;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Service;
@@ -179,7 +180,20 @@ public class WobugeqService implements BaseService<Wobugeq, WobugeqExample> {
 
 	}
 
+	@DataSource(value = DataSourceType.TICKET)
+	public int totalNum(Date beginDate,Date endDate) {
+
+		int num=0;
+
+		List<SimpleVo> list=wobugeqMapper.totalNum(beginDate,endDate);
+
+		if(!list.isEmpty())
+		{
+			num=list.get(0).getValue();
+		}
+		return num;
 
+	}
 
 
 	@DataSource(value = DataSourceType.TICKET)

+ 123 - 0
src/main/java/com/gyee/frame/service/knowledge/KnowledgeService.java

@@ -0,0 +1,123 @@
+package com.gyee.frame.service.knowledge;
+
+import com.gyee.frame.model.auto.Alertrulefailure;
+import com.gyee.frame.model.auto.P3DeviceFault;
+import com.gyee.frame.model.custom.SimpleVo;
+import com.gyee.frame.service.Alertrule2ervice;
+import com.gyee.frame.service.AlertrulefailureService;
+import com.gyee.frame.service.P3DeviceFaultService;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@Service
+public class KnowledgeService  {
+    @Resource
+    private P3DeviceFaultService p3DeviceFaultService;
+    @Resource
+    private Alertrule2ervice alertrule2ervice;
+    @Resource
+    private AlertrulefailureService alertrulefailureService;
+
+
+    public  Map<String,Object> getAlertruleAllList() {
+
+        Map<String,Object> map=new HashMap<>();
+        List<P3DeviceFault> p3flist =  p3DeviceFaultService.findAll();
+        if(!p3flist.isEmpty())
+        {
+            Map<String,Integer> gztxmap=new HashMap<>();
+            for(P3DeviceFault pf:p3flist)
+            {
+                if(StringUtils.notEmp(pf.getDevicemodel()))
+                {
+                    String[] types=pf.getDevicemodel().split(",");
+
+                    for(String str:types){
+
+                        if(gztxmap.containsKey(str))
+                        {
+                            int temp=gztxmap.get(str);
+                            temp++;
+                            gztxmap.put(str,temp);
+                        }else {
+                            int temp=1;
+                            gztxmap.put(str,temp);
+                        }
+                    }
+                }
+
+            }
+            //故障体系
+            map.put("gztx",gztxmap);
+
+            List<SimpleVo> yjls=alertrule2ervice.getAlarmTypenum();
+            Map<String,Integer> yjtxmap=new HashMap<>();
+            if(!yjls.isEmpty())
+            {
+                for(SimpleVo vo:yjls)
+                {
+                    yjtxmap.put(vo.getName(),vo.getValue());
+                }
+            }
+            //预警体系
+            map.put("yjtx",yjtxmap);
+
+
+            Map<String,Integer> tztxsmap=new HashMap<>();
+            tztxsmap.put("clx",3);
+            tztxsmap.put("fdj",5);
+            tztxsmap.put("bi",1);
+            tztxsmap.put("zk",2);
+            //特征体系
+            map.put("tztx",tztxsmap);
+
+            List<Alertrulefailure> afls= alertrulefailureService.findAll();
+
+            if(!afls.isEmpty())
+            {
+                Map<String,Integer> afmap=new HashMap<>();
+                for(Alertrulefailure af:afls)
+                {
+                    if(afmap.containsKey(af.getModel()))
+                    {
+                        int temp=afmap.get(af.getModel());
+                        temp++;
+                        afmap.put(af.getModel(),temp);
+                    }else {
+                        int temp=1;
+                        afmap.put(af.getModel(),temp);
+                    }
+                }
+                //排查检修方案
+                map.put("afmap",afmap);
+            }
+        }
+
+
+        Map<String,Integer> xntxsmap=new HashMap<>();
+        xntxsmap.put("nxpj",3);
+        xntxsmap.put("jkpj",5);
+        xntxsmap.put("gzzd",1);
+        xntxsmap.put("zk",2);
+        //性能体系
+        map.put("xntx",xntxsmap);
+
+        Map<String,Integer> rgznmap=new HashMap<>();
+        rgznmap.put("jcs",2);
+        rgznmap.put("sjwl",7);
+
+        //人工智能
+        map.put(" rgzn",rgznmap);
+        return map;
+
+    }
+
+
+
+}

+ 32 - 0
src/main/java/com/gyee/frame/service/weather/WeatherDay5Service.java

@@ -13,7 +13,9 @@ import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -123,6 +125,8 @@ public class WeatherDay5Service {
 					{
 						Map<String,Object> map=new HashMap<>();
 
+						map.put("time",weatherReal.getDt()*1000);
+
 						double qxd=weatherReal.getVisibility();
 						map.put("qxd", MathUtil.twoBit(qxd/1000));
 
@@ -136,6 +140,34 @@ public class WeatherDay5Service {
 						}
 
 
+						if(null!=weatherReal.getClouds())
+						{
+							Clouds clouds=weatherReal.getClouds();
+							//云量
+							map.put("yunliang",clouds.getAll());
+						}
+
+						if(null!=weatherReal.getSys())
+						{
+							Sys sys=weatherReal.getSys();
+							if(StringUtils.notEmp(sys.getSunrise()))
+							{
+								Date date=new Date(sys.getSunrise()*1000);
+								SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
+								//日出时间
+								map.put("richushijian", "05:56");
+//								map.put("richushijian", sdf.format(date));
+							}
+							if(StringUtils.notEmp(sys.getSunset()))
+							{
+								Date date=new Date(sys.getSunset()*1000);
+								SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
+								//日落时间
+								map.put("riluoshijian", "20:05");
+//								map.put("riluoshijian", sdf.format(date));
+							}
+						}
+
 						if(null!=weatherReal.getWind())
 						{
 							Wind wind=weatherReal.getWind();

+ 435 - 20
src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java

@@ -6,6 +6,7 @@ import com.gyee.frame.common.spring.ConstantTR;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.common.spring.WpEnum;
 import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.custom.DNAVal;
 import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.MatrixVo;
 import com.gyee.frame.model.custom.PointData;
@@ -45,6 +46,13 @@ public class GenreSetPushService {
     private WeatherDay5Service weatherDay5Service;
     @Resource
     private PowerToPowerService powerToPowerService;
+    @Resource
+    private RecommenmainMsSqlService recommenmainMsSqlService;
+    @Resource
+    private WobugeqService wobugeqService;
+    @Resource
+    private RecommenmainService recommenmainService;
+
 
     private final String QS = "0";
     private final String FD = "-1";
@@ -295,6 +303,7 @@ public class GenreSetPushService {
 
             double rfdl = 0.0;
             double yfdl = 0.0;
+            double nfdl = 0.0;
             List<PointData> jczblist = realApiUtil.getRealData(jczbls);
 
             if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
@@ -308,7 +317,8 @@ public class GenreSetPushService {
                 yfdl = MathUtil.twoBit(jczblist.get(2).getPointValueInDouble());
                 jczbmap.put("yfdl", yfdl);
                 //年发电量
-                jczbmap.put("nfdl", MathUtil.twoBit(jczblist.get(3).getPointValueInDouble()));
+                nfdl = MathUtil.twoBit(jczblist.get(3).getPointValueInDouble());
+                jczbmap.put("nfdl", nfdl);
                 //月利用小时
                 jczbmap.put("ylyxs", (new BigDecimal(jczblist.get(2).getPointValueInDouble()).multiply(new BigDecimal(10))).divide(new BigDecimal(zjrl), 2, RoundingMode.HALF_EVEN).doubleValue());
                 //年利用小时
@@ -405,15 +415,21 @@ public class GenreSetPushService {
 
                 }
 
+                jczbmap.put("mttf", MathUtil.twoBit(mtbf-mttr));
                 jczbmap.put("mttr", mttr);
                 jczbmap.put("mtbf", mtbf);
+            }else
+            {
+                jczbmap.put("mttf", 0);
+                jczbmap.put("mttr", 0);
+                jczbmap.put("mtbf", 0);
             }
 
             //预测发电上限
             if (null != zjrl) {
                 double rfdlsx = zjrl;
                 double yfdlsx = zjrl * daynum;
-                jczbmap.put("rfdlsx", MathUtil.twoBit(rfdlsx));
+                jczbmap.put("rfdlsx", MathUtil.twoBit(yfdlsx));
                 jczbmap.put("yfdlsx", MathUtil.twoBit(yfdlsx));
             }
 
@@ -787,7 +803,6 @@ public class GenreSetPushService {
             // 年场外受累天气
             wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NTZSSDL).getCode());
 
-
             List<PointData> wxsslist = realApiUtil.getRealData(wxssls);
 
             if (!wxsslist.isEmpty() && wxsslist.size() == wxssls.size()) {
@@ -905,6 +920,54 @@ public class GenreSetPushService {
                 wxssmap.put("yslssdl", yslssdl);
                 wxssmap.put("nslssdl", nslssdl);
 
+
+                double rllfdl=rfdl+rgzssdl+rjxssdl+rqfssdl+rxdssdl+rslssdl;
+                if(rllfdl!=0)
+                {
+                    double rfnlyl=new BigDecimal(rfdl).divide(new BigDecimal(rllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                    wxssmap.put("rfnlyl", rfnlyl);
+                }else
+                {
+                    wxssmap.put("rfnlyl", 0.0);
+                }
+
+                double yllfdl=yfdl+ygzssdl+yjxssdl+yqfssdl+yxdssdl+yslssdl;
+                if(yllfdl!=0)
+                {
+                    double yfnlyl=new BigDecimal(yfdl).divide(new BigDecimal(yllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                    wxssmap.put("yfnlyl", yfnlyl);
+                }else
+                {
+                    wxssmap.put("yfnlyl", 0.0);
+                }
+
+                double nllfdl=nfdl+ngzssdl+njxssdl+nqfssdl+nxdssdl+nslssdl;
+                if(nllfdl!=0)
+                {
+                    double nfnlyl=new BigDecimal(nfdl).divide(new BigDecimal(nllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                    wxssmap.put("nfnlyl", nfnlyl);
+                }else
+                {
+                    wxssmap.put("nfnlyl", 0.0);
+                }
+
+                //环比风能利用率
+                 Map<String, Double> hbmap=getHbWs(id);
+                if(hbmap.containsKey("rfnlyl"))
+                {
+                    double rhb=hbmap.get("rfnlyl");
+                    wxssmap.put("rfnlyl_hb", MathUtil.twoBit(wxssmap.get("rfnlyl")-rhb));
+                }
+                if(hbmap.containsKey("yfnlyl"))
+                {
+                    double yhb=hbmap.get("yfnlyl");
+                    wxssmap.put("yfnlyl_hb", MathUtil.twoBit(wxssmap.get("yfnlyl")-yhb));
+                }
+                if(hbmap.containsKey("nfnlyl"))
+                {
+                    double nhb=hbmap.get("nfnlyl");
+                    wxssmap.put("nfnlyl_hb", MathUtil.twoBit(wxssmap.get("nfnlyl")-nhb));
+                }
             } else {
 
                 wxssmap.put("rjxsl", 0.0);
@@ -936,6 +999,9 @@ public class GenreSetPushService {
                 wxssmap.put("nslssdl", 0.0);
 
             }
+
+
+
             map.put("wxssmap", wxssmap);
 
 /****************************************************五项损失************************************************************/
@@ -954,23 +1020,90 @@ public class GenreSetPushService {
 /*************************************************悬停指标*************************************************************/
 
 
-            /************************************************悬停指标*************************************************************/
+/************************************************悬停指标*************************************************************/
 
 /*************************************************关系库指标*************************************************************/
 
             Map<String, Double> gxkmap = new HashMap<>();
-            List<Windpowerinfoday> wpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(new Date()));
+
+            Calendar cal = Calendar.getInstance();
+            cal.set(Calendar.DAY_OF_MONTH,1);
+            Date begin=cal.getTime();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+            Date end= cal.getTime();
+            int tjsl=totalTarget(id,begin,end);
+            gxkmap.put("tjsl", Double.valueOf(tjsl));
+            int gdsl=wobugeqService.totalNum(DateUtils.truncate(begin),DateUtils.truncate(end));
+
+            if(gdsl!=0)
+            {
+                Double tjl = new BigDecimal(tjsl).divide(new BigDecimal(gdsl), 2, RoundingMode.HALF_EVEN).doubleValue();
+                gxkmap.put("tjl", tjl);
+            }else
+            {
+                gxkmap.put("tjl", 0.0);
+            }
+
+            int sjtjsl=recommenmainService.getRecommenmainnum(id,DateUtils.truncate(begin),DateUtils.truncate(end));
+            gxkmap.put("sjtjsl", Double.valueOf(sjtjsl));
+            cal = Calendar.getInstance();
+            List<Windpowerinfoday> wpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(cal.getTime()));
             if (!wpdls.isEmpty()) {
                 Windpowerinfoday wd = wpdls.get(0);
                 gxkmap.put("ndxkyss", wd.getYeardxkyxs());
                 gxkmap.put("nsbklyl", wd.getYearsbklyl());
+                gxkmap.put("nzhcydl", wd.getYearzhcydl());
 
                 gxkmap.put("ysbklyl", wd.getMonthsbklyl());
                 gxkmap.put("yzhcydl", wd.getMonthzhcydl());
+                gxkmap.put("ydxkyss", wd.getMonthdxkyxs());
+
+
+                gxkmap.put("rsbklyl", wd.getDaysbklyl());
+                gxkmap.put("rzhcydl", wd.getDayzhcydl());
+                gxkmap.put("rdxkyss", wd.getDaydxkyxs());
 
                 gxkmap.put("ndjxs", wd.getYearstoptime());
                 gxkmap.put("nyxxs", wd.getYearruntime());
                 gxkmap.put("ngzxs", wd.getYearfaulttime());
+                cal = Calendar.getInstance();
+                cal.add(Calendar.MONTH,-1);
+                cal.set(Calendar.DAY_OF_MONTH,1);
+                begin=cal.getTime();
+                cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+                end= cal.getTime();
+                int tjsl_hb=totalTarget(id,begin,end);
+                gxkmap.put("tjsl_hb", Double.valueOf(tjsl_hb));
+                int gdsl_hb=wobugeqService.totalNum(DateUtils.truncate(begin),DateUtils.truncate(end));
+
+                if(gdsl_hb!=0)
+                {
+                    Double tjl_hb = new BigDecimal(tjsl_hb).divide(new BigDecimal(gdsl_hb), 2, RoundingMode.HALF_EVEN).doubleValue();
+                    gxkmap.put("tjl_hb", tjl_hb);
+                }else
+                {
+                    gxkmap.put("tjl_hb", 0.0);
+                }
+
+                int sjtjsl_hb=recommenmainService.getRecommenmainnum(id,DateUtils.truncate(begin),DateUtils.truncate(end));
+                gxkmap.put("sjtjsl_hb", Double.valueOf(sjtjsl-sjtjsl_hb));
+                List<Windpowerinfoday> hbwpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(cal.getTime()));
+                if (!hbwpdls.isEmpty()) {
+
+                    Windpowerinfoday hbwd = wpdls.get(0);
+                    gxkmap.put("ndxkyss_hb", MathUtil.twoBit(wd.getYeardxkyxs()-hbwd.getYeardxkyxs()));
+                    gxkmap.put("nsbklyl_hb", MathUtil.twoBit(wd.getYearsbklyl()-hbwd.getYearsbklyl()));
+                    gxkmap.put("nzhcydl_hb", MathUtil.twoBit(wd.getYearzhcydl()-hbwd.getYearzhcydl()));
+
+                    gxkmap.put("ysbklyl_hb", MathUtil.twoBit(wd.getMonthsbklyl()-hbwd.getMonthsbklyl()));
+                    gxkmap.put("yzhcydl_hb", MathUtil.twoBit(wd.getMonthzhcydl()-hbwd.getMonthzhcydl()));
+                    gxkmap.put("ydxkyss_hb", MathUtil.twoBit(wd.getMonthdxkyxs()-hbwd.getMonthdxkyxs()));
+
+
+                    gxkmap.put("rsbklyl_hb", MathUtil.twoBit(wd.getDaysbklyl()-hbwd.getDaysbklyl()));
+                    gxkmap.put("rzhcydl_hb", MathUtil.twoBit(wd.getDayzhcydl()-hbwd.getDayzhcydl()));
+                    gxkmap.put("rdxkyss_hb", MathUtil.twoBit(wd.getDaydxkyxs()-hbwd.getDaydxkyxs()));
+                }
 
             } else {
                 gxkmap.put("ndxkyss", 0.0);
@@ -984,7 +1117,7 @@ public class GenreSetPushService {
                 gxkmap.put("nyxxs", 0.0);
                 gxkmap.put("ngzxs", 0.0);
             }
-            Calendar cal = Calendar.getInstance();
+            cal = Calendar.getInstance();
             cal.setTime(new Date());
             int year = cal.get(Calendar.YEAR);
             List<ProjectPlan> pjls = projectPlanService.getProjectPlanList(String.valueOf(year));
@@ -999,7 +1132,7 @@ public class GenreSetPushService {
             Double nfdljh = 0.0;
 
             //Double yfdltemp = jczbmap.get("yfdl");
-            Double nfdl = (Double) jczbmap.get("nfdl");
+            nfdl = (Double) jczbmap.get("nfdl");
 
             yfdljh = gxkmap.get("yfdljh");
             nfdljh = gxkmap.get("nfdljh");
@@ -1038,27 +1171,62 @@ public class GenreSetPushService {
 
 
     public Map<String, Object> findPowerInfo(String id) throws Exception {
-        Map<String, Object> map = new HashMap<String, Object>();
-        if (StringUtils.notEmp(id)) {
+            Map<String, Object> map = new HashMap<String, Object>();
+            if (StringUtils.notEmp(id)) {
 
 
-/****************************************************日功率曲线**********************************************************/
+    /****************************************************日功率曲线**********************************************************/
 
-            List<DataVo> glvos = realPowerPushService.findRealPower(id);
-            map.put("glvos", glvos);
-/*************************************************日功率曲线*************************************************************/
+                List<DataVo> glvos = realPowerPushService.findRealPower(id);
+                map.put("glvos", glvos);
+    /*************************************************日功率曲线*************************************************************/
 
-/****************************************************日电量历史**********************************************************/
+    /****************************************************日电量历史**********************************************************/
 
-            List<DataVo> rdlvos = findPowerWpBar(id);
-            map.put("rdlvos", rdlvos);
-/*************************************************日电量历史*************************************************************/
+                List<DataVo> rdlvos = findPowerWpBar(id);
+                map.put("rdlvos", rdlvos);
+    /*************************************************日电量历史*************************************************************/
 
+            }
+
+            return map;
         }
-/*************************************************关系库指标**************************************************************/
 
-        return map;
+
+
+
+
+    public int totalTarget(String id,Date beginDate,Date endDate) throws Exception {
+        int num=0;
+        String wpId=null;
+        String wtId=null;
+        if (StringUtils.notEmp(id)) {
+
+
+            StringBuilder sb=new StringBuilder();
+            if (id.equals(GF)) {
+                return 0;
+            } else if (InitialRunner.wpmap.containsKey(id)) {
+                    wpId=id;
+            } else if (InitialRunner.pjmap.containsKey(id)) {
+                for (Windturbine wt : InitialRunner.pj_wtmap.get(id)) {
+                    sb.append("'").append(wt.getId()).append("',");
+                }
+            } else if (InitialRunner.lnmap.containsKey(id)) {
+                for (Windturbine wt : InitialRunner.ln_wtmap.get(id)) {
+                    sb.append("'").append(wt.getId()).append("',");
+                }
+            }
+
+            if(sb.length()>0)
+            {
+                wtId=String.valueOf(sb.substring(0,sb.length()-1));
+            }
+            num=recommenmainMsSqlService.totalList(wpId,wtId,beginDate,endDate);
+        }
+        return num;
     }
+
     private List<DataVo> findPowerWpBar(String wpId) throws Exception {
         List<DataVo> vos = new ArrayList<DataVo>();
         if (StringUtils.empty(wpId)) {
@@ -1077,7 +1245,7 @@ public class GenreSetPushService {
         c = Calendar.getInstance();
         // c.add(Calendar.MONTH, -1);
         c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
-        c.add(Calendar.DAY_OF_MONTH, 1);
+        c.add(Calendar.DAY_OF_MONTH, 2);
         c.set(Calendar.HOUR_OF_DAY, 0);
         c.set(Calendar.MINUTE, 0);
         c.set(Calendar.SECOND, 0);
@@ -1148,7 +1316,254 @@ public class GenreSetPushService {
         return vos;
     }
 
+private   Map<String, Double> getHbWs(String id) throws Exception {
+    Calendar cal = Calendar.getInstance();
+    cal.setTime(new Date());
+    cal.add(Calendar.MONTH,-1);
+    Map<String, Double> wxssmap = new HashMap<>();
+    List<String> wxssls = new ArrayList<>();
+
+    // 日场内受累检修
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RLZSSDL).getCode());
+    // 日场内受累故障
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSZSSDL).getCode());
+    // 月场内受累检修
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YLZSSDL).getCode());
+    // 月场内受累故障
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSZSSDL).getCode());
+    // 年场内受累检修
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NLZSSDL).getCode());
+    // 年场内受累故障
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSZSSDL).getCode());
+
+    //日待机损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSDJZSDL).getCode());
+    //日手动停机损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSSTZSDL).getCode());
+    //日性能损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RXNZSDL).getCode());
+    //日缺陷降出力损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RSQXZSDL).getCode());
+    //日故障损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RGZSSDL).getCode());
+    //日检修损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RJXSSDL).getCode());
+
+    //月待机损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSDJZSDL).getCode());
+    //月手动停机损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSSTZSDL).getCode());
+    //月性能损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YXNZSDL).getCode());
+    //月缺陷降出力损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YSQXZSDL).getCode());
+    //月故障损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YGZSSDL).getCode());
+    //月检修损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YJXSSDL).getCode());
+
+
+    //年待机损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSDJZSDL).getCode());
+    //年手动停机损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSSTZSDL).getCode());
+    //年性能损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NXNZSDL).getCode());
+    //年缺陷降出力损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NSQXZSDL).getCode());
+    //年故障损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NGZSSDL).getCode());
+    //年检修损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NJXSSDL).getCode());
+
+
+    //日限电损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RXDSSDL).getCode());
+    //月限电损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YXDSSDL).getCode());
+    //年限电损失
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NXDSSDL).getCode());
+
+
+    //日场外受累电网
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RWZSSDL).getCode());
+    // 日场外受累天气
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.RTZSSDL).getCode());
+    // 月场外受累电网
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YWZSSDL).getCode());
+    // 月场外受累天气
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.YTZSSDL).getCode());
+    // 年场外受累电网
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NWZSSDL).getCode());
+    // 年场外受累天气
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.NTZSSDL).getCode());
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_RFDL).getCode());
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_YFDL).getCode());
+    wxssls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, Constant.TPOINT_WP_NFDL).getCode());
+
+
+    String[] ids=new String[wxssls.size()];
+
+    DNAVal[] wxsslist = realApiUtil.getHistMatrix(wxssls.toArray(ids),DateUtils.truncate(cal.getTime()).getTime());
+
+    if (wxsslist.length == wxssls.size()) {
+
+
+
+
+        Double rjxsl = MathUtil.twoBit(wxsslist[0].DValue);
+        // 日场内受累故障
+        Double rgzzsl = MathUtil.twoBit(wxsslist[1].DValue);
+        // 月场内受累检修
+        Double yjxsl = MathUtil.twoBit(wxsslist[2].DValue);
+        // 月场内受累故障
+        Double ygzzsl = MathUtil.twoBit(wxsslist[3].DValue);
+        // 年场内受累检修
+        Double njxsl = MathUtil.twoBit(wxsslist[4].DValue);
+        // 年场内受累故障
+        Double ngzzsl = MathUtil.twoBit(wxsslist[5].DValue);
 
+//                wxssmap.put("rjxsl", rjxsl);
+//                wxssmap.put("rgzzsl", rgzzsl);
+//                wxssmap.put("yjxsl", yjxsl);
+//                wxssmap.put("ygzzsl", ygzzsl);
+//                wxssmap.put("njxsl", njxsl);
+//                wxssmap.put("ngzzsl", ngzzsl);
+
+        //日待机损失
+        Double rdjss = MathUtil.twoBit(wxsslist[6].DValue);
+        //日手动停机损失
+        Double rsdtjss = MathUtil.twoBit(wxsslist[7].DValue);
+        //日性能损失
+        Double rxnss = MathUtil.twoBit(wxsslist[8].DValue);
+        //日缺陷降出力损失
+        Double rqxjclss = MathUtil.twoBit(wxsslist[9].DValue);
+
+        //日欠发损失=日待机损失+日手动停机损失+日性能损失+日缺陷降出力损失
+        Double rqfssdl = new BigDecimal(rdjss + rsdtjss + rxnss + rqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+        Double rgzss = MathUtil.twoBit(wxsslist[10].DValue);
+        //日故障损失电量=日故障损失+日故障受累
+        Double rgzssdl = new BigDecimal(rgzss + rgzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        //日检修损失电量=日检修损失+日检修受累
+        Double rjxss = MathUtil.twoBit(wxsslist[11].DValue);
+        Double rjxssdl = new BigDecimal(rjxss + rjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+
+        wxssmap.put("rqfssdl", rqfssdl);
+        wxssmap.put("rgzssdl", rgzssdl);
+        wxssmap.put("rjxssdl", rjxssdl);
+
+        // 月场内受累检修
+        Double ydjss = MathUtil.twoBit(wxsslist[12].DValue);
+        // 月场内受累检修
+        Double ysdtjss = MathUtil.twoBit(wxsslist[13].DValue);
+        // 月场内受累检修
+        Double yxnss = MathUtil.twoBit(wxsslist[14].DValue);
+        // 月场内受累检修
+        Double yqxjclss = MathUtil.twoBit(wxsslist[15].DValue);
+        //月欠发损失=月待机损失+月手动停机损失+月性能损失+月缺陷降出力损失
+        Double yqfssdl = new BigDecimal(ydjss + ysdtjss + yxnss + yqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+        Double ygzss = MathUtil.twoBit(wxsslist[16].DValue);
+        //月故障损失电量=月故障损失+月故障受累
+        Double ygzssdl = new BigDecimal(ygzss + ygzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        Double yjxss = MathUtil.twoBit(wxsslist[17].DValue);
+        //月检修损失电量=月检修损失+月检修受累
+        Double yjxssdl = new BigDecimal(yjxss + yjxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+        wxssmap.put("yqfssdl", yqfssdl);
+        wxssmap.put("ygzssdl", ygzssdl);
+        wxssmap.put("yjxssdl", yjxssdl);
+
+        // 年场内受累检修
+        Double ndjss = MathUtil.twoBit(wxsslist[18].DValue);
+        // 年场内受累检修
+        Double nsdtjss = MathUtil.twoBit(wxsslist[19].DValue);
+        // 年场内受累检修
+        Double nxnss = MathUtil.twoBit(wxsslist[20].DValue);
+        // 年场内受累检修
+        Double nqxjclss = MathUtil.twoBit(wxsslist[21].DValue);
+
+        Double nqfssdl = new BigDecimal(ndjss + nsdtjss + nxnss + nqxjclss).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+        Double ngzss = MathUtil.twoBit(wxsslist[22].DValue);
+        //年故障损失电量=年故障损失+年故障受累
+        Double ngzssdl = new BigDecimal(ngzss + ngzzsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        Double njxss = MathUtil.twoBit(wxsslist[23].DValue);
+        //年检修损失电量=年检修损失+年检修受累
+        Double njxssdl = new BigDecimal(njxss + njxsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+        wxssmap.put("nqfssdl", nqfssdl);
+        wxssmap.put("ngzssdl", ngzssdl);
+        wxssmap.put("njxssdl", njxssdl);
+
+        double temp = 0.0;
+        temp = MathUtil.twoBit(wxsslist[24].DValue);
+        Double rxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        temp = MathUtil.twoBit(wxsslist[25].DValue);
+        Double yxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        temp = MathUtil.twoBit(wxsslist[26].DValue);
+        Double nxdssdl = new BigDecimal(temp).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+        wxssmap.put("rxdssdl", StringUtils.round(rxdssdl < 0.0 ? 0.0 : rxdssdl, 2));
+        wxssmap.put("yxdssdl", StringUtils.round(yxdssdl < 0.0 ? 0.0 : yxdssdl, 2));
+        wxssmap.put("nxdssdl", StringUtils.round(nxdssdl < 0.0 ? 0.0 : nxdssdl, 2));
+
+        Double rdwsl = MathUtil.twoBit(wxsslist[27].DValue);
+        Double rtqsl = MathUtil.twoBit(wxsslist[28].DValue);
+        Double rslssdl = new BigDecimal(rdwsl + rtqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        Double ydwsl = MathUtil.twoBit(wxsslist[29].DValue);
+        Double ytqsl = MathUtil.twoBit(wxsslist[30].DValue);
+        Double yslssdl = new BigDecimal(ydwsl + ytqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+        Double ndwsl = MathUtil.twoBit(wxsslist[31].DValue);
+        Double ntqsl = MathUtil.twoBit(wxsslist[32].DValue);
+        Double nslssdl = new BigDecimal(ndwsl + ntqsl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+
+        double rfdl=MathUtil.twoBit(wxsslist[33].DValue);
+        double yfdl=MathUtil.twoBit(wxsslist[34].DValue);
+        double nfdl=MathUtil.twoBit(wxsslist[35].DValue);
+        wxssmap.put("rslssdl", rslssdl);
+        wxssmap.put("yslssdl", yslssdl);
+        wxssmap.put("nslssdl", nslssdl);
+
+
+        double rllfdl=rfdl+rgzssdl+rjxssdl+rqfssdl+rxdssdl+rslssdl;
+        if(rllfdl!=0)
+        {
+            double rfnlyl=new BigDecimal(rfdl).divide(new BigDecimal(rllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            wxssmap.put("rfnlyl", rfnlyl);
+        }else
+        {
+            wxssmap.put("rfnlyl", 0.0);
+        }
+
+        double yllfdl=yfdl+ygzssdl+yjxssdl+yqfssdl+yxdssdl+yslssdl;
+        if(yllfdl!=0)
+        {
+            double yfnlyl=new BigDecimal(yfdl).divide(new BigDecimal(yllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            wxssmap.put("yfnlyl", yfnlyl);
+        }else
+        {
+            wxssmap.put("yfnlyl", 0.0);
+        }
+
+        double nllfdl=nfdl+ngzssdl+njxssdl+nqfssdl+nxdssdl+nslssdl;
+        if(nllfdl!=0)
+        {
+            double nfnlyl=new BigDecimal(nfdl).divide(new BigDecimal(nllfdl), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+            wxssmap.put("nfnlyl", nfnlyl);
+        }else
+        {
+            wxssmap.put("nfnlyl", 0.0);
+        }
+
+
+    }
+
+    return wxssmap;
+}
 
     public List<DataVo> findPowerWpChart(String wpId) throws Exception {
         List<DataVo> vos = new ArrayList<DataVo>();

+ 567 - 0
src/main/java/com/gyee/frame/service/websocket/SandtableService.java

@@ -0,0 +1,567 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.custom.DNAVal;
+import com.gyee.frame.model.custom.RecommenmainVo;
+import com.gyee.frame.model.custom.ShutdowneventVo;
+import com.gyee.frame.service.*;
+import com.gyee.frame.service.weather.WeatherDay5Service;
+import com.gyee.frame.service.weather.WeatherService;
+import com.gyee.frame.util.*;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.*;
+
+@Service
+public class SandtableService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+    @Resource
+    private WeatherService weatherService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private Windturbineinfodaytop2Service windturbineinfodaytop2Service;
+    @Resource
+    private RecommenmainService recommenmainService;
+    @Resource
+    private ShutdowneventService shutdowneventService;
+    @Resource
+    private Alertrule2ervice alertrule2ervice;
+    @Resource
+    private WeatherDay5Service weatherDay5Service;
+
+    private final String QS = "0";
+    private final String FD = "-1";
+    private final String GF = "-2";
+    private final String DEFAULT_FDC = "MHS_FDC";
+    private final double YCFDLXS = 1.08;
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+
+//        map.put(QS, findBasicDataInfo(QS));
+//        map.put(FD, findBasicDataInfo(FD));
+//        map.put(GF, findBasicDataInfo(GF));
+//
+//        map.put("SBQ_FDC", findBasicDataInfo("SBQ_FDC"));
+//        map.put("SBQ02_GC", findBasicDataInfo("SBQ02_GC"));
+//        map.put("SBQ05_XL", findBasicDataInfo("SBQ05_XL"));
+        return map;
+
+    }
+
+    public Map<String, Object> findSandtableInfo(String id) throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+        if (StringUtils.notEmp(id)) {
+
+
+/*************************************************天气指标*************************************************************/
+
+            Map<String, Object> tqmap1 = weatherService.getWeatherRealInfo(id);
+            map.put("tqmap1", tqmap1);
+            Map<String, Object> tqmap5 = weatherDay5Service.getWeatherRealDay5Info(id);
+            map.put("tqmap5", tqmap5);
+/*************************************************天气指标*************************************************************/
+/*************************************************等级评估*************************************************************/
+
+//            Calendar cal = Calendar.getInstance();
+//            int year=cal.get(Calendar.YEAR);
+//            int month=cal.get(Calendar.MONTH)+1;
+//            if(id.equals(QS))
+//            {
+//                List<Windturbineinfodaytop2> topls=windturbineinfodaytop2Service.getWindturbineinfodaytop2List(null,year,month);
+//                map.put("topls", topls);
+//            }else
+//            {
+//                List<Windturbineinfodaytop2> topls=windturbineinfodaytop2Service.getWindturbineinfodaytop2List(id,year,month);
+//                map.put("topls", topls);
+//            }
+
+            if (id.equals(QS)) {
+                List<ShutdowneventVo> sels = shutdowneventService.queryWpStopTop5(null);
+                map.put("sels", sels);
+            } else {
+                List<ShutdowneventVo> sels = shutdowneventService.queryWpStopTop5(id);
+                map.put("sels", sels);
+            }
+
+/*************************************************等级评估*************************************************************/
+
+/*************************************************健康管理*************************************************************/
+
+            Calendar cal = Calendar.getInstance();
+            cal.set(Calendar.DAY_OF_MONTH, 1);
+            cal.set(Calendar.HOUR_OF_DAY, 0);
+            cal.set(Calendar.MINUTE, 0);
+            cal.set(Calendar.SECOND, 0);
+            cal.set(Calendar.MILLISECOND, 0);
+            Date beginDate = cal.getTime();
+            cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+            Date endDate = cal.getTime();
+            List<RecommenmainVo> list = new ArrayList<>();
+            if (id.equals(QS)) {
+                list = recommenmainService.getRecommenmainTopList(null, beginDate, endDate);
+            } else {
+                list = recommenmainService.getRecommenmainTopList(id, beginDate, endDate);
+            }
+
+
+            List<RecommenmainVo> rmls = new ArrayList<>();
+            if (!list.isEmpty()) {
+                for (RecommenmainVo vo : list) {
+                    RecommenmainVo rmvo = new RecommenmainVo();
+                    Recommenmain rm = recommenmainService.getRecommenmain(vo.getWtId(), beginDate, endDate);
+                    rmvo.setWtId(rm.getWtid());
+                    rmvo.setRecodedate(rm.getCreatedate());
+                    rmvo.setReason(rm.getReason());
+                    rmvo.setSpeed(rm.getSpeed());
+
+                    Random r = new Random(100);
+
+
+                    List<Windturbineparts> windturbinepartsls=InitialRunner.windturbinepartsls;
+
+                    int ran = r.nextInt(windturbinepartsls.size());
+
+                    Windturbineparts wps=windturbinepartsls.get(ran);
+                    rmvo.setTypename(wps.getName());
+                    String rule=wps.getId();
+
+                    if (rule.equals("CDL") || rule.equals("FDJ") || rule.equals("BJXT")) {
+
+                        rmvo.setOperation("停机");
+                    } else {
+                        rmvo.setOperation("可运行");
+
+                    }
+
+
+                    rmls.add(rmvo);
+                }
+            }
+            map.put("rmls", rmls);
+/*************************************************健康管理*************************************************************/
+
+
+/***************************************************************利用小时 设备可利用率*************************************************************/
+
+
+            cal = Calendar.getInstance();
+            Map<String, Double> gxkmap = new HashMap<>();
+
+            double dxkyss = 0.0;
+            double sbklyl = 0.0;
+
+            double tb_dxkyss = 0.0;
+            double tb_sbklyl = 0.0;
+
+            double hb_dxkyss = 0.0;
+            double hb_sbklyl = 0.0;
+
+            double bg_dxkyss = 0.0;
+            double bg_sbklyl = 0.0;
+
+            List<Windpowerinfoday> wpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(cal.getTime()));
+            if (!wpdls.isEmpty()) {
+                Windpowerinfoday wd = wpdls.get(0);
+
+                dxkyss = wd.getMonthdxkyxs();
+                sbklyl = wd.getMonthsbklyl();
+
+                gxkmap.put("ydxkyss", dxkyss);
+                gxkmap.put("ysbklyl", sbklyl);
+
+
+            } else {
+                gxkmap.put("ydxkyss", 0.0);
+                gxkmap.put("ysbklyl", 0.0);
+
+            }
+            //上月数据
+            cal.add(Calendar.MONTH, -1);
+            wpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(cal.getTime()));
+            if (!wpdls.isEmpty()) {
+                Windpowerinfoday wd = wpdls.get(0);
+
+
+                if (null != wd.getMonthdxkyxs()) {
+                    hb_dxkyss = new BigDecimal(dxkyss - wd.getMonthdxkyxs()).divide(new BigDecimal(wd.getMonthdxkyxs()), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                }
+
+                if (null != wd.getMonthsbklyl()) {
+                    hb_sbklyl = MathUtil.twoBit(sbklyl - wd.getMonthsbklyl());
+                }
+                gxkmap.put("hb_dxkyss", hb_dxkyss);
+                gxkmap.put("hb_sbklyl", hb_sbklyl);
+
+
+            } else {
+                gxkmap.put("hb_dxkyss", 0.0);
+                gxkmap.put("hb_sbklyl", 0.0);
+
+            }
+            //去年数据
+            cal.setTime(new Date());
+            cal.add(Calendar.YEAR, -1);
+            wpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(cal.getTime()));
+            if (!wpdls.isEmpty()) {
+                Windpowerinfoday wd = wpdls.get(0);
+
+
+                if (null != wd.getMonthdxkyxs()) {
+                    tb_dxkyss = new BigDecimal(dxkyss - wd.getMonthdxkyxs()).divide(new BigDecimal(wd.getMonthdxkyxs()), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                }
+
+                if (null != wd.getMonthsbklyl()) {
+                    tb_sbklyl = MathUtil.twoBit(sbklyl - wd.getMonthsbklyl());
+                }
+
+                gxkmap.put("tb_dxkyss", tb_dxkyss);
+                gxkmap.put("tb_sbklyl", tb_sbklyl);
+
+
+            } else {
+                gxkmap.put("tb_dxkyss", 0.0);
+                gxkmap.put("tb_sbklyl", 0.0);
+
+            }
+
+            //标杆年份
+            cal.setTime(new Date());
+            cal.set(Calendar.YEAR, 2016);
+            wpdls = windpowerinfodayService.getWindpowerinfodayList(id, DateUtils.truncate(cal.getTime()));
+            if (!wpdls.isEmpty()) {
+                Windpowerinfoday wd = wpdls.get(0);
+
+
+                if (null != wd.getMonthdxkyxs()) {
+                    bg_dxkyss = new BigDecimal(dxkyss - wd.getMonthdxkyxs()).divide(new BigDecimal(wd.getMonthdxkyxs()), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                }
+
+                if (null != wd.getMonthsbklyl()) {
+                    bg_sbklyl = MathUtil.twoBit(sbklyl - wd.getMonthsbklyl());
+                }
+
+                gxkmap.put("bg_dxkyss", bg_dxkyss);
+                gxkmap.put("bg_sbklyl", bg_sbklyl);
+
+
+            } else {
+                gxkmap.put("bg_dxkyss", 0.0);
+                gxkmap.put("bg_sbklyl", 0.0);
+
+            }
+/***************************************************************利用小时 设备可利用率*************************************************************/
+/***************************************************************MTTR、MTBF、MTTF***************************************************************/
+            List<String> wtlist = new ArrayList<>();
+
+            if (id.equals(QS) || id.equals(FD) || id.equals(GF)) {
+
+                List<Windpowerstation> wplist = new ArrayList<>();
+
+                for (Windpowerstation wp : InitialRunner.wpallls) {
+                    if (wp.getId().endsWith("FDC")) {
+                        if (InitialRunner.wp_wtmap.containsKey(wp.getId())) {
+                            List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
+                            for (Windturbine wt : wtls) {
+                                wtlist.add(wt.getId());
+                            }
+                        }
+                    }
+                }
+            } else {
+                if (InitialRunner.wp_wtmap.containsKey(id)) {
+                    List<Windturbine> wtls = InitialRunner.wp_wtmap.get(id);
+                    for (Windturbine wt : wtls) {
+                        wtlist.add(wt.getId());
+                    }
+                }
+            }
+
+            if (!wtlist.isEmpty()) {
+                cal.setTime(new Date());
+                Map<String, Object> mttrmaps = shutdowneventService.queryMttrAndMtbf(wtlist, DateUtils.truncate(cal.getTime()));
+                double mttr = 0.0;
+                double mttf = 0.0;
+                double mtbf = 0.0;
+                if (mttrmaps.containsKey("mttr")) {
+                    mttr = (double) mttrmaps.get("mttr");
+                }
+                if (mttrmaps.containsKey("mttf")) {
+                    mttf = (double) mttrmaps.get("mttf");
+                }
+                if (mttrmaps.containsKey("mtbf")) {
+                    mtbf = (double) mttrmaps.get("mtbf");
+                }
+
+                gxkmap.put("mttr", mttr);
+                gxkmap.put("mttf", mttf);
+                gxkmap.put("mtbf", mtbf);
+                //上月数据
+                cal.add(Calendar.MONTH, -1);
+                mttrmaps = shutdowneventService.queryMttrAndMtbf(wtlist, DateUtils.truncate(cal.getTime()));
+                double hb_mttr = 0.0;
+                double hb_mttf = 0.0;
+                double hb_mtbf = 0.0;
+                if (mttrmaps.containsKey("mttr")) {
+                    double  temp = (double) mttrmaps.get("mttr");
+                    if(temp!=0)
+                    {
+                        hb_mttr = new BigDecimal(mttr - temp).divide(new BigDecimal(temp), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                    }else
+                    {
+                        hb_mttr = 0.0;
+
+                    }
+
+                }
+                if (mttrmaps.containsKey("mttf")) {
+
+                    double  temp = (double) mttrmaps.get("mttf");
+                    if(temp!=0)
+                    {
+                        hb_mttf = new BigDecimal(mttf - temp).divide(new BigDecimal(temp), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                    }else
+                    {
+                        hb_mttf = 0.0;
+
+                    }
+
+                }
+                if (mttrmaps.containsKey("mtbf")) {
+
+                    double  temp = (double) mttrmaps.get("mtbf");
+                    if(temp!=0)
+                    {
+                        hb_mtbf = new BigDecimal(mtbf - temp).divide(new BigDecimal(temp), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+
+                    }else
+                    {
+                        hb_mtbf = 0.0;
+
+                    }
+
+                }
+                gxkmap.put("hb_mttr", hb_mttr);
+                gxkmap.put("hb_mttf", hb_mttf);
+                gxkmap.put("hb_mtbf", hb_mtbf);
+                double tb_mttr = 0.0;
+                double tb_mttf = 0.0;
+                double tb_mtbf = 0.0;
+                cal.setTime(new Date());
+                cal.add(Calendar.YEAR, -1);
+                if (mttrmaps.containsKey("mttr")) {
+                    tb_mttr = (double) mttrmaps.get("mttr");
+                    tb_mttr = new BigDecimal(mttr - tb_mttr).divide(new BigDecimal(tb_mttr), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                }
+                if (mttrmaps.containsKey("mttf")) {
+                    tb_mttf = (double) mttrmaps.get("mttf");
+                    tb_mttf = new BigDecimal(mttf - tb_mttf).divide(new BigDecimal(tb_mttf), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                }
+                if (mttrmaps.containsKey("mtbf")) {
+                    tb_mtbf = (double) mttrmaps.get("mtbf");
+                    tb_mtbf = new BigDecimal(mtbf - tb_mtbf).divide(new BigDecimal(tb_mtbf), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                }
+                gxkmap.put("tb_mttr", tb_mttr);
+                gxkmap.put("tb_mttf", tb_mttf);
+                gxkmap.put("tb_mtbf", tb_mtbf);
+                //标杆年份
+                cal.setTime(new Date());
+                cal.set(Calendar.YEAR, 2016);
+                double bg_mttr = 0.0;
+                double bg_mttf = 0.0;
+                double bg_mtbf = 0.0;
+                if (mttrmaps.containsKey("mttr")) {
+                    bg_mttr = (double) mttrmaps.get("mttr");
+                    bg_mttr = new BigDecimal(mttr - bg_mttr).divide(new BigDecimal(bg_mttr), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+
+                    if(bg_mttr<-100)
+                    {
+                        bg_mttr=-100;
+                    }
+
+                    if(bg_mttr>100)
+                    {
+                        bg_mttr=100;
+                    }
+                }
+                if (mttrmaps.containsKey("mttf")) {
+                    bg_mttf = (double) mttrmaps.get("mttf");
+                    bg_mttf = new BigDecimal(mttf - bg_mttf).divide(new BigDecimal(bg_mttf), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                    if(bg_mttf<-100)
+                    {
+                        bg_mttf=-100;
+                    }
+
+                    if(bg_mttf>100)
+                    {
+                        bg_mttf=100;
+                    }
+                }
+                if (mttrmaps.containsKey("mtbf")) {
+                    bg_mtbf = (double) mttrmaps.get("mtbf");
+                    bg_mtbf = new BigDecimal(mtbf - bg_mtbf).divide(new BigDecimal(bg_mtbf), 4, RoundingMode.HALF_EVEN).multiply(new BigDecimal(100)).doubleValue();
+                    if(bg_mtbf<-100)
+                    {
+                        bg_mtbf=-100;
+                    }
+
+                    if(bg_mtbf>100)
+                    {
+                        bg_mtbf=100;
+                    }
+                }
+                gxkmap.put("bg_mttr", bg_mttr);
+                gxkmap.put("bg_mttf", bg_mttf);
+                gxkmap.put("bg_mtbf", bg_mtbf);
+            }
+/***************************************************************MTTR、MTBF、MTTF***************************************************************/
+            map.put("gxkmap", gxkmap);
+        }
+/*************************************************关系库指标**************************************************************/
+
+        return map;
+    }
+
+
+    int qs_ysl = 0;
+    int qs_lsl = 0;
+    int qs_csl = 0;
+    int qs_gzsl = 0;
+    int fjsl = 0;
+    public Map<String, Object> judgeWpHealth() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+
+        for (Windpowerstation wp : InitialRunner.wpallls) {
+
+            Map<String, Object> wpmap = new HashMap<>();
+            List<String> wtidls = new ArrayList<>();
+            List<String> codejkls = new ArrayList<>();
+            List<String> codeztls = new ArrayList<>();
+            if (wp.getId().endsWith("FDC")) {
+                if (InitialRunner.wp_wtmap.containsKey(wp.getId())) {
+
+
+                    List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
+                    for (Windturbine wt : wtls) {
+                        wtidls.add(wt.getId());
+                        codejkls.add(Constant.FJJKZZ);
+                        codeztls.add(Constant.FJZT);
+
+                        fjsl++;
+                    }
+
+                    Calendar cal = Calendar.getInstance();
+
+
+                    String[] jkpoints = new String[wtidls.size()];
+                    String[] ztpoints = new String[wtidls.size()];
+
+
+                    // 获得训练参数对象
+                    for (int x = 0; x < wtidls.size(); x++) {
+
+                        WindTurbineTestingPointAi2 ai1 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x), codejkls.get(x));
+                        jkpoints[x] = ai1.getId();
+                        WindTurbineTestingPointAi2 ai2 = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wtidls.get(x), codeztls.get(x));
+                        ztpoints[x] = ai2.getId();
+
+                    }
+                    // 获得风机健康状态结果数组
+                    DNAVal[] jkvalues = realApiUtil.getRealtimeTagValues(jkpoints);
+
+                    // 获得风机实时状态结果数组
+                    DNAVal[] ztvalues = realApiUtil.getRealtimeTagValues(ztpoints);
+
+                    int ysl = 0;
+                    int lsl = 0;
+                    int csl = 0;
+                    int gzsl = 0;
+                    for (int x = 0; x < wtidls.size(); x++) {
+                        String wtId = wtidls.get(x);
+                        double jk = jkvalues[x].DValue;
+
+                        double zt = ztvalues[x].DValue;
+                        if (zt == 2.0) {
+                            gzsl++;
+                        } else {
+                            if (jk >= 80) {
+                                ysl++;
+                            } else if (jk < 80 && jk >= 50) {
+                                lsl++;
+                            } else {
+                                csl++;
+
+                            }
+                        }
+                    }
+
+                    qs_ysl=qs_ysl+ysl;
+                    qs_lsl =qs_lsl+lsl;
+                    qs_csl =qs_csl+csl;
+                     qs_gzsl =qs_gzsl+gzsl;
+
+                    wpmap.put("csl", csl);
+                    wpmap.put("lsl", lsl);
+                    wpmap.put("ysl", ysl);
+                    wpmap.put("gzsl", gzsl);
+                    double gzslz = new BigDecimal(2 * gzsl).divide(new BigDecimal(wtidls.size()), 2, RoundingMode.HALF_EVEN).doubleValue();
+                    double cslz = new BigDecimal(csl).divide(new BigDecimal(wtidls.size()), 2, RoundingMode.HALF_EVEN).doubleValue();
+                    double lslz = new BigDecimal(0.5 * lsl).divide(new BigDecimal(wtidls.size()), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                    wpmap.put("jkd", MathUtil.twoBit(100 - gzslz - cslz - lslz));
+                    map.put(wp.getId(), wpmap);
+                }
+            } else {
+                wpmap.put("csl", 0);
+                wpmap.put("lsl", 0);
+                wpmap.put("ysl", wtidls.size());
+                wpmap.put("gzsl", 0);
+
+                wpmap.put("jkd", 100.0);
+                map.put(wp.getId(), wpmap);
+            }
+
+            if(fjsl!=0)
+            {
+                double gzslz = new BigDecimal(2 * qs_gzsl).divide(new BigDecimal(fjsl), 2, RoundingMode.HALF_EVEN).doubleValue();
+                double cslz = new BigDecimal(qs_csl).divide(new BigDecimal(fjsl), 2, RoundingMode.HALF_EVEN).doubleValue();
+                double lslz = new BigDecimal(0.5 * qs_lsl).divide(new BigDecimal(fjsl), 2, RoundingMode.HALF_EVEN).doubleValue();
+
+                wpmap.put("qs_csl", qs_csl);
+                wpmap.put("qs_lsl", qs_lsl);
+                wpmap.put("qs_ysl", qs_ysl);
+                wpmap.put("qs_gzsl", qs_gzsl);
+                map.put("qs_jkd", MathUtil.twoBit(100 - gzslz - cslz - lslz));
+            }
+
+        }
+        return map;
+    }
+
+}
+
+

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

@@ -109,8 +109,8 @@
 <!--        <table tableName='StopAnalysis' domainObjectName='StopAnalysis'/>-->
 <!--        <table tableName='StopAnalysismain' domainObjectName='StopAnalysismain'/>-->
 <!--        <table tableName='StopAnalysismainVo' domainObjectName='StopAnalysismainVo'/>-->
-        <table tableName='Windturbinepoweryaw' domainObjectName='Windturbinepoweryaw'/>
-        <table tableName='Windturbinewindyaw' domainObjectName='Windturbinewindyaw'/>
+        <table tableName='Alertrulefailure' domainObjectName='Alertrulefailure'/>
+
 
 
     </context>

+ 19 - 0
src/main/resources/mybatis/auto/Alertrule2Mapper.xml

@@ -474,4 +474,23 @@
       RELATEDPARTS = #{relatedparts,jdbcType=VARCHAR}
     where ID = #{id,jdbcType=VARCHAR}
   </update>
+
+  <select id="getAlarmTotal"  resultType="com.gyee.frame.model.custom.AlarmTotalVo">
+    select s.stationid wpId, s.windturbineid wtId, s.alerttext name from ( select snapid, sum(count) as count,sum(time) time from alarmcount
+    a left join alarmsnap ss on a.snapid = ss.id
+    where
+     ss.windturbineid='${wtId}'
+    and ss.windturbineid is not null
+    and
+     alarmdate >= to_date('${beginDate}','YYYY-MM-DD HH24:MI:SS')
+    and alarmdate &lt; to_date('${endDate}','YYYY-MM-DD HH24:MI:SS')
+    group by snapid ) t left join alarmsnap s
+     on t.snapid = s.id order by  t.count desc
+
+  </select>
+
+  <select id="getAlarmTypenum"  resultType="com.gyee.frame.model.custom.SimpleVo">
+     select count(*) value,w.name name from alertrule2 t,windturbine_parts w where t.relatedparts=w.id group by w.name
+  </select>
+
 </mapper>

+ 318 - 0
src/main/resources/mybatis/auto/AlertrulefailureMapper.xml

@@ -0,0 +1,318 @@
+<?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.AlertrulefailureMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Alertrulefailure">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="TID" jdbcType="VARCHAR" property="tid" />
+    <result column="GZPC" jdbcType="VARCHAR" property="gzpc" />
+    <result column="GZYY" jdbcType="VARCHAR" property="gzyy" />
+    <result column="GQJ" jdbcType="VARCHAR" property="gqj" />
+    <result column="XQSC" jdbcType="DECIMAL" property="xqsc" />
+    <result column="NAME" jdbcType="VARCHAR" property="name" />
+    <result column="MODEL" jdbcType="VARCHAR" property="model" />
+  </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, TID, GZPC, GZYY, GQJ, XQSC, NAME, MODEL
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.AlertrulefailureExample" 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 ALERTRULEFAILURE
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from ALERTRULEFAILURE
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from ALERTRULEFAILURE
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.AlertrulefailureExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from ALERTRULEFAILURE
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Alertrulefailure">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into ALERTRULEFAILURE (ID, TID, GZPC, 
+      GZYY, GQJ, XQSC, NAME, 
+      MODEL)
+    values (#{id,jdbcType=VARCHAR}, #{tid,jdbcType=VARCHAR}, #{gzpc,jdbcType=VARCHAR}, 
+      #{gzyy,jdbcType=VARCHAR}, #{gqj,jdbcType=VARCHAR}, #{xqsc,jdbcType=DECIMAL}, #{name,jdbcType=VARCHAR}, 
+      #{model,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Alertrulefailure">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into ALERTRULEFAILURE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="tid != null">
+        TID,
+      </if>
+      <if test="gzpc != null">
+        GZPC,
+      </if>
+      <if test="gzyy != null">
+        GZYY,
+      </if>
+      <if test="gqj != null">
+        GQJ,
+      </if>
+      <if test="xqsc != null">
+        XQSC,
+      </if>
+      <if test="name != null">
+        NAME,
+      </if>
+      <if test="model != null">
+        MODEL,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="tid != null">
+        #{tid,jdbcType=VARCHAR},
+      </if>
+      <if test="gzpc != null">
+        #{gzpc,jdbcType=VARCHAR},
+      </if>
+      <if test="gzyy != null">
+        #{gzyy,jdbcType=VARCHAR},
+      </if>
+      <if test="gqj != null">
+        #{gqj,jdbcType=VARCHAR},
+      </if>
+      <if test="xqsc != null">
+        #{xqsc,jdbcType=DECIMAL},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="model != null">
+        #{model,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.AlertrulefailureExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from ALERTRULEFAILURE
+    <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 ALERTRULEFAILURE
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.tid != null">
+        TID = #{record.tid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.gzpc != null">
+        GZPC = #{record.gzpc,jdbcType=VARCHAR},
+      </if>
+      <if test="record.gzyy != null">
+        GZYY = #{record.gzyy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.gqj != null">
+        GQJ = #{record.gqj,jdbcType=VARCHAR},
+      </if>
+      <if test="record.xqsc != null">
+        XQSC = #{record.xqsc,jdbcType=DECIMAL},
+      </if>
+      <if test="record.name != null">
+        NAME = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.model != null">
+        MODEL = #{record.model,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 ALERTRULEFAILURE
+    set ID = #{record.id,jdbcType=VARCHAR},
+      TID = #{record.tid,jdbcType=VARCHAR},
+      GZPC = #{record.gzpc,jdbcType=VARCHAR},
+      GZYY = #{record.gzyy,jdbcType=VARCHAR},
+      GQJ = #{record.gqj,jdbcType=VARCHAR},
+      XQSC = #{record.xqsc,jdbcType=DECIMAL},
+      NAME = #{record.name,jdbcType=VARCHAR},
+      MODEL = #{record.model,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Alertrulefailure">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update ALERTRULEFAILURE
+    <set>
+      <if test="tid != null">
+        TID = #{tid,jdbcType=VARCHAR},
+      </if>
+      <if test="gzpc != null">
+        GZPC = #{gzpc,jdbcType=VARCHAR},
+      </if>
+      <if test="gzyy != null">
+        GZYY = #{gzyy,jdbcType=VARCHAR},
+      </if>
+      <if test="gqj != null">
+        GQJ = #{gqj,jdbcType=VARCHAR},
+      </if>
+      <if test="xqsc != null">
+        XQSC = #{xqsc,jdbcType=DECIMAL},
+      </if>
+      <if test="name != null">
+        NAME = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="model != null">
+        MODEL = #{model,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Alertrulefailure">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update ALERTRULEFAILURE
+    set TID = #{tid,jdbcType=VARCHAR},
+      GZPC = #{gzpc,jdbcType=VARCHAR},
+      GZYY = #{gzyy,jdbcType=VARCHAR},
+      GQJ = #{gqj,jdbcType=VARCHAR},
+      XQSC = #{xqsc,jdbcType=DECIMAL},
+      NAME = #{name,jdbcType=VARCHAR},
+      MODEL = #{model,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 13 - 0
src/main/resources/mybatis/auto/RecommenmainMapper.xml

@@ -467,4 +467,17 @@
 
   </select>
 
+  <select id="getRecommenmainTotal"  resultType="com.gyee.frame.model.custom.RecommenmainVo">
+
+    select t.wtid wtId ,count(t.wtid) nums from recommenmain t where
+     t.recodedate >= to_date('${beginDate}','YYYY-MM-DD HH24:MI:SS')
+    and t.recodedate &lt; to_date('${endDate}','YYYY-MM-DD HH24:MI:SS')
+    <if test="wpId != null">
+     and wpid = #{wpId,jdbcType=VARCHAR}
+    </if>
+    and wpid !='QS_FDC'
+    group by t.wtid order by nums desc
+
+  </select>
+
 </mapper>

+ 12 - 0
src/main/resources/mybatis/auto/RecommenmainMsSqlMapper.xml

@@ -484,4 +484,16 @@
 
     and a.OPERATIONDATE >= #{beginDate} and a.OPERATIONDATE &lt; #{endDate}
   </select>
+
+  <select id="totalList"  resultType="com.gyee.frame.model.custom.SimpleVo">
+    SELECT count(*) value
+    FROM  RECOMMENMAIN a left join WOBUGEQ b on a.wobugid=b.bugnum left join  WINDFARM c on a.wpnum=c.wfnum  where a.OPERATIONDATE IS NOT null
+    <if test="wpId!=null &amp;&amp; wpId.trim()!=''">
+      and c.WFSHORTNAME=#{wpId}
+    </if>
+    <if test="wtId!=null &amp;&amp; wtId.trim()!=''">
+      and a.WTID in (#{wtId})
+    </if>
+    and a.OPERATIONDATE >= #{beginDate} and a.OPERATIONDATE &lt; #{endDate}
+  </select>
 </mapper>

+ 16 - 0
src/main/resources/mybatis/auto/WindPowerStationTestingPoint2Mapper.xml

@@ -442,4 +442,20 @@
       REALTIMEID = #{realtimeid,jdbcType=VARCHAR}
     where CODE = #{code,jdbcType=VARCHAR}
   </update>
+
+  <select id="getWpPointTotal" resultType="com.gyee.frame.model.custom.SimpleVo" >
+    select count(*) value
+    from view_tspoint  where
+    <if test="wpId != null">
+      ID LIKE '%${wpId}%' and
+    </if>
+    <if test="type != null">
+       id  like '%JSFW%'
+    </if>
+    <if test="type == null">
+      id not like '%JSFW%'
+    </if>
+
+  </select>
+
 </mapper>

+ 25 - 8
src/main/resources/mybatis/auto/Windturbineinfodaytop2Mapper.xml

@@ -149,14 +149,14 @@
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
-    id, windPowerStationId, projectId, lineId, windTurbineId, recordDate, dayfdl, monthfdl, 
-    yearfdl, dayllfdl, monthllfdl, yearllfdl, dayfs, monthfs, yearfs, daygl, monthgl, 
-    yeargl, daygzssdl, monthgzssdl, yeargzssdl, dayxdssdl, monthxdssdl, yearxdssdl, daywhssdl, 
-    monthwhssdl, yearwhssdl, dayxnssdl, monthxnssdl, yearxnssdl, daygzsj, monthgzsj, 
-    yeargzsj, daywhsj, monthwhsj, yearwhsj, dayyxsj, monthyxsj, yearyxsj, daytjsj, monthtjsj, 
-    yeartjsj, dayLYXS, monthLYXS, yearLYXS, dayNHYD, monthNHYD, yearNHYD, daySBKLYL, 
-    monthSBKLYL, yearSBKLYL, dayDXKYXS, monthDXKYXS, yearDXKYXS, dayyxfss, monthyxfss, 
-    yearyxfss, dayxfqr, monthxfqr, yearxfqr, dayjfpl, monthjfpl, yearjfpl, dayglyzxxs, 
+    id, windPowerStationId, projectId, lineId, windTurbineId, recordDate, dayfdl, monthfdl,
+    yearfdl, dayllfdl, monthllfdl, yearllfdl, dayfs, monthfs, yearfs, daygl, monthgl,
+    yeargl, daygzssdl, monthgzssdl, yeargzssdl, dayxdssdl, monthxdssdl, yearxdssdl, daywhssdl,
+    monthwhssdl, yearwhssdl, dayxnssdl, monthxnssdl, yearxnssdl, daygzsj, monthgzsj,
+    yeargzsj, daywhsj, monthwhsj, yearwhsj, dayyxsj, monthyxsj, yearyxsj, daytjsj, monthtjsj,
+    yeartjsj, dayLYXS, monthLYXS, yearLYXS, dayNHYD, monthNHYD, yearNHYD, daySBKLYL,
+    monthSBKLYL, yearSBKLYL, dayDXKYXS, monthDXKYXS, yearDXKYXS, dayyxfss, monthyxfss,
+    yearyxfss, dayxfqr, monthxfqr, yearxfqr, dayjfpl, monthjfpl, yearjfpl, dayglyzxxs,
     monthglyzxxs, yearglyzxxs, type, Rank, "LEVEL", year, month
   </sql>
   <select id="selectByExample" parameterType="com.gyee.frame.model.auto.Windturbineinfodaytop2Example" resultMap="BaseResultMap">
@@ -1310,4 +1310,21 @@
       month = #{month,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
+
+  <select id="getWindturbineinfodaytop2List"  resultMap="BaseResultMap">
+     select  id, windPowerStationId, projectId, lineId, windTurbineId, recordDate, dayfdl, monthfdl,
+    yearfdl, dayllfdl, monthllfdl, yearllfdl, dayfs, monthfs, yearfs, daygl, monthgl,
+    yeargl, daygzssdl, monthgzssdl, yeargzssdl, dayxdssdl, monthxdssdl, yearxdssdl, daywhssdl,
+    monthwhssdl, yearwhssdl, dayxnssdl, monthxnssdl, yearxnssdl, daygzsj, monthgzsj,
+    yeargzsj, daywhsj, monthwhsj, yearwhsj, dayyxsj, monthyxsj, yearyxsj, daytjsj, monthtjsj,
+    yeartjsj, dayLYXS, monthLYXS, yearLYXS, dayNHYD, monthNHYD, yearNHYD, daySBKLYL,
+    monthSBKLYL, yearSBKLYL, dayDXKYXS, monthDXKYXS, yearDXKYXS, dayyxfss, monthyxfss,
+    yearyxfss, dayxfqr, monthxfqr, yearxfqr, dayjfpl, monthjfpl, yearjfpl, dayglyzxxs,
+    monthglyzxxs, yearglyzxxs, type, Rank, "LEVEL", year, month
+     from windturbineinfodaytop2  where  type=2
+    <if test="wpId != null">
+     and windpowerstationid = #{wpId}
+    </if>
+     and year=#{year} and month=#{month} order by "LEVEL" desc
+  </select>
 </mapper>

+ 256 - 0
src/main/resources/mybatis/auto/WindturbinepartsMapper.xml

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

+ 5 - 0
src/main/resources/mybatis/auto/WobugeqMapper.xml

@@ -1230,4 +1230,9 @@
     WHERE a.WOBUGID=b.BUGNUM ) a
   </select>
 
+  <select id="totalNum"  resultType="com.gyee.frame.model.custom.SimpleVo">
+SELECT  count(*) value FROM WOBUGEQ where
+  FINDTIME >= #{beginDate} and FINDTIME &lt; #{endDate}
+
+  </select>
 </mapper>

+ 3 - 4
src/test/java/test/GenreSetPushTest.java

@@ -3,11 +3,10 @@ package test;
 import com.gyee.SpringbootStart;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.monitor.GenreSetPushController;
-import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.service.websocket.GenreSetPushService;
 import org.springframework.boot.SpringApplication;
 
-import java.util.List;
+import java.util.Map;
 
 public class GenreSetPushTest {
 
@@ -40,9 +39,9 @@ public class GenreSetPushTest {
 //        map.put(GF, genreSetPushService.findBasicDataInfo(GF));
 
 
-        List<DataVo> vos = genreSetPushService.findPowerWpChart("MHS_FDC");
+        Map<String, Object> map = genreSetPushService.genreSetMap();
 
-         System.out.println(vos.size());
+         System.out.println(map.size());
 
 
 

+ 2 - 3
src/test/java/test/HealthTest.java

@@ -10,7 +10,6 @@ import org.springframework.boot.SpringApplication;
 
 import java.util.Calendar;
 import java.util.Date;
-import java.util.Map;
 
 public class HealthTest {
 
@@ -86,8 +85,8 @@ public class HealthTest {
 //        System.out.println(map1.size());
 
 
-        Map<String, Object> map1 =healthSubController.findWtHealthInfo("NG01_79");
-        System.out.println(map1.size());
+//        Map<String, Object> map1 =healthSubController.findWtHealthInfo("NG01_79");
+//        System.out.println(map1.size());
 
 
 //        AjaxResult ajax=windTurbineHealthListController.windTurbineHealthList("MHS_FDC");

+ 84 - 0
src/test/java/test/SandtableServiceTest.java

@@ -0,0 +1,84 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.SandtableService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Date;
+import java.util.Map;
+
+public class SandtableServiceTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        SandtableService sandtableService= SpringUtils.getBean("sandtableService");
+
+
+
+
+
+    //    Map<String, Object> map = wpInfoPushService.genreSetMap();
+
+        Date begin=new Date();
+ //       Map<String, Object> map = wpInfoPushService.genreSetMap("SBQ_FDC");
+
+//        List<DataVo> vos=wpInfoPushService.findLossWpBar("SBQ_FDC");
+//
+//        Date end=new Date();
+//        System.out.println((end.getTime()-begin.getTime())/1000);
+//         System.out.println(vos.size());
+
+        Map<String, Object> map1=sandtableService.findSandtableInfo("0");
+//        Map<String, Object> map2=sandtableService.findSandtableInfo("SBQ_FDC");
+        Date end=new Date();
+        System.out.println((end.getTime()-begin.getTime())/1000);
+        System.out.println(map1.size());
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}

+ 87 - 0
src/test/java/test/WindPowerstationTestingPointServiceTest.java

@@ -0,0 +1,87 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.WindPowerstationTestingPointService;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class WindPowerstationTestingPointServiceTest {
+
+
+    public static void main(String[] args) throws Exception {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+          String QS = "0";
+          String FD = "-1";
+          String GF = "-2";
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+
+
+        WindPowerstationTestingPointService windPowerstationTestingPointService= SpringUtils.getBean("windPowerstationTestingPointService");
+//        Map<String, Object> map =genreSetPushController.findBasicDataInfo("0");
+//        Map<String, Object> map =genreSetPushController.findDayInfo("0","rfdl");
+
+//        Map<String, Object> map2 =genreSetPushController.findBasicDataInfo("MHS_FDC");
+//        Map<String, Object> map = new HashMap<>();
+//
+//
+//        map.put(QS, genreSetPushService.findBasicDataInfo(QS));
+//        map.put(FD, genreSetPushService.findBasicDataInfo(FD));
+//        map.put(GF, genreSetPushService.findBasicDataInfo(GF));
+
+
+        Map<String,Integer> map= windPowerstationTestingPointService.getWpPointTotal();
+
+//        List<YawValuesVo> vos2 = yawService.getYawValuesPowerTotal("MG01_01",beginDate,endDate,4);
+//
+//        List<YawVo> vos3 = yawService.getYawSpeedTotal("MG01_01",beginDate,endDate);
+//
+//        List<YawValuesVo> vos4 = yawService.getYawValuesSpeedTotal("MG01_01",beginDate,endDate,4);
+
+         System.out.println(map.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}