xieshengjie 2 år sedan
förälder
incheckning
6a4caacf69
44 ändrade filer med 1249 tillägg och 11 borttagningar
  1. 14 11
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/config/GeneratorCodeConfig.java
  2. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/CurvefittingmonthsubController.java
  3. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport1Controller.java
  4. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport2Controller.java
  5. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport3Controller.java
  6. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport4Controller.java
  7. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport5Controller.java
  8. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport6Controller.java
  9. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport7Controller.java
  10. 1 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/init/CacheContext.java
  11. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/CurvefittingmonthsubMapper.java
  12. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport1Mapper.java
  13. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport2Mapper.java
  14. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport3Mapper.java
  15. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport4Mapper.java
  16. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport5Mapper.java
  17. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport6Mapper.java
  18. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport7Mapper.java
  19. 60 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Curvefittingmonthsub.java
  20. 44 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport1.java
  21. 36 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport2.java
  22. 39 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport3.java
  23. 46 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport4.java
  24. 34 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport5.java
  25. 34 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport6.java
  26. 38 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport7.java
  27. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/ICurvefittingmonthsubService.java
  28. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport1Service.java
  29. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport2Service.java
  30. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport3Service.java
  31. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport4Service.java
  32. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport5Service.java
  33. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport6Service.java
  34. 16 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport7Service.java
  35. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/CurvefittingmonthsubServiceImpl.java
  36. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport1ServiceImpl.java
  37. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport2ServiceImpl.java
  38. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport3ServiceImpl.java
  39. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport4ServiceImpl.java
  40. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport5ServiceImpl.java
  41. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport6ServiceImpl.java
  42. 20 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport7ServiceImpl.java
  43. 326 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/healthreport/HealthReportNewService.java
  44. 1 0
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/vo/HealthReportVo.java

+ 14 - 11
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/config/GeneratorCodeConfig.java

