Переглянути джерело

修正健康管理状态数量统计

shilin 2 роки тому
батько
коміт
0aaa8d8f00
70 змінених файлів з 2718 додано та 737 видалено
  1. 12 0
      web/health/pom.xml
  2. 6 6
      web/health/src/main/java/com/gyee/frame/common/base/PageInfo.java
  3. 1 1
      web/health/src/main/java/com/gyee/frame/common/conf/GeneratorCodeConfig.java
  4. 0 592
      web/health/src/main/java/com/gyee/frame/common/spring/Constant.java
  5. 1 1
      web/health/src/main/java/com/gyee/frame/common/spring/ConstantTR.java
  6. 8 8
      web/health/src/main/java/com/gyee/frame/common/spring/InitialRedis.java
  7. 20 0
      web/health/src/main/java/com/gyee/frame/controller/HealthReportMainController.java
  8. 20 0
      web/health/src/main/java/com/gyee/frame/controller/HealthReportTargetController.java
  9. 220 0
      web/health/src/main/java/com/gyee/frame/controller/health/HealthReportController.java
  10. 43 0
      web/health/src/main/java/com/gyee/frame/mapper/auto/AlarmcountMapper.java
  11. 23 0
      web/health/src/main/java/com/gyee/frame/mapper/auto/AlarmsnapMapper.java
  12. 28 0
      web/health/src/main/java/com/gyee/frame/mapper/auto/Alertrule2Mapper.java
  13. 24 0
      web/health/src/main/java/com/gyee/frame/mapper/auto/AlertrulefailureMapper.java
  14. 23 0
      web/health/src/main/java/com/gyee/frame/mapper/auto/AlertrulefailuresubMapper.java
  15. 16 0
      web/health/src/main/java/com/gyee/frame/mapper/auto/AlertrulesubMapper.java
  16. 16 0
      web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconHealthReportMainMapper.java
  17. 16 0
      web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconHealthReportTargetMapper.java
  18. 2 2
      web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconPartPowerstatticMainMapper.java
  19. 2 2
      web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconPartpowerStatticsSubMapper.java
  20. 18 1
      web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconRecommenMainMapper.java
  21. 31 11
      web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconShutdownEventMapper.java
  22. 42 0
      web/health/src/main/java/com/gyee/frame/model/auto/Alarmcount.java
  23. 113 0
      web/health/src/main/java/com/gyee/frame/model/auto/Alarmsnap.java
  24. 80 0
      web/health/src/main/java/com/gyee/frame/model/auto/Alertrule2.java
  25. 50 0
      web/health/src/main/java/com/gyee/frame/model/auto/Alertrulefailure.java
  26. 38 0
      web/health/src/main/java/com/gyee/frame/model/auto/Alertrulefailuresub.java
  27. 46 0
      web/health/src/main/java/com/gyee/frame/model/auto/Alertrulesub.java
  28. 164 0
      web/health/src/main/java/com/gyee/frame/model/auto/ProEconHealthReportMain.java
  29. 69 0
      web/health/src/main/java/com/gyee/frame/model/auto/ProEconHealthReportTarget.java
  30. 1 1
      web/health/src/main/java/com/gyee/frame/model/auto/ProEconPartPowerstatticMain.java
  31. 4 3
      web/health/src/main/java/com/gyee/frame/model/auto/ProEconPartpowerStatticsSub.java
  32. 6 6
      web/health/src/main/java/com/gyee/frame/model/auto/ProEconRecommenMain.java
  33. 1 13
      web/health/src/main/java/com/gyee/frame/model/custom/ShutdowneventVo.java
  34. 29 0
      web/health/src/main/java/com/gyee/frame/model/vo/AlarmcountResultVo.java
  35. 19 0
      web/health/src/main/java/com/gyee/frame/model/vo/AlarmcountVo.java
  36. 18 0
      web/health/src/main/java/com/gyee/frame/model/vo/DataVlueVo.java
  37. 19 0
      web/health/src/main/java/com/gyee/frame/model/vo/EquipmentInfoDayTopSubVo.java
  38. 21 0
      web/health/src/main/java/com/gyee/frame/model/vo/EquipmentInfoDayTopVo.java
  39. 19 0
      web/health/src/main/java/com/gyee/frame/model/vo/HealthNumVo.java
  40. 34 0
      web/health/src/main/java/com/gyee/frame/model/vo/LossPowerRateVo.java
  41. 20 0
      web/health/src/main/java/com/gyee/frame/model/vo/ShutdownEventTypeVo.java
  42. 28 0
      web/health/src/main/java/com/gyee/frame/model/vo/StateJudgmentVo.java
  43. 25 0
      web/health/src/main/java/com/gyee/frame/service/auto/IAlarmcountService.java
  44. 21 0
      web/health/src/main/java/com/gyee/frame/service/auto/IAlarmsnapService.java
  45. 22 0
      web/health/src/main/java/com/gyee/frame/service/auto/IAlertrule2Service.java
  46. 20 0
      web/health/src/main/java/com/gyee/frame/service/auto/IAlertrulefailureService.java
  47. 19 0
      web/health/src/main/java/com/gyee/frame/service/auto/IAlertrulefailuresubService.java
  48. 16 0
      web/health/src/main/java/com/gyee/frame/service/auto/IAlertrulesubService.java
  49. 16 0
      web/health/src/main/java/com/gyee/frame/service/auto/IProEconHealthReportMainService.java
  50. 16 0
      web/health/src/main/java/com/gyee/frame/service/auto/IProEconHealthReportTargetService.java
  51. 2 2
      web/health/src/main/java/com/gyee/frame/service/auto/IProEconPartPowerstatticMainService.java
  52. 2 2
      web/health/src/main/java/com/gyee/frame/service/auto/IProEconPartpowerStatticsSubService.java
  53. 4 0
      web/health/src/main/java/com/gyee/frame/service/auto/IProEconRecommenMainService.java
  54. 44 0
      web/health/src/main/java/com/gyee/frame/service/auto/impl/AlarmcountServiceImpl.java
  55. 33 0
      web/health/src/main/java/com/gyee/frame/service/auto/impl/AlarmsnapServiceImpl.java
  56. 36 0
      web/health/src/main/java/com/gyee/frame/service/auto/impl/Alertrule2ServiceImpl.java
  57. 33 0
      web/health/src/main/java/com/gyee/frame/service/auto/impl/AlertrulefailureServiceImpl.java
  58. 31 0
      web/health/src/main/java/com/gyee/frame/service/auto/impl/AlertrulefailuresubServiceImpl.java
  59. 20 0
      web/health/src/main/java/com/gyee/frame/service/auto/impl/AlertrulesubServiceImpl.java
  60. 20 0
      web/health/src/main/java/com/gyee/frame/service/auto/impl/ProEconHealthReportMainServiceImpl.java
  61. 20 0
      web/health/src/main/java/com/gyee/frame/service/auto/impl/ProEconHealthReportTargetServiceImpl.java
  62. 2 2
      web/health/src/main/java/com/gyee/frame/service/auto/impl/ProEconPartPowerstatticMainServiceImpl.java
  63. 2 2
      web/health/src/main/java/com/gyee/frame/service/auto/impl/ProEconPartpowerStatticsSubServiceImpl.java
  64. 11 0
      web/health/src/main/java/com/gyee/frame/service/auto/impl/ProEconRecommenMainServiceImpl.java
  65. 21 21
      web/health/src/main/java/com/gyee/frame/service/health/HealthMainService.java
  66. 21 21
      web/health/src/main/java/com/gyee/frame/service/health/HealthOperationService.java
  67. 867 0
      web/health/src/main/java/com/gyee/frame/service/health/HealthReportService.java
  68. 35 32
      web/health/src/main/java/com/gyee/frame/service/health/HealthSubService.java
  69. 6 6
      web/health/src/main/java/com/gyee/frame/service/recommen/RecommenService.java
  70. 2 2
      web/health/src/main/resources/application-jn.yml

+ 12 - 0
web/health/pom.xml

@@ -96,6 +96,18 @@
             <artifactId>pagehelper-spring-boot-starter</artifactId>
             <version>1.2.5</version>
         </dependency>
+
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>1.4.3</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>jsqlparser</artifactId>
+                    <groupId>com.github.jsqlparser</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
         <!-- mysql驱动7.0-->
         <dependency>
             <groupId>mysql</groupId>

+ 6 - 6
web/health/src/main/java/com/gyee/frame/common/base/PageInfo.java

@@ -1,10 +1,10 @@
 package com.gyee.frame.common.base;
 
+import com.github.pagehelper.Page;
+
 import java.io.Serializable;
 import java.util.List;
 
