Browse Source

优化后台计算算法

shilin 1 year ago
parent
commit
f24aee1a26
48 changed files with 4386 additions and 23 deletions
  1. 9 2
      web/health/src/main/java/com/gyee/health/HealthApplication.java
  2. 133 0
      web/health/src/main/java/com/gyee/health/controller/health/ReportController.java
  3. 257 0
      web/health/src/main/java/com/gyee/health/controller/leaderboard/LeaderboardController.java
  4. 127 0
      web/health/src/main/java/com/gyee/health/controller/powersaturation/PowerSaturationAmonutController.java
  5. 124 0
      web/health/src/main/java/com/gyee/health/controller/powersaturation/PowerSaturationController.java
  6. 121 0
      web/health/src/main/java/com/gyee/health/controller/powersaturation/PowerSaturationMonthController.java
  7. 97 0
      web/health/src/main/java/com/gyee/health/controller/scatter/ScatterController.java
  8. 57 0
      web/health/src/main/java/com/gyee/health/controller/scatter/WinddirectionController.java
  9. 28 1
      web/health/src/main/java/com/gyee/health/init/CacheContext.java
  10. 3 1
      web/health/src/main/java/com/gyee/health/mapper/auto/ProEconPartStatisticsSubMapper.java
  11. 13 1
      web/health/src/main/java/com/gyee/health/mapper/auto/ProEconPartpowerStatticsSubMapper.java
  12. 16 0
      web/health/src/main/java/com/gyee/health/model/vo/PartpowerStatticsSubVo.java
  13. 36 0
      web/health/src/main/java/com/gyee/health/model/vo/ProEconPartTemperatureSubVo.java
  14. 179 0
      web/health/src/main/java/com/gyee/health/model/vo/StopAnalysis.java
  15. 244 0
      web/health/src/main/java/com/gyee/health/model/vo/StopAnalysisDetailVo.java
  16. 77 0
      web/health/src/main/java/com/gyee/health/model/vo/StopAnalysisNodeVo.java
  17. 145 0
      web/health/src/main/java/com/gyee/health/model/vo/StopAnalysismainVo.java
  18. 26 0
      web/health/src/main/java/com/gyee/health/model/vo/StopTypeTreeVo.java
  19. 5 0
      web/health/src/main/java/com/gyee/health/service/auto/IProEconCurveFittMonthMainService.java
  20. 4 0
      web/health/src/main/java/com/gyee/health/service/auto/IProEconCurveFittingMainService.java
  21. 4 0
      web/health/src/main/java/com/gyee/health/service/auto/IProEconEarlyWarningMainService.java
  22. 4 0
      web/health/src/main/java/com/gyee/health/service/auto/IProEconFailureStatisticMainService.java
  23. 3 0
      web/health/src/main/java/com/gyee/health/service/auto/IProEconPartTemperatureSubService.java
  24. 6 1
      web/health/src/main/java/com/gyee/health/service/auto/IProEconPartpowerStatticsSubService.java
  25. 9 1
      web/health/src/main/java/com/gyee/health/service/auto/IProEconWtCurveFittingMonthService.java
  26. 12 0
      web/health/src/main/java/com/gyee/health/service/auto/IProEconWtCurveFittingService.java
  27. 9 0
      web/health/src/main/java/com/gyee/health/service/auto/IProEconWtPowerCurveFittingService.java
  28. 36 0
      web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconCurveFittMonthMainServiceImpl.java
  29. 33 0
      web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconCurveFittingMainServiceImpl.java
  30. 144 3
      web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconEarlyWarningMainServiceImpl.java
  31. 141 3
      web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconFailureStatisticMainServiceImpl.java
  32. 99 0
      web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconPartTemperatureSubServiceImpl.java
  33. 93 2
      web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconPartpowerStatticsSubServiceImpl.java
  34. 69 2
      web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconWtCurveFittingMonthServiceImpl.java
  35. 115 1
      web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconWtCurveFittingServiceImpl.java
  36. 88 3
      web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconWtPowerCurveFittingServiceImpl.java
  37. 38 0
      web/health/src/main/java/com/gyee/health/service/health/EarlyWarningMainService.java
  38. 35 0
      web/health/src/main/java/com/gyee/health/service/health/FailureStatisticMainService.java
  39. 36 0
      web/health/src/main/java/com/gyee/health/service/health/PartTemperatureSubService.java
  40. 36 0
      web/health/src/main/java/com/gyee/health/service/health/PartpowerStatticsSubService.java
  41. 674 0
      web/health/src/main/java/com/gyee/health/service/leaderboard/LeaderboardService.java
  42. 231 0
      web/health/src/main/java/com/gyee/health/service/scatter/ScatterService.java
  43. 70 0
      web/health/src/main/java/com/gyee/health/service/scatter/WinddirectionService.java
  44. 404 0
      web/health/src/main/java/com/gyee/health/service/stopanalysis/StopAnalysisStaticService.java
  45. 170 0
      web/health/src/main/java/com/gyee/health/service/stopanalysis/StopAnalysisTreeUtil.java
  46. 116 0
      web/health/src/main/java/com/gyee/health/util/SpringUtils.java
  47. 8 0
      web/health/src/main/java/com/gyee/health/util/StringUtils.java
  48. 2 2
      web/health/src/main/resources/application-jn.properties

+ 9 - 2
web/health/src/main/java/com/gyee/health/HealthApplication.java

@@ -9,7 +9,6 @@ import org.springframework.context.ConfigurableApplicationContext;
 import org.springframework.core.env.Environment;
 
 import java.net.InetAddress;
-import java.net.UnknownHostException;
 
 
 @Log4j2
@@ -17,10 +16,18 @@ import java.net.UnknownHostException;
 @MapperScan("com.gyee.health.mapper")
 public class HealthApplication {
     
-    public static void main(String[] args) throws UnknownHostException {
+    public static void main(String[] args) throws Exception {
         ConfigurableApplicationContext application = SpringApplication.run(HealthApplication.class, args);
 
 
+//        PartTemperatureSubService partTemperatureSubService= SpringUtils.getBean("partTemperatureSubService");
+//        Calendar c=Calendar.getInstance();
+//        c.set(Calendar.DAY_OF_MONTH,24);
+//        Map<String,Object>  vos= partTemperatureSubService.getParttemperaturesubListByWpId("SXJ_KGDL_GJY_FDC_STA", DateUtils.truncate(c.getTime()),"fdj");
+//
+//
+//
+//        System.out.println(AjaxResult.successData(AjaxStatus.success.code, vos));
         Environment env = application.getEnvironment();
         String ip = InetAddress.getLocalHost().getHostAddress();
         String port = env.getProperty("server.port");

+ 133 - 0
web/health/src/main/java/com/gyee/health/controller/health/ReportController.java

@@ -0,0 +1,133 @@
+package com.gyee.health.controller.health;
+
+
+import com.gyee.health.dto.AjaxResult;
+import com.gyee.health.dto.AjaxStatus;
+import com.gyee.health.service.health.EarlyWarningMainService;
+import com.gyee.health.service.health.FailureStatisticMainService;
+import com.gyee.health.service.health.PartTemperatureSubService;
+import com.gyee.health.service.health.PartpowerStatticsSubService;
+import com.gyee.health.util.DateUtils;
+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.GetMapping;
+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("/report")
+@Api(value = "健康报表",tags =  "健康报表")
+public class ReportController {
+
+    @Resource
+    private PartTemperatureSubService partTemperatureSubService;
+    @Resource
+    private PartpowerStatticsSubService partpowerStatticsSubService;
+    @Resource
+    private FailureStatisticMainService failureStatisticMainService;
+
+    @Resource
+    private EarlyWarningMainService earlyWarningMainService;
+
+
+    /**
+     * 按部件获取温度列表
+     * @return
+     */
+    @GetMapping("/getParttemperaturesubListByWpId")
+    @ResponseBody
+    @ApiOperation(value = "按部件获取温度列表", notes = "按部件获取温度列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "partId", value = "部件(发电机 fdj,齿轮箱 clx,变桨 bj,主控 zk)", required = true, dataType = "string", paramType = "query")})
+     public AjaxResult getParttemperaturesubListByWpId(String wpId, String recorddate, String partId) throws Exception {
+
+        Map<String,Object> map=new HashMap<>();
+
+        map=partTemperatureSubService.getParttemperaturesubListByWpId(wpId, DateUtils.parseStrtoDate(recorddate), partId);
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        }
+    }
+
+    /**
+     * 按部件获取温度列表
+     * @return
+     */
+    @GetMapping("/getProEconPartPowerStatticsSubListByWpId")
+    @ResponseBody
+    @ApiOperation(value = "按部件获取功率列表", notes = "按部件获取功率列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "partId", value = "部件(发电机 fdj,齿轮箱 clx,变桨 bj,主控 zk)", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult getProEconPartPowerStatticsSubListByWpId(String wpId, String recorddate, String partId) throws Exception {
+
+        Map<String,Object> map=new HashMap<>();
+
+        map=partpowerStatticsSubService.getProEconPartPowerStatticsSubListByWpId(wpId, DateUtils.parseStrtoDate(recorddate), partId);
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        }
+    }
+
+    /**
+     * 故障评判列表
+     * @return
+     */
+    @GetMapping("/getFailureStatisticMainListByWpId")
+    @ResponseBody
+    @ApiOperation(value = "故障评判列表", notes = "故障评判列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult getFailureStatisticMainListByWpId(String wpId, String recorddate) throws Exception {
+
+        Map<String,Object> map=new HashMap<>();
+
+        map=failureStatisticMainService.getFailureStatisticMainListByWpId(wpId, DateUtils.parseStrtoDate(recorddate));
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        }
+    }
+
+    /**
+     * 预警评判列表
+     * @return
+     */
+    @GetMapping("/getEarlyWarningMainListByWpId")
+    @ResponseBody
+    @ApiOperation(value = "预警评判列表", notes = "预警评判列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+    public AjaxResult getEarlyWarningMainListByWpId(String wpId, String recorddate) throws Exception {
+
+        Map<String,Object> map=new HashMap<>();
+
+        map=earlyWarningMainService.getEarlyWarningMainListByWpId(wpId, DateUtils.parseStrtoDate(recorddate));
+
+        if (null!=map) {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, map);
+        }
+    }
+}

+ 257 - 0
web/health/src/main/java/com/gyee/health/controller/leaderboard/LeaderboardController.java