@@ -49,19 +49,19 @@ public class GeneratorCodeConfig {
         // 数据源配置
         DataSourceConfig dsc = new DataSourceConfig();
 
-//        dsc.setUrl("jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true");
-//        dsc.setDriverName("com.mysql.jdbc.Driver");
-//        dsc.setUsername("root");
-//        dsc.setPassword("root");
-//        mpg.setDataSource(dsc);
-
-        dsc.setDriverName("oracle.jdbc.driver.OracleDriver");
-        dsc.setUsername("gdprod");
-        dsc.setPassword("gd123");
-//        dsc.setUrl("jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd");
-        dsc.setUrl("jdbc:oracle:thin:@10.83.68.165:1521:gdsj");
+        dsc.setUrl("jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true");
+        dsc.setDriverName("com.mysql.jdbc.Driver");
+        dsc.setUsername("root");
+        dsc.setPassword("root");
         mpg.setDataSource(dsc);
 
+//        dsc.setDriverName("oracle.jdbc.driver.OracleDriver");
+//        dsc.setUsername("gdprod");
+//        dsc.setPassword("gd123");
+////        dsc.setUrl("jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd");
+//        dsc.setUrl("jdbc:oracle:thin:@10.83.68.165:1521:gdsj");
+//        mpg.setDataSource(dsc);
+
 //        dsc.setDriverName("com.cloudera.impala.jdbc41.Driver");
 //        dsc.setUrl("jdbc:impala://192.168.1.67:21050/gyee_test");
 //        mpg.setDataSource(dsc);
@@ -148,4 +148,7 @@ public class GeneratorCodeConfig {
         mpg.setTemplateEngine(new FreemarkerTemplateEngine());
         mpg.execute();
     }
+
+
+
 }

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/CurvefittingmonthsubController.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.controller.auto;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@RestController
+@RequestMapping("//curvefittingmonthsub")
+public class CurvefittingmonthsubController {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport1Controller.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.controller.auto;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@RestController
+@RequestMapping("//healthwtreport1")
+public class Healthwtreport1Controller {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport2Controller.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.controller.auto;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@RestController
+@RequestMapping("//healthwtreport2")
+public class Healthwtreport2Controller {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport3Controller.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.controller.auto;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@RestController
+@RequestMapping("//healthwtreport3")
+public class Healthwtreport3Controller {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport4Controller.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.controller.auto;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@RestController
+@RequestMapping("//healthwtreport4")
+public class Healthwtreport4Controller {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport5Controller.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.controller.auto;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@RestController
+@RequestMapping("//healthwtreport5")
+public class Healthwtreport5Controller {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport6Controller.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.controller.auto;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@RestController
+@RequestMapping("//healthwtreport6")
+public class Healthwtreport6Controller {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/controller/auto/Healthwtreport7Controller.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.controller.auto;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@RestController
+@RequestMapping("//healthwtreport7")
+public class Healthwtreport7Controller {
+
+}

+ 1 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/init/CacheContext.java

@@ -64,6 +64,7 @@ public class CacheContext implements CommandLineRunner {
 
 
 
+
     @Override
     public void run(String... args) throws Exception {
 

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/CurvefittingmonthsubMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.mapper.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Curvefittingmonthsub;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface CurvefittingmonthsubMapper extends BaseMapper<Curvefittingmonthsub> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport1Mapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.mapper.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport1;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface Healthwtreport1Mapper extends BaseMapper<Healthwtreport1> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport2Mapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.mapper.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport2;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface Healthwtreport2Mapper extends BaseMapper<Healthwtreport2> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport3Mapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.mapper.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport3;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface Healthwtreport3Mapper extends BaseMapper<Healthwtreport3> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport4Mapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.mapper.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport4;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface Healthwtreport4Mapper extends BaseMapper<Healthwtreport4> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport5Mapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.mapper.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport5;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface Healthwtreport5Mapper extends BaseMapper<Healthwtreport5> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport6Mapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.mapper.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport6;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface Healthwtreport6Mapper extends BaseMapper<Healthwtreport6> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/mapper/auto/Healthwtreport7Mapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.mapper.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport7;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface Healthwtreport7Mapper extends BaseMapper<Healthwtreport7> {
+
+}

+ 60 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Curvefittingmonthsub.java

@@ -0,0 +1,60 @@
+package com.gyee.healthmanagementhistroy.model.auto;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Curvefittingmonthsub extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("id")
+    private String id;
+
+    @TableField("WINDTURBINEID")
+    private String windturbineid;
+
+    @TableField("YEAR")
+    private String year;
+
+    @TableField("MONTH")
+    private String month;
+
+    @TableField("MONTHDEVIATIONRATE")
+    private Double monthdeviationrate;
+
+    @TableField("YEARDEVIATIONRATE")
+    private Double yeardeviationrate;
+
+    @TableField("STANDARDDEVIATIONRATE")
+    private Double standarddeviationrate;
+
+    @TableField("DEVIATIONRATE1")
+    private Double deviationrate1;
+
+    @TableField("DEVIATIONRATE2")
+    private Double deviationrate2;
+
+    @TableField("DEVIATIONRATE3")
+    private Double deviationrate3;
+
+    @TableField("SPEED")
+    private String speed;
+
+
+}

+ 44 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport1.java

@@ -0,0 +1,44 @@
+package com.gyee.healthmanagementhistroy.model.auto;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Healthwtreport1 extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    private String wtid;
+
+    private Double qxpcl;
+
+    private Double threeqxpcl;
+
+    private Double fiveqxpcl;
+
+    private Double elevenqxpcl;
+
+    private String compareqxpclname;
+
+    private Double compareqxpcl;
+
+    private Integer type;
+
+
+}

+ 36 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport2.java

@@ -0,0 +1,36 @@
+package com.gyee.healthmanagementhistroy.model.auto;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Healthwtreport2 extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    private String wtid;
+
+    private Integer speed;
+
+    private Double nhgl;
+
+    private Double bzgl;
+
+
+}

+ 39 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport3.java

@@ -0,0 +1,39 @@
+package com.gyee.healthmanagementhistroy.model.auto;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDate;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Healthwtreport3 extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    private String wtid;
+
+    private Date date;
+
+    private Double qxpcl;
+
+    private Double jzz;
+
+
+}

+ 46 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport4.java

@@ -0,0 +1,46 @@
+package com.gyee.healthmanagementhistroy.model.auto;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Healthwtreport4 extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    private String wtid;
+
+    private Integer withincount;
+
+    private Integer beyondcount;
+
+    private Double dfpcl;
+
+    private Double threedfpcl;
+
+    private Double fivedfpcl;
+
+    private Double elevendfpcl;
+
+    private String glfw;
+
+    private String descriptiondfpcl;
+
+
+}

+ 34 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport5.java

@@ -0,0 +1,34 @@
+package com.gyee.healthmanagementhistroy.model.auto;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Healthwtreport5 extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    private String wtid;
+
+    private Double speed;
+
+    private Double dfpcl;
+
+
+}

+ 34 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport6.java

@@ -0,0 +1,34 @@
+package com.gyee.healthmanagementhistroy.model.auto;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Healthwtreport6 extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    private String wtid;
+
+    private Double power;
+
+    private Double dfpcl;
+
+
+}

+ 38 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/model/auto/Healthwtreport7.java

@@ -0,0 +1,38 @@
+package com.gyee.healthmanagementhistroy.model.auto;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Healthwtreport7 extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    private String wtid;
+
+    private Double xfqr;
+
+    private Double xfqc;
+
+    private Double dfqr;
+
+    private Double dfqc;
+
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/ICurvefittingmonthsubService.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.service.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Curvefittingmonthsub;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface ICurvefittingmonthsubService extends IService<Curvefittingmonthsub> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport1Service.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.service.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport1;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface IHealthwtreport1Service extends IService<Healthwtreport1> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport2Service.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.service.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport2;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface IHealthwtreport2Service extends IService<Healthwtreport2> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport3Service.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.service.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport3;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface IHealthwtreport3Service extends IService<Healthwtreport3> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport4Service.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.service.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport4;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface IHealthwtreport4Service extends IService<Healthwtreport4> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport5Service.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.service.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport5;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface IHealthwtreport5Service extends IService<Healthwtreport5> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport6Service.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.service.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport6;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface IHealthwtreport6Service extends IService<Healthwtreport6> {
+
+}

+ 16 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/IHealthwtreport7Service.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagementhistroy.service.auto;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport7;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+public interface IHealthwtreport7Service extends IService<Healthwtreport7> {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/CurvefittingmonthsubServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.service.auto.impl;
+
+import com.gyee.healthmanagementhistroy.model.auto.Curvefittingmonthsub;
+import com.gyee.healthmanagementhistroy.mapper.auto.CurvefittingmonthsubMapper;
+import com.gyee.healthmanagementhistroy.service.auto.ICurvefittingmonthsubService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Service
+public class CurvefittingmonthsubServiceImpl extends ServiceImpl<CurvefittingmonthsubMapper, Curvefittingmonthsub> implements ICurvefittingmonthsubService {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport1ServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.service.auto.impl;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport1;
+import com.gyee.healthmanagementhistroy.mapper.auto.Healthwtreport1Mapper;
+import com.gyee.healthmanagementhistroy.service.auto.IHealthwtreport1Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Service
+public class Healthwtreport1ServiceImpl extends ServiceImpl<Healthwtreport1Mapper, Healthwtreport1> implements IHealthwtreport1Service {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport2ServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.service.auto.impl;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport2;
+import com.gyee.healthmanagementhistroy.mapper.auto.Healthwtreport2Mapper;
+import com.gyee.healthmanagementhistroy.service.auto.IHealthwtreport2Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Service
+public class Healthwtreport2ServiceImpl extends ServiceImpl<Healthwtreport2Mapper, Healthwtreport2> implements IHealthwtreport2Service {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport3ServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.service.auto.impl;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport3;
+import com.gyee.healthmanagementhistroy.mapper.auto.Healthwtreport3Mapper;
+import com.gyee.healthmanagementhistroy.service.auto.IHealthwtreport3Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Service
+public class Healthwtreport3ServiceImpl extends ServiceImpl<Healthwtreport3Mapper, Healthwtreport3> implements IHealthwtreport3Service {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport4ServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.service.auto.impl;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport4;
+import com.gyee.healthmanagementhistroy.mapper.auto.Healthwtreport4Mapper;
+import com.gyee.healthmanagementhistroy.service.auto.IHealthwtreport4Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Service
+public class Healthwtreport4ServiceImpl extends ServiceImpl<Healthwtreport4Mapper, Healthwtreport4> implements IHealthwtreport4Service {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport5ServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.service.auto.impl;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport5;
+import com.gyee.healthmanagementhistroy.mapper.auto.Healthwtreport5Mapper;
+import com.gyee.healthmanagementhistroy.service.auto.IHealthwtreport5Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Service
+public class Healthwtreport5ServiceImpl extends ServiceImpl<Healthwtreport5Mapper, Healthwtreport5> implements IHealthwtreport5Service {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport6ServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.service.auto.impl;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport6;
+import com.gyee.healthmanagementhistroy.mapper.auto.Healthwtreport6Mapper;
+import com.gyee.healthmanagementhistroy.service.auto.IHealthwtreport6Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Service
+public class Healthwtreport6ServiceImpl extends ServiceImpl<Healthwtreport6Mapper, Healthwtreport6> implements IHealthwtreport6Service {
+
+}

+ 20 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/auto/impl/Healthwtreport7ServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagementhistroy.service.auto.impl;
+
+import com.gyee.healthmanagementhistroy.model.auto.Healthwtreport7;
+import com.gyee.healthmanagementhistroy.mapper.auto.Healthwtreport7Mapper;
+import com.gyee.healthmanagementhistroy.service.auto.IHealthwtreport7Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-01
+ */
+@Service
+public class Healthwtreport7ServiceImpl extends ServiceImpl<Healthwtreport7Mapper, Healthwtreport7> implements IHealthwtreport7Service {
+
+}

+ 326 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/service/healthreport/HealthReportNewService.java

@@ -0,0 +1,326 @@
+package com.gyee.healthmanagementhistroy.service.healthreport;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.CommonUtils;
+import com.gyee.common.util.DateUtils;
+import com.gyee.healthmanagementhistroy.init.CacheContext;
+import com.gyee.healthmanagementhistroy.model.auto.*;
+import com.gyee.healthmanagementhistroy.service.auto.*;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.lang.reflect.Field;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class HealthReportNewService {
+    @Resource
+    private IHealthwtreport1Service healthwtreport1Service;
+    @Resource
+    private IHealthwtreport2Service healthwtreport2Service;
+    @Resource
+    private IHealthwtreport3Service healthwtreport3Service;
+    @Resource
+    private IHealthwtreport4Service healthwtreport4Service;
+    @Resource
+    private IHealthwtreport5Service healthwtreport5Service;
+    @Resource
+    private IHealthwtreport6Service healthwtreport6Service;
+    @Resource
+    private IHealthwtreport7Service healthwtreport7Service;
+    @Resource
+    private ICurvefittingmonthsubService curvefittingmonthsubService;
+    @Resource
+    private ICurvefittingsubService curvefittingsubService;
+    @Resource
+    private IWindturbinecurvefittingmonthService windturbinecurvefittingmonthService;
+    @Resource
+    private IWindturbinewindyawService windturbinewindyawService;
+    @Resource
+    private IWindturbinepoweryawService windturbinepoweryawService;
+
+    @Resource
+    private IWinddeviationrateService winddeviationrateService;
+    @Resource
+    private IInputoroutputspeedtotalService inputoroutputspeedtotalService;
+    /**
+     * 保存性能描述表
+     * @param stringdate
+     */
+    public void saveHealthwtreport1(String stringdate){
+        healthwtreport1Service.remove(new QueryWrapper<>());
+
+        List<Healthwtreport1> resultList = new ArrayList<>();
+
+        List<Windturbine> wtls = CacheContext.wtls;
+
+        Date date = DateUtils.parseDate1(stringdate);
+        int month = DateUtils.getMonth(date);
+        int year = DateUtils.getYear(date);
+
+        QueryWrapper<Curvefittingmonthsub> curvefittingsubQueryWrapper = new QueryWrapper<>();
+        curvefittingsubQueryWrapper.ge("month",String.valueOf(month));
+        curvefittingsubQueryWrapper.ge("year",String.valueOf(year));
+        List<Curvefittingmonthsub> curvefittingmonthsubs = curvefittingmonthsubService.list(curvefittingsubQueryWrapper);
+        if (StringUtils.isNotEmpty(curvefittingmonthsubs)){
+            wtls.stream().forEach(wt->{
+                //过滤此台风机的偏差率数据
+                List<Curvefittingmonthsub> collect = curvefittingmonthsubs.stream().filter(curve -> curve.getWindturbineid().equals(wt.getId())).collect(Collectors.toList());
+                Healthwtreport1 healthwtreport1 = new Healthwtreport1();
+                healthwtreport1.setId(CommonUtils.getUUID());
+                double qxpcl = collect.stream().mapToDouble(Curvefittingmonthsub::getDeviationrate2).average().orElse(0d);
+                double jzz = collect.stream().mapToDouble(Curvefittingmonthsub::getStandarddeviationrate).average().orElse(0d);
+                healthwtreport1.setQxpcl(qxpcl);
+                healthwtreport1.setThreeqxpcl(collect.stream().filter(i->Double.parseDouble(i.getSpeed())>=3 && Double.parseDouble(i.getSpeed())<5).mapToDouble(Curvefittingmonthsub::getDeviationrate2).average().orElse(0d));
+                healthwtreport1.setFiveqxpcl(collect.stream().filter(i->Double.parseDouble(i.getSpeed())>=5 && Double.parseDouble(i.getSpeed())<11).mapToDouble(Curvefittingmonthsub::getDeviationrate2).average().orElse(0d));
+                healthwtreport1.setElevenqxpcl(collect.stream().filter(i->Double.parseDouble(i.getSpeed())>=11).mapToDouble(Curvefittingmonthsub::getDeviationrate2).average().orElse(0d));
+                if (qxpcl>=jzz){
+                    healthwtreport1.setCompareqxpclname("高于");
+                }else {
+                    healthwtreport1.setCompareqxpclname("低于");
+                }
+                healthwtreport1.setCompareqxpcl(Math.abs(qxpcl-jzz));
+                healthwtreport1.setType(1);
+                resultList.add(healthwtreport1);
+            });
+        }
+
+        healthwtreport1Service.saveBatch(resultList);
+    }
+
+    /**
+     * 保存功率曲线
+     * @param stringdate
+     */
+    public void saveHealthwtreport2(String stringdate){
+        healthwtreport2Service.remove(new QueryWrapper<>());
+        List<Healthwtreport2> resultList = new ArrayList<>();
+        Date date = DateUtils.parseDate1(stringdate);
+        int month = DateUtils.getMonth(date);
+        int year = DateUtils.getYear(date);
+
+        QueryWrapper<Windturbinecurvefittingmonth> windturbinecurvefittingmonthQueryWrapper = new QueryWrapper<>();
+        windturbinecurvefittingmonthQueryWrapper.eq("year",year);
+        windturbinecurvefittingmonthQueryWrapper.eq("month",month);
+        windturbinecurvefittingmonthQueryWrapper.in("speed",0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25);
+        List<Windturbinecurvefittingmonth> windturbinecurvefittingmonthList = windturbinecurvefittingmonthService.list(windturbinecurvefittingmonthQueryWrapper);
+        windturbinecurvefittingmonthList.stream().forEach(i->{
+            Healthwtreport2 healthwtreport2 = new Healthwtreport2();
+            healthwtreport2.setId(CommonUtils.getUUID());
+            healthwtreport2.setWtid(i.getWindturbineid());
+            healthwtreport2.setSpeed(i.getSpeed());
+            healthwtreport2.setBzgl(i.getOptimalpower());
+            healthwtreport2.setNhgl(i.getActualpower());
+
+            resultList.add(healthwtreport2);
+        });
+        healthwtreport2Service.saveBatch(resultList);
+    }
+
+
+    /**
+     * 保存曲线偏差率曲线
+     * @param stringdate
+     */
+    public void saveHealthwtreport3(String stringdate){
+        healthwtreport3Service.remove(new QueryWrapper<>());
+        List<Healthwtreport3> resultList = new ArrayList<>();
+        Date date = DateUtils.parseDate1(stringdate);
+        Date monthFirst = DateUtils.getMonthFirst(date);
+        Date monthLast = DateUtils.getMonthLast(date);
+
+        QueryWrapper<Curvefittingsub> curvefittingsubQueryWrapper = new QueryWrapper<>();
+        curvefittingsubQueryWrapper.select("windturbineid,recorddate,avg(standarddeviationrate) standarddeviationrate,avg(deviationrate2) deviationrate2");
+        curvefittingsubQueryWrapper.ge("recorddate",monthFirst).le("recorddate",monthLast);
+        curvefittingsubQueryWrapper.groupBy("windturbineid","recorddate");
+        List<Curvefittingsub> curvefittingsubList = curvefittingsubService.list(curvefittingsubQueryWrapper);
+        curvefittingsubList.stream().forEach(i->{
+            Healthwtreport3 healthwtreport3 = new Healthwtreport3();
+
+            healthwtreport3.setId(CommonUtils.getUUID());
+            healthwtreport3.setDate(i.getRecorddate());
+            healthwtreport3.setWtid(i.getWindturbineid());
+            healthwtreport3.setQxpcl(i.getDeviationrate2());
+            healthwtreport3.setJzz(i.getStandarddeviationrate());
+            resultList.add(healthwtreport3);
+        });
+        healthwtreport3Service.saveBatch(resultList);
+    }
+
+
+    /**
+     * 保存对风偏差率描述
+     * @param stringdate
+     */
+    public void saveHealthwtreport456(String stringdate){
+        healthwtreport4Service.remove(new QueryWrapper<>());
+        healthwtreport5Service.remove(new QueryWrapper<>());
+        healthwtreport6Service.remove(new QueryWrapper<>());
+
+        List<Windturbine> wtls = CacheContext.wtls;
+        List<Healthwtreport4> resultList = new ArrayList<>();
+        Date date = DateUtils.parseDate1(stringdate);
+        Date monthFirst = DateUtils.getMonthFirst(date);
+        Date monthLast = DateUtils.getMonthLast(date);
+
+        QueryWrapper<Windturbinewindyaw> windqueryWrapper = new QueryWrapper<>();
+        windqueryWrapper.le("recorddate",monthLast);
+        windqueryWrapper.ge("recorddate",monthFirst);
+        List<Windturbinewindyaw> windturbinewindyaws = windturbinewindyawService.list(windqueryWrapper);
+
+        QueryWrapper<Windturbinepoweryaw> powerqueryWrapper = new QueryWrapper<>();
+        powerqueryWrapper.le("recorddate",monthLast);
+        powerqueryWrapper.ge("recorddate",monthFirst);
+        List<Windturbinepoweryaw> powerturbinewindyaws = windturbinepoweryawService.list(powerqueryWrapper);
+
+        wtls.stream().forEach(wt->{
+            Healthwtreport4 healthwtreport4 = new Healthwtreport4();
+            healthwtreport4.setId(CommonUtils.getUUID());
+            healthwtreport4.setWtid(wt.getId());
+            List<Windturbinewindyaw> collect = windturbinewindyaws.stream().filter(i -> i.getWindturbineid().equals(wt.getId())).collect(Collectors.toList());
+            List<Windturbinepoweryaw> collect1 = powerturbinewindyaws.stream().filter(i -> i.getWindturbineid().equals(wt.getId())).collect(Collectors.toList());
+            int hg = collect.stream().mapToInt(Windturbinewindyaw::getQualified).sum();
+            int bhg = collect.stream().mapToInt(Windturbinewindyaw::getUnqualified).sum();
+            healthwtreport4.setWithincount(hg);
+            healthwtreport4.setBeyondcount(bhg);
+            int sum = hg+bhg;
+            healthwtreport4.setDfpcl(sum!=0?(double)bhg/sum*100:0);
+
+            int threehg = collect.stream().filter(i->i.getSpeed() >= 3 && i.getSpeed() < 5).mapToInt(Windturbinewindyaw::getQualified).sum();
+            int threebhg = collect.stream().filter(i->i.getSpeed() >= 3 && i.getSpeed() < 5).mapToInt(Windturbinewindyaw::getUnqualified).sum();
+            int threesum = threehg+threebhg;
+            healthwtreport4.setThreedfpcl(threesum!=0?(double)threebhg/threesum*100:0);
+
+            int fivehg = collect.stream().filter(i->i.getSpeed() >= 5 && i.getSpeed() < 11).mapToInt(Windturbinewindyaw::getQualified).sum();
+            int fivebhg = collect.stream().filter(i->i.getSpeed() >= 5 && i.getSpeed() < 11).mapToInt(Windturbinewindyaw::getUnqualified).sum();
+            int fivesum = fivehg+fivebhg;
+            healthwtreport4.setFivedfpcl(fivesum!=0?(double)fivebhg/fivesum*100:0);
+
+            int elehg = collect.stream().filter(i->i.getSpeed() >= 11).mapToInt(Windturbinewindyaw::getQualified).sum();
+            int elebhg = collect.stream().filter(i->i.getSpeed() >= 11).mapToInt(Windturbinewindyaw::getUnqualified).sum();
+            int elesum = elehg+elebhg;
+            healthwtreport4.setElevendfpcl(elesum!=0?(double)elebhg/elesum*100:0);
+            List<Healthwtreport6> powerresultList = new ArrayList<>();
+            List<Healthwtreport5> speedresultList = new ArrayList<>();
+            healthwtreport4.setGlfw("1500");
+            if (collect1!=null && collect1.size()>0){
+                List<Double> powercollect = collect1.stream().map(i -> i.getPower()).distinct().collect(Collectors.toList());
+                Collections.sort(powercollect);
+                String descriptiondfpcl="";
+                for (Double aDouble : powercollect) {
+                    Healthwtreport6 healthwtreport6 = new Healthwtreport6();
+                    healthwtreport6.setId(CommonUtils.getUUID());
+                    healthwtreport6.setWtid(wt.getId());
+                    healthwtreport6.setPower(aDouble);
+
+                    int xhg = collect1.stream().filter(i->i.getPower()==aDouble).mapToInt(Windturbinepoweryaw::getQualified).sum();
+                    int xbhg= collect1.stream().filter(i->i.getPower()==aDouble).mapToInt(Windturbinepoweryaw::getUnqualified).sum();
+                    int xsum = xhg + xbhg;
+                    healthwtreport6.setDfpcl(xsum!=0?(double)xbhg/xsum*100:0);
+                    powerresultList.add(healthwtreport6);
+                    descriptiondfpcl += ((xsum!=0?xbhg/xsum*100:0)+"%,");
+                }
+                healthwtreport4.setDescriptiondfpcl(descriptiondfpcl);
+            }
+            if (collect!=null && collect.size()>0){
+                List<Double> speedcollect = collect.stream().map(i -> i.getSpeed()).distinct().collect(Collectors.toList());
+                Collections.sort(speedcollect);
+                for (Double aDouble : speedcollect) {
+                    Healthwtreport5 healthwtreport5 = new Healthwtreport5();
+                    healthwtreport5.setId(CommonUtils.getUUID());
+                    healthwtreport5.setWtid(wt.getId());
+                    healthwtreport5.setSpeed(aDouble);
+
+                    int xhg = collect.stream().filter(i->i.getSpeed()==aDouble).mapToInt(Windturbinewindyaw::getQualified).sum();
+                    int xbhg= collect.stream().filter(i->i.getSpeed()==aDouble).mapToInt(Windturbinewindyaw::getUnqualified).sum();
+                    int xsum = xhg + xbhg;
+                    healthwtreport5.setDfpcl(xsum!=0?(double)xbhg/xsum*100:0);
+                    speedresultList.add(healthwtreport5);
+                }
+            }
+            resultList.add(healthwtreport4);
+            healthwtreport6Service.saveBatch(powerresultList);
+            healthwtreport5Service.saveBatch(speedresultList);
+        });
+        healthwtreport4Service.saveBatch(resultList);
+    }
+
+
+    /**
+     * 保存对风偏差率(奶嘴图)
+     */
+    public void saveDfpcl(String stringdate){
+        List<Winddeviationrate> resultList = new ArrayList<>();
+        winddeviationrateService.clear();
+        Date date = DateUtils.parseDate1(stringdate);
+        Date monthFirst = DateUtils.getMonthFirst(date);
+        Date monthLast = DateUtils.getMonthLast(date);
+        List<Windturbinepoweryaw> windturbinepoweryawList = windturbinepoweryawService.getDfpcl(monthFirst,monthLast);
+        windturbinepoweryawList.stream().forEach(i->{
+            Field[] fields = i.getClass().getDeclaredFields();
+            Arrays.stream(fields).forEach(j->{
+                Winddeviationrate winddeviationrate = new Winddeviationrate();
+                winddeviationrate.setId(CommonUtils.getUUID());
+                winddeviationrate.setWtid(i.getWindturbineid());
+                winddeviationrate.setType(j.getName().replace("Rf","R-"));
+                try {
+                    Field field = i.getClass().getDeclaredField(j.getName());
+                    if (field.getGenericType().toString().equals("class java.lang.Integer")){
+                        field.setAccessible(true);
+                        Integer count = (Integer) field.get(i);
+                        winddeviationrate.setCount(count);
+                        resultList.add(winddeviationrate);
+                    }
+                } catch (NoSuchFieldException | IllegalAccessException e) {
+                    winddeviationrate.setCount(0);
+                    resultList.add(winddeviationrate);
+                    e.printStackTrace();
+                }
+
+            });
+        });
+        winddeviationrateService.saveBatch(resultList);
+    }
+
+    /**
+     * 保存切入切出
+     * @param stringdate
+     */
+    public void saveHealthwtreport7(String stringdate){
+        healthwtreport7Service.remove(new QueryWrapper<>());
+
+        Date date = DateUtils.parseDate1(stringdate);
+        Date monthFirst = DateUtils.getMonthFirst(date);
+        Date monthLast = DateUtils.getMonthLast(date);
+
+        QueryWrapper<Inputoroutputspeedtotal> queryWrapper = new QueryWrapper<>();
+        queryWrapper.le("recorddate",monthLast);
+        queryWrapper.ge("recorddate",monthFirst);
+        List<Inputoroutputspeedtotal> inputoroutputspeedtotals = inputoroutputspeedtotalService.list(queryWrapper);
+
+        List<Healthwtreport7> resultList = new ArrayList<>();
+
+        List<Windturbine> wtls = CacheContext.wtls;
+        wtls.stream().forEach(wt->{
+            List<Inputoroutputspeedtotal> collect = inputoroutputspeedtotals.stream().filter(in -> in.getWindturbineid().equals(wt.getId())).collect(Collectors.toList());
+            Healthwtreport7 healthwtreport7 = new Healthwtreport7();
+            healthwtreport7.setId(CommonUtils.getUUID());
+            healthwtreport7.setWtid(wt.getId());
+            double xfqr = collect.stream().mapToDouble(Inputoroutputspeedtotal::getInputsmall).average().orElse(0d);
+            double dfqr = collect.stream().mapToDouble(Inputoroutputspeedtotal::getInputbig).average().orElse(0d);
+            double xfqc = collect.stream().mapToDouble(Inputoroutputspeedtotal::getOutputsmall).average().orElse(0d);
+            double dfqc = collect.stream().mapToDouble(Inputoroutputspeedtotal::getOutputbig).average().orElse(0d);
+            healthwtreport7.setDfqc(dfqc);
+            healthwtreport7.setDfqr(dfqr);
+            healthwtreport7.setXfqc(xfqc);
+            healthwtreport7.setXfqr(xfqr);
+            resultList.add(healthwtreport7);
+        });
+        healthwtreport7Service.saveBatch(resultList);
+
+    }
+
+
+}

+ 1 - 0
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/vo/HealthReportVo.java

@@ -47,6 +47,7 @@ public class HealthReportVo implements Serializable {
     private Double threeqxpcl;   //3-5
     private Double fiveqxpcl;    //5-8
     private Double elevenqxpcl;   //11-25
+    private String compareqxpclname; //高于或者低于
     private Double compareqxpcl;   //与型号平均值相比
     private String descriptionqxpcl;  //曲线偏差率说明
     private List<NhglVo> nhglqxs;    //拟合功率曲线(风速,拟合功率,保证功率,点值)