-import com.github.pagehelper.Page;
-
 @SuppressWarnings({"rawtypes", "unchecked"})
 public class PageInfo<T> implements Serializable {
     private static final long serialVersionUID = 1L;
@@ -18,9 +18,9 @@ public class PageInfo<T> implements Serializable {
     //可以在页面中"显示startRow到endRow 共size条数据"
 
     //当前页面第一个元素在数据库中的行号
-    private int startRow;
+    private long startRow;
     //当前页面最后一个元素在数据库中的行号
-    private int endRow;
+    private long endRow;
     //总记录数
     private long total;
     //总页数
@@ -172,11 +172,11 @@ public class PageInfo<T> implements Serializable {
         return size;
     }
 
-    public int getStartRow() {
+    public long getStartRow() {
         return startRow;
     }
 
-    public int getEndRow() {
+    public long getEndRow() {
         return endRow;
     }
 

+ 1 - 1
web/health/src/main/java/com/gyee/frame/common/conf/GeneratorCodeConfig.java

@@ -39,7 +39,7 @@ public class GeneratorCodeConfig {
         // 全局配置
         GlobalConfig gc = new GlobalConfig();
         String projectPath = System.getProperty("user.dir");
-        gc.setOutputDir(projectPath+"\\web\\health"+ "\\src\\main\\java");
+        gc.setOutputDir(projectPath+"\\web\\health\\src\\main\\java");
         gc.setAuthor("shilin");
         gc.setOpen(false);
         //实体属性 Swagger2 注解

Різницю між файлами не показано, бо вона завелика
+ 0 - 592
web/health/src/main/java/com/gyee/frame/common/spring/Constant.java


+ 1 - 1
web/health/src/main/java/com/gyee/frame/common/spring/ConstantTR.java

@@ -3,7 +3,7 @@ package com.gyee.frame.common.spring;
 /**
  * 
  * 
- * 项目名称:nxfd 类名称:Constant 类描述: 创建人:石林 创建时间:2014-3-4 上午10:07:03 修改人:shilinno1
+ * 项目名称:nxfd 类名称:ContantXk 类描述: 创建人:石林 创建时间:2014-3-4 上午10:07:03 修改人:shilinno1
  * 修改时间:2014-3-4 上午10:07:03 修改备注:
  * 
  * @version

+ 8 - 8
web/health/src/main/java/com/gyee/frame/common/spring/InitialRedis.java

@@ -89,8 +89,8 @@
 //            for(Windpowerstation wp:InitialRunner.wpls)
 //            {
 //                String wpId=wp.getId();
-//                Windpowerstationpointnew gl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
-//                Windpowerstationpointnew fs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+//                Windpowerstationpointnew gl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, ContantXk.TPOINT_WP_SJGL);
+//                Windpowerstationpointnew fs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, ContantXk.SSPJFS);
 //
 //                int daynum = DateUtils.daysDiff(beginDate, endDate);
 //                long pried = 600 ;
@@ -169,8 +169,8 @@
 //            for(Project pj:InitialRunner.pjls)
 //            {
 //                String wpId=pj.getId();
-//                Windpowerstationpointnew gl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
-//                Windpowerstationpointnew fs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+//                Windpowerstationpointnew gl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, ContantXk.TPOINT_WP_SJGL);
+//                Windpowerstationpointnew fs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, ContantXk.SSPJFS);
 //
 //                int daynum = DateUtils.daysDiff(beginDate, endDate);
 //                long pried = 600 ;
@@ -249,8 +249,8 @@
 //            for(Line wp:InitialRunner.linels)
 //            {
 //                String wpId=wp.getId();
-//                Windpowerstationpointnew gl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
-//                Windpowerstationpointnew fs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+//                Windpowerstationpointnew gl = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, ContantXk.TPOINT_WP_SJGL);
+//                Windpowerstationpointnew fs = windPowerstationTestingPoint2Service.getWindPowerStationTestingPoint2(wpId, ContantXk.SSPJFS);
 //
 //                int daynum = DateUtils.daysDiff(beginDate, endDate);
 //                long pried = 600 ;
@@ -325,8 +325,8 @@
 //            for(Windturbine wt:InitialRunner.wtls)
 //            {
 //                String wpId=wt.getId();
-//                Windturbinetestingpointnew gl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wpId, Constant.TPOINT_WT_FJGL);
-//                Windturbinetestingpointnew fs = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wpId, Constant.TPOINT_WT_FJSSFS);
+//                Windturbinetestingpointnew gl = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wpId, ContantXk.CJ_SSGL);
+//                Windturbinetestingpointnew fs = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wpId, ContantXk.CJ_SSFS);
 //
 //                int daynum = DateUtils.daysDiff(beginDate, endDate);
 //                long pried = 600 ;

+ 20 - 0
web/health/src/main/java/com/gyee/frame/controller/HealthReportMainController.java

@@ -0,0 +1,20 @@
+package com.gyee.frame.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 健康报告主表 前端控制器
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@RestController
+@RequestMapping("//health-report-main")
+public class HealthReportMainController {
+
+}

+ 20 - 0
web/health/src/main/java/com/gyee/frame/controller/HealthReportTargetController.java

@@ -0,0 +1,20 @@
+package com.gyee.frame.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 健康报告指标 前端控制器
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@RestController
+@RequestMapping("//health-report-target")
+public class HealthReportTargetController {
+
+}

+ 220 - 0
web/health/src/main/java/com/gyee/frame/controller/health/HealthReportController.java

@@ -0,0 +1,220 @@
+package com.gyee.frame.controller.health;
+
+import com.gyee.frame.common.conf.AjaxStatus;
+import com.gyee.frame.common.domain.AjaxResult;
+import com.gyee.frame.model.auto.ProEconHealthReportMain;
+import com.gyee.frame.model.auto.ProEconHealthReportTarget;
+import com.gyee.frame.model.vo.*;
+import com.gyee.frame.service.health.HealthReportService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.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.*;
+
+@Controller
+@RequestMapping("/healthreport")
+@Api(value = "健康管理主页面", tags = "健康管理主页面")
+public class HealthReportController {
+
+    @Resource
+    private HealthReportService healthReportService;
+
+    @GetMapping("/getconHealthReportTargetMap")
+    @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 getEconHealthReportMain(Date recordDate, String wtId) throws Exception {
+
+
+        ProEconHealthReportMain vos = new ProEconHealthReportMain();
+
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            vos = healthReportService.getEconHealthReportMain(DateUtils.parseDate(recordDate), wtId);
+
+        }
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vos);
+        }
+
+    }
+
+    @GetMapping("/getconHealthReportTargetMap")
+    @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 getconHealthReportTargetMap(Date recordDate, String wtId) throws Exception {
+
+
+        Map<String, List<ProEconHealthReportTarget>> vos = new HashMap<>();
+
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            vos = healthReportService.getconHealthReportTargetMap(DateUtils.parseDate(recordDate), wtId);
+
+        }
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vos);
+        }
+
+    }
+
+
+    @GetMapping("/getStateJudgment")
+    @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 getStateJudgment(Date recordDate, String wtId) throws Exception {
+
+
+        StateJudgmentVo vos = new StateJudgmentVo();
+
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            vos = healthReportService.getStateJudgment(DateUtils.parseDate(recordDate), wtId);
+
+        }
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vos);
+        }
+
+    }
+
+    @GetMapping("/getHealthNumVoList")
+    @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 getHealthNumVoList(Date recordDate, String wtId) throws Exception {
+
+
+        List<HealthNumVo> vos = new ArrayList<>();
+
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            vos = healthReportService.getHealthNumVoList(DateUtils.parseDate(recordDate), wtId);
+
+        }
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vos);
+        }
+
+    }
+
+
+    @GetMapping("/getEquipmentInfoDayTopVoList")
+    @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 getEquipmentInfoDayTopVoList(Date recordDate, String wtId) throws Exception {
+
+
+        List<EquipmentInfoDayTopVo> vos = new ArrayList<>();
+
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            vos = healthReportService.getEquipmentInfoDayTopVoList(DateUtils.parseDate(recordDate), wtId);
+
+        }
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vos);
+        }
+
+    }
+
+    @GetMapping("/getHealthDataVlueVo")
+    @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"),
+            @ApiImplicitParam(name = "type", value = "类型(clx 齿轮箱,fdj 发电机,bj 变桨,zz 主轴)", required = true, dataType = "string", paramType = "query")
+    })
+    public AjaxResult getHealthDataVlueVo(Date recordDate, String wtId, String type) throws Exception {
+
+
+        List<DataVlueVo> vos = new ArrayList<>();
+
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            vos = healthReportService.getHealthDataVlueVo(DateUtils.parseDate(recordDate), wtId,type);
+
+        }
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vos);
+        }
+
+    }
+
+    @GetMapping("/getAlarmcountVoList")
+    @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 getAlarmcountVoList(Date recordDate, String wtId) throws Exception {
+
+
+        List<AlarmcountResultVo> vos = new ArrayList<>();
+
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            vos = healthReportService.getAlarmcountVoList(DateUtils.parseDate(recordDate), wtId);
+
+        }
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vos);
+        }
+
+    }
+
+    @GetMapping("/getHealthReportQxpc")
+    @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 getHealthReportQxpc(Date recordDate, String wtId) throws Exception {
+
+
+        List<DataVlueVo> vos = new ArrayList<>();
+
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            vos = healthReportService.getHealthReportQxpc(DateUtils.parseDate(recordDate), wtId);
+
+        }
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vos);
+        }
+
+    }
+}

+ 43 - 0
web/health/src/main/java/com/gyee/frame/mapper/auto/AlarmcountMapper.java

@@ -0,0 +1,43 @@
+package com.gyee.frame.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.frame.model.auto.Alarmcount;
+import com.gyee.frame.model.vo.AlarmcountVo;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface AlarmcountMapper extends BaseMapper<Alarmcount> {
+
+    @Select(" select * from alarmcount where time is not null and snapid=#{snapid} and  alarmdate>=#{beginDate} and alarmdate<=#{endDate}   ")
+    public List<Alarmcount> findAlarmcount(@Param(value = "snapid") Long snapid,@Param(value = "beginDate") Date beginDate, @Param(value = "endDate")Date endDate);
+
+
+    @Select(" select s.alerttext as alertText,p.name as name ,s.windturbineid as wtId ,a.count as counts,a.time as times " +
+            "    from   (select snapid,sum(count) as count,sum(time) as time from alarmcount" +
+            "    where alarmdate>=#{beginDate} and  alarmdate<=#{endDate} group by snapid )" +
+            "    a,alarmsnap s,windturbine_parts p where s.id=a.snapid and s.category3=p.id" +
+            " and s.windturbineid=#{wtId}  ")
+    public List<AlarmcountVo> findAlarmCountByWt(@Param(value = "wtId") String wtId, @Param(value = "beginDate") Date beginDate, @Param(value = "endDate")Date endDate);
+
+
+    @Select(" select s.alerttext as alertText,p.name as name ,w.modelid as modelId ,a.count as counts,a.time as times " +
+            "    from   (select snapid,sum(count) as count,sum(time) as time from alarmcount" +
+            "    where alarmdate>=#{beginDate} and  alarmdate<=#{endDate} group by snapid )" +
+            "    a,alarmsnap s,windturbine_parts p,windturbine w where s.id=a.snapid and s.category3=p.id" +
+            "  and w.id=s.windturbineid and  s.modelid =w.modelid and w.modelid=#{wtId}  ")
+    public List<AlarmcountVo> findAlarmCountByModelId(@Param(value = "modelId") String modelId, @Param(value = "beginDate") Date beginDate, @Param(value = "endDate")Date endDate);
+
+
+   
+}

+ 23 - 0
web/health/src/main/java/com/gyee/frame/mapper/auto/AlarmsnapMapper.java

@@ -0,0 +1,23 @@
+package com.gyee.frame.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.frame.model.auto.Alarmsnap;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface AlarmsnapMapper extends BaseMapper<Alarmsnap> {
+
+    @Select(" select * from alarmsnap where alertvalue=#{alertvalue}  and windturbineid=#{wtid} ")
+    List<Alarmsnap> getAlarmsnapList(  @Param(value = "wtid")String wtid,@Param(value = "alertvalue") Long alertvalue);
+
+}

+ 28 - 0
web/health/src/main/java/com/gyee/frame/mapper/auto/Alertrule2Mapper.java

@@ -0,0 +1,28 @@
+package com.gyee.frame.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.frame.model.auto.Alertrule2;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface Alertrule2Mapper extends BaseMapper<Alertrule2> {
+
+
+    @Select(" select * from alertrule2 where station=#{station} and modelid=#{modelid} ")
+    List<Alertrule2> findAlertRuleList(@Param(value = "station") String station, @Param(value = "modelid")String modelid);
+
+
+    @Select(" select * from alertrule2 where station=#{station} and modelid=#{modelid} and name=#{name} ")
+    List<Alertrule2> getAlertRuleIdByName(@Param(value = "station") String station, @Param(value = "modelid")String modelid, @Param(value = "name")String name);
+
+}

+ 24 - 0
web/health/src/main/java/com/gyee/frame/mapper/auto/AlertrulefailureMapper.java

@@ -0,0 +1,24 @@
+package com.gyee.frame.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.frame.model.auto.Alertrulefailure;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface AlertrulefailureMapper extends BaseMapper<Alertrulefailure> {
+
+
+    @Select(" select * from public.alertrulefailure f " +
+            "where name=#{name} and model= #{model} order by name")
+    public List<Alertrulefailure> getPartByAlertrule(@Param(value = "name") String name,@Param(value = "model") String model);
+}

+ 23 - 0
web/health/src/main/java/com/gyee/frame/mapper/auto/AlertrulefailuresubMapper.java

@@ -0,0 +1,23 @@
+package com.gyee.frame.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.frame.model.auto.Alertrulefailuresub;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface AlertrulefailuresubMapper extends BaseMapper<Alertrulefailuresub> {
+
+    @Select(" select altype from alertrulefailuresub where tid=#{tid}  ")
+    public List<String> getPartByAlertruleid(@Param(value = "tid") String tid);
+
+}

+ 16 - 0
web/health/src/main/java/com/gyee/frame/mapper/auto/AlertrulesubMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.frame.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.frame.model.auto.Alertrulesub;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-20
+ */
+public interface AlertrulesubMapper extends BaseMapper<Alertrulesub> {
+
+}

+ 16 - 0
web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconHealthReportMainMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.frame.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.frame.model.auto.ProEconHealthReportMain;
+
+/**
+ * <p>
+ * 健康报告主表 Mapper 接口
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+public interface ProEconHealthReportMainMapper extends BaseMapper<ProEconHealthReportMain> {
+
+}

+ 16 - 0
web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconHealthReportTargetMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.frame.mapper.auto;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.gyee.frame.model.auto.ProEconHealthReportTarget;
+
+/**
+ * <p>
+ * 健康报告指标 Mapper 接口
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+public interface ProEconHealthReportTargetMapper extends BaseMapper<ProEconHealthReportTarget> {
+
+}

+ 2 - 2
web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconPartPowerstatticMainMapper.java

@@ -1,6 +1,6 @@
 package com.gyee.frame.mapper.auto;
 
-import com.gyee.frame.model.auto.ProEconPartPowerstatticMain;
+import com.gyee.frame.model.auto.ProEconPartPowerStatticMain;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 /**
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @author shilin
  * @since 2023-04-24
  */
-public interface ProEconPartPowerstatticMainMapper extends BaseMapper<ProEconPartPowerstatticMain> {
+public interface ProEconPartPowerstatticMainMapper extends BaseMapper<ProEconPartPowerStatticMain> {
 
 }

+ 2 - 2
web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconPartpowerStatticsSubMapper.java

@@ -1,6 +1,6 @@
 package com.gyee.frame.mapper.auto;
 
-import com.gyee.frame.model.auto.ProEconPartpowerStatticsSub;
+import com.gyee.frame.model.auto.ProEconPartPowerStatticsSub;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 /**
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @author shilin
  * @since 2023-04-24
  */
-public interface ProEconPartpowerStatticsSubMapper extends BaseMapper<ProEconPartpowerStatticsSub> {
+public interface ProEconPartpowerStatticsSubMapper extends BaseMapper<ProEconPartPowerStatticsSub> {
 
 }

Різницю між файлами не показано, бо вона завелика
+ 18 - 1
web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconRecommenMainMapper.java


+ 31 - 11
web/health/src/main/java/com/gyee/frame/mapper/auto/ProEconShutdownEventMapper.java

@@ -6,6 +6,7 @@ import com.gyee.frame.model.custom.ShutdowneventVo;
 import com.gyee.frame.model.custom.SimpleVo;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
 
 import java.util.Date;
 import java.util.List;
@@ -23,10 +24,10 @@ public interface ProEconShutdownEventMapper extends BaseMapper<ProEconShutdownEv
 
 
     @Select("<script> select * from pro_econ_shutdown_event where  " +
-            "  <when test='wpId !=null'>  windpowerstation_id = #{wpId}   </when> " +
-            "  <when test='wtId !=null && wpId==null '> windturbine_id = #{wtId}   </when> " +
-            "  <when test='wtId !=null && wpId!=null '> and windturbine_id = #{wtId}   </when> " +
-            "  and stop_time >= #{beginDate}  and stop_time <= #{endDate} " +
+
+            "  <when test='wtId !=null  '> windturbine_id = #{wtId}   </when> " +
+            "  <when test='wpId !=null'>  and windpowerstation_id = #{wpId}   </when> " +
+            "  and stop_time >= #{beginDate}  and stop_time &lt;= #{endDate} " +
             "  <when test='type !=null  '> and status_code = #{type}   </when> " +
             " order by windturbine_id,start_time desc" +
             "</script>")
@@ -36,14 +37,33 @@ public interface ProEconShutdownEventMapper extends BaseMapper<ProEconShutdownEv
 
 
 
-    @Select(" select b.windpowerstationid id, count(*) filter(where a.stoptime between (SELECT current_date - interval '7 day') and current_date) as" +
-            "        value from shutdownevent a,windturbine b" +
-            "    where  a.windturbineid = b.id and a.statuscode=2   group by b.windpowerstationid")
-   
+    @Select(" select b.winpowerstation_id id, count(*) filter(where a.stop_time between (SELECT current_date - interval '7 day') and current_date) as" +
+            "        value from pro_econ_shutdown_event a,ProBasicEquipment b" +
+            "    where  a.windturbine_id = b.id and a.status_code=2   group by b.winpowerstation_id")
+
     List<SimpleVo> countStopByWp();
-    @Select("select b.projectid id, count(*) filter(where a.stoptime between (SELECT current_date - interval '7 day') and current_date) as" +
-            "        value from shutdownevent a,windturbine b" +
-            "    where  a.windturbineid = b.id and a.statuscode=2   group by b.projectid")
+    @Select("select b.projectid id, count(*) filter(where a.stop_time between (SELECT current_date - interval '7 day') and current_date) as" +
+            "        value from pro_econ_shutdown_event a,ProBasicEquipment b" +
+            "    where  a.windturbine_id = b.id and a.status_code=2   group by b.projectid")
     List<SimpleVo> countStopByPj();
 
+
+    @Select("select * from pro_econ_shutdown_event t  where  t.stop_time>=#{beginDate}   and  t.stop_time<=#{endDate} and t.status_code=2  and t.warning_id is null and t.stop_time is not null  order by t.windturbine_id")
+    public List<ProEconShutdownEvent> queryShutdowneventList(@Param(value = "beginDate") Date beginDate, @Param(value = "endDate")Date endDate);
+
+    @Select(" select h.id id,s.windturbineid windTurbineId,s.alertvalue warningId,s.alerttext warnDesc,h.alerttime stopTime,s.category2 stopTypeId " +
+            "  from ${alerthistory} h,alarmsnap s" +
+            "  where to_NUMBER(h.snapid) =to_NUMBER(s.id) and s.category1='windturbine' " +
+            " and h.messagetype=1 and s.windturbineid is not null " +
+            " and s.windturbineid=#{windturbineid} " +
+
+            "    and h.alerttime>=#{beginDate} " +
+            "     and h.alerttime<=#{endDate} " +
+            "     order by s.rank desc ")
+    public List<ShutdowneventVo> queryAlerthistoryList(@Param(value = "alerthistory")String alerthistory, @Param(value = "windturbineid")String windturbineid, @Param(value = "beginDate")Date beginDate, @Param(value = "endDate")Date endDate);
+
+
+    @Update("update pro_econ_shutdown_event t  set t.warning_id=#{warning_id},t.stop_type_id=#{stop_type_id}  where t.id=#{stopid}")
+    public int  updateShutdownevent(@Param(value = "warning_id") String warning_id, @Param(value = "stop_type_id")String stop_type_id, @Param(value = "stopid")String stopid);
+
 }

+ 42 - 0
web/health/src/main/java/com/gyee/frame/model/auto/Alarmcount.java

@@ -0,0 +1,42 @@
+package com.gyee.frame.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("ALARMCOUNT")
+public class Alarmcount extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("ID")
+    private Long id;
+
+    @TableField("ALARMDATE")
+    private Date alarmdate;
+
+    @TableField("SNAPID")
+    private Long snapid;
+
+    @TableField("COUNT")
+    private Integer count;
+
+    @TableField("TIME")
+    private Double time;
+
+
+}

+ 113 - 0
web/health/src/main/java/com/gyee/frame/model/auto/Alarmsnap.java

@@ -0,0 +1,113 @@
+package com.gyee.frame.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("ALARMSNAP")
+public class Alarmsnap extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private Long id;
+
+    @TableField("STATIONID")
+    private String stationid;
+
+    @TableField("PROJECTID")
+    private String projectid;
+
+    @TableField("LINEID")
+    private String lineid;
+
+    @TableField("WINDTURBINEID")
+    private String windturbineid;
+
+    @TableField("ALERTVALUE")
+    private BigDecimal alertvalue;
+
+    @TableField("CATEGORY1")
+    private String category1;
+
+    @TableField("CATEGORY2")
+    private String category2;
+
+    @TableField("CATEGORY3")
+    private String category3;
+
+    @TableField("RANK")
+    private String rank;
+
+    @TableField("ISOPENED")
+    private Integer isopened;
+
+    @TableField("STATIONNAME")
+    private String stationname;
+
+    @TableField("PROJECTNAME")
+    private String projectname;
+
+    @TableField("LINENAME")
+    private String linename;
+
+    @TableField("WINDTURBINENAME")
+    private String windturbinename;
+
+    @TableField("ALERTTEXT")
+    private String alerttext;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("TESTINGPOINTKEY")
+    private String testingpointkey;
+
+    @TableField("LASTUPDATETIME")
+    private Date lastupdatetime;
+
+    @TableField("DATAINFO")
+    private String datainfo;
+
+    @TableField("ISCONFIRMED")
+    private Integer isconfirmed;
+
+    @TableField("CONFIRMTIME")
+    private Date confirmtime;
+
+    @TableField("LASTUPDATEPERSON")
+    private String lastupdateperson;
+
+    @TableField("IFIXPICTURE")
+    private String ifixpicture;
+
+    @TableField("IFIXTAG")
+    private String ifixtag;
+
+    @TableField("LASTCLOSETIME")
+    private Date lastclosetime;
+
+    @TableField("LASTCLOSEPERSON")
+    private String lastcloseperson;
+
+    @TableField("CONFIRMPERSON")
+    private String confirmperson;
+
+
+}

+ 80 - 0
web/health/src/main/java/com/gyee/frame/model/auto/Alertrule2.java

@@ -0,0 +1,80 @@
+package com.gyee.frame.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("ALERTRULE2")
+public class Alertrule2 extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("DESCRIPTION")
+    private String description;
+
+    @TableField("EXPRESSION")
+    private String expression;
+
+    @TableField("TAG")
+    private String tag;
+
+    @TableField("RANK")
+    private String rank;
+
+    @TableField("ENABLED")
+    private Integer enabled;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("EDNAVALUE")
+    private Long ednavalue;
+
+    @TableField("CATEGORY")
+    private String category;
+
+    @TableField("RANGE")
+    private String range;
+
+    @TableField("STATION")
+    private String station;
+
+    @TableField("WINDTURBINE")
+    private String windturbine;
+
+    @TableField("LINE")
+    private String line;
+
+    @TableField("PROJECT")
+    private String project;
+
+    @TableField("ELECTRICAL")
+    private String electrical;
+
+    @TableField("TASKSTART")
+    private String taskstart;
+
+    @TableField("RELATEDPARTS")
+    private String relatedparts;
+
+
+}

+ 50 - 0
web/health/src/main/java/com/gyee/frame/model/auto/Alertrulefailure.java

@@ -0,0 +1,50 @@
+package com.gyee.frame.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("ALERTRULEFAILURE")
+public class Alertrulefailure extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("TID")
+    private String tid;
+
+    @TableField("GZPC")
+    private String gzpc;
+
+    @TableField("GZYY")
+    private String gzyy;
+
+    @TableField("GQJ")
+    private String gqj;
+
+    @TableField("XQSC")
+    private Double xqsc;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+
+}

+ 38 - 0
web/health/src/main/java/com/gyee/frame/model/auto/Alertrulefailuresub.java

@@ -0,0 +1,38 @@
+package com.gyee.frame.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("ALERTRULEFAILURESUB")
+public class Alertrulefailuresub extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("TID")
+    private String tid;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("ALTYPE")
+    private String altype;
+
+
+}

+ 46 - 0
web/health/src/main/java/com/gyee/frame/model/auto/Alertrulesub.java

@@ -0,0 +1,46 @@
+package com.gyee.frame.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("ALERTRULESUB")
+public class Alertrulesub extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("RID")
+    private String rid;
+
+    @TableField("FREQUENCY")
+    private BigDecimal frequency;
+
+    @TableField("TIMEINTERVAL")
+    private BigDecimal timeinterval;
+
+    @TableField("TIMERANGE")
+    private String timerange;
+
+    @TableField("TIMENUM")
+    private BigDecimal timenum;
+
+
+}