@@ -0,0 +1,257 @@
+package com.gyee.health.controller.leaderboard;
+
+import com.gyee.health.dto.AjaxResult;
+import com.gyee.health.dto.AjaxStatus;
+import com.gyee.health.model.auto.ProEconCurveFittMonthMain;
+import com.gyee.health.model.auto.ProEconCurveFittingMain;
+import com.gyee.health.model.custom.Tablepar;
+import com.gyee.health.service.leaderboard.LeaderboardService;
+import com.gyee.health.util.DateUtils;
+import com.gyee.health.util.StringUtils;
+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.*;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+@Controller
+@RequestMapping("/leaderboard")
+@Api(value = "排行榜功能",tags =  "排行榜功能")
+public class LeaderboardController {
+    @Resource
+    private LeaderboardService leaderboardService;
+
+ 
+/*******************************************************************************************************************************/
+    /**查询日曲线偏差率列表**/
+    @PostMapping("/curvefittingmainList")
+    @ResponseBody
+    @ApiOperation(value = "查询日曲线偏差率列表", notes = "查询日曲线偏差率列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult curvefittingmainList(@RequestBody Tablepar tablepar, String wpId, String recorddate) {
+        List<ProEconCurveFittingMain> vos=new ArrayList<>();
+        if (StringUtils.isNotEmpty(recorddate))
+        {
+            Date  date= DateUtils.parseDate(recorddate);
+            vos= leaderboardService.proEconCurveFittingMainList( tablepar, wpId, date);
+
+        }
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+
+    /**查询日曲线(实际/保证 实际/最优 最优/保证)图表**/
+    @GetMapping("/getCurvechatAjax")
+    @ResponseBody
+    @ApiOperation(value = "查询日曲线", notes = "查询日曲线")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型 sjbz:实际/保证,sjzy:实际/最优,zybz:最优/保证", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult getCurvechatAjax(String type,String wtId,  String recorddate) {
+        Map<String, Object> vos=new HashMap<>();
+        if (StringUtils.isNotEmpty(recorddate))
+        {
+            Date  date= DateUtils.parseDate(recorddate);
+            vos= leaderboardService.getCurvechatAjax( type,wtId, date);
+        }
+
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+
+    /**查询日曲线同比图表**/
+    @GetMapping("/curvechatAjaxtb")
+    @ResponseBody
+    @ApiOperation(value = "查询日曲线同比图表", notes = "查询日曲线同比图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult curvechatAjaxtb(String type,String wtId,  String recorddate) {
+
+        Map<String, Object> vos=new HashMap<>();
+        if (StringUtils.isNotEmpty(recorddate))
+        {
+            Date  date= DateUtils.parseDate(recorddate);
+           vos= leaderboardService.curvechatAjaxtb( type,wtId, date);
+        }
+
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+    /**查询日曲线环比图表**/
+    @GetMapping("/curvechatAjaxhb")
+    @ResponseBody
+    @ApiOperation(value = "查询日曲线环比图表", notes = "查询日曲线环比图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult curvechatAjaxhb(String type,String wtId,  String recorddate) {
+        Map<String, Object> vos=new HashMap<>();
+        if (StringUtils.isNotEmpty(recorddate))
+        {
+            Date  date= DateUtils.parseDate(recorddate);
+            vos= leaderboardService.curvechatAjaxhb( type,wtId, date);
+        }
+
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+    /**查询日曲线标杆图表**/
+    @GetMapping("/curvechatAjaxbg")
+    @ResponseBody
+    @ApiOperation(value = "查询日曲线标杆图表", notes = "查询日曲线标杆图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult curvechatAjaxbg(String type,String wtId,  String recorddate) {
+        Map<String, Object> vos=new HashMap<>();
+        if (StringUtils.isNotEmpty(recorddate))
+        {
+            Date  date= DateUtils.parseDate(recorddate);
+            vos= leaderboardService.curvechatAjaxbg( type,wtId, date);
+        }
+
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+
+    /*******************************************************************************************************************************/
+    /**查询月曲线偏差率列表**/
+    @PostMapping("/curvefittingmonthmainList")
+    @ResponseBody
+    @ApiOperation(value = "查询月曲线偏差率列表", notes = "查询月曲线偏差率列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult curvefittingmonthmainList(@RequestBody Tablepar tablepar, String wpId, String year,String month) {
+
+        List<ProEconCurveFittMonthMain> vos= leaderboardService.curvefittingmonthmainList( tablepar, wpId, year, month);
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+
+    /**查询月曲线(实际/保证 实际/最优 最优/保证)图表**/
+    @GetMapping("/curveMonthchatAjax")
+    @ResponseBody
+    @ApiOperation(value = "查询月曲线偏差率", notes = "查询月曲线偏差率")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型 sjbz:实际/保证,sjzy:实际/最优,zybz:最优/保证", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult curveMonthchatAjax(String type,String wtId,  String year,String month) {
+
+        Map<String, Object> vos= leaderboardService.curveMonthchatAjax( type,wtId, year, month);
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+
+    /**查询月曲线同比图表**/
+    @GetMapping("/curveMonthchatAjaxtb")
+    @ResponseBody
+    @ApiOperation(value = "查询月曲线同比图表", notes = "查询月曲线同比图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult curveMonthchatAjaxtb(String type,String wtId, String year,String month) {
+
+        Map<String, Object> vos= leaderboardService.curveMonthchatAjaxtb( type,wtId, year, month);
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+    /**查询月曲线环比图表**/
+    @GetMapping("/curveMonthchatAjaxhb")
+    @ResponseBody
+    @ApiOperation(value = "查询月曲线环比图表", notes = "查询月曲线环比图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult curveMonthchatAjaxhb(String type,String wtId,  String year,String month) {
+
+        Map<String, Object> vos= leaderboardService.curveMonthchatAjaxhb( type,wtId, year, month);
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+    /**查询月曲线标杆图表**/
+    @GetMapping("/curveMonthchatAjaxbg")
+    @ResponseBody
+    @ApiOperation(value = "查询月曲线标杆图表", notes = "查询月曲线标杆图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型 tb:同比,hb:环比,bg:标杆", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult curveMonthchatAjaxbg(String type,String wtId,  String year,String month) {
+
+        Map<String, Object> vos= leaderboardService.curveMonthchatAjaxbg( type,wtId, year, month);
+
+        if (vos != null && !vos.isEmpty()) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+}

+ 127 - 0
web/health/src/main/java/com/gyee/health/controller/powersaturation/PowerSaturationAmonutController.java

@@ -0,0 +1,127 @@
+package com.gyee.health.controller.powersaturation;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.health.dto.AjaxResult;
+import com.gyee.health.dto.AjaxStatus;
+import com.gyee.health.dto.DataVo;
+import com.gyee.health.init.CacheContext;
+import com.gyee.health.model.auto.ProBasicEquipment;
+import com.gyee.health.model.auto.ProBasicModelPowerRd;
+import com.gyee.health.model.auto.ProEconWtPowerCurveFitting;
+import com.gyee.health.model.custom.Tablepar;
+import com.gyee.health.service.auto.IProEconWtPowerCurveFittingService;
+import com.gyee.health.util.StringUtils;
+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.*;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+@Controller
+@RequestMapping("/powersaturation")
+@Api(value = "总单机饱和度统计",tags =  "总单机饱和度统计")
+public class PowerSaturationAmonutController {
+    @Resource
+    private IProEconWtPowerCurveFittingService proEconWtPowerCurveFittingService;
+
+    /**总功率饱和列表**/
+    @PostMapping("/powersaturationamonutlist")
+    @ResponseBody
+    @ApiOperation(value = "查询总功率饱和列表", notes = "查询总功率饱和列表")
+    @ApiImplicitParams({
+
+            @ApiImplicitParam(name = "tablepar", value = "分页对象1", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult powersaturationamonutlist(@RequestBody Tablepar tablepar, String wtId) {
+
+        IPage<ProEconWtPowerCurveFitting> vos=null;
+        if (StringUtils.notEmp(wtId) )
+        {
+            vos=proEconWtPowerCurveFittingService.getWindturbinecurvefitting(tablepar, wtId);
+        }
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+
+    }
+    /**总功率饱和图表**/
+    @GetMapping("/powersaturationamonutchart")
+    @ResponseBody
+    @ApiOperation(value = "查询总功率饱和图表", notes = "查询总功率饱和图表")
+    @ApiImplicitParams({
+
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult powersaturationamonutchart(String wtId) {
+
+        List<DataVo> vos = new ArrayList<>();
+        Map<String, Map<Double, ProBasicModelPowerRd>> modelpowerrdmap = CacheContext.modelpowerrdmap;
+        Map<String, ProBasicEquipment> wtmap = CacheContext.wtmap;
+
+        Map<Double, ProBasicModelPowerRd> map = null;
+        if (StringUtils.notEmp(wtId) )
+        {
+
+            List<ProEconWtPowerCurveFitting> wcls=proEconWtPowerCurveFittingService.getWindturbinepowercurvefittingByWtId(wtId);
+
+            if (!wcls.isEmpty()) {
+//				Collections.sort(wcls, new Comparator<ProEconWtPowerCurveFitting>() {
+//					public int compare(ProEconWtPowerCurveFitting arg0, ProEconWtPowerCurveFitting arg1) {
+//						int result = 0;
+//						if (arg0.getSpeed() > arg1.getSpeed())
+//							result = 1;
+//						else
+//							result = 0;
+//						return result;
+//					}
+//				});
+                if (wtmap.containsKey(wtId)) {
+                    ProBasicEquipment wt = wtmap.get(wtId);
+                    if (modelpowerrdmap.containsKey(wt.getModelId())) {
+                        map = modelpowerrdmap.get(wt.getModelId());
+                    }
+                }
+
+                double temp = 0.0;
+                for (ProEconWtPowerCurveFitting wc : wcls) {
+                    DataVo vo = new DataVo();
+
+                    int c = (int) wc.getSpeed().intValue();
+
+                    if (c == wc.getSpeed()) {
+                        vo.setValue1(wc.getSpeed());// 风速
+                        vo.setValue2(wc.getActualPower());// 实际拟合功率
+                        vo.setValue3(wc.getOptimalPower());// 最优拟合功率
+
+                        if (null != map && StringUtils.notEmp(wc.getSpeed()) && map.containsKey(String.valueOf(wc.getSpeed()))) {
+                            ProBasicModelPowerRd mp = map.get(String.valueOf(wc.getSpeed()));
+                            vo.setValue4(mp.getEnsurePower());// 保证功率曲线
+                            temp = mp.getEnsurePower();
+                        } else {
+                            vo.setValue4(temp);// 保证功率曲线
+                        }
+
+                        vos.add(vo);
+                    }
+
+                }
+            }
+        }
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+}

+ 124 - 0
web/health/src/main/java/com/gyee/health/controller/powersaturation/PowerSaturationController.java

@@ -0,0 +1,124 @@
+package com.gyee.health.controller.powersaturation;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.health.dto.AjaxResult;
+import com.gyee.health.dto.AjaxStatus;
+import com.gyee.health.dto.DataVo;
+import com.gyee.health.init.CacheContext;
+import com.gyee.health.model.auto.ProBasicEquipment;
+import com.gyee.health.model.auto.ProBasicModelPowerRd;
+import com.gyee.health.model.auto.ProEconWtCurveFitting;
+import com.gyee.health.model.custom.Tablepar;
+import com.gyee.health.service.auto.IProEconWtCurveFittingService;
+import com.gyee.health.util.DateUtils;
+import com.gyee.health.util.StringUtils;
+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.*;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@Controller
+@RequestMapping("/powersaturation")
+@Api(value = "日单机饱和度统计",tags =  "日单机饱和度统计")
+public class PowerSaturationController {
+
+    @Resource
+    private IProEconWtCurveFittingService proEconWtCurveFittingService;
+
+    /**日功率饱和列表**/
+    @PostMapping("/powersaturationlist")
+    @ResponseBody
+    @ApiOperation(value = "日功率饱和列表", notes = "日功率饱和列表")
+    @ApiImplicitParams({
+
+            @ApiImplicitParam(name = "tablepar", value = "分页对象1", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult powersaturationlist(@RequestBody Tablepar tablepar, String wtId, String recorddate) {
+
+        IPage<ProEconWtCurveFitting> vos=null;
+
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+        {
+            Date date= DateUtils.parseStrtoDate(recorddate);
+            vos=proEconWtCurveFittingService.comparechatAjax(tablepar, wtId, date);
+        }
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+
+    }
+    /**日功率饱和图表**/
+    @GetMapping("/powersaturationchart")
+    @ResponseBody
+    @ApiOperation(value = "日功率饱和图表", notes = "日功率饱和图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult powersaturationchart(String wtId,String recorddate) {
+
+        List<DataVo> vos = new ArrayList<>();
+        Map<String, Map<Double, ProBasicModelPowerRd>> modelPowermap = CacheContext.modelpowerrdmap;
+        Map<String, ProBasicEquipment> wtmap = CacheContext.wtmap;
+
+        Map<Double, ProBasicModelPowerRd> map = null;
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+        {
+            Date date=DateUtils.parseStrtoDate(recorddate);
+            List<ProEconWtCurveFitting> wcls=proEconWtCurveFittingService.comparechatAjax(wtId, date);
+
+            if (!wcls.isEmpty()) {
+
+                if (wtmap.containsKey(wtId)) {
+                    ProBasicEquipment wt = wtmap.get(wtId);
+                    if (modelPowermap.containsKey(wt.getModelId())) {
+                        map = modelPowermap.get(wt.getModelId());
+                    }
+                }
+
+                double temp = 0.0;
+                for (ProEconWtCurveFitting wc : wcls) {
+                    DataVo vo = new DataVo();
+
+                    int c = (int) wc.getSpeed().intValue();
+
+                    if (c == wc.getSpeed()) {
+                        vo.setValue1(wc.getSpeed());// 风速
+                        vo.setValue2(wc.getActualPower());// 实际拟合功率
+                        vo.setValue3(wc.getOptimalPower());// 最优拟合功率
+
+                        if (null != map && StringUtils.notEmp(wc.getSpeed()) && map.containsKey(String.valueOf(wc.getSpeed()))) {
+                            ProBasicModelPowerRd mp = map.get(String.valueOf(wc.getSpeed()));
+                            vo.setValue4(mp.getEnsurePower());// 保证功率曲线
+                            temp = mp.getEnsurePower();
+                        } else {
+                            vo.setValue4(temp);// 保证功率曲线
+                        }
+
+                        vos.add(vo);
+                    }
+
+                }
+            }
+        }
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+}

+ 121 - 0
web/health/src/main/java/com/gyee/health/controller/powersaturation/PowerSaturationMonthController.java

@@ -0,0 +1,121 @@
+package com.gyee.health.controller.powersaturation;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.health.dto.AjaxResult;
+import com.gyee.health.dto.AjaxStatus;
+import com.gyee.health.dto.DataVo;
+import com.gyee.health.init.CacheContext;
+import com.gyee.health.model.auto.ProBasicEquipment;
+import com.gyee.health.model.auto.ProBasicModelPowerRd;
+import com.gyee.health.model.auto.ProEconWtCurveFittingMonth;
+import com.gyee.health.model.custom.Tablepar;
+import com.gyee.health.service.auto.IProEconWtCurveFittingMonthService;
+import com.gyee.health.util.StringUtils;
+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.*;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+@Controller
+@RequestMapping("/powersaturation")
+@Api(value = "月单机饱和度统计",tags =  "月单机饱和度统计")
+public class PowerSaturationMonthController {
+
+    @Resource
+    private IProEconWtCurveFittingMonthService proEconWtCurveFittingMonthService;
+
+    /**月功率饱和列表**/
+    @PostMapping("/powersaturationmonthlist")
+    @ResponseBody
+    @ApiOperation(value = "月功率饱和列表", notes = "月功率饱和列表")
+    @ApiImplicitParams({
+
+            @ApiImplicitParam(name = "tablepar", value = "分页对象1", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult powersaturationmonthlist(@RequestBody Tablepar tablepar, String wtId, String year, String month) {
+
+        IPage<ProEconWtCurveFittingMonth> vos=null;
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(year)  && StringUtils.notEmp(month))
+        {
+
+            vos=proEconWtCurveFittingMonthService.getWindturbinecurvefittingmonthList(tablepar, wtId, year,month);
+        }
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+
+    }
+    /**月功率饱和图表**/
+    @GetMapping("/powersaturationmonthchart")
+    @ResponseBody
+    @ApiOperation(value = "月功率饱和图表", notes = "月功率饱和图表")
+    @ApiImplicitParams({
+             @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult powersaturationmonthchart(String wtId, String year, String month) {
+
+        List<DataVo> vos = new ArrayList<DataVo>();
+        Map<String, Map<Double, ProBasicModelPowerRd>> modelPowermap = CacheContext.modelpowerrdmap;
+        Map<String, ProBasicEquipment> wtmap = CacheContext.wtmap;
+
+        Map<Double, ProBasicModelPowerRd> map = null;
+        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(year)  && StringUtils.notEmp(month))
+        {
+            List<ProEconWtCurveFittingMonth> wcls=proEconWtCurveFittingMonthService.getWindturbinecurvefittingmonthList(wtId, year,month);
+            if (!wcls.isEmpty()) {
+
+
+                if (wtmap.containsKey(wtId)) {
+                    ProBasicEquipment wt = wtmap.get(wtId);
+                    if (modelPowermap.containsKey(wt.getModelId())) {
+                        map = modelPowermap.get(wt.getModelId());
+                    }
+                }
+
+                double temp = 0.0;
+                for (ProEconWtCurveFittingMonth wc : wcls) {
+
+                    DataVo vo = new DataVo();
+                    int c = (int) wc.getSpeed().intValue();
+
+                    if (c == wc.getSpeed()) {
+                        vo.setValue1(wc.getSpeed());// 风速
+                        vo.setValue2(wc.getActualPower());// 实际拟合功率
+                        vo.setValue3(wc.getOptimalPower());// 最优拟合功率
+
+                        if (null != map && StringUtils.notEmp(wc.getSpeed()) && map.containsKey(String.valueOf(wc.getSpeed()))) {
+                            ProBasicModelPowerRd mp = map.get(String.valueOf(wc.getSpeed()));
+                            vo.setValue4(mp.getEnsurePower());// 保证功率曲线
+                            temp = mp.getEnsurePower();
+                        } else {
+                            vo.setValue4(temp);// 保证功率曲线
+                        }
+
+                        vos.add(vo);
+                    }
+                }
+            }
+        }
+
+        if (null!=vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+    }
+}

+ 97 - 0
web/health/src/main/java/com/gyee/health/controller/scatter/ScatterController.java

@@ -0,0 +1,97 @@
+package com.gyee.health.controller.scatter;
+
+import com.gyee.health.dto.AjaxResult;
+import com.gyee.health.dto.AjaxStatus;
+import com.gyee.health.service.scatter.ScatterService;
+import com.gyee.health.util.StringUtils;
+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.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Controller
+@RequestMapping("/scatter")
+@Api(value = "风场、项目、线路功率风速散点图", tags = "风场、项目、线路功率风速散点图")
+public class ScatterController {
+
+    @Resource
+    private ScatterService scatterService;
+
+
+    /**
+     * @throws
+     * @Title: scatterAjax
+     * @Description: 获得选择场站、项目、线路、年份、月份相关散点图
+     */
+    @GetMapping("/scatterAjax")
+    @ResponseBody
+    @ApiOperation(value = "获得选择场站、项目、线路、年份、月份相关散点图", notes = "获得选择场站、项目、线路、年份、月份相关散点图")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "pjId", value = "项目编号", required = false, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "lnId", value = "线路编号", required = false, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult scatterAjax(String wpId, String pjId, String lnId, String year, String month) throws Exception {
+
+        List<List<Double>> vos = new ArrayList<List<Double>>();
+        if (StringUtils.notEmp(year) && StringUtils.notEmp(month)) {
+
+
+            vos =scatterService.scatterAjax( wpId,  pjId,  lnId,  year,  month);
+
+
+        }
+
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+
+    }
+
+    /**
+     * @throws
+     * @Title: scatterAjax
+     * @Description: 获得选择风机、年份、月份相关散点图
+     */
+    @GetMapping("/scatterWtAjax")
+    @ResponseBody
+    @ApiOperation(value = "获得选择风机、年份、月份相关散点图", notes = "获得选择风机、年份、月份相关散点图")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult scatterWtAjax(String wtId, String year, String month) throws Exception {
+
+        Map<String, List<List<Double>>> result = new HashMap<String, List<List<Double>>>();
+
+
+        if (StringUtils.notEmp(year) && StringUtils.notEmp(month)) {
+
+            result=scatterService.scatterWtAjax(wtId,year,month);
+        }
+
+        if (null != result) {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, result);
+        }
+
+    }
+
+
+}

+ 57 - 0
web/health/src/main/java/com/gyee/health/controller/scatter/WinddirectionController.java

@@ -0,0 +1,57 @@
+package com.gyee.health.controller.scatter;
+
+
+import com.gyee.health.dto.AjaxResult;
+import com.gyee.health.dto.AjaxStatus;
+import com.gyee.health.dto.DataVo;
+import com.gyee.health.service.scatter.WinddirectionService;
+import com.gyee.health.util.DateUtils;
+import com.gyee.health.util.StringUtils;
+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.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+@Controller
+@RequestMapping("/winddirection")
+@Api(value = "风向图表", tags = "风向图表")
+public class WinddirectionController {
+
+    @Resource
+    private WinddirectionService winddirectionService;
+
+
+    @GetMapping("/getWinddirection")
+    @ResponseBody
+    @ApiOperation(value = "风向图表", notes = "风向图表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
+            @ApiImplicitParam(name = "recordDate", value = "日期", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult getWinddirection(String wpId, String recordDate) throws Exception {
+
+        List<DataVo> vos = new ArrayList<DataVo>();
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recordDate)) {
+
+             vos =winddirectionService.winddirectionAjax(wpId, DateUtils.parseStrtoDate(recordDate));
+
+        }
+
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        }
+
+    }
+
+
+}

+ 28 - 1
web/health/src/main/java/com/gyee/health/init/CacheContext.java

@@ -86,7 +86,7 @@ public class CacheContext implements CommandLineRunner {
     public static List<ProBasicRegion>  rgls = new ArrayList<>();
     public static List<ProBasicEnergyGroup>  gpls = new ArrayList<>();
     public static List<ProBasicPowerstationPoint> powerpointls = new ArrayList<>();
-    public static List<ProBasicEquipmentPoint> Equipmentpointls = new ArrayList<>();
+    public static List<ProBasicEquipmentPoint> equipmentpointls = new ArrayList<>();
     public static Map<String,ProBasicProject> pjmap = new HashMap<>();
     public static Map<String,ProBasicLine> lnmap = new HashMap<>();
     public static Map<String,ProBasicRegion> rgmap = new HashMap<>();
@@ -138,6 +138,10 @@ public class CacheContext implements CommandLineRunner {
 
     public static List<ProBasicModelPower> mpls=new ArrayList<>();
 
+    public static Map<String,Map<Double,ProBasicModelPowerRd>> modelpowerrdmap = new TreeMap<>();
+
+    public static List<ProBasicModelPowerRd> mprdls=new ArrayList<>();
+
     public static List<ProEconEquipmentmodel> equipmentmodels=new ArrayList<>();
 
     public static Map<String,List<ProBasicEquipment>> subWtsMap = new HashMap<>();
@@ -151,6 +155,8 @@ public class CacheContext implements CommandLineRunner {
         logger.info("缓存开始------------------------------------------------------------");
 
 
+
+
         List<ProBasicPowerstation> wptempls = proBasicPowerstationService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());
 
         //和风只部署芳山风电场
@@ -211,6 +217,27 @@ public class CacheContext implements CommandLineRunner {
                 }
             }
         }
+
+
+        mprdls=proBasicModelPowerRdService.list();
+        mprdls.sort(Comparator.comparing(ProBasicModelPowerRd::getSpeed));
+        if(!mprdls.isEmpty())
+        {
+
+            for(ProBasicModelPowerRd mp:mprdls)
+            {
+                if(modelpowerrdmap.containsKey(mp.getModelId()))
+                {
+                    Map<Double,ProBasicModelPowerRd> tempmap=modelpowerrdmap.get(mp.getModelId());
+                    tempmap.put(mp.getSpeed(),mp);
+
+                }else {
+                    Map<Double,ProBasicModelPowerRd> tempmap=new HashMap<>();
+                    tempmap.put(mp.getSpeed(),mp);
+                    modelpowerrdmap.put(mp.getModelId(),tempmap);
+                }
+            }
+        }
         sqls=proBasicSquareService.list().stream().filter(i->i.getIsAble()==1).collect(Collectors.toList());
         if (!sqls.isEmpty())
         {

+ 3 - 1
web/health/src/main/java/com/gyee/health/mapper/auto/ProEconPartStatisticsSubMapper.java

@@ -1,7 +1,7 @@
 package com.gyee.health.mapper.auto;
 
-import com.gyee.health.model.auto.ProEconPartStatisticsSub;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.health.model.auto.ProEconPartStatisticsSub;
 
 /**
  * <p>
@@ -13,4 +13,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface ProEconPartStatisticsSubMapper extends BaseMapper<ProEconPartStatisticsSub> {
 
+
+
 }

+ 13 - 1
web/health/src/main/java/com/gyee/health/mapper/auto/ProEconPartpowerStatticsSubMapper.java

@@ -1,7 +1,13 @@
 package com.gyee.health.mapper.auto;
 
-import com.gyee.health.model.auto.ProEconPartPowerStatticsSub;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.health.model.auto.ProEconPartPowerStatticsSub;
+import com.gyee.health.model.vo.PartpowerStatticsSubVo;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +19,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface ProEconPartpowerStatticsSubMapper extends BaseMapper<ProEconPartPowerStatticsSub> {
 
+    @Select(" select m.wt_id as wtId,s.name as name,s.power as power,s.critical_value as value  from public.pro_econ_part_power_stattic_main m," +
+            " public.pro_econ_part_power_stattics_sub s " +
+            " where m.id=s.tid and m.wp_id= #{wpId} and m.record_date= #{record_date} " +
+            " and s.part_id= #{part_id} order by s.power")
+    List<PartpowerStatticsSubVo> getProEconPartStatisticsSubList(@Param("wpId") String wpId,
+                                                                 @Param("record_date") Date record_date, @Param("part_id")String part_id);
 }

+ 16 - 0
web/health/src/main/java/com/gyee/health/model/vo/PartpowerStatticsSubVo.java

@@ -0,0 +1,16 @@
+package com.gyee.health.model.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class PartpowerStatticsSubVo {
+
+    private String wtId;
+    private String name;
+    private String power;
+    private Double value;
+}

+ 36 - 0
web/health/src/main/java/com/gyee/health/model/vo/ProEconPartTemperatureSubVo.java

@@ -0,0 +1,36 @@
+package com.gyee.health.model.vo;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 部件温度统计子表
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-04-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProEconPartTemperatureSubVo extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * 风机编号
+     */
+    private String wtId;
+
+    /**
+     * 风机名称
+     */
+    private String wtName;
+
+
+
+
+
+}

+ 179 - 0
web/health/src/main/java/com/gyee/health/model/vo/StopAnalysis.java

@@ -0,0 +1,179 @@
+package com.gyee.health.model.vo;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class StopAnalysis implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSIS.ID
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSIS.WPID
+     *
+     * @mbg.generated
+     */
+    private String wpid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSIS.RULEID
+     *
+     * @mbg.generated
+     */
+    private String ruleid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSIS.TIMETYPE
+     *
+     * @mbg.generated
+     */
+    private String timetype;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSIS.JUDEGDATE
+     *
+     * @mbg.generated
+     */
+    private Date judegdate;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table STOPANALYSIS
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSIS.ID
+     *
+     * @return the value of STOPANALYSIS.ID
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSIS.ID
+     *
+     * @param id the value for STOPANALYSIS.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 STOPANALYSIS.WPID
+     *
+     * @return the value of STOPANALYSIS.WPID
+     *
+     * @mbg.generated
+     */
+    public String getWpid() {
+        return wpid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSIS.WPID
+     *
+     * @param wpid the value for STOPANALYSIS.WPID
+     *
+     * @mbg.generated
+     */
+    public void setWpid(String wpid) {
+        this.wpid = wpid == null ? null : wpid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSIS.RULEID
+     *
+     * @return the value of STOPANALYSIS.RULEID
+     *
+     * @mbg.generated
+     */
+    public String getRuleid() {
+        return ruleid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSIS.RULEID
+     *
+     * @param ruleid the value for STOPANALYSIS.RULEID
+     *
+     * @mbg.generated
+     */
+    public void setRuleid(String ruleid) {
+        this.ruleid = ruleid == null ? null : ruleid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSIS.TIMETYPE
+     *
+     * @return the value of STOPANALYSIS.TIMETYPE
+     *
+     * @mbg.generated
+     */
+    public String getTimetype() {
+        return timetype;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSIS.TIMETYPE
+     *
+     * @param timetype the value for STOPANALYSIS.TIMETYPE
+     *
+     * @mbg.generated
+     */
+    public void setTimetype(String timetype) {
+        this.timetype = timetype == null ? null : timetype.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSIS.JUDEGDATE
+     *
+     * @return the value of STOPANALYSIS.JUDEGDATE
+     *
+     * @mbg.generated
+     */
+    public Date getJudegdate() {
+        return judegdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSIS.JUDEGDATE
+     *
+     * @param judegdate the value for STOPANALYSIS.JUDEGDATE
+     *
+     * @mbg.generated
+     */
+    public void setJudegdate(Date judegdate) {
+        this.judegdate = judegdate;
+    }
+}

+ 244 - 0
web/health/src/main/java/com/gyee/health/model/vo/StopAnalysisDetailVo.java

@@ -0,0 +1,244 @@
+package com.gyee.health.model.vo;
+
+import java.io.Serializable;
+
+public class StopAnalysisDetailVo implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISDETAILVO.ID
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISDETAILVO.PID
+     *
+     * @mbg.generated
+     */
+    private String pid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISDETAILVO.NAME
+     *
+     * @mbg.generated
+     */
+    private String name;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISDETAILVO.JUDEGVULUE
+     *
+     * @mbg.generated
+     */
+    private String judegvulue;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISDETAILVO.URL
+     *
+     * @mbg.generated
+     */
+    private String url;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISDETAILVO.ISPARENT
+     *
+     * @mbg.generated
+     */
+    private Long isparent;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISDETAILVO.WTID
+     *
+     * @mbg.generated
+     */
+    private String wtid;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table STOPANALYSISDETAILVO
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSISDETAILVO.ID
+     *
+     * @return the value of STOPANALYSISDETAILVO.ID
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISDETAILVO.ID
+     *
+     * @param id the value for STOPANALYSISDETAILVO.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 STOPANALYSISDETAILVO.PID
+     *
+     * @return the value of STOPANALYSISDETAILVO.PID
+     *
+     * @mbg.generated
+     */
+    public String getPid() {
+        return pid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISDETAILVO.PID
+     *
+     * @param pid the value for STOPANALYSISDETAILVO.PID
+     *
+     * @mbg.generated
+     */
+    public void setPid(String pid) {
+        this.pid = pid == null ? null : pid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSISDETAILVO.NAME
+     *
+     * @return the value of STOPANALYSISDETAILVO.NAME
+     *
+     * @mbg.generated
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISDETAILVO.NAME
+     *
+     * @param name the value for STOPANALYSISDETAILVO.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 STOPANALYSISDETAILVO.JUDEGVULUE
+     *
+     * @return the value of STOPANALYSISDETAILVO.JUDEGVULUE
+     *
+     * @mbg.generated
+     */
+    public String getJudegvulue() {
+        return judegvulue;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISDETAILVO.JUDEGVULUE
+     *
+     * @param judegvulue the value for STOPANALYSISDETAILVO.JUDEGVULUE
+     *
+     * @mbg.generated
+     */
+    public void setJudegvulue(String judegvulue) {
+        this.judegvulue = judegvulue == null ? null : judegvulue.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSISDETAILVO.URL
+     *
+     * @return the value of STOPANALYSISDETAILVO.URL
+     *
+     * @mbg.generated
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISDETAILVO.URL
+     *
+     * @param url the value for STOPANALYSISDETAILVO.URL
+     *
+     * @mbg.generated
+     */
+    public void setUrl(String url) {
+        this.url = url == null ? null : url.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSISDETAILVO.ISPARENT
+     *
+     * @return the value of STOPANALYSISDETAILVO.ISPARENT
+     *
+     * @mbg.generated
+     */
+    public Long getIsparent() {
+        return isparent;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISDETAILVO.ISPARENT
+     *
+     * @param isparent the value for STOPANALYSISDETAILVO.ISPARENT
+     *
+     * @mbg.generated
+     */
+    public void setIsparent(Long isparent) {
+        this.isparent = isparent;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSISDETAILVO.WTID
+     *
+     * @return the value of STOPANALYSISDETAILVO.WTID
+     *
+     * @mbg.generated
+     */
+    public String getWtid() {
+        return wtid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISDETAILVO.WTID
+     *
+     * @param wtid the value for STOPANALYSISDETAILVO.WTID
+     *
+     * @mbg.generated
+     */
+    public void setWtid(String wtid) {
+        this.wtid = wtid == null ? null : wtid.trim();
+    }
+}

+ 77 - 0
web/health/src/main/java/com/gyee/health/model/vo/StopAnalysisNodeVo.java

@@ -0,0 +1,77 @@
+package com.gyee.health.model.vo;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class StopAnalysisNodeVo implements Serializable {
+	private static final long serialVersionUID = 1L;
+	private String id;
+	private String pid;
+	private String name;
+	private String judegVulue;
+	private String url;
+	private Boolean isParent;
+	private List<StopAnalysisNodeVo> children;
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	public void setParent(Boolean parent) {
+		isParent = parent;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getPid() {
+		return pid;
+	}
+
+	public void setPid(String pid) {
+		this.pid = pid;
+	}
+
+
+	public Boolean getParent() {
+		return isParent;
+	}
+
+	public void setIsParent(Boolean parent) {
+		isParent = parent;
+	}
+
+	public List<StopAnalysisNodeVo> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<StopAnalysisNodeVo> children) {
+		this.children = children;
+	}
+
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getJudegVulue() {
+		return judegVulue;
+	}
+
+	public void setJudegVulue(String judegVulue) {
+		this.judegVulue = judegVulue;
+	}
+}

+ 145 - 0
web/health/src/main/java/com/gyee/health/model/vo/StopAnalysismainVo.java

@@ -0,0 +1,145 @@
+package com.gyee.health.model.vo;
+
+import java.io.Serializable;
+
+public class StopAnalysismainVo implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISMAINVO.ID
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISMAINVO.WTID
+     *
+     * @mbg.generated
+     */
+    private String wtid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISMAINVO.MODELID
+     *
+     * @mbg.generated
+     */
+    private String modelid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column STOPANALYSISMAINVO.JUDEGVULUE
+     *
+     * @mbg.generated
+     */
+    private String judegvulue;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table STOPANALYSISMAINVO
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSISMAINVO.ID
+     *
+     * @return the value of STOPANALYSISMAINVO.ID
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISMAINVO.ID
+     *
+     * @param id the value for STOPANALYSISMAINVO.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 STOPANALYSISMAINVO.WTID
+     *
+     * @return the value of STOPANALYSISMAINVO.WTID
+     *
+     * @mbg.generated
+     */
+    public String getWtid() {
+        return wtid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISMAINVO.WTID
+     *
+     * @param wtid the value for STOPANALYSISMAINVO.WTID
+     *
+     * @mbg.generated
+     */
+    public void setWtid(String wtid) {
+        this.wtid = wtid == null ? null : wtid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSISMAINVO.MODELID
+     *
+     * @return the value of STOPANALYSISMAINVO.MODELID
+     *
+     * @mbg.generated
+     */
+    public String getModelId() {
+        return modelid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISMAINVO.MODELID
+     *
+     * @param modelid the value for STOPANALYSISMAINVO.MODELID
+     *
+     * @mbg.generated
+     */
+    public void setModelid(String modelid) {
+        this.modelid = modelid == null ? null : modelid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column STOPANALYSISMAINVO.JUDEGVULUE
+     *
+     * @return the value of STOPANALYSISMAINVO.JUDEGVULUE
+     *
+     * @mbg.generated
+     */
+    public String getJudegvulue() {
+        return judegvulue;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column STOPANALYSISMAINVO.JUDEGVULUE
+     *
+     * @param judegvulue the value for STOPANALYSISMAINVO.JUDEGVULUE
+     *
+     * @mbg.generated
+     */
+    public void setJudegvulue(String judegvulue) {
+        this.judegvulue = judegvulue == null ? null : judegvulue.trim();
+    }
+}

+ 26 - 0
web/health/src/main/java/com/gyee/health/model/vo/StopTypeTreeVo.java

@@ -0,0 +1,26 @@
+package com.gyee.health.model.vo;
+
+public class StopTypeTreeVo {
+	private String id;
+	private String pId;
+	private String name;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getpId() {
+		return pId;
+	}
+	public void setpId(String pId) {
+		this.pId = pId;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+
+}

+ 5 - 0
web/health/src/main/java/com/gyee/health/service/auto/IProEconCurveFittMonthMainService.java

@@ -2,6 +2,9 @@ package com.gyee.health.service.auto;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.health.model.auto.ProEconCurveFittMonthMain;
+import com.gyee.health.model.custom.Tablepar;
+
+import java.util.List;
 
 /**
  * <p>
@@ -14,4 +17,6 @@ import com.gyee.health.model.auto.ProEconCurveFittMonthMain;
 public interface IProEconCurveFittMonthMainService extends IService<ProEconCurveFittMonthMain> {
 
     public int deleteProEconCurveFittMonthMainByMonth(String year, String month);
+
+    public List<ProEconCurveFittMonthMain> getCurvefittingmonthmainList(Tablepar tablepar, List<String> wtIds, String year, String month);
 }

+ 4 - 0
web/health/src/main/java/com/gyee/health/service/auto/IProEconCurveFittingMainService.java

@@ -2,8 +2,10 @@ package com.gyee.health.service.auto;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.health.model.auto.ProEconCurveFittingMain;
+import com.gyee.health.model.custom.Tablepar;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -16,4 +18,6 @@ import java.util.Date;
 public interface IProEconCurveFittingMainService extends IService<ProEconCurveFittingMain> {
 
     public int deleteProEconCurveFittingMainByDay(Date recodedate);
+
+    public List<ProEconCurveFittingMain> getProEconCurveFittingMainList(Tablepar tablepar, List<String> wtIds, Date recorddate);
 }

+ 4 - 0
web/health/src/main/java/com/gyee/health/service/auto/IProEconEarlyWarningMainService.java

@@ -5,6 +5,7 @@ import com.gyee.health.model.auto.ProEconEarlyWarningMain;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -18,4 +19,7 @@ public interface IProEconEarlyWarningMainService extends IService<ProEconEarlyWa
 
 
     public List<ProEconEarlyWarningMain> getEarlywarningmainListBywtId(String wtId, Date recorddate) ;
+
+
+    public Map<String,Object> getEarlyWarningMainListByWpId(String wpId, Date recorddate) ;
 }

+ 4 - 0
web/health/src/main/java/com/gyee/health/service/auto/IProEconFailureStatisticMainService.java

@@ -5,6 +5,7 @@ import com.gyee.health.model.auto.ProEconFailureStatisticMain;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -18,4 +19,7 @@ public interface IProEconFailureStatisticMainService extends IService<ProEconFai
 
 
     public List<ProEconFailureStatisticMain> getFailurestatisticsmainListBywtId(String wtId, Date recorddate);
+
+
+    public Map<String, Object> getFailurestatisticsmainListByWpId(String wpId, Date recorddate);
 }

+ 3 - 0
web/health/src/main/java/com/gyee/health/service/auto/IProEconPartTemperatureSubService.java

@@ -6,6 +6,7 @@ import com.gyee.health.model.custom.YxfxVo;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -21,4 +22,6 @@ public interface IProEconPartTemperatureSubService extends IService<ProEconPartT
 
 
     public List<YxfxVo> getListValue(List<ProEconPartTemperatureSub> ls) ;
+
+    public Map<String,Object> getParttemperaturesubListByWpId(String wpId, Date recorddate, String partId) throws Exception;
 }

+ 6 - 1
web/health/src/main/java/com/gyee/health/service/auto/IProEconPartpowerStatticsSubService.java

@@ -1,7 +1,10 @@
 package com.gyee.health.service.auto;
 
-import com.gyee.health.model.auto.ProEconPartPowerStatticsSub;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.health.model.auto.ProEconPartPowerStatticsSub;
+
+import java.util.Date;
+import java.util.Map;
 
 /**
  * <p>
@@ -13,4 +16,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProEconPartpowerStatticsSubService extends IService<ProEconPartPowerStatticsSub> {
 
+    public Map<String,Object> getProEconPartPowerStatticsSubListByWpId(String wpId, Date recorddate, String partId) throws Exception ;
+
 }

+ 9 - 1
web/health/src/main/java/com/gyee/health/service/auto/IProEconWtCurveFittingMonthService.java

@@ -1,7 +1,9 @@
 package com.gyee.health.service.auto;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.health.model.auto.ProEconWtCurveFittingMonth;
+import com.gyee.health.model.custom.Tablepar;
 
 import java.util.List;
 
@@ -18,5 +20,11 @@ public interface IProEconWtCurveFittingMonthService extends IService<ProEconWtCu
     public int deleteProEconWtCurveFittingByMonth(String year, String month);
 
 
-    List<ProEconWtCurveFittingMonth> getProEconWtCurveFittingMonthList(String windturbineId, String month,String year);
+    List<ProEconWtCurveFittingMonth> getProEconWtCurveFittingMonthList(String windturbineId,String year, String month);
+
+    public List<ProEconWtCurveFittingMonth> getWindturbinecurvefittingmonthList(String windturbineid,String year,String month);
+
+    public IPage<ProEconWtCurveFittingMonth> getWindturbinecurvefittingmonthList(Tablepar tablepar, String windturbineid, String year, String month);
+
+
 }

+ 12 - 0
web/health/src/main/java/com/gyee/health/service/auto/IProEconWtCurveFittingService.java

@@ -1,7 +1,9 @@
 package com.gyee.health.service.auto;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.health.model.auto.ProEconWtCurveFitting;
+import com.gyee.health.model.custom.Tablepar;
 
 import java.util.Date;
 import java.util.List;
@@ -20,4 +22,14 @@ public interface IProEconWtCurveFittingService extends IService<ProEconWtCurveFi
 
 
     List<ProEconWtCurveFitting> getProEconWtCurveFittingList(String windturbineId,Date recordDate);
+
+    public List<ProEconWtCurveFitting> comparechatAjax(String windturbineid, Date date);
+
+    public IPage<ProEconWtCurveFitting> getWindturbinecurvefitting(Tablepar tablepar, String wtId) ;
+
+
+    public List<ProEconWtCurveFitting> getWindturbinepowercurvefittingByWtId(String windturbineid);
+
+
+    public IPage<ProEconWtCurveFitting> comparechatAjax(Tablepar tablepar, String wtId, Date date);
 }

+ 9 - 0
web/health/src/main/java/com/gyee/health/service/auto/IProEconWtPowerCurveFittingService.java

@@ -1,8 +1,11 @@
 package com.gyee.health.service.auto;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.health.model.auto.ProEconWtPowerCurveFitting;
+import com.gyee.health.model.custom.Tablepar;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -19,4 +22,10 @@ public interface IProEconWtPowerCurveFittingService extends IService<ProEconWtPo
     public int deleteProEconWtPowerCurveFitting();
 
     Map<String, List<ProEconWtPowerCurveFitting>>   getgroupProEconWtPowerCurveFittingList(String windturbineIds);
+
+    public List<ProEconWtPowerCurveFitting> getWindturbinepowercurvefittingByWtId(String windturbineid)  ;
+
+    public IPage<ProEconWtPowerCurveFitting> comparechatAjax(Tablepar tablepar, String wtId, Date date);
+
+    public IPage<ProEconWtPowerCurveFitting>  getWindturbinecurvefitting(Tablepar tablepar, String wtId) ;
 }

+ 36 - 0
web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconCurveFittMonthMainServiceImpl.java

@@ -1,12 +1,19 @@
 package com.gyee.health.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.health.mapper.auto.ProEconCurveFittMonthMainMapper;
 import com.gyee.health.model.auto.ProEconCurveFittMonthMain;
+import com.gyee.health.model.custom.Tablepar;
 import com.gyee.health.service.auto.IProEconCurveFittMonthMainService;
+import com.gyee.health.util.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * <p>
@@ -26,4 +33,33 @@ public class ProEconCurveFittMonthMainServiceImpl extends ServiceImpl<ProEconCur
 
         return proEconCurveFittMonthMainMapper.deleteProEconCurveFittMonthSubByMonth(year,month);
     }
+    @Override
+    public List<ProEconCurveFittMonthMain> getCurvefittingmonthmainList(Tablepar tablepar, List<String> wtIds, String year, String month)  {
+
+        List<ProEconCurveFittMonthMain> vos =new ArrayList<>();
+
+        if(StringUtils.notEmp(wtIds) && StringUtils.notEmp(year) && StringUtils.notEmp(month))
+        {
+
+
+            QueryWrapper<ProEconCurveFittMonthMain> qw = new QueryWrapper<>();
+            qw.orderByDesc("deviation_rate2");
+            qw.in("windturbine_id",wtIds);
+
+            qw.ge("year",year);
+            qw.le("month",month);
+
+            Page<ProEconCurveFittMonthMain> page = new Page<>(tablepar.getPageNum(), tablepar.getPageSize());
+            IPage<ProEconCurveFittMonthMain> list = proEconCurveFittMonthMainMapper.selectPage(page, qw);
+
+            if(null !=list)
+            {
+                vos = list.getRecords();
+            }
+        }
+
+
+        return vos;
+
+    }
 }

+ 33 - 0
web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconCurveFittingMainServiceImpl.java

@@ -1,13 +1,20 @@
 package com.gyee.health.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.health.mapper.auto.ProEconCurveFittingMainMapper;
 import com.gyee.health.model.auto.ProEconCurveFittingMain;
+import com.gyee.health.model.custom.Tablepar;
 import com.gyee.health.service.auto.IProEconCurveFittingMainService;
+import com.gyee.health.util.DateUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -28,4 +35,30 @@ public class ProEconCurveFittingMainServiceImpl extends ServiceImpl<ProEconCurve
     public int deleteProEconCurveFittingMainByDay(Date recodedate) {
         return  proEconCurveFittingMainMapper.deleteProEconCurveFittingMainByDay(recodedate);
     }
+
+    public List<ProEconCurveFittingMain> getProEconCurveFittingMainList(Tablepar tablepar, List<String> wtIds, Date recorddate)  {
+
+        List<ProEconCurveFittingMain> vos =new ArrayList<>();
+
+
+        QueryWrapper<ProEconCurveFittingMain> qw = new QueryWrapper<>();
+        qw.orderByDesc("deviation_rate2");
+        qw.in("windturbine_id",wtIds);
+
+        Date endDate= DateUtils.addDays(recorddate,1);
+        qw.ge("record_date",recorddate);
+        qw.le("record_date",endDate);
+
+        Page<ProEconCurveFittingMain> page = new Page<>(tablepar.getPageNum(), tablepar.getPageSize());
+        IPage<ProEconCurveFittingMain> list = proEconCurveFittingMainMapper.selectPage(page, qw);
+
+
+        if(null !=list)
+        {
+            vos = list.getRecords();
+        }
+
+        return vos;
+
+    }
 }

+ 144 - 3
web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconEarlyWarningMainServiceImpl.java

@@ -2,7 +2,9 @@ package com.gyee.health.service.auto.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.health.init.CacheContext;
 import com.gyee.health.mapper.auto.ProEconEarlyWarningMainMapper;
+import com.gyee.health.model.auto.ProBasicEquipment;
 import com.gyee.health.model.auto.ProEconEarlyWarningMain;
 import com.gyee.health.service.auto.IProEconEarlyWarningMainService;
 import com.gyee.health.util.DateUtils;
@@ -10,9 +12,7 @@ import com.gyee.health.util.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * <p>
@@ -44,4 +44,145 @@ public class ProEconEarlyWarningMainServiceImpl extends ServiceImpl<ProEconEarly
         return list;
 
     }
+
+
+    public Map<String,Object> getEarlyWarningMainListByWpId(String wpId, Date recorddate) {
+
+        Map<String,Object> resultMap=new HashMap<>();
+        List<Object> rList = new ArrayList<>();
+
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate) ) {
+
+            Date endDate = DateUtils.addDays(recorddate, 1);
+            QueryWrapper<ProEconEarlyWarningMain> qw = new QueryWrapper<>();
+            qw.eq("wp_id", wpId);
+            qw.ge("record_date", recorddate).lt("record_date", endDate);
+
+            qw.orderByDesc("record_date");
+            List<ProEconEarlyWarningMain> list = proEconEarlyWarningMainMapper.selectList(qw);
+
+            List<String> title1 = new ArrayList<>();
+            List<String> title2 = new ArrayList<>();
+            if (!list.isEmpty()) {
+              //  title1.add("风机编号");
+                title1.add("风机编码");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近1个月");
+                title1.add("近1个月");
+                title1.add("近1个月");
+                title1.add("近1个月");
+                title1.add("近1个月");
+                title1.add("近1个月");
+
+             //   title2.add("风机编号");
+                title2.add("风机编码");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+
+                for (ProEconEarlyWarningMain sub : list) {
+                    List<Object> ls = new ArrayList<>();
+
+                 //   ls.add(sub.getWtId());
+                    if (CacheContext.wtmap.containsKey(sub.getWtId())) {
+                        ProBasicEquipment wt = CacheContext.wtmap.get(sub.getWtId());
+                        ls.add(wt.getNemCode());
+                    }
+
+                    ls.add(sub.getDay1top1name1());
+                    ls.add(sub.getDay1top1());
+                    ls.add(sub.getDay1top2name2());
+                    ls.add(sub.getDay1top2());
+                    ls.add(sub.getDay1top3name3());
+                    ls.add(sub.getDay1top3());
+
+                    ls.add(sub.getDay3top1name());
+                    ls.add(sub.getDay3top1());
+                    ls.add(sub.getDay3top2name());
+                    ls.add(sub.getDay3top2());
+                    ls.add(sub.getDay3top3name());
+                    ls.add(sub.getDay3top3());
+
+                    ls.add(sub.getDay7top1name());
+                    ls.add(sub.getDay7top1());
+                    ls.add(sub.getDay7top2name());
+                    ls.add(sub.getDay7top2());
+                    ls.add(sub.getDay7top3name());
+                    ls.add(sub.getDay7top3());
+
+                    ls.add(sub.getDay15top1name());
+                    ls.add(sub.getDay15top1());
+                    ls.add(sub.getDay15top2name());
+                    ls.add(sub.getDay15top2());
+                    ls.add(sub.getDay15top3name());
+                    ls.add(sub.getDay15top3());
+
+                    ls.add(sub.getMonth1top1name());
+                    ls.add(sub.getMonth1top1());
+                    ls.add(sub.getMonth1top2name());
+                    ls.add(sub.getMonth1top2());
+                    ls.add(sub.getMonth1top3name());
+                    ls.add(sub.getMonth1top3());
+
+                    rList.add(ls);
+                }
+            }
+            resultMap.put("title1", title1);
+            resultMap.put("title2", title2);
+            resultMap.put("list", rList);
+
+
+        }
+        return resultMap;
+    }
 }

+ 141 - 3
web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconFailureStatisticMainServiceImpl.java

@@ -2,7 +2,9 @@ package com.gyee.health.service.auto.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.health.init.CacheContext;
 import com.gyee.health.mapper.auto.ProEconFailureStatisticMainMapper;
+import com.gyee.health.model.auto.ProBasicEquipment;
 import com.gyee.health.model.auto.ProEconFailureStatisticMain;
 import com.gyee.health.service.auto.IProEconFailureStatisticMainService;
 import com.gyee.health.util.DateUtils;
@@ -10,9 +12,7 @@ import com.gyee.health.util.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * <p>
@@ -47,5 +47,143 @@ public class ProEconFailureStatisticMainServiceImpl extends ServiceImpl<ProEconF
 
     }
 
+    public Map<String,Object> getFailurestatisticsmainListByWpId(String wpId, Date recorddate) {
 
+        Map<String,Object> resultMap=new HashMap<>();
+        List<Object> rList = new ArrayList<>();
+
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate) ) {
+
+            Date endDate = DateUtils.addDays(recorddate, 1);
+            QueryWrapper<ProEconFailureStatisticMain> qw = new QueryWrapper<>();
+            qw.eq("wp_id", wpId);
+            qw.ge("record_date", recorddate).lt("record_date", endDate);
+
+            qw.orderByDesc("record_date");
+            List<ProEconFailureStatisticMain> list = proEconFailureStatisticMainMapper.selectList(qw);
+
+            List<String> title1 = new ArrayList<>();
+            List<String> title2 = new ArrayList<>();
+            if (!list.isEmpty()) {
+              //  title1.add("风机编号");
+                title1.add("风机编码");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近1天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近3天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近7天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近15天");
+                title1.add("近1个月");
+                title1.add("近1个月");
+                title1.add("近1个月");
+                title1.add("近1个月");
+                title1.add("近1个月");
+                title1.add("近1个月");
+
+              //  title2.add("风机编号");
+                title2.add("风机编码");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+                title2.add("TOP1");
+                title2.add("数量");
+                title2.add("TOP2");
+                title2.add("数量");
+                title2.add("TOP3");
+                title2.add("数量");
+
+                for (ProEconFailureStatisticMain sub : list) {
+                    List<Object> ls = new ArrayList<>();
+
+                  //  ls.add(sub.getWtId());
+                    if (CacheContext.wtmap.containsKey(sub.getWtId())) {
+                        ProBasicEquipment wt = CacheContext.wtmap.get(sub.getWtId());
+                        ls.add(wt.getNemCode());
+                    }
+
+                    ls.add(sub.getDay1top1name());
+                    ls.add(sub.getDay1top1());
+                    ls.add(sub.getDay1top2name());
+                    ls.add(sub.getDay1top2());
+                    ls.add(sub.getDay1top3name());
+                    ls.add(sub.getDay1top3());
+
+                    ls.add(sub.getDay3top1name());
+                    ls.add(sub.getDay3top1());
+                    ls.add(sub.getDay3top2name());
+                    ls.add(sub.getDay3top2());
+                    ls.add(sub.getDay3top3name());
+                    ls.add(sub.getDay3top3());
+
+                    ls.add(sub.getDay7top1name());
+                    ls.add(sub.getDay7top1());
+                    ls.add(sub.getDay7top2name());
+                    ls.add(sub.getDay7top2());
+                    ls.add(sub.getDay7top3name());
+                    ls.add(sub.getDay7top3());
+
+                    ls.add(sub.getDay15top1name());
+                    ls.add(sub.getDay15top1());
+                    ls.add(sub.getDay15top2name());
+                    ls.add(sub.getDay15top2());
+                    ls.add(sub.getDay15top3name());
+                    ls.add(sub.getDay15top3());
+
+                    ls.add(sub.getMonth1top1name());
+                    ls.add(sub.getMonth1top1());
+                    ls.add(sub.getMonth1top2name());
+                    ls.add(sub.getMonth1top2());
+                    ls.add(sub.getMonth1top3name());
+                    ls.add(sub.getMonth1top3());
+
+                    rList.add(ls);
+                }
+            }
+            resultMap.put("title1", title1);
+            resultMap.put("title2", title2);
+            resultMap.put("list", rList);
+
+
+        }
+        return resultMap;
+    }
 }

+ 99 - 0
web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconPartTemperatureSubServiceImpl.java

@@ -2,7 +2,9 @@ package com.gyee.health.service.auto.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.health.init.CacheContext;
 import com.gyee.health.mapper.auto.ProEconPartTemperatureSubMapper;
+import com.gyee.health.model.auto.ProBasicEquipment;
 import com.gyee.health.model.auto.ProEconPartTemperatureSub;
 import com.gyee.health.model.custom.YxfxVo;
 import com.gyee.health.service.auto.IProEconPartTemperatureSubService;
@@ -148,4 +150,101 @@ public class ProEconPartTemperatureSubServiceImpl extends ServiceImpl<ProEconPar
             }
         }
     }
+
+
+    public Map<String,Object> getParttemperaturesubListByWpId(String wpId, Date recorddate,String partId) throws Exception {
+
+
+        Map<String,Object> resultMap=new HashMap<>();
+        List<Object> rList = new ArrayList<>();
+
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate) ) {
+
+            Date endDate= DateUtils.addDays(recorddate,1);
+            QueryWrapper<ProEconPartTemperatureSub> qw = new QueryWrapper<>();
+            qw.eq("wp_id",wpId);
+            qw.ge("record_date",recorddate).lt("record_date",endDate);
+            qw.eq("partname",partId);
+
+            qw.orderByAsc("wt_id");
+            qw.orderByAsc("trange");
+            qw.orderByAsc("pointname");
+
+            List<String> title1=new ArrayList<>();
+            List<String> title2=new ArrayList<>();
+            List<ProEconPartTemperatureSub>   list = proEconPartTemperatureSubMapper.selectList(qw);
+
+            if(!list.isEmpty())
+            {
+
+                Map<String,List<ProEconPartTemperatureSub>> map=new LinkedHashMap<>();
+                for( ProEconPartTemperatureSub sub:list)
+                {
+
+                    if(map.containsKey(sub.getWtId()))
+                    {
+                        List<ProEconPartTemperatureSub> ls=map.get(sub.getWtId());
+                        ls.add(sub);
+                    }else
+                    {
+                        List<ProEconPartTemperatureSub> ls=new ArrayList<>();
+                        ls.add(sub);
+                        map.put(sub.getWtId(),ls);
+                    }
+
+                }
+
+                int num=0;
+               // title1.add("风机编号");
+                title1.add("风机编码");
+                //title2.add("风机编号");
+                title2.add("风机编码");
+                for(Map.Entry<String,List<ProEconPartTemperatureSub>> entry : map.entrySet()){
+
+                   List<Object> tempmap=new ArrayList<>();
+
+                  //  tempmap.add(entry.getKey());
+                    if(CacheContext.wtmap.containsKey(entry.getKey()))
+                    {
+                        ProBasicEquipment wt= CacheContext.wtmap.get(entry.getKey());
+
+                        tempmap.add(wt.getNemCode());
+                    }
+
+
+                    for(int i=0;i<entry.getValue().size();i++)
+                    {
+
+                        ProEconPartTemperatureSub sub=entry.getValue().get(i);
+
+                        if(num==0)
+                        {
+                            title1.add(sub.getTrange());
+                            title2.add(sub.getPointname());
+                        }
+
+                        tempmap.add(sub.getTsnumber());
+
+                    }
+                    num++;
+
+                    rList.add(tempmap);
+                }
+
+
+
+            }
+            resultMap.put("title1",title1);
+            resultMap.put("title2",title2);
+            resultMap.put("list",rList);
+        }
+
+
+
+        return resultMap;
+
+    }
+
+
+
 }

+ 93 - 2
web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconPartpowerStatticsSubServiceImpl.java

@@ -1,11 +1,19 @@
 package com.gyee.health.service.auto.impl;
 
-import com.gyee.health.model.auto.ProEconPartPowerStatticsSub;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.health.init.CacheContext;
 import com.gyee.health.mapper.auto.ProEconPartpowerStatticsSubMapper;
+import com.gyee.health.model.auto.ProBasicEquipment;
+import com.gyee.health.model.auto.ProEconPartPowerStatticsSub;
+import com.gyee.health.model.vo.PartpowerStatticsSubVo;
 import com.gyee.health.service.auto.IProEconPartpowerStatticsSubService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.health.util.DateUtils;
+import com.gyee.health.util.StringUtils;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.*;
+
 /**
  * <p>
  * 部件功率健康统计子表 服务实现类
@@ -17,4 +25,87 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProEconPartpowerStatticsSubServiceImpl extends ServiceImpl<ProEconPartpowerStatticsSubMapper, ProEconPartPowerStatticsSub> implements IProEconPartpowerStatticsSubService {
 
+    @Resource
+    private ProEconPartpowerStatticsSubMapper proEconPartpowerStatticsSubMapper;
+    public Map<String,Object> getProEconPartPowerStatticsSubListByWpId(String wpId, Date recorddate, String partId) throws Exception {
+
+
+        Map<String,Object> resultMap=new HashMap<>();
+        List<Object> rList = new ArrayList<>();
+
+        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate) ) {
+
+            List<PartpowerStatticsSubVo>   list = proEconPartpowerStatticsSubMapper.getProEconPartStatisticsSubList(wpId, DateUtils.truncate(recorddate), partId);
+            List<String> title1=new ArrayList<>();
+            List<String> title2=new ArrayList<>();
+            if(!list.isEmpty())
+            {
+
+                Map<String,List<PartpowerStatticsSubVo>> map=new LinkedHashMap<>();
+                for( PartpowerStatticsSubVo sub:list)
+                {
+
+                    if(map.containsKey(sub.getWtId()))
+                    {
+                        List<PartpowerStatticsSubVo> ls=map.get(sub.getWtId());
+                        ls.add(sub);
+                    }else
+                    {
+                        List<PartpowerStatticsSubVo> ls=new ArrayList<>();
+                        ls.add(sub);
+                        map.put(sub.getWtId(),ls);
+                    }
+
+                }
+
+                int num=0;
+                //title1.add("风机编号");
+                title1.add("风机编码");
+               // title2.add("风机编号");
+                title2.add("风机编码");
+                for(Map.Entry<String,List<PartpowerStatticsSubVo>> entry : map.entrySet()){
+
+                    List<Object> tempmap=new ArrayList<>();
+
+                    //tempmap.add(entry.getKey());
+                    if(CacheContext.wtmap.containsKey(entry.getKey()))
+                    {
+                        ProBasicEquipment wt= CacheContext.wtmap.get(entry.getKey());
+
+                        tempmap.add(wt.getNemCode());
+                    }
+
+
+                    for(int i=0;i<entry.getValue().size();i++)
+                    {
+
+                        PartpowerStatticsSubVo sub=entry.getValue().get(i);
+
+                        if(num==0)
+                        {
+                            title1.add(sub.getPower());
+                            title2.add(sub.getName());
+                        }
+
+                        tempmap.add(sub.getValue());
+
+                    }
+                    num++;
+
+                    rList.add(tempmap);
+                }
+
+
+
+            }
+            resultMap.put("title1",title1);
+            resultMap.put("title2",title2);
+            resultMap.put("list",rList);
+        }
+
+
+
+        return resultMap;
+
+    }
 }

+ 69 - 2
web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconWtCurveFittingMonthServiceImpl.java

@@ -1,14 +1,18 @@
 package com.gyee.health.service.auto.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.common.model.StringUtils;
 import com.gyee.health.mapper.auto.ProEconWtCurveFittingMonthMapper;
 import com.gyee.health.model.auto.ProEconWtCurveFittingMonth;
+import com.gyee.health.model.custom.Tablepar;
 import com.gyee.health.service.auto.IProEconWtCurveFittingMonthService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -30,7 +34,7 @@ public class ProEconWtCurveFittingMonthServiceImpl extends ServiceImpl<ProEconWt
     }
 
     @Override
-    public List<ProEconWtCurveFittingMonth> getProEconWtCurveFittingMonthList(String windturbineId, String month,String year) {
+    public List<ProEconWtCurveFittingMonth> getProEconWtCurveFittingMonthList(String windturbineId, String year,String month) {
 
         QueryWrapper<ProEconWtCurveFittingMonth> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(windturbineId)) {
@@ -45,8 +49,71 @@ public class ProEconWtCurveFittingMonthServiceImpl extends ServiceImpl<ProEconWt
             qw.lambda().eq(ProEconWtCurveFittingMonth::getYear, year);
         }
         qw.lambda().orderByAsc(ProEconWtCurveFittingMonth::getSpeed);
-        List<ProEconWtCurveFittingMonth> list = baseMapper.selectList(qw);
+        List<ProEconWtCurveFittingMonth> list = proEconWtCurveFittingMonthMapper.selectList(qw);
 
         return list;
     }
+    @Override
+    public List<ProEconWtCurveFittingMonth> getWindturbinecurvefittingmonthList(String windturbineid,String year,String month)  {
+
+
+        List<ProEconWtCurveFittingMonth> list =new ArrayList<>();
+
+        QueryWrapper<ProEconWtCurveFittingMonth> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(windturbineid)) {
+            qw.lambda().eq(ProEconWtCurveFittingMonth::getWindturbineId, windturbineid);
+        }
+
+        if (StringUtils.isNotEmpty(month)) {
+            qw.lambda().eq(ProEconWtCurveFittingMonth::getMonth, month);
+        }
+
+        if (StringUtils.isNotEmpty(year)) {
+            qw.lambda().eq(ProEconWtCurveFittingMonth::getYear, year);
+        }
+        qw.lambda().orderByAsc(ProEconWtCurveFittingMonth::getSpeed);
+       list = proEconWtCurveFittingMonthMapper.selectList(qw);
+
+
+        return list;
+
+    }
+    @Override
+    public IPage<ProEconWtCurveFittingMonth> getWindturbinecurvefittingmonthList(Tablepar tablepar, String windturbineid, String year, String month)  {
+
+
+        List<ProEconWtCurveFittingMonth> list =new ArrayList<>();
+
+        QueryWrapper<ProEconWtCurveFittingMonth> qw = new QueryWrapper<>();
+
+
+
+        if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
+        {
+
+            if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
+            {
+                qw.orderByAsc(tablepar.getOrderByColumn());
+            }else
+            {
+                qw.orderByDesc(tablepar.getOrderByColumn());
+            }
+
+        }else {
+
+            qw.orderByAsc("speed");
+        }
+
+        qw.eq("windturbine_id",windturbineid);
+        qw.eq("year",year);
+        qw.eq("month",month);
+        Page<ProEconWtCurveFittingMonth> page = new Page<>(tablepar.getPageNum(), tablepar.getPageSize());
+
+        IPage<ProEconWtCurveFittingMonth> pageInfo = proEconWtCurveFittingMonthMapper.selectPage(page, qw);
+
+
+
+        return pageInfo;
+
+    }
 }

+ 115 - 1
web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconWtCurveFittingServiceImpl.java

@@ -1,14 +1,19 @@
 package com.gyee.health.service.auto.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.common.model.StringUtils;
 import com.gyee.health.mapper.auto.ProEconWtCurveFittingMapper;
 import com.gyee.health.model.auto.ProEconWtCurveFitting;
+import com.gyee.health.model.custom.Tablepar;
 import com.gyee.health.service.auto.IProEconWtCurveFittingService;
+import com.gyee.health.util.DateUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -44,8 +49,117 @@ public class ProEconWtCurveFittingServiceImpl extends ServiceImpl<ProEconWtCurve
         }
 
         qw.lambda().orderByAsc(ProEconWtCurveFitting::getSpeed);
-        List<ProEconWtCurveFitting> list = baseMapper.selectList(qw);
+        List<ProEconWtCurveFitting> list = proEconWtCurveFittingMapper.selectList(qw);
 
         return list;
     }
+    @Override
+    public List<ProEconWtCurveFitting> comparechatAjax(String windturbineid, Date date)  {
+
+
+        List<ProEconWtCurveFitting> list =new ArrayList<>();
+
+
+        QueryWrapper<ProEconWtCurveFitting> qw = new QueryWrapper<>();
+        qw.orderByAsc("speed");
+
+        List<String> idls = new ArrayList<String>();
+
+        String[] strs = windturbineid.split(",");
+
+        for (int i = 0; i < strs.length; i++) {
+            idls.add(strs[i]);
+        }
+        qw.in("windturbine_id",idls);
+
+        Date endDate= DateUtils.addDays(date,1);
+        qw.ge("record_date",date);
+        qw.le("record_date",endDate);
+
+        list = proEconWtCurveFittingMapper.selectList(qw);
+        return list;
+
+    }
+
+    public IPage<ProEconWtCurveFitting>  getWindturbinecurvefitting(Tablepar tablepar, String wtId)  {
+
+
+        List<ProEconWtCurveFitting> vos =new ArrayList<>();
+
+        QueryWrapper<ProEconWtCurveFitting> qw = new QueryWrapper<>();
+     
+
+
+        if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
+        {
+
+            if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
+            {
+                qw.orderByAsc(tablepar.getOrderByColumn());
+            }else
+            {
+                qw.orderByDesc(tablepar.getOrderByColumn());
+            }
+          
+        }else {
+
+            qw.orderByAsc("speed");
+        }
+
+        Page<ProEconWtCurveFitting> page = new Page<>(tablepar.getPageNum(), tablepar.getPageSize());
+        IPage<ProEconWtCurveFitting> pageInfo = proEconWtCurveFittingMapper.selectPage(page, qw);
+
+        return pageInfo;
+
+    }
+
+    public List<ProEconWtCurveFitting> getWindturbinepowercurvefittingByWtId(String windturbineid)  {
+
+
+        List<ProEconWtCurveFitting> list =new ArrayList<>();
+
+        if(StringUtils.notEmp(windturbineid))
+        {
+            QueryWrapper<ProEconWtCurveFitting> qw = new QueryWrapper<>();
+            qw.orderByAsc("speed");
+
+            qw.eq("windturbine_id",windturbineid);
+            list = proEconWtCurveFittingMapper.selectList(qw);
+        }
+
+        return list;
+
+    }
+
+    public IPage<ProEconWtCurveFitting> comparechatAjax(Tablepar tablepar, String wtId, Date date)  {
+
+
+        List<ProEconWtCurveFitting> list =new ArrayList<>();
+
+        QueryWrapper<ProEconWtCurveFitting> qw = new QueryWrapper<>();
+
+
+
+        if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
+        {
+
+            if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
+            {
+                qw.orderByAsc(tablepar.getOrderByColumn());
+            }else
+            {
+                qw.orderByDesc(tablepar.getOrderByColumn());
+            }
+
+        }else {
+
+            qw.orderByAsc("speed");
+        }
+
+        Page<ProEconWtCurveFitting> page = new Page<>(tablepar.getPageNum(), tablepar.getPageSize());
+        IPage<ProEconWtCurveFitting> pageInfo = proEconWtCurveFittingMapper.selectPage(page, qw);
+
+        return pageInfo;
+
+    }
 }

+ 88 - 3
web/health/src/main/java/com/gyee/health/service/auto/impl/ProEconWtPowerCurveFittingServiceImpl.java

@@ -1,18 +1,19 @@
 package com.gyee.health.service.auto.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.common.model.StringUtils;
 import com.gyee.health.init.CacheContext;
 import com.gyee.health.mapper.auto.ProEconWtPowerCurveFittingMapper;
 import com.gyee.health.model.auto.ProEconWtPowerCurveFitting;
+import com.gyee.health.model.custom.Tablepar;
 import com.gyee.health.service.auto.IProEconWtPowerCurveFittingService;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -61,4 +62,88 @@ public class ProEconWtPowerCurveFittingServiceImpl extends ServiceImpl<ProEconWt
         Map<String, List<ProEconWtPowerCurveFitting>> map =  fittingList.stream().collect(Collectors.groupingBy(ProEconWtPowerCurveFitting::getNemCode));
         return map;
     }
+
+
+    public List<ProEconWtPowerCurveFitting> getWindturbinepowercurvefittingByWtId(String windturbineid)  {
+
+
+        List<ProEconWtPowerCurveFitting> list =new ArrayList<>();
+
+        if(StringUtils.notEmp(windturbineid))
+        {
+            QueryWrapper<ProEconWtPowerCurveFitting> qw = new QueryWrapper<>();
+            qw.orderByAsc("speed");
+
+            qw.eq("windturbine_id",windturbineid);
+            list = proEconWtPowerCurveFittingMapper.selectList(qw);
+        }
+
+        return list;
+
+    }
+
+    public IPage<ProEconWtPowerCurveFitting> comparechatAjax(Tablepar tablepar, String wtId, Date date)  {
+
+
+        List<ProEconWtPowerCurveFitting> list =new ArrayList<>();
+
+        QueryWrapper<ProEconWtPowerCurveFitting> qw = new QueryWrapper<>();
+
+
+
+        if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
+        {
+
+            if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
+            {
+                qw.orderByAsc(tablepar.getOrderByColumn());
+            }else
+            {
+                qw.orderByDesc(tablepar.getOrderByColumn());
+            }
+
+        }else {
+
+            qw.orderByAsc("speed");
+        }
+
+        Page<ProEconWtPowerCurveFitting> page = new Page<>(tablepar.getPageNum(), tablepar.getPageSize());
+        IPage<ProEconWtPowerCurveFitting> pageInfo = proEconWtPowerCurveFittingMapper.selectPage(page, qw);
+
+        return pageInfo;
+
+    }
+
+    public IPage<ProEconWtPowerCurveFitting>  getWindturbinecurvefitting(Tablepar tablepar, String wtId)  {
+
+
+        List<ProEconWtPowerCurveFitting> vos =new ArrayList<>();
+
+        QueryWrapper<ProEconWtPowerCurveFitting> qw = new QueryWrapper<>();
+
+
+
+        if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
+        {
+
+            if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
+            {
+                qw.orderByAsc(tablepar.getOrderByColumn());
+            }else
+            {
+                qw.orderByDesc(tablepar.getOrderByColumn());
+            }
+
+        }else {
+
+            qw.orderByAsc("speed");
+        }
+
+        Page<ProEconWtPowerCurveFitting> page = new Page<>(tablepar.getPageNum(), tablepar.getPageSize());
+        IPage<ProEconWtPowerCurveFitting> pageInfo = proEconWtPowerCurveFittingMapper.selectPage(page, qw);
+
+        return pageInfo;
+
+    }
+    
 }

+ 38 - 0
web/health/src/main/java/com/gyee/health/service/health/EarlyWarningMainService.java

@@ -0,0 +1,38 @@
+package com.gyee.health.service.health;
+
+
+import com.gyee.health.service.auto.IProEconEarlyWarningMainService;
+import com.gyee.health.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+@Service
+public class EarlyWarningMainService {
+
+
+    @Resource
+    private IProEconEarlyWarningMainService proEconEarlyWarningMainService;
+
+
+
+
+    public Map<String,Object> getEarlyWarningMainListByWpId(String wpId, Date recorddate) throws Exception {
+
+        Map<String,Object> vos=new HashMap<>();
+
+        if(StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate) )
+        {
+            vos=proEconEarlyWarningMainService.getEarlyWarningMainListByWpId(wpId,recorddate);
+        }
+
+        return vos;
+    }
+
+
+}
+
+

+ 35 - 0
web/health/src/main/java/com/gyee/health/service/health/FailureStatisticMainService.java

@@ -0,0 +1,35 @@
+package com.gyee.health.service.health;
+
+
+import com.gyee.health.service.auto.IProEconFailureStatisticMainService;
+import com.gyee.health.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+@Service
+public class FailureStatisticMainService {
+
+
+    @Resource
+    private IProEconFailureStatisticMainService proEconFailureStatisticMainService;
+
+    public Map<String,Object> getFailureStatisticMainListByWpId(String wpId, Date recorddate) throws Exception {
+
+        Map<String,Object> vos=new HashMap<>();
+
+        if(StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate) )
+        {
+            vos=proEconFailureStatisticMainService.getFailurestatisticsmainListByWpId(wpId,recorddate);
+        }
+
+        return vos;
+    }
+
+
+}
+
+

+ 36 - 0
web/health/src/main/java/com/gyee/health/service/health/PartTemperatureSubService.java

@@ -0,0 +1,36 @@
+package com.gyee.health.service.health;
+
+
+import com.gyee.health.service.auto.IProEconPartTemperatureSubService;
+import com.gyee.health.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+@Service
+public class PartTemperatureSubService {
+
+
+    @Resource
+    private IProEconPartTemperatureSubService proEconPartTemperatureSubService;
+
+
+
+
+    public Map<String,Object> getParttemperaturesubListByWpId(String wpId, Date recorddate, String partId) throws Exception {
+
+        Map<String,Object> vos=new HashMap<>();
+
+        if(StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate) && StringUtils.notEmp(partId))
+        {
+            vos=proEconPartTemperatureSubService.getParttemperaturesubListByWpId(wpId,recorddate,partId);
+        }
+
+        return vos;
+    }
+
+
+}
+
+

+ 36 - 0
web/health/src/main/java/com/gyee/health/service/health/PartpowerStatticsSubService.java

@@ -0,0 +1,36 @@
+package com.gyee.health.service.health;
+
+
+import com.gyee.health.service.auto.IProEconPartpowerStatticsSubService;
+import com.gyee.health.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+@Service
+public class PartpowerStatticsSubService {
+
+
+    @Resource
+    private IProEconPartpowerStatticsSubService proEconPartpowerStatticsSubService;
+
+
+    public Map<String,Object> getProEconPartPowerStatticsSubListByWpId(String wpId, Date recorddate, String partId) throws Exception {
+
+        Map<String,Object> vos=new HashMap<>();
+
+        if(StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate) && StringUtils.notEmp(partId))
+        {
+            vos=proEconPartpowerStatticsSubService.getProEconPartPowerStatticsSubListByWpId(wpId,recorddate,partId);
+        }
+
+        return vos;
+    }
+
+
+}
+
+

+ 674 - 0
web/health/src/main/java/com/gyee/health/service/leaderboard/LeaderboardService.java

@@ -0,0 +1,674 @@
+package com.gyee.health.service.leaderboard;
+
+import com.gyee.health.dto.DataVo;
+import com.gyee.health.init.CacheContext;
+import com.gyee.health.model.auto.*;
+import com.gyee.health.model.custom.Tablepar;
+import com.gyee.health.service.auto.IProEconCurveFittMonthMainService;
+import com.gyee.health.service.auto.IProEconCurveFittingMainService;
+import com.gyee.health.service.auto.IProEconWtCurveFittingMonthService;
+import com.gyee.health.service.auto.IProEconWtCurveFittingService;
+import com.gyee.health.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+@Service
+public class LeaderboardService {
+
+
+    @Resource
+    private IProEconWtCurveFittingMonthService proEconWtCurveFittingMonthService;
+    @Resource
+    private IProEconWtCurveFittingService proEconWtCurveFittingService;
+    @Resource
+    private IProEconCurveFittingMainService proEconCurveFittingMainService;
+    @Resource
+    private IProEconCurveFittMonthMainService proEconCurveFittMonthMainService;
+
+    private final String SJBZ = "sjbz";//实际保证
+    private final String SJZY = "sjzy";//实际最优
+    private final String ZYBZ = "zybz";//最优保证
+    private final String TB = "tb";//同比
+    private final String HB = "hb";//环比
+    private final String BG = "bg";//标杆
+
+    private String name1;
+    private String name2;
+
+ 
+    /*******************************************************************************************************************************************************/
+
+    public List<ProEconCurveFittingMain> proEconCurveFittingMainList(Tablepar tablepar, String wpId, Date recorddate)  {
+
+        List<ProEconCurveFittingMain> list =new ArrayList<>();
+        List<String> wtIds=new ArrayList<>();
+        if(StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate))
+        {
+            List<ProBasicEquipment> wtls=CacheContext.wpwtmap.get(wpId);
+            for(ProBasicEquipment wt:wtls)
+            {
+                wtIds.add(wt.getId());
+            }
+
+
+            list =proEconCurveFittingMainService.getProEconCurveFittingMainList(tablepar,wtIds,recorddate);
+        }
+
+        return list;
+
+    }
+
+    public  Map<String, Object>  getCurvechatAjax(String type,String wtId,  Date recorddate)  {
+        Map<String, Object> map = new HashMap<>();
+
+        if(StringUtils.notEmp(type) && StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+        {
+            List<DataVo> datavos = new ArrayList<>();
+            List<ProEconWtCurveFitting> wcls = proEconWtCurveFittingService.comparechatAjax(wtId, recorddate);
+            Map<String, ProBasicEquipment> wtmap = CacheContext.wtmap;
+            Map<String, Map<Double, ProBasicModelPowerRd>> modelpowerrdmap = CacheContext.modelpowerrdmap;
+            Map<Double, ProBasicModelPowerRd> modelmap = null;
+            if (wtmap.containsKey(wtId)) {
+                ProBasicEquipment wt = wtmap.get(wtId);
+                if (modelpowerrdmap.containsKey(wt.getModelId())) {
+                    modelmap = modelpowerrdmap.get(wt.getModelId());
+                }
+            }
+
+            if (!wcls.isEmpty()) {
+                Collections.sort(wcls, new Comparator<ProEconWtCurveFitting>() {
+                    public int compare(ProEconWtCurveFitting arg0, ProEconWtCurveFitting arg1) {
+                        return arg0.getSpeed().compareTo(arg1.getSpeed());
+
+                    }
+                });
+                for (ProEconWtCurveFitting wc : wcls) {
+
+                    DataVo vo = new DataVo();
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        vo.setValue1(wc.getSpeed());
+                        if (StringUtils.notEmp(type) && type.equals(SJBZ) && null != modelmap) {
+                            if (modelmap.containsKey(String.valueOf(wc.getSpeed()))) {
+                                ProBasicModelPowerRd mp = modelmap.get(String.valueOf(wc.getSpeed()));
+                                vo.setValue3(mp.getEnsurePower());
+                            } else {
+                                vo.setValue3(0.0);
+                            }
+                            vo.setValue2(wc.getActualPower());
+
+                        } else if (StringUtils.notEmp(type) && type.equals(SJZY)) {
+                            vo.setValue2(wc.getActualPower());
+                            vo.setValue3(wc.getOptimalPower());
+
+                        } else if (StringUtils.notEmp(type) && type.equals(ZYBZ) && null != modelmap) {
+                            if (modelmap.containsKey(String.valueOf(wc.getSpeed()))) {
+                                ProBasicModelPowerRd mp = modelmap.get(String.valueOf(wc.getSpeed()));
+                                vo.setValue3(mp.getEnsurePower());
+                            } else {
+                                vo.setValue3(0.0);
+                            }
+                            vo.setValue2(wc.getOptimalPower());
+
+                        }
+
+                        datavos.add(vo);
+
+                    }
+                }
+            }
+            curvechat(type);
+
+            map.put("datas", datavos);
+            map.put("name1", name1);
+            map.put("name2", name2);
+        }
+        return map;
+    }
+
+
+    public  Map<String, Object>  curvechatAjaxtb(String type,String wtId,  Date recorddate)  {
+        Map<String, Object> map = new HashMap<>();
+
+        if(StringUtils.notEmp(type) && StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+        {
+            List<DataVo> datavos = new ArrayList<DataVo>();
+            Map<Double, Double> speedmap = new HashMap<Double, Double>();
+            List<ProEconWtCurveFitting> thisdayls = proEconWtCurveFittingService.comparechatAjax(wtId,recorddate);
+
+            // 去年统计指标
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(recorddate);
+            cal.add(Calendar.YEAR, -1);
+
+            List<ProEconWtCurveFitting> lastyearls = proEconWtCurveFittingService.comparechatAjax(wtId,cal.getTime());
+
+            if (!lastyearls.isEmpty()) {
+
+                for (ProEconWtCurveFitting wc : lastyearls) {
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        speedmap.put(wc.getSpeed(), wc.getActualPower());
+                    }
+                }
+            }
+            if (!thisdayls.isEmpty()) {
+                Collections.sort(thisdayls, new Comparator<ProEconWtCurveFitting>() {
+                    public int compare(ProEconWtCurveFitting arg0, ProEconWtCurveFitting arg1) {
+                        return arg0.getSpeed().compareTo(arg1.getSpeed());
+                    }
+                });
+
+                for (ProEconWtCurveFitting wc : thisdayls) {
+
+                    DataVo vo = new DataVo();
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        vo.setValue1(wc.getSpeed());
+                        vo.setValue2(wc.getActualPower());
+
+                        if (speedmap.containsKey(wc.getSpeed())) {
+                            vo.setValue3(speedmap.get(wc.getSpeed()));
+                        } else {
+                            vo.setValue3(0.0);
+                        }
+                        datavos.add(vo);
+
+                    }
+                }
+            }
+
+            curvechat(type);
+
+            map.put("datas", datavos);
+            map.put("name1", name1);
+            map.put("name2", name2);
+        }
+        return map;
+    }
+
+    public  Map<String, Object>  curvechatAjaxhb(String type,String wtId,  Date recorddate)  {
+        Map<String, Object> map = new HashMap<>();
+
+        if(StringUtils.notEmp(type) && StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+        {
+            List<DataVo> datavos = new ArrayList<DataVo>();
+            Map<Double, Double> speedmap = new HashMap<Double, Double>();
+            List<ProEconWtCurveFitting> thisdayls = proEconWtCurveFittingService.comparechatAjax(wtId,recorddate);
+
+            // 上个月统计指标
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(recorddate);
+            cal.add(Calendar.DAY_OF_MONTH, -1);
+
+            List<ProEconWtCurveFitting> lastyearls = proEconWtCurveFittingService.comparechatAjax(wtId,cal.getTime());
+
+            if (!lastyearls.isEmpty()) {
+
+                for (ProEconWtCurveFitting wc : lastyearls) {
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        speedmap.put(wc.getSpeed(), wc.getActualPower());
+                    }
+                }
+            }
+            if (!thisdayls.isEmpty()) {
+                Collections.sort(thisdayls, new Comparator<ProEconWtCurveFitting>() {
+                    public int compare(ProEconWtCurveFitting arg0, ProEconWtCurveFitting arg1) {
+                        return arg0.getSpeed().compareTo(arg1.getSpeed());
+                    }
+                });
+
+                for (ProEconWtCurveFitting wc : thisdayls) {
+
+                    DataVo vo = new DataVo();
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        vo.setValue1(wc.getSpeed());
+                        vo.setValue2(wc.getActualPower());
+
+                        if (speedmap.containsKey(wc.getSpeed())) {
+                            vo.setValue3(speedmap.get(wc.getSpeed()));
+                        } else {
+                            vo.setValue3(0.0);
+                        }
+                        datavos.add(vo);
+
+                    }
+                }
+            }
+
+            curvechat(type);
+
+            map.put("datas", datavos);
+            map.put("name1", name1);
+            map.put("name2", name2);
+        }
+        return map;
+    }
+
+    public  Map<String, Object>  curvechatAjaxbg(String type,String wtId,  Date recorddate)  {
+        Map<String, Object> map = new HashMap<>();
+
+        if(StringUtils.notEmp(type) && StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+        {
+            List<DataVo> datavos = new ArrayList<DataVo>();
+            Map<Double, Double> speedmap = new HashMap<Double, Double>();
+            List<ProEconWtCurveFitting> thisdayls = proEconWtCurveFittingService.comparechatAjax(wtId,recorddate);
+
+            // 标杆风机指标
+            String stid = CacheContext.wtstandardmap.get(wtId);
+
+
+            if(StringUtils.notEmp(stid))
+            {
+                List<ProEconWtCurveFitting> stmonthls = proEconWtCurveFittingService.comparechatAjax(wtId,recorddate);
+
+                if (null != stmonthls && !stmonthls.isEmpty()) {
+
+                    if (!stmonthls.isEmpty()) {
+
+                        for (ProEconWtCurveFitting wc : stmonthls) {
+                            int c = (int) wc.getSpeed().intValue();
+                            if (c == wc.getSpeed()) {
+                                speedmap.put(wc.getSpeed(), wc.getActualPower());
+                            }
+                        }
+                    }
+                }
+
+                if (!thisdayls.isEmpty()) {
+                    Collections.sort(thisdayls, new Comparator<ProEconWtCurveFitting>() {
+                        public int compare(ProEconWtCurveFitting arg0, ProEconWtCurveFitting arg1) {
+                            return arg0.getSpeed().compareTo(arg1.getSpeed());
+
+                        }
+                    });
+                    for (ProEconWtCurveFitting wc : thisdayls) {
+
+                        DataVo vo = new DataVo();
+                        int c = (int) wc.getSpeed().intValue();
+                        if (c == wc.getSpeed()) {
+                            vo.setValue1(wc.getSpeed());
+                            vo.setValue2(wc.getActualPower());
+
+                            if (speedmap.containsKey(wc.getSpeed())) {
+                                vo.setValue3(speedmap.get(wc.getSpeed()));
+                            } else {
+                                vo.setValue3(0.0);
+                            }
+                            datavos.add(vo);
+
+                        }
+                    }
+                }
+
+                curvechat(type);
+
+                map.put("datas", datavos);
+                map.put("name1", name1);
+                map.put("name2", name2);
+            }
+
+        }
+        return map;
+    }
+
+    private void curvechat(String type) {
+        if (StringUtils.notEmp(type) && type.equals(SJBZ)) {
+
+            name1 = "实际功率";
+            name2 = "保证功率";
+
+        } else if (StringUtils.notEmp(type) && type.equals(SJZY)) {
+
+            name1 = "实际功率";
+            name2 = "最优功率";
+        } else if (StringUtils.notEmp(type) && type.equals(ZYBZ)) {
+
+            name1 = "最优功率";
+            name2 = "保证功率";
+        } else if (StringUtils.notEmp(type) && type.equals(TB)) {
+
+            name1 = "本日实际功率";
+            name2 = "去年同期实际功率";
+        } else if (StringUtils.notEmp(type) && type.equals(HB)) {
+
+            name1 = "本日实际功率";
+            name2 = "上日实际功率";
+        } else if (StringUtils.notEmp(type) && type.equals(BG)) {
+
+            name1 = "本日实际功率";
+            name2 = "标杆实际功率";
+        }
+
+    }
+
+
+    /*******************************************************************************************************************************************************/
+
+    public List<ProEconCurveFittMonthMain> curvefittingmonthmainList(Tablepar tablepar, String wpId, String year, String month)  {
+
+        List<ProEconCurveFittMonthMain> list =new ArrayList<>();
+        List<String> wtIds=new ArrayList<>();
+        if(StringUtils.notEmp(wpId) && StringUtils.notEmp(year) && StringUtils.notEmp(month))
+        {
+            List<ProBasicEquipment> wtls=CacheContext.wpwtmap.get(wpId);
+            for(ProBasicEquipment wt:wtls)
+            {
+                wtIds.add(wt.getId());
+            }
+            
+            list =proEconCurveFittMonthMainService.getCurvefittingmonthmainList(tablepar,wtIds,year,month);
+        }
+
+        return list;
+
+    }
+    public  Map<String, Object>  curveMonthchatAjax(String type,String wtId, String year,String month)  {
+        Map<String, Object> map = new HashMap<>();
+
+        if(StringUtils.notEmp(type) && StringUtils.notEmp(wtId) && StringUtils.notEmp(year) && StringUtils.notEmp(month))
+        {
+            List<DataVo> datavos = new ArrayList<DataVo>();
+            List<ProEconWtCurveFittingMonth> wcls = proEconWtCurveFittingMonthService.getProEconWtCurveFittingMonthList(wtId, year,month);
+            Map<String, ProBasicEquipment> wtmap = CacheContext.wtmap;
+            Map<String, Map<Double, ProBasicModelPowerRd>> modelpowerrdmap = CacheContext.modelpowerrdmap;
+
+            Map<Double, ProBasicModelPowerRd> modelmap = null;
+            if (wtmap.containsKey(wtId)) {
+                ProBasicEquipment wt = wtmap.get(wtId);
+                if (modelpowerrdmap.containsKey(wt.getModelId())) {
+                    modelmap = modelpowerrdmap.get(wt.getModelId());
+                }
+            }
+
+            if (!wcls.isEmpty()) {
+                Collections.sort(wcls, new Comparator<ProEconWtCurveFittingMonth>() {
+                    public int compare(ProEconWtCurveFittingMonth arg0, ProEconWtCurveFittingMonth arg1) {
+                        return arg0.getSpeed().compareTo(arg1.getSpeed());
+
+                    }
+                });
+                for (ProEconWtCurveFittingMonth wc : wcls) {
+
+                    DataVo vo = new DataVo();
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        vo.setValue1(wc.getSpeed());
+                        if (StringUtils.notEmp(type) && type.equals(SJBZ) && null != modelmap) {
+                            if (modelmap.containsKey(String.valueOf(wc.getSpeed()))) {
+                                ProBasicModelPowerRd mp = modelmap.get(String.valueOf(wc.getSpeed()));
+                                vo.setValue3(mp.getEnsurePower());
+                            } else {
+                                vo.setValue3(0.0);
+                            }
+                            vo.setValue2(wc.getActualPower());
+                            name1 = "实际功率";
+                            name2 = "保证功率";
+
+                        } else if (StringUtils.notEmp(type) && type.equals(SJZY)) {
+                            vo.setValue2(wc.getActualPower());
+                            vo.setValue3(wc.getOptimalPower());
+                            name1 = "实际功率";
+                            name2 = "最优功率";
+                        } else if (StringUtils.notEmp(type) && type.equals(ZYBZ) && null != modelmap) {
+                            if (modelmap.containsKey(String.valueOf(wc.getSpeed()))) {
+                                ProBasicModelPowerRd mp = modelmap.get(String.valueOf(wc.getSpeed()));
+                                vo.setValue3(mp.getEnsurePower());
+                            } else {
+                                vo.setValue3(0.0);
+                            }
+                            vo.setValue2(wc.getOptimalPower());
+
+                            name1 = "最优功率";
+                            name2 = "保证功率";
+                        }
+
+                        datavos.add(vo);
+
+                    }
+                }
+            }
+            curvemonthchat(type);
+
+            map.put("datas", datavos);
+            map.put("name1", name1);
+            map.put("name2", name2);
+        }
+        return map;
+    }
+
+
+    public  Map<String, Object>  curveMonthchatAjaxtb(String type,String wtId,  String year,String month)  {
+        Map<String, Object> map = new HashMap<>();
+
+        if(StringUtils.notEmp(type) && StringUtils.notEmp(wtId) && StringUtils.notEmp(year) && StringUtils.notEmp(month))
+        {
+            List<DataVo> datavos = new ArrayList<DataVo>();
+            Map<Double, Double> speedmap = new HashMap<Double, Double>();
+            List<ProEconWtCurveFittingMonth> thismonthls = proEconWtCurveFittingMonthService.getProEconWtCurveFittingMonthList(wtId, year,month);
+
+            // 去年统计指标
+            Calendar cal = Calendar.getInstance();
+            cal.set(Calendar.YEAR,Integer.valueOf(year));
+            cal.set(Calendar.MONTH,Integer.valueOf(month)-1);
+            cal.add(Calendar.YEAR, -1);
+
+            String lastyear=String.valueOf(cal.get(Calendar.YEAR));
+
+            List<ProEconWtCurveFittingMonth> lastyearls =proEconWtCurveFittingMonthService.getProEconWtCurveFittingMonthList(wtId, lastyear,month);
+
+            if (!lastyearls.isEmpty()) {
+
+                for (ProEconWtCurveFittingMonth wc : lastyearls) {
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        speedmap.put(wc.getSpeed(), wc.getActualPower());
+                    }
+                }
+            }
+            if (!thismonthls.isEmpty()) {
+                Collections.sort(thismonthls, new Comparator<ProEconWtCurveFittingMonth>() {
+                    public int compare(ProEconWtCurveFittingMonth arg0, ProEconWtCurveFittingMonth arg1) {
+                        return arg0.getSpeed().compareTo(arg1.getSpeed());
+                    }
+                });
+
+                for (ProEconWtCurveFittingMonth wc : thismonthls) {
+
+                    DataVo vo = new DataVo();
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        vo.setValue1(wc.getSpeed());
+                        vo.setValue2(wc.getActualPower());
+                        name1 = "本月实际功率";
+                        name2 = "去年同期实际功率";
+                        if (speedmap.containsKey(wc.getSpeed())) {
+                            vo.setValue3(speedmap.get(wc.getSpeed()));
+                        } else {
+                            vo.setValue3(0.0);
+                        }
+                        datavos.add(vo);
+
+                    }
+                }
+            }
+
+            curvemonthchat(type);
+
+            map.put("datas", datavos);
+            map.put("name1", name1);
+            map.put("name2", name2);
+        }
+        return map;
+    }
+
+    public  Map<String, Object>  curveMonthchatAjaxhb(String type,String wtId,  String year,String month)  {
+        Map<String, Object> map = new HashMap<>();
+
+        if(StringUtils.notEmp(type) && StringUtils.notEmp(wtId) && StringUtils.notEmp(year) && StringUtils.notEmp(month))
+        {
+            List<DataVo> datavos = new ArrayList<DataVo>();
+            Map<Double, Double> speedmap = new HashMap<Double, Double>();
+            List<ProEconWtCurveFittingMonth> thismonthls = proEconWtCurveFittingMonthService.getProEconWtCurveFittingMonthList(wtId, year,month);
+
+            // 上个月统计指标
+            Calendar cal = Calendar.getInstance();
+            cal.set(Calendar.YEAR,Integer.valueOf(year));
+            cal.set(Calendar.MONTH,Integer.valueOf(month)-1);
+            cal.add(Calendar.MONTH, -1);
+
+            String lastyearmonth=String.valueOf(cal.get(Calendar.MONTH));
+
+            List<ProEconWtCurveFittingMonth> lastmonthls =proEconWtCurveFittingMonthService.getProEconWtCurveFittingMonthList(wtId, year,lastyearmonth);
+
+
+            if (!lastmonthls.isEmpty()) {
+
+                for (ProEconWtCurveFittingMonth wc : lastmonthls) {
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        speedmap.put(wc.getSpeed(), wc.getActualPower());
+                    }
+                }
+            }
+
+            if (!thismonthls.isEmpty()) {
+                Collections.sort(thismonthls, new Comparator<ProEconWtCurveFittingMonth>() {
+                    public int compare(ProEconWtCurveFittingMonth arg0, ProEconWtCurveFittingMonth arg1) {
+                        // 修改横轴排序
+                        return arg0.getSpeed().compareTo(arg1.getSpeed());
+
+                    }
+                });
+                for (ProEconWtCurveFittingMonth wc : thismonthls) {
+
+                    DataVo vo = new DataVo();
+                    int c = (int) wc.getSpeed().intValue();
+                    if (c == wc.getSpeed()) {
+                        vo.setValue1(wc.getSpeed());
+                        vo.setValue2(wc.getActualPower());
+                        name1 = "本月实际功率";
+                        name2 = "上月实际功率";
+                        if (speedmap.containsKey(wc.getSpeed())) {
+                            vo.setValue3(speedmap.get(wc.getSpeed()));
+                        } else {
+                            vo.setValue3(0.0);
+                        }
+                        datavos.add(vo);
+
+                    }
+                }
+            }
+            curvemonthchat(type);
+            map.put("datas", datavos);
+            map.put("name1", name1);
+            map.put("name2", name2);
+        }
+        return map;
+    }
+
+    public  Map<String, Object>  curveMonthchatAjaxbg(String type,String wtId,  String year,String month)  {
+        Map<String, Object> map = new HashMap<>();
+
+        if(StringUtils.notEmp(type) && StringUtils.notEmp(wtId) && StringUtils.notEmp(year) && StringUtils.notEmp(month))
+        {
+            List<DataVo> datavos = new ArrayList<>();
+            Map<Double, Double> speedmap = new HashMap<>();
+            List<ProEconWtCurveFittingMonth> thismonthls = proEconWtCurveFittingMonthService.getProEconWtCurveFittingMonthList(wtId, year,month);
+
+            // 标杆风机指标
+            ProBasicEquipment wt = CacheContext.wtmap.get(wtId);
+            // 标杆风机指标
+            String stid = CacheContext.wtstandardmap.get(wtId);
+
+            if(StringUtils.notEmp(stid))
+            {
+                List<ProEconWtCurveFittingMonth> stmonthls = proEconWtCurveFittingMonthService.getProEconWtCurveFittingMonthList(stid, year,month);
+
+                if (null != stmonthls && !stmonthls.isEmpty()) {
+
+                    if (!stmonthls.isEmpty()) {
+
+                        for (ProEconWtCurveFittingMonth wc : stmonthls) {
+                            int c = (int) wc.getSpeed().intValue();
+                            if (c == wc.getSpeed()) {
+                                speedmap.put(wc.getSpeed(), wc.getActualPower());
+                            }
+                        }
+                    }
+                }
+
+                if (!thismonthls.isEmpty()) {
+                    Collections.sort(thismonthls, new Comparator<ProEconWtCurveFittingMonth>() {
+                        public int compare(ProEconWtCurveFittingMonth arg0, ProEconWtCurveFittingMonth arg1) {
+                            return arg0.getSpeed().compareTo(arg1.getSpeed());
+
+                        }
+                    });
+                    for (ProEconWtCurveFittingMonth wc : thismonthls) {
+
+                        DataVo vo = new DataVo();
+                        int c = (int) wc.getSpeed().intValue();
+                        if (c == wc.getSpeed()) {
+                            vo.setValue1(wc.getSpeed());
+                            vo.setValue2(wc.getActualPower());
+                            name1 = "本月实际功率";
+                            name2 = "标杆实际功率";
+                            if (speedmap.containsKey(wc.getSpeed())) {
+                                vo.setValue3(speedmap.get(wc.getSpeed()));
+                            } else {
+                                vo.setValue3(0.0);
+                            }
+                            datavos.add(vo);
+
+                        }
+                    }
+                }
+
+                curvemonthchat(type);
+
+                map.put("datas", datavos);
+                map.put("name1", name1);
+                map.put("name2", name2);
+            }
+
+
+        }
+        return map;
+    }
+
+    private void curvemonthchat(String type) {
+
+        if (StringUtils.notEmp(type) && type.equals(SJBZ)) {
+
+            name1 = "实际功率";
+            name2 = "保证功率";
+
+        } else if (StringUtils.notEmp(type) && type.equals(SJZY)) {
+
+            name1 = "实际功率";
+            name2 = "最优功率";
+        } else if (StringUtils.notEmp(type) && type.equals(ZYBZ)) {
+
+            name1 = "最优功率";
+            name2 = "保证功率";
+        } else if (StringUtils.notEmp(type) && type.equals(TB)) {
+
+            name1 = "本月实际功率";
+            name2 = "去年同期实际功率";
+        } else if (StringUtils.notEmp(type) && type.equals(HB)) {
+
+            name1 = "本月实际功率";
+            name2 = "上月实际功率";
+        } else if (StringUtils.notEmp(type) && type.equals(BG)) {
+
+            name1 = "本月实际功率";
+            name2 = "标杆实际功率";
+        }
+
+    }
+}

+ 231 - 0
web/health/src/main/java/com/gyee/health/service/scatter/ScatterService.java

@@ -0,0 +1,231 @@
+package com.gyee.health.service.scatter;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.gyee.health.model.auto.ProEconWtCurveFittingMonth;
+import com.gyee.health.service.auto.IProBasicEquipmentPointService;
+import com.gyee.health.service.auto.IProBasicPowerstationPointService;
+import com.gyee.health.util.IRealTimeDataBaseUtil;
+import com.gyee.health.util.RealTimeDataBaseFactory;
+import com.gyee.health.util.StringUtils;
+import com.gyee.health.util.redis.RedisService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+/**
+ *
+ */
+@Service
+public class ScatterService {
+
+
+	@Resource
+	private IProBasicPowerstationPointService proBasicPowerstationPointService;
+	@Resource
+	private IProBasicEquipmentPointService proBasicEquipmentPointService;
+	@Resource
+	private RedisService redisService;
+	IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+
+	/**
+	 * @throws
+	 * @Title: scatterAjax
+	 * @Description: 获得选择场站、项目、线路、年份、月份相关散点图
+	 */
+	public List<List<Double>> scatterAjax(String wpId, String pjId, String lnId, String year, String month) throws Exception {
+
+		List<List<Double>> vos = new ArrayList<List<Double>>();
+		if (StringUtils.notEmp(year) && StringUtils.notEmp(month)) {
+
+			Calendar cal = Calendar.getInstance();
+			cal.set(Calendar.HOUR_OF_DAY, 0);
+			cal.set(Calendar.MINUTE, 0);
+			cal.set(Calendar.SECOND, 0);
+
+			int years = cal.get((Calendar.YEAR));
+			int months = cal.get((Calendar.MONTH));
+
+
+				StringBuilder sb = new StringBuilder();
+				if (StringUtils.notEmp(wpId)) {
+					sb.append("scatter_").append(wpId).append("_").append(month);
+				} else if (StringUtils.notEmp(pjId)) {
+					sb.append("scatter_").append(pjId).append("_").append(month);
+				} else if (StringUtils.notEmp(lnId)) {
+					sb.append("scatter_").append(lnId).append("_").append(month);
+				}
+
+				if(redisService.hasKey(String.valueOf(sb)))
+				{
+					String scatter = (String) (redisService.get(String.valueOf(sb)));
+					vos = JSONObject.parseObject(scatter, new TypeReference<List<List<Double>>>() {
+					});
+				}
+//				else {
+//					cal.set(Calendar.YEAR, Integer.valueOf(year));
+//					cal.set(Calendar.MONTH, Integer.valueOf(month) - 1);
+//					cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+//					Date beginDate = cal.getTime();
+//					cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+//					Date endDate = cal.getTime();
+//
+//
+//					ProBasicPowerstationPoint gl = null;
+//					ProBasicPowerstationPoint fs = null;
+//
+//					if (StringUtils.notEmp(wpId)) {
+//						gl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZGL);
+//						fs = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSPJFS);
+//					} else if (StringUtils.notEmp(pjId)) {
+//						gl = proBasicPowerstationPointService.getPowerstationPoint(pjId, ContantXk.SSZGL);
+//						fs = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSPJFS);
+//
+//					} else if (StringUtils.notEmp(lnId)) {
+//						gl = proBasicPowerstationPointService.getPowerstationPoint(lnId, ContantXk.SSZGL);
+//						fs = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSPJFS);
+//					}
+//
+//
+//					int daynum = DateUtils.daysDiff(beginDate, endDate);
+//					long pried = 60 * 10;
+//					long count = 6 * 24 * daynum;
+//
+//					DecimalFormat dcmFmt = new DecimalFormat("0.00");
+//					List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+//
+//					List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+//
+//
+//					if (!gls.isEmpty() && !fss.isEmpty()) {
+//						for (int i = 0; i < fss.size(); i++) {
+//
+//							List<Double> ds = new ArrayList<Double>();
+//
+//							double f = fss.get(i).getPointValueInDouble();
+//							ds.add(Double.valueOf(dcmFmt.format(f)));
+//							f = gls.get(i).getPointValueInDouble();
+//							ds.add(Double.valueOf(dcmFmt.format(f)));
+//							vos.add(ds);
+//						}
+//					}
+//				}
+
+
+			}
+
+
+
+		return vos;
+	}
+
+	/**
+	 * @throws
+	 * @Title: scatterAjax
+	 * @Description: 获得选择风机、年份、月份相关散点图
+	 */
+	public Map<String, List<List<Double>>> scatterWtAjax(String wtId, String year, String month) throws Exception {
+
+		Map<String, List<List<Double>>> result = new HashMap<String, List<List<Double>>>();
+
+		List<List<Double>> vos = new ArrayList<List<Double>>();
+		if (StringUtils.notEmp(year) && StringUtils.notEmp(month)) {
+
+			Calendar cal = Calendar.getInstance();
+			cal.set(Calendar.HOUR_OF_DAY, 0);
+			cal.set(Calendar.MINUTE, 0);
+			cal.set(Calendar.SECOND, 0);
+
+
+			int years = cal.get((Calendar.YEAR));
+			int months = cal.get((Calendar.MONTH));
+
+			StringBuilder sb = new StringBuilder();
+			if (StringUtils.notEmp(wtId)) {
+				sb.append("scatter_").append(wtId).append("_").append(Integer.valueOf(month));
+				if (redisService.hasKey(String.valueOf(sb))) {
+					String scatter = (String) (redisService.get(String.valueOf(sb)));
+					vos = JSONObject.parseObject(scatter, new TypeReference<List<List<Double>>>() {
+					});
+				}
+//				else {
+//
+//					cal.set(Calendar.YEAR, Integer.valueOf(year));
+//					cal.set(Calendar.MONTH, Integer.valueOf(month) - 1);
+//					cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
+//					Date beginDate = cal.getTime();
+//					cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+//					Date endDate = cal.getTime();
+//
+//					ProBasicEquipmentPoint gl = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.CJ_SSGL);
+//					int daynum = DateUtils.daysDiff(beginDate, endDate);
+//					long pried = 60 * 10;
+//					long count = 6 * 24 * daynum;
+//					DecimalFormat dcmFmt = new DecimalFormat("0.00");
+//					List<PointData> gls = realApiUtil.getHistoryDatasSnap(gl, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+//					ProBasicEquipmentPoint fs = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.CJ_SSFS);
+//					List<PointData> fss = realApiUtil.getHistoryDatasSnap(fs, beginDate.getTime() / 1000, endDate.getTime() / 1000, count, pried);
+//
+//					if (!gls.isEmpty() && !fss.isEmpty()) {
+//						for (int i = 0; i < fss.size(); i++) {
+//
+//							List<Double> ds = new ArrayList<Double>();
+//
+//							double f = fss.get(i).getPointValueInDouble();
+//							ds.add(Double.valueOf(dcmFmt.format(f)));
+//							f = gls.get(i).getPointValueInDouble();
+//							ds.add(Double.valueOf(dcmFmt.format(f)));
+//							vos.add(ds);
+//						}
+//					}
+//				}
+			}
+
+
+
+			List<List<Double>> vos2 = new ArrayList<>();
+
+			List<ProEconWtCurveFittingMonth> wcls = null;
+			sb = new StringBuilder();
+			if (StringUtils.notEmp(wtId)) {
+				sb.append("monthCurve_").append(wtId);
+			}
+			if(redisService.hasKey(String.valueOf(sb)))
+			{
+				String scatter = (String) (redisService.get(String.valueOf(sb)));
+				wcls = JSONObject.parseObject(scatter, new TypeReference<List<ProEconWtCurveFittingMonth>>() {
+				});
+				for (ProEconWtCurveFittingMonth wc : wcls) {
+
+					List<Double> ds = new ArrayList<>();
+
+					int c = (int) wc.getSpeed().intValue();
+
+					double speed=wc.getSpeed();
+					double power=wc.getActualPower();
+
+					if (c == speed ) {
+
+						ds.add(speed);
+						ds.add(power);
+
+						// vo.setValue1(wc.getSpeed());// 风速
+						// vo.setValue2(wc.getActualpower());// 实际拟合功率
+						// vo.setValue3(wc.getOptimalpower());// 最优拟合功率
+						vos2.add(ds);
+					}
+				}
+			}
+
+			result.put("scatter", vos);
+			result.put("line", vos2);
+
+		}
+
+
+		return result;
+	}
+
+
+}

+ 70 - 0
web/health/src/main/java/com/gyee/health/service/scatter/WinddirectionService.java

@@ -0,0 +1,70 @@
+package com.gyee.health.service.scatter;
+
+import com.gyee.common.contant.ContantXk;
+import com.gyee.common.model.PointData;
+import com.gyee.health.dto.DataVo;
+import com.gyee.health.dto.ValueObjVo;
+import com.gyee.health.model.auto.ProBasicEquipmentPoint;
+import com.gyee.health.service.auto.IProBasicEquipmentPointService;
+import com.gyee.health.util.DateUtils;
+import com.gyee.health.util.IRealTimeDataBaseUtil;
+import com.gyee.health.util.RealTimeDataBaseFactory;
+import com.gyee.health.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.List;
+
+
+@Service
+public class WinddirectionService {
+
+
+	IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+	@Resource
+	private IProBasicEquipmentPointService proBasicEquipmentPointService;
+
+	public List<DataVo>  winddirectionAjax(String wpId,Date recorddate) throws Exception {
+		List<DataVo> vos = new ArrayList<DataVo>();
+
+		if (StringUtils.notEmp(wpId) && StringUtils.notEmp(recorddate)) {
+
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+			SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+			SimpleDateFormat sfs = new SimpleDateFormat("HH时");
+			Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(recorddate, 1)) + " 00:00:00");
+			Date beginDate = sdfs.parse(sdf.format(recorddate) + " 00:00:00");
+
+			ProBasicEquipmentPoint fspoint = proBasicEquipmentPointService.getEquipmentPoint(wpId, ContantXk.FCCFTFS70);
+			ProBasicEquipmentPoint fxpoint = proBasicEquipmentPointService.getEquipmentPoint(wpId, ContantXk.FCCFTFX70);
+
+			List<PointData> fxls = realApiUtil.getHistoryDatasSnap(fxpoint, beginDate.getTime() / 1000, endDate.getTime() / 1000, 24l, 3600L);
+			List<PointData> fsls = realApiUtil.getHistoryDatasSnap(fspoint, beginDate.getTime() / 1000, endDate.getTime() / 1000, 24l, 3600L);
+
+
+			if (!fsls.isEmpty()) {
+				for (int i = 0; i < fsls.size(); i++) {
+					DataVo vo = new DataVo();
+
+					Date date = new Date(fsls.get(i).getPointTime() * 1000);
+					vo.setTimestr(sfs.format(date));
+					ValueObjVo voobj = new ValueObjVo();
+					voobj.setValue(StringUtils.round(fsls.get(i).getPointValueInDouble(), 2));
+					voobj.setSymbol("arrow");
+					voobj.setSymbolSize(20);
+					voobj.setSymbolRotate(StringUtils.round(fxls.get(i).getPointValueInDouble(), 2));
+
+					vo.setValueObjVo(voobj);
+					vos.add(vo);
+				}
+			}
+		}
+		return vos;
+	}
+
+
+
+}

+ 404 - 0
web/health/src/main/java/com/gyee/health/service/stopanalysis/StopAnalysisStaticService.java

@@ -0,0 +1,404 @@
+//package com.gyee.health.service.stopanalysis;
+//
+//import com.gyee.common.contant.ContantXk;
+//import com.gyee.common.model.PointData;
+//import com.gyee.health.init.CacheContext;
+//import com.gyee.health.model.auto.ProBasicEquipment;
+//import com.gyee.health.model.auto.ProBasicEquipmentPoint;
+//import com.gyee.health.model.vo.*;
+//import com.gyee.health.service.auto.IProBasicEquipmentPointService;
+//import com.gyee.health.service.auto.IProBasicEquipmentService;
+//import com.gyee.health.util.IRealTimeDataBaseUtil;
+//import com.gyee.health.util.RealTimeDataBaseFactory;
+//import com.gyee.health.util.StringUtils;
+//import org.springframework.stereotype.Service;
+//
+//import javax.annotation.Resource;
+//import java.security.SecureRandom;
+//import java.util.*;
+//
+//
+//@Service
+//public class StopAnalysisStaticService {
+//
+//
+//    @Resource
+//    private IProBasicEquipmentPointService proBasicEquipmentPointService;
+//    @Resource
+//    private IProBasicEquipmentService proBasicEquipmentService;
+//
+//    @Resource
+//    private StopAnalysisService stopAnalysisService;
+//    @Resource
+//    private StopAnalysismainService stopAnalysismainService;
+//    @Resource
+//    private StopAnalysismainVoService stopAnalysismainVoService;
+//    @Resource
+//    private StopAnalysisDetailService stopAnalysisDetailService;
+//    @Resource
+//    private StopAnalysisDetailVoService stopAnalysisDetailVoService;
+//
+//    private final String ZC = "正常";
+//    private final String ZY = "注意";
+//    private final String GZ = "关注";
+//
+//    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+//
+//    public List<StopAnalysismainVo> stopAnalysisList(String wpId, String modelId, String typeId) throws Exception {
+//
+//        List<StopAnalysismainVo> vos = new ArrayList<>();
+//
+//        if (StringUtils.notEmp(wpId) && StringUtils.notEmp(modelId) && StringUtils.notEmp(typeId)) {
+//
+//            stopAnalysismainVoService.deleteAll();
+//            stopAnalysisDetailVoService.deleteAll();
+//            List<ProBasicEquipment> wtls = CacheContext.wpwtmap.get(wpId);
+//
+//            if (typeId.equals("1")) {
+//                List<String> wtidls = new ArrayList<>();
+//                List<String> codejkls = new ArrayList<>();
+//                List<String> clxjkls = new ArrayList<>();
+//                List<String> fdjjkls = new ArrayList<>();
+//                List<String> bjjkls = new ArrayList<>();
+//                List<String> zkjkls = new ArrayList<>();
+//                List<String> codeztls = new ArrayList<>();
+//                for (ProBasicEquipment wt : wtls) {
+//
+//
+//                    wtidls.add(wt.getId());
+//                    codejkls.add(ContantXk.JKZT001);
+//                    clxjkls.add(ContantXk.JKZT002);
+//                    fdjjkls.add(ContantXk.JKZT003);
+//                    bjjkls.add(ContantXk.JKZT004);
+//                    zkjkls.add(ContantXk.JKZT005);
+//                    codeztls.add(ContantXk.MXZT);
+//
+//                }
+//
+//                String[] jkpoints = new String[wtidls.size()];
+//                String[] ztpoints = new String[wtidls.size()];
+//                String[] clxpoints = new String[wtidls.size()];
+//                String[] fdjpoints = new String[wtidls.size()];
+//                String[] bjpoints = new String[wtidls.size()];
+//                String[] zkpoints = new String[wtidls.size()];
+//
+//                // 获得训练参数对象
+//                for (int x = 0; x < wtidls.size(); x++) {
+//
+//                    ProBasicEquipmentPoint ai1 = proBasicEquipmentPointService.getEquipmentPoint(wtidls.get(x), codejkls.get(x));
+//                    jkpoints[x] = ai1.getNemCode();
+//                    ProBasicEquipmentPoint ai2 = proBasicEquipmentPointService.getEquipmentPoint(wtidls.get(x), codeztls.get(x));
+//                    ztpoints[x] = ai2.getNemCode();
+//                    ProBasicEquipmentPoint ai3 = proBasicEquipmentPointService.getEquipmentPoint(wtidls.get(x), clxjkls.get(x));
+//                    clxpoints[x] = ai3.getNemCode();
+//                    ProBasicEquipmentPoint ai4 = proBasicEquipmentPointService.getEquipmentPoint(wtidls.get(x), fdjjkls.get(x));
+//                    fdjpoints[x] = ai4.getNemCode();
+//                    ProBasicEquipmentPoint ai5 = proBasicEquipmentPointService.getEquipmentPoint(wtidls.get(x), bjjkls.get(x));
+//                    bjpoints[x] = ai5.getNemCode();
+//                    ProBasicEquipmentPoint ai6 = proBasicEquipmentPointService.getEquipmentPoint(wtidls.get(x), zkjkls.get(x));
+//                    zkpoints[x] = ai6.getNemCode();
+//
+//                }
+//
+//                // 获得风机健康状态结果数组
+//                List<PointData> jkvalues = realApiUtil.getRealData(jkpoints);
+//                // 获得风机实时状态结果数组
+//                List<PointData> ztvalues = realApiUtil.getRealData(ztpoints);
+//                List<PointData> clxvalues = realApiUtil.getRealData(clxpoints);
+//                List<PointData> fdjvalues = realApiUtil.getRealData(fdjpoints);
+//                List<PointData> bjvalues = realApiUtil.getRealData(bjpoints);
+//                List<PointData> zkvalues = realApiUtil.getRealData(zkpoints);
+//
+//
+//                for (int x = 0; x < wtls.size(); x++) {
+//                    ProBasicEquipment wt = wtls.get(x);
+//                    String wtId = wt.getId();
+//                    double jk = jkvalues.get(x).getPointValueInDouble();
+//                    double zt = ztvalues.get(x).getPointValueInDouble();
+//                    double clx = clxvalues.get(x).getPointValueInDouble();
+//                    double fdj = fdjvalues.get(x).getPointValueInDouble();
+//                    double bj = bjvalues.get(x).getPointValueInDouble();
+//                    double zk = zkvalues.get(x).getPointValueInDouble();
+//                    StopAnalysismainVo vo = new StopAnalysismainVo();
+//                    vo.setWtid(wt.getId());
+//                    vo.setModelid(wt.getModelId());
+//                    if (zt == StatusDetailValue.GZ.getCode()) {
+//                        vo.setJudegvulue(GZ);
+//                    } else {
+//                        vo.setJudegvulue(getJudgeVaue(clx,fdj,bj,zk));
+//                    }
+//                    //添加雪花主键id
+//                    String id=StringUtils.getUUID();
+//                    vo.setId(id);
+//                    stopAnalysismainVoService.insertSelective(vo);
+//
+//                    vos.add(vo);
+//                }
+//
+//            } else if (typeId.equals("2")) {
+//                Calendar c = Calendar.getInstance();
+//
+//                c.set(Calendar.SECOND, 0);
+//                c.set(Calendar.MILLISECOND, 0);
+//                Date endDate = c.getTime();
+//                c.add(Calendar.MINUTE, -10);
+//                Date beginDate = c.getTime();
+//
+//                for (int x = 0; x < wtls.size(); x++) {
+//                    ProBasicEquipment wt = wtls.get(x);
+//                    String wtId = wt.getId();
+//                    StopAnalysismainVo vo = new StopAnalysismainVo();
+//                    vo.setWtid(wt.getId());
+//                    vo.setModelid(wt.getModelId());
+////                    public static final String CLXJKZT = "JKZT002";// 齿轮箱健康状态
+////                    public static final String FDJJKZT = "JKZT003";// 发电机健康状态
+////                    public static final String BJJKZT = "JKZT004";// 变桨健康
+////                    public static final String ZKJKZT = "JKZT005";// 主控健康状态
+//                    ProBasicEquipmentPoint ai1 = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT002);
+//                    List<PointData> pointls1 = realApiUtil.getHistoryDatasSnap(ai1, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 10, 60L);
+//                    ProBasicEquipmentPoint ai2 = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT003);
+//                    List<PointData> pointls2 = realApiUtil.getHistoryDatasSnap(ai1, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 10, 60L);
+//                    ProBasicEquipmentPoint ai3 = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT004);
+//                    List<PointData> pointls3 = realApiUtil.getHistoryDatasSnap(ai1, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 10, 60L);
+//                    ProBasicEquipmentPoint ai4 = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT005);
+//                    List<PointData> pointls4 = realApiUtil.getHistoryDatasSnap(ai1, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) 10, 60L);
+//
+//
+//                    if (!pointls1.isEmpty() && !pointls2.isEmpty() && !pointls3.isEmpty() &&!pointls4.isEmpty()) {
+//                        double csl = 0.0;
+//                        double lsl = 0.0;
+//                        double ysl = 0.0;
+//                        for (int i=0;i<pointls1.size();i++) {
+//
+//                            PointData point1=pointls1.get(i);
+//                            PointData point2=pointls2.get(i);
+//                            PointData point3=pointls3.get(i);
+//                            PointData point4=pointls4.get(i);
+//
+//                            double clx = point1.getPointValueInDouble();
+//                            double fdj = point2.getPointValueInDouble();
+//                            double bj = point3.getPointValueInDouble();
+//                            double zk = point4.getPointValueInDouble();
+//
+//                            String state=getJudgeVaue(clx,fdj,bj,zk);
+//                            if (state.equals(GZ)) {
+//                                csl++;
+//                            } else if (state.equals(ZY)) {
+//                                lsl++;
+//                            } else {
+//                                ysl++;
+//                            }
+//                        }
+//
+//                        if (csl >=2) {
+//                            vo.setJudegvulue(GZ);
+//                        } else if (lsl>= 4) {
+//                            vo.setJudegvulue(ZY);
+//                        } else {
+//                            vo.setJudegvulue(ZC);
+//                        }
+//
+//                    } else {
+//                        vo.setJudegvulue(ZC);
+//                    }
+//                    //添加雪花主键id
+//                    String id=StringUtils.getUUID();
+//                    vo.setId(id);
+//                    stopAnalysismainVoService.insertSelective(vo);
+//
+//                    vos.add(vo);
+//                }
+//
+//            }
+//
+//        }
+//        return vos;
+//    }
+//
+//    private String getJudgeVaue(double clx,double fdj,double bj,double zk) {
+//        double total=clx+fdj+bj+zk;
+//        if (clx==4|| fdj==4|| bj==4|| zk==4) {
+//            return GZ;
+//        } else if (clx==3|| fdj==3|| bj==3|| zk==3) {
+//            return ZY;
+//        } else {
+//            return ZC;
+//        }
+//    }
+//
+//    private String getJudgeVaue(double values) {
+//        if (values<=2.0) {
+//            return ZC;
+//        } else if (values== 3) {
+//            return ZY;
+//        } else {
+//            return GZ;
+//        }
+//    }
+//
+//
+//
+//    private List<StopAnalysisDetailVo> saveLocationTreeByWtId(String mainId, String wtId, String values) throws Exception {
+//
+//        List<StopAnalysisDetailVo> nodes = new ArrayList<>();
+//        if (StringUtils.notEmp(wtId)) {
+//
+//
+//            List<String> codels = new ArrayList<>();
+//
+//
+//            codels.add(ContantXk.JKZT002);
+//            codels.add(ContantXk.JKZT003);
+//            codels.add(ContantXk.JKZT004);
+//            codels.add(ContantXk.JKZT005);
+//
+//
+//            String[] points = new String[codels.size()];
+//
+//            for (int i = 0; i < codels.size(); i++) {
+//
+//                ProBasicEquipmentPoint ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, codels.get(i));
+//                points[i] = ai.getNemCode();
+//               // System.out.println(ai.getNemCode());
+//            }
+//
+//            // 获得风机健康状态结果数组
+//            List<PointData> jkvalues = realApiUtil.getRealData(points);
+//
+//
+//            //随机生成诊断等级
+//            if (values.equals(ZY)) {
+//                Random random = new SecureRandom();
+//                int index = random.nextInt(4);
+//                jkvalues.get(index).setPointValueInDouble(3);
+//            } else if (values.equals(GZ)) {
+//                Random random = new SecureRandom();
+//                int index = random.nextInt(4);
+//                jkvalues.get(index).setPointValueInDouble(4);
+//            }
+//
+//            String clxzt = getJudgeVaue(jkvalues.get(0).getPointValueInDouble());
+//            String fdjzt = getJudgeVaue(jkvalues.get(1).getPointValueInDouble());
+//            String bjzt = getJudgeVaue(jkvalues.get(2).getPointValueInDouble());
+//            String zkzt = getJudgeVaue(jkvalues.get(3).getPointValueInDouble());
+//
+////            System.out.println("clxzt"+clxzt);
+////            System.out.println("fdjzt"+fdjzt);
+////            System.out.println("bjzt"+bjzt);
+////            System.out.println("zkzt"+zkzt);
+////            MismapSql mis = mismapSqlService.findMismapSqlById(wtId);
+////            String wtNum = mis.getMiskey();
+//            ProBasicEquipment wt = proBasicEquipmentService.findWindturbineById(wtId);
+//
+//           // System.out.println("wt.getLocation()"+wt.getLocation());
+//            if (StringUtils.notEmp(wt) && StringUtils.notEmp(wt.getLocation())) {
+//
+//                List<ProBasicEquipment> eqls = equipmentSqlService.getEquipmentListByLocation(wt.getLocation());
+//
+//               // System.out.println("eqls.size()"+eqls.size());
+//                if (!eqls.isEmpty()) {
+//
+//                    for (ProBasicEquipment eq : eqls) {
+//                        StopAnalysisDetailVo node = new StopAnalysisDetailVo();
+//                        node.setId(eq.getLocation());
+//                        node.setPid(eq.getParent());
+//                        node.setName(eq.getDescription());
+//                        node.setWtid(wtId);
+//                        if(StringUtils.notEmp(eq) && StringUtils.notEmp(eq.getDescription()) )
+//                        {
+//                            if (eq.getDescription().indexOf("齿轮箱") != -1) {
+//                                node.setJudegvulue(clxzt);
+//                            } else if (eq.getDescription().indexOf("发电机") != -1) {
+//                                node.setJudegvulue(fdjzt);
+//                            } else if (eq.getDescription().indexOf("变桨") != -1) {
+//                                node.setJudegvulue(bjzt);
+//                            } else if (eq.getDescription().indexOf("塔") != -1) {
+//                                node.setJudegvulue(zkzt);
+//                            } else {
+//                                node.setJudegvulue(ZC);
+//                            }
+//                        }else
+//                        {
+//                            node.setJudegvulue(ZC);
+//                        }
+//
+//                       // stopAnalysisDetailVoService.insertSelective(node);
+//                        //	node.setOpen(true);
+//                        nodes.add(node);
+//                    }
+//
+//                }
+//            }
+//        }
+//
+//        return nodes;
+//    }
+//
+//
+//
+//
+//    /**
+//     * 获取部件结构树
+//     *
+//     * @return
+//     */
+//    public List<StopAnalysisNodeVo> findLocationTreeByWtId(String mainId, String wtId, String values) throws Exception {
+//
+//        List<StopAnalysisNodeVo> vos = new ArrayList<>();
+//        if (StringUtils.notEmp(wtId)) {
+//
+////            List<StopAnalysisDetailVo> list=stopAnalysisDetailVoService.findStopAnalysisDetailVoList(wtId);
+////            if(list.isEmpty())
+////            {
+////                list=saveLocationTreeByWtId(mainId,wtId, values);
+////
+////            }
+//
+//            List<StopAnalysisDetailVo> list=saveLocationTreeByWtId(mainId,wtId, values);
+//
+//            List<StopAnalysisNodeVo> nodes = new ArrayList<StopAnalysisNodeVo>();
+//            for(StopAnalysisDetailVo eq:list)
+//            {
+//                StopAnalysisNodeVo node=new StopAnalysisNodeVo();
+//                node.setId(eq.getId());
+//                node.setPid(eq.getPid());
+//                node.setName(eq.getName());
+//                node.setJudegVulue(eq.getJudegvulue());
+//                //	node.setOpen(true);
+//                nodes.add(node);
+//            }
+//
+//            StopAnalysisTreeUtil treeUtil=new StopAnalysisTreeUtil(nodes);
+//            vos=treeUtil.buildJSONTree();
+//
+//        }
+//
+//        return vos;
+//    }
+//
+//    public void saveStopAnalysis(String wpId, String modelId, String typeId)
+//    {
+//        StopAnalysis stopAnalysis=new StopAnalysis();
+//       //添加雪花主键id
+//        String id=StringUtils.getUUID();
+//
+//        List<StopAnalysismainVo> mainlist=stopAnalysismainVoService.findStopAnalysismainVoList();
+//        List<StopAnalysisDetailVo> detaillist=stopAnalysisDetailVoService.findStopAnalysisDetailVoList();
+//
+//
+//        if(!mainlist.isEmpty() && !detaillist.isEmpty())
+//        {
+//            stopAnalysis.setId(id);
+//            stopAnalysis.setWpid(wpId);
+//            stopAnalysis.setRuleid(modelId);
+//            stopAnalysis.setTimetype(typeId);
+//            stopAnalysis.setJudegdate(new Date());
+//            stopAnalysisService.insertSelective(stopAnalysis);
+//
+//            stopAnalysismainService.saveStopAnalysismainList(id,mainlist);
+//            stopAnalysisDetailService.saveStopAnalysisDetailList(id,detaillist);
+//        }
+//
+//    }
+//
+//}

+ 170 - 0
web/health/src/main/java/com/gyee/health/service/stopanalysis/StopAnalysisTreeUtil.java

@@ -0,0 +1,170 @@
+package com.gyee.health.service.stopanalysis;
+
+
+import com.gyee.health.model.vo.StopAnalysisNodeVo;
+import com.gyee.health.util.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class StopAnalysisTreeUtil {
+
+
+	List<StopAnalysisNodeVo> nodes = new ArrayList<>();
+
+	public StopAnalysisTreeUtil(List<StopAnalysisNodeVo> nodes) {
+
+		super();
+
+		this.nodes = nodes;
+
+	}
+
+	/**
+	 * 构建JSON树形结构
+	 * 
+	 * @return
+	 */
+
+	public List<StopAnalysisNodeVo> buildJSONTree() {
+
+		List<StopAnalysisNodeVo> nodeTree = buildTree();
+		
+		//nodeTree.get(0).setIcon(ROOT);
+
+		//String json = JSON.toJSONString(nodeTree);
+
+		return nodeTree;
+
+	}
+
+	/**
+	 * 构建树形结构
+	 * 
+	 * @return
+	 */
+
+	public List<StopAnalysisNodeVo> buildTree() {
+
+		List<StopAnalysisNodeVo> treeNodes = new ArrayList<StopAnalysisNodeVo>();
+
+		List<StopAnalysisNodeVo> rootNodes = getRootNodes();
+
+		for (StopAnalysisNodeVo rootNode : rootNodes) {
+
+			buildChildNodes(rootNode);
+
+			treeNodes.add(rootNode);
+
+		}
+
+		return treeNodes;
+
+	}
+
+	/**
+	 * 递归子节点
+	 * 
+	 * @param node
+	 */
+
+	public void buildChildNodes(StopAnalysisNodeVo node) {
+
+		List<StopAnalysisNodeVo> children = getChildNodes(node);
+
+		if (!children.isEmpty()) {
+			//node.setIcon(PARENT);
+			
+			for (StopAnalysisNodeVo child : children) {
+
+				buildChildNodes(child);
+
+			}
+			node.setIsParent(true);
+			node.setChildren(children);
+
+		}else
+		{
+			//node.setIcon(LEAF);
+		}
+
+	}
+
+	/**
+	 * 获取父节点下所有的子节点
+	 *
+	 * @param pnode
+	 * @return
+	 */
+
+	public List<StopAnalysisNodeVo> getChildNodes(StopAnalysisNodeVo pnode) {
+
+		
+		List<StopAnalysisNodeVo> childNodes = new ArrayList<StopAnalysisNodeVo>();
+
+		for (StopAnalysisNodeVo n : nodes) {
+
+			if (pnode.getId().equals(n.getPid())) {
+
+				childNodes.add(n);
+				
+			}
+
+		}
+
+		return childNodes;
+
+	}
+
+	/**
+	 * 判断是否为根节点
+	 * 
+	 * @return
+	 */
+
+	public boolean rootNode(StopAnalysisNodeVo node) {
+
+		boolean isRootNode = true;
+
+		for (StopAnalysisNodeVo n : nodes) {
+
+			if (StringUtils.notEmp(node.getPid()) && node.getPid().equals(n.getId())) {
+
+				isRootNode = false;
+
+				break;
+
+			}
+
+		}
+
+		return isRootNode;
+
+	}
+
+	/**
+	 * 获取集合中所有的根节点
+	 * 
+	 * @return
+	 */
+
+	public List<StopAnalysisNodeVo> getRootNodes() {
+
+		List<StopAnalysisNodeVo> rootNodes = new ArrayList<StopAnalysisNodeVo>();
+
+		for (StopAnalysisNodeVo n : nodes) {
+
+			if (rootNode(n)) {
+
+				rootNodes.add(n);
+				
+			}
+
+		}
+
+		return rootNodes;
+
+	}
+
+
+}

+ 116 - 0
web/health/src/main/java/com/gyee/health/util/SpringUtils.java

@@ -0,0 +1,116 @@
+package com.gyee.health.util;
+
+import org.springframework.aop.framework.AopContext;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.stereotype.Component;
+
+/**
+* spring工具类 方便在非spring管理环境中获取bean
+* @ClassName: SpringUtils
+* @author gyee
+* @date 2019-09-11 11:28
+*
+ */
+@Component
+public final class SpringUtils implements BeanFactoryPostProcessor
+{
+    /** Spring应用上下文环境 */
+    private static ConfigurableListableBeanFactory beanFactory;
+
+    @Override
+    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
+    {
+        SpringUtils.beanFactory = beanFactory;
+    }
+
+    /**
+     * 获取对象
+     *
+     * @param name
+     * @return Object 一个以所给名字注册的bean的实例
+     * @throws BeansException
+     *
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> T getBean(String name) throws BeansException
+    {
+        return (T) beanFactory.getBean(name);
+    }
+
+    /**
+     * 获取类型为requiredType的对象
+     *
+     * @param clz
+     * @return
+     * @throws BeansException
+     *
+     */
+    public static <T> T getBean(Class<T> clz) throws BeansException
+    {
+        T result = (T) beanFactory.getBean(clz);
+        return result;
+    }
+
+    /**
+     * 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true
+     *
+     * @param name
+     * @return boolean
+     */
+    public static boolean containsBean(String name)
+    {
+        return beanFactory.containsBean(name);
+    }
+
+    /**
+     * 判断以给定名字注册的bean定义是一个singleton还是一个prototype。 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException)
+     *
+     * @param name
+     * @return boolean
+     * @throws NoSuchBeanDefinitionException
+     *
+     */
+    public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException
+    {
+        return beanFactory.isSingleton(name);
+    }
+
+    /**
+     * @param name
+     * @return Class 注册对象的类型
+     * @throws NoSuchBeanDefinitionException
+     *
+     */
+    public static Class<?> getType(String name) throws NoSuchBeanDefinitionException
+    {
+        return beanFactory.getType(name);
+    }
+
+    /**
+     * 如果给定的bean名字在bean定义中有别名,则返回这些别名
+     *
+     * @param name
+     * @return
+     * @throws NoSuchBeanDefinitionException
+     *
+     */
+    public static String[] getAliases(String name) throws NoSuchBeanDefinitionException
+    {
+        return beanFactory.getAliases(name);
+    }
+
+    /**
+     * 获取aop代理对象
+     * 
+     * @param invoker
+     * @return
+     */
+    @SuppressWarnings("unchecked")
+    public static <T> T getAopProxy(T invoker)
+    {
+        return (T) AopContext.currentProxy();
+    }
+}

+ 8 - 0
web/health/src/main/java/com/gyee/health/util/StringUtils.java

@@ -490,6 +490,14 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
 
         return new BigDecimal(num).setScale(digit, RoundingMode.HALF_UP).doubleValue();
     }
+
+//    public static double rounddown(double num, int digit) {
+//
+//        String temp=String.valueOf(num);
+//        String temp1=temp.substring(0,temp.indexOf("."));
+//        String temp2=temp.substring(temp.indexOf(".")+1,digit);
+//        return Double.valueOf(temp1+"."+temp2);
+//    }
     /**
      * 将字符串解析为Date类型
      *

+ 2 - 2
web/health/src/main/resources/application-jn.properties

@@ -3,8 +3,8 @@ server.port=8172
 
 #\u670D\u52A1\u540D\u79F0
 spring.application.name=health-hb-provider
-spring.cloud.nacos.discovery.server-addr=10.81.3.155:8848
-#spring.cloud.nacos.discovery.server-addr=127.0.0.1:8870
+#spring.cloud.nacos.discovery.server-addr=10.81.3.155:8848
+spring.cloud.nacos.discovery.server-addr=127.0.0.1:8870
 
 #nacos\u7684\u7528\u6237\u540D\u548C\u5BC6\u7801
 spring.cloud.nacos.username=nacos