+ 164 - 0
web/health/src/main/java/com/gyee/frame/model/auto/ProEconHealthReportMain.java

@@ -0,0 +1,164 @@
+package com.gyee.frame.model.auto;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 健康报告主表
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProEconHealthReportMain extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编码
+     */
+    private String id;
+
+    /**
+     * 风场编号
+     */
+    private String wpId;
+
+    /**
+     * 风机编号
+     */
+    private String wtId;
+
+    /**
+     * 日期
+     */
+    private Date recordDate;
+
+    /**
+     * 评级结果
+     */
+    private String ratingResults;
+
+    /**
+     * 评级展望
+     */
+    private String ratingOutlook;
+
+    /**
+     * 评级有效期
+     */
+    private Date ratingValidityPeriod;
+
+    /**
+     * 首次并网时间
+     */
+    private Date firstIntegratedTime;
+
+    /**
+     * 运行天数
+     */
+    private Integer runningDays;
+
+    /**
+     * 月累加发电量
+     */
+    private Double monthFdl;
+
+    /**
+     * 月风能利用率
+     */
+    private Double yfnlyl;
+
+    /**
+     * 月利用小时
+     */
+    private Double ylyxs;
+
+    /**
+     * 月风能利用率环比
+     */
+    private Double yfnlylhb;
+
+    /**
+     * 月利用小时环比
+     */
+    private Double ylyxshb;
+
+    /**
+     * 月MTBF
+     */
+    private Double ymtbf;
+
+    /**
+     * 月MTTR
+     */
+    private Double ymttr;
+
+    /**
+     * 月MTTF
+     */
+    private Double ymttf;
+
+    /**
+     * 月故障次数
+     */
+    private Double ygzcs;
+
+    /**
+     * 检修间隔时长(月)
+     */
+    private Double jxjgsc;
+
+    /**
+     * 故障出现频次第1名
+     */
+    private String gztop1;
+
+    /**
+     * 故障出现频次第2名
+     */
+    private String gztop2;
+
+    /**
+     * 故障出现频次第3名
+     */
+    private String gztop3;
+
+    /**
+     * 报告生成日期
+     */
+    private Date reportCreatedate;
+
+    /**
+     * 月曲线偏差率保证实际
+     */
+    private Double yqxpcbbzsj;
+
+    /**
+     * 月曲线偏差率环比
+     */
+    private Double yqxpcbhb;
+
+    /**
+     * 月3-5米曲线偏差率
+     */
+    private Double y35mqxpcl;
+
+    /**
+     * 月5-11米曲线偏差率
+     */
+    private Double y511mqxpcl;
+
+    /**
+     * 月11米以上曲线偏差率
+     */
+    private Double y11mycqxpcl;
+
+
+}

+ 69 - 0
web/health/src/main/java/com/gyee/frame/model/auto/ProEconHealthReportTarget.java

@@ -0,0 +1,69 @@
+package com.gyee.frame.model.auto;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 健康报告指标
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProEconHealthReportTarget extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编码
+     */
+    private String id;
+
+    /**
+     * 主表编号
+     */
+    private String hid;
+
+    /**
+     * 风场编号
+     */
+    private String wpId;
+
+    /**
+     * 风机编号
+     */
+    private String wtId;
+
+    /**
+     * 日期
+     */
+    private Date recordDate;
+
+    /**
+     * 指标名称
+     */
+    private String name;
+
+    /**
+     * 当月值
+     */
+    private Double monthValue;
+
+    /**
+     * 上月值
+     */
+    private Double lastMonth1Value;
+
+    /**
+     * 前两月值
+     */
+    private Double lastMonth2Value;
+
+
+}

+ 1 - 1
web/health/src/main/java/com/gyee/frame/model/auto/ProEconPartPowerstatticMain.java

@@ -15,7 +15,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class ProEconPartPowerstatticMain extends Model {
+public class ProEconPartPowerStatticMain extends Model {
 
     private static final long serialVersionUID = 1L;
 

+ 4 - 3
web/health/src/main/java/com/gyee/frame/model/auto/ProEconPartpowerStatticsSub.java

@@ -1,11 +1,12 @@
 package com.gyee.frame.model.auto;
 
-import java.math.BigDecimal;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.time.LocalDate;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
 /**
  * <p>
  * 部件功率健康统计子表
@@ -16,7 +17,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class ProEconPartpowerStatticsSub extends Model {
+public class ProEconPartPowerStatticsSub extends Model {
 
     private static final long serialVersionUID = 1L;
 

+ 6 - 6
web/health/src/main/java/com/gyee/frame/model/auto/ProEconRecommenMain.java

@@ -1,11 +1,11 @@
 package com.gyee.frame.model.auto;
 
-import java.math.BigDecimal;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import java.time.LocalDate;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.util.Date;
+
 /**
  * <p>
  * 健康追踪主表
@@ -38,17 +38,17 @@ public class ProEconRecommenMain extends Model {
     /**
      * 日期
      */
-    private LocalDate recordDate;
+    private Date recordDate;
 
     /**
      * 创建记录时间
      */
-    private LocalDate createDate;
+    private Date createDate;
 
     /**
      * 速度
      */
-    private BigDecimal speed;
+    private Double speed;
 
     /**
      * 原因
@@ -68,7 +68,7 @@ public class ProEconRecommenMain extends Model {
     /**
      * 操作时间
      */
-    private LocalDate operationdate;
+    private Date operationdate;
 
     /**
      * 公式

+ 1 - 13
web/health/src/main/java/com/gyee/frame/model/custom/ShutdowneventVo.java

@@ -1,8 +1,6 @@
 
 package com.gyee.frame.model.custom;
 
-import com.gyee.frame.common.spring.Constant;
-
 import java.util.Date;
 
 
@@ -181,16 +179,6 @@ public class ShutdowneventVo {
 	public void setStatusCode(Integer statusCode) {
 		this.statusCode = statusCode;
 	}
-	public String getStatusName(){
-		String result = null;
-		if(statusCode != null){
-			if(statusCode==2){
-				result = Constant.FAULT_NAME;
-			}else if(statusCode==4){
-				result = Constant.MAINTENANCE_NAME;
-			}
-		}
-		return result;
-	}
+
 	
 }	

+ 29 - 0
web/health/src/main/java/com/gyee/frame/model/vo/AlarmcountResultVo.java

@@ -0,0 +1,29 @@
+package com.gyee.frame.model.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class AlarmcountResultVo {
+
+
+    //风机编号
+    public String wtId;
+    //部件名称
+    public String name;
+    //型号编号
+    public String modelId;
+    //报警描述
+    public String alertText;
+    //时长
+    public Integer times;
+    //平均时长
+    public Integer avgtimes;
+    //次数
+    public Integer counts;
+    //平均次数
+    public Integer avgcounts;
+}

+ 19 - 0
web/health/src/main/java/com/gyee/frame/model/vo/AlarmcountVo.java

@@ -0,0 +1,19 @@
+package com.gyee.frame.model.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class AlarmcountVo {
+
+
+    public String wtId;
+    public String name;
+    public String modelId;
+    public String alertText;
+    public Integer times;
+    public Integer counts;
+}

+ 18 - 0
web/health/src/main/java/com/gyee/frame/model/vo/DataVlueVo.java

@@ -0,0 +1,18 @@
+package com.gyee.frame.model.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class DataVlueVo {
+
+    public String wpId;
+    public String wtId;
+    public Date recordDate;
+    public Double value;
+}

+ 19 - 0
web/health/src/main/java/com/gyee/frame/model/vo/EquipmentInfoDayTopSubVo.java

@@ -0,0 +1,19 @@
+package com.gyee.frame.model.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class EquipmentInfoDayTopSubVo {
+
+
+    public String types;
+    public String targetName;
+    public Double value;
+    public Double num;
+    public Double score;
+
+}

+ 21 - 0
web/health/src/main/java/com/gyee/frame/model/vo/EquipmentInfoDayTopVo.java

@@ -0,0 +1,21 @@
+package com.gyee.frame.model.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class EquipmentInfoDayTopVo {
+
+
+    public String wtId;
+    public String wtName;
+    public String wtLevel;
+    public Integer wtNum;
+    public List<EquipmentInfoDayTopSubVo> topls;
+
+}

+ 19 - 0
web/health/src/main/java/com/gyee/frame/model/vo/HealthNumVo.java

@@ -0,0 +1,19 @@
+package com.gyee.frame.model.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class HealthNumVo {
+
+
+    public String dateRange;
+    public Integer fdj;
+    public Integer clx;
+    public Integer bj;
+    public Integer zz;
+    public Integer total;
+}

+ 34 - 0
web/health/src/main/java/com/gyee/frame/model/vo/LossPowerRateVo.java

@@ -0,0 +1,34 @@
+package com.gyee.frame.model.vo;
+
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-12
+ */
+@Data
+
+public class LossPowerRateVo extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    private String time;
+
+    private String wtid;
+
+    private Double realpower;
+
+    private Double losspower;
+
+    private Double rate;
+
+    private String wpid;
+
+
+}

+ 20 - 0
web/health/src/main/java/com/gyee/frame/model/vo/ShutdownEventTypeVo.java

@@ -0,0 +1,20 @@
+package com.gyee.frame.model.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class ShutdownEventTypeVo implements Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	private String  wtId;
+	private Date stopTime;
+	private int stopNum;
+
+}

+ 28 - 0
web/health/src/main/java/com/gyee/frame/model/vo/StateJudgmentVo.java

@@ -0,0 +1,28 @@
+package com.gyee.frame.model.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class StateJudgmentVo {
+
+
+    public String wtId;
+    public String wtName;
+    public String top1;
+    public String top2;
+    public String top3;
+    public String gzpc;
+    public String gzcl;
+    public String gqj;
+    public Double xqsc;
+    public Date recordDate;
+
+
+
+}

+ 25 - 0
web/health/src/main/java/com/gyee/frame/service/auto/IAlarmcountService.java

@@ -0,0 +1,25 @@
+package com.gyee.frame.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.frame.model.auto.Alarmcount;
+import com.gyee.frame.model.vo.AlarmcountVo;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface IAlarmcountService extends IService<Alarmcount> {
+
+      public List<Alarmcount> findAlarmcount(Long snapid, Date beginDate, Date endDate);
+      public List<AlarmcountVo> findAlarmCountByWt(String wtId, Date beginDate, Date endDate);
+
+      public List<AlarmcountVo> findAlarmCountByModelId(String modelId, Date beginDate, Date endDate);
+}
+

+ 21 - 0
web/health/src/main/java/com/gyee/frame/service/auto/IAlarmsnapService.java

@@ -0,0 +1,21 @@
+package com.gyee.frame.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.frame.model.auto.Alarmsnap;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface IAlarmsnapService extends IService<Alarmsnap> {
+
+    public List<Alarmsnap> getAlarmsnapList(String wtid,Long ednavalue);
+
+
+}

+ 22 - 0
web/health/src/main/java/com/gyee/frame/service/auto/IAlertrule2Service.java

@@ -0,0 +1,22 @@
+package com.gyee.frame.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.frame.model.auto.Alertrule2;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface IAlertrule2Service extends IService<Alertrule2> {
+
+    public List<Alertrule2> findAlertRuleList(String station, String modelid);
+
+    public List<Alertrule2> getAlertRuleIdByName(String station, String modelid,String name);
+
+}

+ 20 - 0
web/health/src/main/java/com/gyee/frame/service/auto/IAlertrulefailureService.java

@@ -0,0 +1,20 @@
+package com.gyee.frame.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.frame.model.auto.Alertrulefailure;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface IAlertrulefailureService extends IService<Alertrulefailure> {
+
+    public List<Alertrulefailure> getPartByAlertrule(String name,String model);
+
+}

+ 19 - 0
web/health/src/main/java/com/gyee/frame/service/auto/IAlertrulefailuresubService.java

@@ -0,0 +1,19 @@
+package com.gyee.frame.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.frame.model.auto.Alertrulefailuresub;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+public interface IAlertrulefailuresubService extends IService<Alertrulefailuresub> {
+
+    public List<String> getPartByAlertruleid(String tid);
+}

+ 16 - 0
web/health/src/main/java/com/gyee/frame/service/auto/IAlertrulesubService.java

@@ -0,0 +1,16 @@
+package com.gyee.frame.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.frame.model.auto.Alertrulesub;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-20
+ */
+public interface IAlertrulesubService extends IService<Alertrulesub> {
+
+}

+ 16 - 0
web/health/src/main/java/com/gyee/frame/service/auto/IProEconHealthReportMainService.java

@@ -0,0 +1,16 @@
+package com.gyee.frame.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.frame.model.auto.ProEconHealthReportMain;
+
+/**
+ * <p>
+ * 健康报告主表 服务类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+public interface IProEconHealthReportMainService extends IService<ProEconHealthReportMain> {
+
+}

+ 16 - 0
web/health/src/main/java/com/gyee/frame/service/auto/IProEconHealthReportTargetService.java

@@ -0,0 +1,16 @@
+package com.gyee.frame.service.auto;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.frame.model.auto.ProEconHealthReportTarget;
+
+/**
+ * <p>
+ * 健康报告指标 服务类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+public interface IProEconHealthReportTargetService extends IService<ProEconHealthReportTarget> {
+
+}

+ 2 - 2
web/health/src/main/java/com/gyee/frame/service/auto/IProEconPartPowerstatticMainService.java

@@ -1,6 +1,6 @@
 package com.gyee.frame.service.auto;
 
-import com.gyee.frame.model.auto.ProEconPartPowerstatticMain;
+import com.gyee.frame.model.auto.ProEconPartPowerStatticMain;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 /**
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @author shilin
  * @since 2023-04-24
  */
-public interface IProEconPartPowerstatticMainService extends IService<ProEconPartPowerstatticMain> {
+public interface IProEconPartPowerstatticMainService extends IService<ProEconPartPowerStatticMain> {
 
 }

+ 2 - 2
web/health/src/main/java/com/gyee/frame/service/auto/IProEconPartpowerStatticsSubService.java

@@ -1,6 +1,6 @@
 package com.gyee.frame.service.auto;
 
-import com.gyee.frame.model.auto.ProEconPartpowerStatticsSub;
+import com.gyee.frame.model.auto.ProEconPartPowerStatticsSub;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 /**
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @author shilin
  * @since 2023-04-24
  */
-public interface IProEconPartpowerStatticsSubService extends IService<ProEconPartpowerStatticsSub> {
+public interface IProEconPartpowerStatticsSubService extends IService<ProEconPartPowerStatticsSub> {
 
 }

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

@@ -20,4 +20,8 @@ public interface IProEconRecommenMainService extends IService<ProEconRecommenMai
     public List<ProEconRecommenMain> getRecommenmainListByStatus(String ismain, Date beginDate, Date endDate);
 
     public ProEconRecommenMain getRecommenmain(String rId) ;
+
+    public List<ProEconRecommenMain> findRecommenmainList(Date beginDate,Date endDate);
+
+    public List<ProEconRecommenMain> findRecommenmainList(String wtId,  Date recordDate);
 }

+ 44 - 0
web/health/src/main/java/com/gyee/frame/service/auto/impl/AlarmcountServiceImpl.java

@@ -0,0 +1,44 @@
+package com.gyee.frame.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.frame.mapper.auto.AlarmcountMapper;
+import com.gyee.frame.model.auto.Alarmcount;
+import com.gyee.frame.model.vo.AlarmcountVo;
+import com.gyee.frame.service.auto.IAlarmcountService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Service
+public class AlarmcountServiceImpl extends ServiceImpl<AlarmcountMapper, Alarmcount> implements IAlarmcountService {
+
+    @Resource
+    private AlarmcountMapper alarmcountMapper;
+
+    @Override
+    public List<Alarmcount> findAlarmcount(Long snapid, Date beginDate, Date endDate)
+    {
+        return alarmcountMapper.findAlarmcount(snapid, beginDate, endDate);
+    }
+
+    @Override
+    public List<AlarmcountVo> findAlarmCountByWt(String wtId, Date beginDate, Date endDate)
+    {
+        return alarmcountMapper.findAlarmCountByWt(wtId, beginDate, endDate);
+    }
+    @Override
+    public List<AlarmcountVo> findAlarmCountByModelId(String modelId, Date beginDate, Date endDate)
+    {
+        return alarmcountMapper.findAlarmCountByModelId(modelId, beginDate, endDate);
+    }
+}

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

@@ -0,0 +1,33 @@
+package com.gyee.frame.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.frame.mapper.auto.AlarmsnapMapper;
+import com.gyee.frame.model.auto.Alarmsnap;
+import com.gyee.frame.service.auto.IAlarmsnapService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Service
+public class AlarmsnapServiceImpl extends ServiceImpl<AlarmsnapMapper, Alarmsnap> implements IAlarmsnapService {
+
+
+    @Resource
+    private AlarmsnapMapper alarmsnapMapper;
+
+    @Override
+    public List<Alarmsnap> getAlarmsnapList(String wtid,Long ednavalue)
+    {
+        return  alarmsnapMapper.getAlarmsnapList( wtid, ednavalue);
+    }
+
+}

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

@@ -0,0 +1,36 @@
+package com.gyee.frame.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.frame.mapper.auto.Alertrule2Mapper;
+import com.gyee.frame.model.auto.Alertrule2;
+import com.gyee.frame.service.auto.IAlertrule2Service;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Service
+public class Alertrule2ServiceImpl extends ServiceImpl<Alertrule2Mapper, Alertrule2> implements IAlertrule2Service {
+
+    @Resource
+    private Alertrule2Mapper alertrule2Mapper;
+    @Override
+     public List<Alertrule2> findAlertRuleList(String station, String modelid) {
+        return  alertrule2Mapper.findAlertRuleList(station, modelid);
+    }
+
+    @Override
+    public List<Alertrule2> getAlertRuleIdByName(String station, String modelid,String name) {
+        return  alertrule2Mapper.getAlertRuleIdByName(station, modelid,name);
+    }
+
+
+}

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

@@ -0,0 +1,33 @@
+package com.gyee.frame.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.frame.mapper.auto.AlertrulefailureMapper;
+import com.gyee.frame.model.auto.Alertrulefailure;
+import com.gyee.frame.service.auto.IAlertrulefailureService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Service
+public class AlertrulefailureServiceImpl extends ServiceImpl<AlertrulefailureMapper, Alertrulefailure> implements IAlertrulefailureService {
+
+    @Resource
+    private AlertrulefailureMapper alertrulefailureMapper;
+    @Override
+    public List<Alertrulefailure> getPartByAlertrule(String name, String model)
+    {
+        return alertrulefailureMapper.getPartByAlertrule(name,model);
+    }
+
+
+
+}

+ 31 - 0
web/health/src/main/java/com/gyee/frame/service/auto/impl/AlertrulefailuresubServiceImpl.java

@@ -0,0 +1,31 @@
+package com.gyee.frame.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.frame.mapper.auto.AlertrulefailuresubMapper;
+import com.gyee.frame.model.auto.Alertrulefailuresub;
+import com.gyee.frame.service.auto.IAlertrulefailuresubService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-21
+ */
+@Service
+public class AlertrulefailuresubServiceImpl extends ServiceImpl<AlertrulefailuresubMapper, Alertrulefailuresub> implements IAlertrulefailuresubService {
+
+    @Resource
+    private AlertrulefailuresubMapper alertrulefailuresubMapper;
+
+    @Override
+    public List<String> getPartByAlertruleid(String tid)
+    {
+        return  alertrulefailuresubMapper.getPartByAlertruleid(tid);
+    }
+}

+ 20 - 0
web/health/src/main/java/com/gyee/frame/service/auto/impl/AlertrulesubServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.frame.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.frame.mapper.auto.AlertrulesubMapper;
+import com.gyee.frame.model.auto.Alertrulesub;
+import com.gyee.frame.service.auto.IAlertrulesubService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 石林
+ * @since 2022-01-20
+ */
+@Service
+public class AlertrulesubServiceImpl extends ServiceImpl<AlertrulesubMapper, Alertrulesub> implements IAlertrulesubService {
+
+}

+ 20 - 0
web/health/src/main/java/com/gyee/frame/service/auto/impl/ProEconHealthReportMainServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.frame.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.frame.mapper.auto.ProEconHealthReportMainMapper;
+import com.gyee.frame.model.auto.ProEconHealthReportMain;
+import com.gyee.frame.service.auto.IProEconHealthReportMainService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 健康报告主表 服务实现类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@Service
+public class ProEconHealthReportMainServiceImpl extends ServiceImpl<ProEconHealthReportMainMapper, ProEconHealthReportMain> implements IProEconHealthReportMainService {
+
+}

+ 20 - 0
web/health/src/main/java/com/gyee/frame/service/auto/impl/ProEconHealthReportTargetServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.frame.service.auto.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.frame.mapper.auto.ProEconHealthReportTargetMapper;
+import com.gyee.frame.model.auto.ProEconHealthReportTarget;
+import com.gyee.frame.service.auto.IProEconHealthReportTargetService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 健康报告指标 服务实现类
+ * </p>
+ *
+ * @author shilin
+ * @since 2023-05-07
+ */
+@Service
+public class ProEconHealthReportTargetServiceImpl extends ServiceImpl<ProEconHealthReportTargetMapper, ProEconHealthReportTarget> implements IProEconHealthReportTargetService {
+
+}

+ 2 - 2
web/health/src/main/java/com/gyee/frame/service/auto/impl/ProEconPartPowerstatticMainServiceImpl.java

@@ -1,6 +1,6 @@
 package com.gyee.frame.service.auto.impl;
 
-import com.gyee.frame.model.auto.ProEconPartPowerstatticMain;
+import com.gyee.frame.model.auto.ProEconPartPowerStatticMain;
 import com.gyee.frame.mapper.auto.ProEconPartPowerstatticMainMapper;
 import com.gyee.frame.service.auto.IProEconPartPowerstatticMainService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -15,6 +15,6 @@ import org.springframework.stereotype.Service;
  * @since 2023-04-24
  */
 @Service
-public class ProEconPartPowerstatticMainServiceImpl extends ServiceImpl<ProEconPartPowerstatticMainMapper, ProEconPartPowerstatticMain> implements IProEconPartPowerstatticMainService {
+public class ProEconPartPowerstatticMainServiceImpl extends ServiceImpl<ProEconPartPowerstatticMainMapper, ProEconPartPowerStatticMain> implements IProEconPartPowerstatticMainService {
 
 }

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

@@ -1,6 +1,6 @@
 package com.gyee.frame.service.auto.impl;
 
-import com.gyee.frame.model.auto.ProEconPartpowerStatticsSub;
+import com.gyee.frame.model.auto.ProEconPartPowerStatticsSub;
 import com.gyee.frame.mapper.auto.ProEconPartpowerStatticsSubMapper;
 import com.gyee.frame.service.auto.IProEconPartpowerStatticsSubService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -15,6 +15,6 @@ import org.springframework.stereotype.Service;
  * @since 2023-04-24
  */
 @Service
-public class ProEconPartpowerStatticsSubServiceImpl extends ServiceImpl<ProEconPartpowerStatticsSubMapper, ProEconPartpowerStatticsSub> implements IProEconPartpowerStatticsSubService {
+public class ProEconPartpowerStatticsSubServiceImpl extends ServiceImpl<ProEconPartpowerStatticsSubMapper, ProEconPartPowerStatticsSub> implements IProEconPartpowerStatticsSubService {
 
 }

+ 11 - 0
web/health/src/main/java/com/gyee/frame/service/auto/impl/ProEconRecommenMainServiceImpl.java

@@ -65,4 +65,15 @@ public class ProEconRecommenMainServiceImpl extends ServiceImpl<ProEconRecommenM
         return po;
 
     }
+
+    @Override
+    public List<ProEconRecommenMain> findRecommenmainList(Date beginDate, Date endDate)
+    {
+        return proEconRecommenMainMapper.findRecommenmainList(beginDate, endDate);
+    }
+    @Override
+    public List<ProEconRecommenMain> findRecommenmainList(String wtId,  Date recordDate)
+    {
+        return proEconRecommenMainMapper.findRecommenmainList(wtId, recordDate);
+    }
 }

+ 21 - 21
web/health/src/main/java/com/gyee/frame/service/health/HealthMainService.java

@@ -1,8 +1,8 @@
 package com.gyee.frame.service.health;
 
+import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.PointData;
 import com.gyee.frame.common.conf.GyeeConfig;
-import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.MatrixVo;
@@ -81,9 +81,9 @@ public class HealthMainService {
 
                 ProBasicEquipment wt = wtls.get(x);
 
-                ProBasicEquipmentPoint jkztpoint = proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), Constant.FJJKZZ);
+                ProBasicEquipmentPoint jkztpoint = proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.JKZT100);
                 jkpoints[x] = jkztpoint.getNemCode();
-                ProBasicEquipmentPoint fjztpoint = proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), Constant.FJZT);
+                ProBasicEquipmentPoint fjztpoint = proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.MXZT);
                 ztpoints[x] = fjztpoint.getNemCode();
 
             }
@@ -100,7 +100,7 @@ public class HealthMainService {
                 double zt = ztvalues.get(x).getPointValueInDouble();
 
 
-                if (zt == 2.0) {
+                if (zt == StatusDetailValue.GZ.getCode()) {
 
                     String[] str = new String[2];
                     str[0] = wtId;
@@ -161,14 +161,14 @@ public class HealthMainService {
 
             Calendar cal = Calendar.getInstance();
 
-            String uniformcode = Constant.YCFJJKZT1DAY;
+            String uniformcode = ContantXk.JKYC006;
             switch (type) {
                 case 1:
                     cal.add(Calendar.HOUR_OF_DAY, 2);
                     cal.set(Calendar.MINUTE, 0);
                     cal.set(Calendar.SECOND, 0);
 
-                    uniformcode = Constant.YCFJJKZT1DAY;
+                    uniformcode = ContantXk.JKYC006;
                     break;
                 case 2:
                 case 3:
@@ -177,8 +177,8 @@ public class HealthMainService {
                     cal.set(Calendar.MINUTE, 0);
                     cal.set(Calendar.SECOND, 0);
 
-                    uniformcode = Constant.YCFJJKZT1MONTH;
-                    //   uniformcode = Constant.YCFJJKZT7DAY;
+                    uniformcode = ContantXk.JKYC021;
+                    //   uniformcode = ContantXk.YCFJJKZT7DAY;
                     break;
                 default:
                     break;
@@ -390,7 +390,7 @@ public class HealthMainService {
                 wpmap.put("tqyb", 1.0);
                 // 获得实时风速测点编号
 
-                ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), Constant.TPOINT_WP_SSFS);
+                ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.SSPJFS);
                 String wppintId = point.getNemCode();
 
                 PointData ssfspoint = realApiUtil.getRealData(wppintId);
@@ -407,8 +407,8 @@ public class HealthMainService {
 
                 for (ProBasicEquipment wt : wtls) {
                     wtidls.add(wt.getId());
-                    codejkls.add(Constant.FJJKZT);
-                    codeztls.add(Constant.FJZT);
+                    codejkls.add(ContantXk.JKZT001);
+                    codeztls.add(ContantXk.MXZT);
                 }
 
                 Calendar cal = Calendar.getInstance();
@@ -442,7 +442,7 @@ public class HealthMainService {
                     double jk = jkvalues.get(x).getPointValueInDouble();
 
                     double zt = ztvalues.get(x).getPointValueInDouble();
-                    if (zt == 2.0) {
+                    if (zt == StatusDetailValue.GZ.getCode()) {
 
                         List<ShutdowneventVo> svos = proEconShutdownEventService.queryEvents(null, wtId, begin, end, ShutdowneventType.GZ.getCode());
 
@@ -574,12 +574,12 @@ public class HealthMainService {
 
                 // 获得实时风速测点编号
 
-                ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wpId, Constant.TPOINT_WP_RFDL);
+                ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.RFDL);
                 String wppintId1 = point.getNemCode();
                 PointData ssfspoint1 = realApiUtil.getRealData(wppintId1);
                 double rfdl = StringUtils.round(ssfspoint1.getPointValueInDouble(), digit);
 
-                ProBasicPowerstationPoint point2 = proBasicPowerstationPointService.getPowerstationPoint(wpId, Constant.TPOINT_WP_YFDL);
+                ProBasicPowerstationPoint point2 = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.YFDL);
                 String wppintId2 = point2.getNemCode();
                 PointData ssfspoint2 = realApiUtil.getRealData(wppintId2);
                 double yfdl = StringUtils.round(ssfspoint2.getPointValueInDouble(), digit);
@@ -747,8 +747,8 @@ public class HealthMainService {
                 for (ProBasicEquipment wt : wtls) {
 
                     wtidls.add(wt.getId());
-                    codejkls.add(Constant.FJJKZT);
-                    codeztls.add(Constant.ZTMX);
+                    codejkls.add(ContantXk.JKZT001);
+                    codeztls.add(ContantXk.MXZT);
 
                 }
 
@@ -1005,13 +1005,13 @@ public class HealthMainService {
 
             List<String> jczbls = new ArrayList<>();
             //良好状态数量
-            jczbls.add(proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), Constant.FJLHSL).getNemCode());
+            jczbls.add(proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.JKSLLH001).getNemCode());
             //正常状态数量
-            jczbls.add(proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), Constant.FJZCSL).getNemCode());
+            jczbls.add(proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.JKSLHG001).getNemCode());
             //注意状态数量
-            jczbls.add(proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), Constant.FJZYSL).getNemCode());
+            jczbls.add(proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.JKSLZY001).getNemCode());
             //严重状态数量
-            jczbls.add(proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), Constant.FJYZSL).getNemCode());
+            jczbls.add(proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.JKSLYZ001).getNemCode());
 
 
             List<PointData> jczblist = realApiUtil.getRealData(jczbls);
@@ -1051,7 +1051,7 @@ public class HealthMainService {
 
             for (ProBasicEquipment wt : wtls) {
                 //风机状态
-                fjzbls.add(proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), Constant.FJJKZT).getNemCode());
+                fjzbls.add(proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.JKZT001).getNemCode());
 
             }
 

+ 21 - 21
web/health/src/main/java/com/gyee/frame/service/health/HealthOperationService.java

@@ -1,7 +1,7 @@
 package com.gyee.frame.service.health;
 
+import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.PointData;
-import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.ProBasicPowerstation;
 import com.gyee.frame.model.auto.ProBasicPowerstationPoint;
@@ -47,13 +47,13 @@ public class HealthOperationService {
 
         List<String> idls=new ArrayList<>();
 
-        ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(QS, Constant.FJZCSL);
+        ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(QS, ContantXk.JKSLHG001);
         idls.add(point.getNemCode());// 合格(正常)
-        point = proBasicPowerstationPointService.getPowerstationPoint(QS, Constant.FJLHSL);
+        point = proBasicPowerstationPointService.getPowerstationPoint(QS, ContantXk.JKSLLH001);
         idls.add(point.getNemCode());// 良好
-        point = proBasicPowerstationPointService.getPowerstationPoint(QS, Constant.FJZYSL);
+        point = proBasicPowerstationPointService.getPowerstationPoint(QS, ContantXk.JKSLZY001);
         idls.add(point.getNemCode());// 注意
-        point = proBasicPowerstationPointService.getPowerstationPoint(QS, Constant.FJYZSL);
+        point = proBasicPowerstationPointService.getPowerstationPoint(QS, ContantXk.JKSLYZ001);
         idls.add(point.getNemCode());// 严重
 
 
@@ -98,16 +98,16 @@ public class HealthOperationService {
 
                     List<String> idls=new ArrayList<>();
 
-                    ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), Constant.FJZCSL);
+                    ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), ContantXk.JKSLHG001);
                     idls.add(point.getNemCode());// 合格(正常)
                // System.out.println("测点编号" +point.getNemCode());
-                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), Constant.FJLHSL);
+                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), ContantXk.JKSLLH001);
                     idls.add(point.getNemCode());// 良好
                // System.out.println("测点编号" +point.getNemCode());
-                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), Constant.FJZYSL);
+                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), ContantXk.JKSLZY001);
                     idls.add(point.getNemCode());// 注意
                // System.out.println("测点编号" +point.getNemCode());
-                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), Constant.FJYZSL);
+                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), ContantXk.JKSLYZ001);
                     idls.add(point.getNemCode());// 严重
 
                 //System.out.println("测点编号" +point.getNemCode());
@@ -147,13 +147,13 @@ public class HealthOperationService {
 
                     List<String> idls=new ArrayList<>();
 
-                    ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), Constant.FJZCSL);
+                    ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), ContantXk.JKSLHG001);
                     idls.add(point.getNemCode());// 合格(正常)
-                    point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), Constant.FJLHSL);
+                    point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), ContantXk.JKSLLH001);
                     idls.add(point.getNemCode());// 良好
-                    point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), Constant.FJZYSL);
+                    point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), ContantXk.JKSLZY001);
                     idls.add(point.getNemCode());// 注意
-                    point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), Constant.FJYZSL);
+                    point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), ContantXk.JKSLYZ001);
                     idls.add(point.getNemCode());// 严重
 
                     List<PointData> pols=realApiUtil.getRealData(idls);
@@ -207,9 +207,9 @@ public class HealthOperationService {
                 List<String> tList = new ArrayList<String>();
 
                 if ("1".equals(status)) {
-                    ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), Constant.FJZCSL);
+                    ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), ContantXk.JKSLHG001);
                     String hgCode = point.getNemCode();// 合格(正常)
-                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), Constant.FJLHSL);
+                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), ContantXk.JKSLLH001);
                     String lhCode = point.getNemCode();// 良好
                     List<PointData> phgList = realApiUtil.getHistoryDatasSnap(hgCode, start / 1000, end / 1000, 1L,
                             15 * 60L);
@@ -243,9 +243,9 @@ public class HealthOperationService {
 
                 } else {
 
-                    ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), Constant.FJZYSL);
+                    ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), ContantXk.JKSLZY001);
                     String zyCode = point.getNemCode();// 注意
-                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), Constant.FJYZSL);
+                    point = proBasicPowerstationPointService.getPowerstationPoint(wpList.get(i).getId(), ContantXk.JKSLYZ001);
                     String yzCode = point.getNemCode();// 严重
                     List<PointData> pzyList = realApiUtil.getHistoryDatasSnap(zyCode, start / 1000, end / 1000, 0L,
                             15 * 60L);
@@ -292,9 +292,9 @@ public class HealthOperationService {
 
 
                     if ("1".equals(status)) {
-                        ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), Constant.FJZCSL);
+                        ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), ContantXk.JKSLHG001);
                         String hgCode = point.getNemCode();// 合格(正常)
-                        point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), Constant.FJLHSL);
+                        point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), ContantXk.JKSLLH001);
                         String lhCode = point.getNemCode();// 良好
                         List<PointData> phgList = realApiUtil.getHistoryDatasSnap(hgCode, start / 1000, end / 1000, 0L,
                                 15 * 60L);
@@ -326,9 +326,9 @@ public class HealthOperationService {
                         }
 
                     } else {
-                        ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), Constant.FJZYSL);
+                        ProBasicPowerstationPoint point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), ContantXk.JKSLZY001);
                         String zyCode = point.getNemCode();// 注意
-                        point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), Constant.FJYZSL);
+                        point = proBasicPowerstationPointService.getPowerstationPoint(pList.get(i).getId(), ContantXk.JKSLYZ001);
                         String yzCode = point.getNemCode();// 严重
                         List<PointData> pzyList = realApiUtil.getHistoryDatasSnap(zyCode, start / 1000, end / 1000, 0L,
                                 15 * 60L);

+ 867 - 0
web/health/src/main/java/com/gyee/frame/service/health/HealthReportService.java

@@ -0,0 +1,867 @@
+package com.gyee.frame.service.health;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.contant.ContantXk;
+import com.gyee.common.model.PointData;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.vo.*;
+import com.gyee.frame.service.auto.*;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.RealTimeDataBaseFactory;
+import com.gyee.frame.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+
+@Service
+public class HealthReportService {
+
+    private static Logger logger = LoggerFactory.getLogger(HealthReportService.class);
+
+    @Resource
+    private IAlarmcountService alarmcountService;
+
+    @Resource
+    private IAlertrulefailureService alertrulefailureService;
+
+    @Resource
+    private IProBasicEquipmentPointService proBasicEquipmentPointService;
+    @Resource
+    private IProEconEquipmentInfoDayTopService proEconEquipmentInfoDayTopService;
+
+    @Resource
+    private IProEconEquipmentInfoDay4Service proEconEquipmentInfoDay4Service;
+
+
+    @Resource
+    private IProEconHealthReportMainService proEconHealthReportMainService;
+
+    @Resource
+    private IProEconHealthReportTargetService proEconHealthReportTargetService;
+
+
+    @Resource
+    private IProEconRecommenMainService proEconRecommenMainService;
+
+    IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
+
+
+    /**
+     * 获得健康报告指标信息
+     * @param recordDate
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public Map<String,List<ProEconHealthReportTarget>>  getconHealthReportTargetMap(Date recordDate, String wtId) throws Exception {
+
+        Map<String,List<ProEconHealthReportTarget>> map=new HashMap<>();
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+
+            QueryWrapper<ProEconHealthReportTarget> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("record_date", recordDate);
+            queryWrapper.eq("wt_id", wtId);
+            List<ProEconHealthReportTarget> ls=proEconHealthReportTargetService.list(queryWrapper);
+
+            if(!ls.isEmpty())
+            {
+                List<ProEconHealthReportTarget> ls1=new ArrayList<>();
+                List<ProEconHealthReportTarget> ls2=new ArrayList<>();
+                List<ProEconHealthReportTarget> ls3=new ArrayList<>();
+               for(ProEconHealthReportTarget et:ls)
+               {
+                    if(et.getName().equals("3-5米曲线偏差率"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("5-11米曲线偏差率"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("11米以上曲线偏差率"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("小风切入风速"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("小风切出风速"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("性能评价"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("发电机健康状态"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("齿轮箱健康状态"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("变桨健康状态"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("主轴健康状态"))
+                    {
+                        ls1.add(et);
+                    }else  if(et.getName().equals("风能利用率"))
+                    {
+                        ls1.add(et);
+                        ls2.add(et);
+                    }else  if(et.getName().equals("设备可利用率"))
+                    {
+                        ls1.add(et);
+                        ls3.add(et);
+                    }else  if(et.getName().equals("发电量"))
+                    {
+                        ls2.add(et);
+                    }else  if(et.getName().equals("检修损失电量"))
+                    {
+                        ls2.add(et);
+                    }else  if(et.getName().equals("故障损失电量"))
+                    {
+                        ls2.add(et);
+                    }else  if(et.getName().equals("受累损失电量"))
+                    {
+                        ls2.add(et);
+                    }else  if(et.getName().equals("限电损失电量"))
+                    {
+                        ls2.add(et);
+                    }else  if(et.getName().equals("性能损失电量"))
+                    {
+                        ls2.add(et);
+                    }else  if(et.getName().equals("风速"))
+                    {
+                        ls2.add(et);
+                    }else  if(et.getName().equals("理论发电量"))
+                    {
+                        ls2.add(et);
+                    }else  if(et.getName().equals("运行小时"))
+                    {
+                        ls3.add(et);
+                    }else  if(et.getName().equals("待机小时"))
+                    {
+                        ls3.add(et);
+                    }else  if(et.getName().equals("检修小时"))
+                    {
+                        ls3.add(et);
+                    }else  if(et.getName().equals("故障小时"))
+                    {
+                        ls3.add(et);
+                    }else  if(et.getName().equals("限电小时"))
+                    {
+                        ls3.add(et);
+                    }
+
+
+               }
+
+                map.put("ls1",ls1);
+                map.put("ls2",ls2);
+                map.put("ls3",ls3);
+            }
+
+
+
+        }
+        return map;
+
+    }
+
+    /**
+     * 获得健康报告主表信息
+     * @param recordDate
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public ProEconHealthReportMain getEconHealthReportMain(Date recordDate, String wtId) throws Exception {
+
+        ProEconHealthReportMain vo=new ProEconHealthReportMain();
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+
+            QueryWrapper<ProEconHealthReportMain> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("record_date", recordDate);
+            queryWrapper.eq("wt_id", wtId);
+            List<ProEconHealthReportMain> ls=proEconHealthReportMainService.list(queryWrapper);
+
+            if(!ls.isEmpty())
+            {
+                vo=ls.get(0);
+            }
+
+        }
+        return vo;
+
+    }
+
+    /**
+     * 获得推荐检修信息
+     *
+     * @param recordDate
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public StateJudgmentVo getStateJudgment(Date recordDate, String wtId) throws Exception {
+
+
+        StateJudgmentVo vo = new StateJudgmentVo();
+
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+
+            List<ProEconRecommenMain> sjls = proEconRecommenMainService.findRecommenmainList(wtId,recordDate);
+
+            if (!sjls.isEmpty()) {
+
+                if(InitialRunner.wtmap.containsKey(wtId))
+                {
+                    ProBasicEquipment wt=InitialRunner.wtmap.get(wtId);
+                    for (ProEconRecommenMain sj : sjls) {
+
+                        if(StringUtils.notEmp(sj.getTopThreeFault()))
+                        {
+                            String[] gzarr=sj.getTopThreeFault().split(",");
+                            if(StringUtils.notEmp(gzarr) && gzarr.length==3)
+                            {
+
+                                if(gzarr[0]!=null && !gzarr.equals("null"))
+                                {
+                                    String gz1=gzarr[0];
+                                    String gz2=gzarr[1];
+                                    String gz3=gzarr[2];
+
+                                    List<Alertrulefailure> afls=alertrulefailureService.getPartByAlertrule(gz1,wt.getModelId());
+                                    if(!afls.isEmpty())
+                                    {
+
+                                        Alertrulefailure af=afls.get(0);
+                                        vo.setTop1(gz1);
+                                        vo.setTop2(gz2);
+                                        vo.setTop3(gz3);
+                                        vo.setGzpc(af.getGzpc());
+                                        vo.setGzcl(af.getGzyy());
+                                        vo.setGqj(af.getGqj());
+                                        vo.setRecordDate(sj.getRecordDate());
+                                        vo.setXqsc(af.getXqsc());
+                                        vo.setWtId(wt.getId());
+                                        vo.setWtName(wt.getName());
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+
+            }
+        }
+        return vo;
+    }
+
+    /**
+     * 获得健康状态不良数据统计
+     *
+     * @param recordDate
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public List<HealthNumVo> getHealthNumVoList(Date recordDate, String wtId) throws Exception {
+
+        List<HealthNumVo> vos = new ArrayList<>();
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+
+            ProBasicEquipment wt = InitialRunner.wtmap.get(wtId);
+
+
+            Calendar c = Calendar.getInstance();
+            c.setTime(recordDate);
+            Date endDate = c.getTime();
+            c.add(Calendar.DAY_OF_MONTH, -1);
+            Date beginDate = DateUtils.truncate(c.getTime());
+
+            HealthNumVo vo1 = new HealthNumVo();
+            vo1.setDateRange("1天");
+            getHealthNumVo(vo1, wt, endDate, beginDate);
+
+            c.setTime(recordDate);
+            endDate = c.getTime();
+            c.add(Calendar.DAY_OF_MONTH, -3);
+            beginDate = DateUtils.truncate(c.getTime());
+            HealthNumVo vo2 = new HealthNumVo();
+            vo2.setDateRange("3天");
+            getHealthNumVo(vo2, wt, endDate, beginDate);
+
+            c.setTime(recordDate);
+            endDate = c.getTime();
+            c.set(Calendar.DAY_OF_MONTH, 1);
+            beginDate = DateUtils.truncate(c.getTime());
+            HealthNumVo vo3 = new HealthNumVo();
+            vo3.setDateRange("统计期内");
+            getHealthNumVo(vo3, wt, endDate, beginDate);
+        }
+        return vos;
+    }
+
+    /**
+     * 获得等级评估结果
+     *
+     * @param recordDate
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public List<EquipmentInfoDayTopVo> getEquipmentInfoDayTopVoList(Date recordDate, String wtId) throws Exception {
+
+        List<EquipmentInfoDayTopVo> vos = new ArrayList<>();
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+
+
+            QueryWrapper<ProEconEquipmentInfoDayTop> queryWrapperTop = new QueryWrapper<>();
+            queryWrapperTop.eq("record_date", recordDate);
+            queryWrapperTop.eq("windturbine_Id", wtId);
+            queryWrapperTop.eq("types", 2);
+            List<ProEconEquipmentInfoDayTop> eidTopls = proEconEquipmentInfoDayTopService.list(queryWrapperTop);
+            if (!eidTopls.isEmpty()) {
+                for (ProEconEquipmentInfoDayTop eid : eidTopls) {
+
+                    EquipmentInfoDayTopVo vo = new EquipmentInfoDayTopVo();
+                    vo.setWtId(eid.getWindturbineId());
+                    if (InitialRunner.wtmap.containsKey(eid.getWindturbineId())) {
+                        ProBasicEquipment wt = InitialRunner.wtmap.get(eid.getWindturbineId());
+                        vo.setWtName(wt.getName());
+                    }
+                    vo.setWtLevel(eid.getDayLevel());
+                    vo.setWtNum(eid.getDayRank());
+                    List<EquipmentInfoDayTopSubVo> topls = new ArrayList<>();
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "发电量");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "理论发电量");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "平均功率");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "故障损失电量");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "限电损失电量");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "检修损失电量");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "故障时间");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "检修时间");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "停机时间");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "平均切入风速");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "性能损失电量");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "拟合优度");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "功率一致性系数");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "设备可利用率");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "等效可利用系数");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "有效风时速");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "平均风速");
+                    setEquipmentInfoDayTopSubVoList(topls, eid, "静风频率");
+                    vo.setTopls(topls);
+
+                    vos.add(vo);
+                }
+
+            }
+
+        }
+
+        return vos;
+    }
+
+    private void setEquipmentInfoDayTopSubVoList(List<EquipmentInfoDayTopSubVo> topls, ProEconEquipmentInfoDayTop eid, String name) {
+
+        if (StringUtils.notEmp(eid) && StringUtils.notEmp(name)) {
+
+
+            switch (name) {
+                case "发电量": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("发电量");
+                    subVo.setValue(eid.getDayfdl());
+                    subVo.setNum(eid.getMonthfdl());
+                    subVo.setScore(eid.getYearfdl());
+                    topls.add(subVo);
+                    break;
+                }
+                case "理论发电量": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("理论发电量");
+                    subVo.setValue(eid.getDayllfdl());
+                    subVo.setNum(eid.getMonthllfdl());
+                    subVo.setScore(eid.getYearllfdl());
+                    topls.add(subVo);
+                    break;
+                }
+                case "平均功率": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("平均功率");
+                    subVo.setValue(eid.getDaygl());
+                    subVo.setNum(eid.getMonthgl());
+                    subVo.setScore(eid.getYeargl());
+                    topls.add(subVo);
+                    break;
+                }
+                case "故障损失电量": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("故障损失电量");
+                    subVo.setValue(eid.getDaygzssdl());
+                    subVo.setNum(eid.getMonthgzssdl());
+                    subVo.setScore(eid.getYeargzssdl());
+                    topls.add(subVo);
+                    break;
+                }
+                case "限电损失电量": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("限电损失电量");
+                    subVo.setValue(eid.getDayxdssdl());
+                    subVo.setNum(eid.getMonthxdssdl());
+                    subVo.setScore(eid.getYearxdssdl());
+                    topls.add(subVo);
+                    break;
+                }
+                case "检修损失电量": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("检修损失电量");
+                    subVo.setValue(eid.getDaywhssdl());
+                    subVo.setNum(eid.getMonthwhssdl());
+                    subVo.setScore(eid.getYearwhssdl());
+                    topls.add(subVo);
+                    break;
+                }
+                case "故障时间": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("故障时间");
+                    subVo.setValue(eid.getDaygzsj());
+                    subVo.setNum(eid.getMonthgzsj());
+                    subVo.setScore(eid.getYeargzsj());
+                    topls.add(subVo);
+                    break;
+                }
+                case "检修时间": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("检修时间");
+                    subVo.setValue(eid.getDaywhsj());
+                    subVo.setNum(eid.getMonthwhsj());
+                    subVo.setScore(eid.getYearwhsj());
+                    topls.add(subVo);
+                    break;
+                }
+                case "运行时间": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("运行时间");
+                    subVo.setValue(eid.getDayyxsj());
+                    subVo.setNum(eid.getMonthyxsj());
+                    subVo.setScore(eid.getYearyxsj());
+                    topls.add(subVo);
+                    break;
+                }
+                case "停机时间": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("");
+                    subVo.setTargetName("停机时间");
+                    subVo.setValue(eid.getDaytjsj());
+                    subVo.setNum(eid.getMonthtjsj());
+                    subVo.setScore(eid.getYeartjsj());
+                    topls.add(subVo);
+                    break;
+                }
+                case "平均切入风速": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("性能");
+                    subVo.setTargetName("平均切入风速");
+                    subVo.setValue(eid.getDayxfqr());
+                    subVo.setNum(eid.getMonthxfqr());
+                    subVo.setScore(eid.getYearxfqr());
+                    topls.add(subVo);
+                    break;
+                }
+                case "性能损失电量": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("性能");
+                    subVo.setTargetName("性能损失电量");
+                    subVo.setValue(eid.getDayxnssdl());
+                    subVo.setNum(eid.getMonthxnssdl());
+                    subVo.setScore(eid.getYearxnssdl());
+                    topls.add(subVo);
+                    break;
+                }
+                case "拟合优度": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("性能");
+                    subVo.setTargetName("拟合优度");
+                    subVo.setValue(eid.getDaynhyd());
+                    subVo.setNum(eid.getMonthnhyd());
+                    subVo.setScore(eid.getYearnhyd());
+                    topls.add(subVo);
+                    break;
+                }
+                case "功率一致性系数": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("可靠性管理");
+                    subVo.setTargetName("功率一致性系数");
+                    subVo.setValue(eid.getDayglyzxxs());
+                    subVo.setNum(eid.getMonthglyzxxs());
+                    subVo.setScore(eid.getYearglyzxxs());
+                    topls.add(subVo);
+                    break;
+                }
+                case "设备可利用率": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("可靠性管理");
+                    subVo.setTargetName("设备可利用率");
+                    subVo.setValue(eid.getDaysbklyl());
+                    subVo.setNum(eid.getMonthsbklyl());
+                    subVo.setScore(eid.getYearsbklyl());
+                    topls.add(subVo);
+                    break;
+                }
+                case "等效可利用系数": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("可靠性管理");
+                    subVo.setTargetName("等效可利用系数");
+                    subVo.setValue(eid.getDaydxkyxs());
+                    subVo.setNum(eid.getMonthdxkyxs());
+                    subVo.setScore(eid.getYeardxkyxs());
+                    topls.add(subVo);
+                    break;
+                }
+                case "有效风时速": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("可靠性管理");
+                    subVo.setTargetName("有效风时速");
+                    subVo.setValue(eid.getDayyxfss());
+                    subVo.setNum(eid.getMonthyxfss());
+                    subVo.setScore(eid.getYearyxfss());
+                    topls.add(subVo);
+                    break;
+                }
+                case "平均风速": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("资源");
+                    subVo.setTargetName("平均风速");
+                    subVo.setValue(eid.getDayfs());
+                    subVo.setNum(eid.getMonthfs());
+                    subVo.setScore(eid.getYearfs());
+                    topls.add(subVo);
+                    break;
+                }
+                case "静风频率": {
+                    EquipmentInfoDayTopSubVo subVo = new EquipmentInfoDayTopSubVo();
+                    subVo.setTypes("资源");
+                    subVo.setTargetName("静风频率");
+                    subVo.setValue(eid.getDayjfpl());
+                    subVo.setNum(eid.getMonthjfpl());
+                    subVo.setScore(eid.getYearjfpl());
+                    topls.add(subVo);
+                    break;
+                }
+
+            }
+
+        }
+
+
+    }
+
+
+    /**
+     * 获得部件健康得分曲线
+     *
+     * @param recordDate
+     * @param wtId
+     * @param type
+     * @return
+     * @throws Exception
+     */
+    public List<DataVlueVo> getHealthDataVlueVo(Date recordDate, String wtId, String type) throws Exception {
+
+        List<DataVlueVo> vos = new ArrayList<>();
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId) && StringUtils.notEmp(type)) {
+
+            ProBasicEquipment wt = InitialRunner.wtmap.get(wtId);
+
+
+            Calendar c = Calendar.getInstance();
+            c.setTime(recordDate);
+            Date endDate = c.getTime();
+            c.set(Calendar.DAY_OF_MONTH, -1);
+            Date beginDate = DateUtils.truncate(c.getTime());
+            ProBasicEquipmentPoint point = null;
+            if (type.equals("fdj")) {
+                point = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKJL003);
+
+            } else if (type.equals("clx")) {
+                point = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKJL002);
+
+            } else if (type.equals("bj")) {
+                point = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKJL004);
+
+            } else if (type.equals("zz")) {
+                point = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKJL005);
+
+            }
+
+            List<PointData> fjjkztls = realApiUtil.getHistoryDatasSnap(point.getNemCode(), beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600l);
+            Double fdj = 0.0;
+
+            if (!fjjkztls.isEmpty()) {
+                for (PointData pd : fjjkztls) {
+                    DataVlueVo vo = new DataVlueVo();
+                    vo.setRecordDate(new Date(pd.getPointTime()));
+                    vo.setValue(pd.getPointValueInDouble());
+                    vos.add(vo);
+                }
+            }
+        }
+
+
+        return vos;
+    }
+
+    private HealthNumVo getHealthNumVo(HealthNumVo vo, ProBasicEquipment wt, Date endDate, Date beginDate) throws Exception {
+
+
+        ProBasicEquipmentPoint fjjkzt = proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.JKZT003);
+        //发电机不良健康状态统计
+        List<PointData> fjjkztls = realApiUtil.getHistoryDatasSnap(fjjkzt.getNemCode(), beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600l);
+        Double fdj = 0.0;
+
+        if (!fjjkztls.isEmpty()) {
+            for (PointData pd : fjjkztls) {
+                if (pd.getPointValueInDouble() == 3 || pd.getPointValueInDouble() == 4) {
+                    fdj = fdj + 1;
+                }
+            }
+        }
+        vo.setFdj(fdj.intValue());
+        fjjkzt = proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.JKZT002);
+        //齿轮箱不良健康状态统计
+        fjjkztls = realApiUtil.getHistoryDatasSnap(fjjkzt.getNemCode(), beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600l);
+        Double clx = 0.0;
+
+        if (!fjjkztls.isEmpty()) {
+            for (PointData pd : fjjkztls) {
+                if (pd.getPointValueInDouble() == 3 || pd.getPointValueInDouble() == 4) {
+                    clx = clx + 1;
+                }
+            }
+        }
+
+        fjjkzt = proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.JKZT004);
+        //变桨不良健康状态统计
+        fjjkztls = realApiUtil.getHistoryDatasSnap(fjjkzt.getNemCode(), beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600l);
+        Double bj = 0.0;
+
+        if (!fjjkztls.isEmpty()) {
+            for (PointData pd : fjjkztls) {
+                if (pd.getPointValueInDouble() == 3 || pd.getPointValueInDouble() == 4) {
+                    bj = bj + 1;
+                }
+            }
+        }
+        vo.setBj(bj.intValue());
+
+        fjjkzt = proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), ContantXk.JKZT005);
+        //主轴不良健康状态统计
+        fjjkztls = realApiUtil.getHistoryDatasSnap(fjjkzt.getNemCode(), beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 3600l);
+        Double zz = 0.0;
+
+        if (!fjjkztls.isEmpty()) {
+            for (PointData pd : fjjkztls) {
+                if (pd.getPointValueInDouble() == 3 || pd.getPointValueInDouble() == 4) {
+                    zz = zz + 1;
+                }
+            }
+        }
+        vo.setZz(zz.intValue());
+
+        vo.setTotal(Integer.valueOf(String.valueOf(fdj + clx + bj + zz)));
+        return vo;
+    }
+
+    /**
+     * 获得报警部件次数统计
+     *
+     * @param recordDate
+     * @param wtId
+     * @return
+     */
+    public List<AlarmcountResultVo> getAlarmcountVoList(Date recordDate, String wtId) {
+
+        List<AlarmcountResultVo> vos = new ArrayList<>();
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            Calendar c = Calendar.getInstance();
+            c.setTime(DateUtils.truncate(recordDate));
+
+            Date end = c.getTime();
+            c.set(Calendar.DAY_OF_MONTH, 1);
+            Date begin = c.getTime();
+
+            ProBasicEquipment wt = InitialRunner.wtmap.get(wtId);
+
+            Map<String, AlarmcountVo> map = new HashMap<>();
+            List<AlarmcountVo> vomodells = alarmcountService.findAlarmCountByModelId(wt.getModelId(), begin, end);
+            if (!vomodells.isEmpty()) {
+                for (AlarmcountVo vo : vomodells) {
+                    map.put(vo.getName() + vo.getAlertText(), vo);
+                }
+            }
+
+            List<AlarmcountVo> vols = alarmcountService.findAlarmCountByWt(wtId, begin, end);
+
+            if (!vols.isEmpty()) {
+                for (AlarmcountVo vo : vols) {
+                    AlarmcountResultVo po = new AlarmcountResultVo();
+                    if (map.containsKey(vo.getName() + vo.getAlertText())) {
+                        AlarmcountVo avgvo = map.get(vo.getName() + vo.getAlertText());
+                        po.setAvgtimes(avgvo.getTimes());
+                        po.setAvgcounts(avgvo.getCounts());
+                    }
+
+                    po.setName(vo.getName());
+                    po.setAlertText(vo.getAlertText());
+                    po.setModelId(wt.getModelId());
+                    po.setWtId(wt.getId());
+                    po.setTimes(vo.getTimes());
+                    po.setCounts(vo.getCounts());
+
+                }
+            }
+        }
+        return vos;
+    }
+
+    /**
+     * 获得曲线偏差率列表
+     *
+     * @param recordDate
+     * @param wtId
+     * @return
+     * @throws Exception
+     */
+    public List<DataVlueVo> getHealthReportQxpc(Date recordDate, String wtId) throws Exception {
+
+
+        List<DataVlueVo> vols = new ArrayList<>();
+        if (StringUtils.notEmp(recordDate) && StringUtils.notEmp(wtId)) {
+            Calendar c = Calendar.getInstance();
+            c.setTime(DateUtils.truncate(recordDate));
+
+            Date end = c.getTime();
+            c.set(Calendar.DAY_OF_MONTH, 1);
+            Date begin = c.getTime();
+
+
+            QueryWrapper<ProEconEquipmentInfoDay4> queryWrapper4 = new QueryWrapper<>();
+            queryWrapper4.ge("record_date", begin);
+            queryWrapper4.le("record_date", end);
+            queryWrapper4.eq("windturbine_id", wtId);
+
+            List<ProEconEquipmentInfoDay4> eid4ls = proEconEquipmentInfoDay4Service.list(queryWrapper4);
+            if (!eid4ls.isEmpty()) {
+                for (ProEconEquipmentInfoDay4 eid : eid4ls) {
+                    DataVlueVo vo = new DataVlueVo();
+
+                    vo.setValue(eid.getRqxpcbbzsj());
+                    vo.setWtId(wtId);
+                    vo.setRecordDate(eid.getRecordDate());
+                    vols.add(vo);
+                }
+
+            }
+        }
+
+        return vols;
+
+    }
+
+
+    private void setHealthStatus(ProEconHealthReportTarget po, Date recordDate, ProBasicEquipment wt, String code) throws Exception {
+        Calendar c = Calendar.getInstance();
+        c.setTime(recordDate);
+
+        Date endDate = c.getTime();
+        c.set(Calendar.DAY_OF_MONTH, 1);
+        Date beginDate = DateUtils.truncate(c.getTime());
+
+        ProBasicEquipmentPoint fjjkzt = proBasicEquipmentPointService.getEquipmentPoint(wt.getId(), code);
+        //获得当月健康状态
+        double jktzdy = judgeHealthStatus(endDate, beginDate, fjjkzt);
+        po.setMonthValue(jktzdy);
+        c.setTime(endDate);
+        c.add(Calendar.MONTH, -1);
+        endDate = c.getTime();
+        c.set(Calendar.DAY_OF_MONTH, 1);
+
+        beginDate = c.getTime();
+        //获得上月健康状态
+        double jktzsy = judgeHealthStatus(endDate, beginDate, fjjkzt);
+        po.setLastMonth1Value(jktzsy);
+        c.setTime(endDate);
+        c.add(Calendar.MONTH, -1);
+        endDate = c.getTime();
+        c.set(Calendar.DAY_OF_MONTH, 1);
+        beginDate = c.getTime();
+        //获得大上月健康状态
+        double jktzdsy = judgeHealthStatus(endDate, beginDate, fjjkzt);
+        po.setLastMonth2Value(jktzdsy);
+    }
+
+
+    
+
+    private double judgeHealthStatus(Date endDate, Date beginDate, ProBasicEquipmentPoint fjjkzt) throws Exception {
+        List<PointData> fjjkztls = realApiUtil.getHistoryDatasSnap(fjjkzt.getNemCode(), beginDate.getTime() / 1000, endDate.getTime() / 1000, null, 21600l);
+        double statusvalue = 1;
+        String status = "良好";
+        double lh = 0;
+        double zc = 0;
+        double zy = 0;
+        double yz = 0;
+        if (!fjjkztls.isEmpty()) {
+            for (PointData pd : fjjkztls) {
+                if (pd.getPointValueInDouble() == 1) {
+                    lh = lh + 1;
+                } else if (pd.getPointValueInDouble() == 2) {
+                    zc = zc + 1;
+                } else if (pd.getPointValueInDouble() == 3) {
+                    zy = zy + 1;
+                } else if (pd.getPointValueInDouble() == 4) {
+                    yz = yz + 1;
+                }
+            }
+            List<Double> values = new ArrayList<>();
+
+            values.add(lh);
+            values.add(zc);
+            values.add(zy);
+            values.add(yz);
+
+            statusvalue = values.indexOf(Collections.max(values)) + 1;
+
+//            switch (statusvalue) {
+//                case 0:
+//                    return "良好";
+//                case 1:
+//                    return "正常";
+//                case 2:
+//                    return "注意";
+//                case 3:
+//                    return "严重";
+//
+//            }
+        }
+
+        return statusvalue;
+    }
+
+
+}

+ 35 - 32
web/health/src/main/java/com/gyee/frame/service/health/HealthSubService.java

@@ -1,11 +1,14 @@
 package com.gyee.frame.service.health;
 
+import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.PointData;
-import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.*;
 import com.gyee.frame.model.custom.*;
-import com.gyee.frame.model.vo.*;
+import com.gyee.frame.model.vo.ShutdowneventType;
+import com.gyee.frame.model.vo.StatusDetailValue;
+import com.gyee.frame.model.vo.WtTopScoreLevel;
+import com.gyee.frame.model.vo.WtTopType;
 import com.gyee.frame.service.auto.*;
 import com.gyee.frame.util.*;
 import org.springframework.stereotype.Service;
@@ -101,7 +104,7 @@ public class HealthSubService {
             List<ProEconStateJudgmentDay> ls = proEconStateJudgmentDayService.findStatejudgmentrecord(wtId);
 
 
-            ProBasicEquipmentPoint ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.ZTMX);
+            ProBasicEquipmentPoint ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.MXZT);
             PointData point = realApiUtil.getRealData(ai);
 
 
@@ -151,15 +154,15 @@ public class HealthSubService {
 //        String[] jkpoints = new String[5];
         List<String> jkpoints = new ArrayList<>();
 
-        ProBasicEquipmentPoint ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.CLXJKZT);
+        ProBasicEquipmentPoint ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT002);
         jkpoints.add(ai.getNemCode());
-        ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.FDJJKZT);
+        ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT003);
         jkpoints.add(ai.getNemCode());
-        ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.BJJKZT);
+        ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT004);
         jkpoints.add(ai.getNemCode());
-        ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.ZKJKZT);
+        ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT005);
         jkpoints.add(ai.getNemCode());
-        ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.FJJKZT);
+        ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT001);
         jkpoints.add(ai.getNemCode());
 
         List<PointData> ssjkvalues = realApiUtil.getRealData(jkpoints);
@@ -497,17 +500,17 @@ public class HealthSubService {
                     ValueVo vo5 = new ValueVo();
                     ValueVo vo6 = new ValueVo();
 
-                    vo1.setName("运行状态为故障!");
+                    vo1.setName("运行状态为故障或检修!");
                     vo2.setName("风机部件健康状态异常!");
                     vo3.setName("风机等级评估得分过低!");
                     vo4.setName("3-5米小风曲线偏差过大!");
                     vo5.setName("5-11米风曲线偏差过大!");
                     vo6.setName("11-25米风曲线偏差过大!");
-                    ProBasicEquipmentPoint ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.FJZT);
+                    ProBasicEquipmentPoint ai = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.MXZT);
                     PointData point = realApiUtil.getRealData(ai);
 
                     if (StringUtils.notEmp(point)) {
-                        if (point.getPointValueInDouble() == 2) {
+                        if (point.getPointValueInDouble() == StatusDetailValue.GZ.getCode()) {
                             setScoreValue("1", vo1);
                         } else {
                             setScoreValue(str[0], vo1);
@@ -703,7 +706,7 @@ public class HealthSubService {
             timearr[i] = cal.getTime().getTime();
             cal.add(Calendar.MINUTE, 3);
         }
-        ProBasicEquipmentPoint sjgl = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.TPOINT_WT_FJGL);
+        ProBasicEquipmentPoint sjgl = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.CJ_SSGL);
 
         List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 180L);
 
@@ -716,7 +719,7 @@ public class HealthSubService {
 
             }
         }
-        ProBasicEquipmentPoint llgl = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.TPOINT_WT_LLGL);
+        ProBasicEquipmentPoint llgl = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.LLGL);
 
         List<PointData> llglls = realApiUtil.getHistoryDatasSnap(llgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 180L);
 
@@ -729,7 +732,7 @@ public class HealthSubService {
             }
         }
 
-        ProBasicEquipmentPoint ssfs = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.TPOINT_WT_FJSSFS);
+        ProBasicEquipmentPoint ssfs = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.CJ_SSFS);
 
         List<PointData> ssfsls = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 180L);
 
@@ -834,10 +837,10 @@ public class HealthSubService {
         // 获得风机健康状态结果数组
         List<String> jkpoints = new ArrayList<>();
 
-        ProBasicEquipmentPoint clx = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.CLXJKZT);
-        ProBasicEquipmentPoint fdj = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.FDJJKZT);
-        ProBasicEquipmentPoint bj = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.BJJKZT);
-        ProBasicEquipmentPoint zk = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.ZKJKZT);
+        ProBasicEquipmentPoint clx = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT002);
+        ProBasicEquipmentPoint fdj = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT003);
+        ProBasicEquipmentPoint bj = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT004);
+        ProBasicEquipmentPoint zk = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT005);
 
         jkpoints.add(clx.getNemCode()) ;
         jkpoints.add(fdj.getNemCode()) ;
@@ -1041,11 +1044,11 @@ public class HealthSubService {
         List<DatasetsVo> datasets = new ArrayList<DatasetsVo>();
 
 
-        ProBasicEquipmentPoint fj = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.FJJKZZ);
-        ProBasicEquipmentPoint clx = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.CLXJKJL);
-        ProBasicEquipmentPoint fdj = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.FDJJKJL);
-        ProBasicEquipmentPoint kzys = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.BJJKJL);
-        ProBasicEquipmentPoint jcxt = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.ZKJKJL);
+        ProBasicEquipmentPoint fj = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT100);
+        ProBasicEquipmentPoint clx = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKJL002);
+        ProBasicEquipmentPoint fdj = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKJL003);
+        ProBasicEquipmentPoint kzys = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKJL004);
+        ProBasicEquipmentPoint jcxt = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKJL005);
 
 
         if (null != fj) {
@@ -1234,11 +1237,11 @@ public class HealthSubService {
         Map<String, ProBasicEquipment> wtmap = InitialRunner.wtmap;
         //String wtName = wtmap.get(wtId).getName();
 
-        ProBasicEquipmentPoint fj = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.FJJKZT);
-        ProBasicEquipmentPoint clx = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.CLXJKZT);
-        ProBasicEquipmentPoint fdj = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.FDJJKZT);
-        ProBasicEquipmentPoint bj = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.BJJKZT);
-        ProBasicEquipmentPoint zk = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.ZKJKZT);
+        ProBasicEquipmentPoint fj = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT001);
+        ProBasicEquipmentPoint clx = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT002);
+        ProBasicEquipmentPoint fdj = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT003);
+        ProBasicEquipmentPoint bj = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT004);
+        ProBasicEquipmentPoint zk = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT005);
 
         // 时间 目前当天0点开始
         Calendar cl = Calendar.getInstance();
@@ -1357,10 +1360,10 @@ public class HealthSubService {
         Date beginDate = sdfs.parse(sdf.format(currentDate) + " 00:00:00");
 
 
-        ProBasicEquipmentPoint clx = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.CLXJKZT);
-        ProBasicEquipmentPoint fdj = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.FDJJKZT);
-        ProBasicEquipmentPoint bj = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.BJJKZT);
-        ProBasicEquipmentPoint zk = proBasicEquipmentPointService.getEquipmentPoint(wtId, Constant.ZKJKZT);
+        ProBasicEquipmentPoint clx = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT002);
+        ProBasicEquipmentPoint fdj = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT003);
+        ProBasicEquipmentPoint bj = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT004);
+        ProBasicEquipmentPoint zk = proBasicEquipmentPointService.getEquipmentPoint(wtId, ContantXk.JKZT005);
 
 
         if (null != clx) {

+ 6 - 6
web/health/src/main/java/com/gyee/frame/service/recommen/RecommenService.java

@@ -1,7 +1,7 @@
 package com.gyee.frame.service.recommen;
 
+import com.gyee.common.contant.ContantXk;
 import com.gyee.common.model.PointData;
-import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.ProBasicEquipment;
 import com.gyee.frame.model.auto.ProBasicEquipmentPoint;
@@ -208,14 +208,14 @@ public class RecommenService {
 
 			Calendar cal = Calendar.getInstance();
 
-			String uniformcode = Constant.YCFJJKZT1DAY;
+			String uniformcode = ContantXk.JKYC006;
 			switch (type) {
 				case "1":
 					cal.add(Calendar.HOUR_OF_DAY, 2);
 					cal.set(Calendar.MINUTE, 0);
 					cal.set(Calendar.SECOND, 0);
 
-					uniformcode = Constant.YCFJJKZT1DAY;
+					uniformcode = ContantXk.JKYC006;
 
 					num=12;
 					break;
@@ -225,8 +225,8 @@ public class RecommenService {
 					cal.set(Calendar.MINUTE, 0);
 					cal.set(Calendar.SECOND, 0);
 					cal.set(Calendar.MILLISECOND, 0);
-					//  uniformcode = Constant.YCFJJKZT7DAY;
-					uniformcode = Constant.YCFJJKZT1MONTH;
+					//  uniformcode = ContantXk.YCFJJKZT7DAY;
+					uniformcode = ContantXk.JKYC021;
 					num=7;
 					break;
 
@@ -236,7 +236,7 @@ public class RecommenService {
 					cal.set(Calendar.MINUTE, 0);
 					cal.set(Calendar.SECOND, 0);
 					cal.set(Calendar.MILLISECOND, 0);
-					uniformcode = Constant.YCFJJKZT1MONTH;
+					uniformcode = ContantXk.JKYC021;
 					num=30;
 					break;
 				default:

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

@@ -109,9 +109,9 @@ spring :
     druid:
       #主库数据源
       master:
-        url: jdbc:postgresql://127.0.0.1:5432/IMS_NEM_JN
+        url: jdbc:postgresql://10.81.3.151:5432/IMS_NEM_JN
         username: postgres
-        password: gd123
+        password: postgres
         driver-class-name: org.postgresql.Driver
       #备数据源 #关闭
       slave: