xieshengjie преди 2 години
родител
ревизия
cc3c7a79e1
променени са 45 файла, в които са добавени 1979 реда и са изтрити 56 реда
  1. 74 0
      common/src/main/java/com/gyee/common/model/Alertrule2.java
  2. 39 0
      common/src/main/java/com/gyee/common/model/Alertrulefailure.java
  3. 57 0
      common/src/main/java/com/gyee/common/model/P3DeviceFault.java
  4. 70 0
      common/src/main/java/com/gyee/common/model/P3DeviceFeatures.java
  5. 49 0
      common/src/main/java/com/gyee/common/model/Risktype.java
  6. 41 0
      common/src/main/java/com/gyee/common/model/Safeprecstard.java
  7. 36 36
      histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/task/HealthreportTask.java
  8. 1 0
      web/consumer/pom.xml
  9. 87 3
      web/consumer/src/main/java/com/gyee/consumer/api/knowleage/KnowledgeApi.java
  10. 109 0
      web/consumer/src/main/java/com/gyee/consumer/controller/knowleage/KnowleageController.java
  11. 2 2
      web/consumer/src/main/resources/application.yml
  12. 11 11
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/config/GeneratorCodeConfig.java
  13. 20 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/BjgltjbController.java
  14. 20 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/EarlywarningmainController.java
  15. 20 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/EquipmentmodelController.java
  16. 20 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/FailurestatisticsmainController.java
  17. 20 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/PartsController.java
  18. 142 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/reliability/ReliabilityController.java
  19. 22 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/BjgltjbMapper.java
  20. 21 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/EarlywarningmainMapper.java
  21. 16 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/EquipmentmodelMapper.java
  22. 21 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/FailurestatisticsmainMapper.java
  23. 16 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/PartsMapper.java
  24. 71 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Bjgltjb.java
  25. 154 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Earlywarningmain.java
  26. 65 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Equipmentmodel.java
  27. 154 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Failurestatisticsmain.java
  28. 31 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Parts.java
  29. 19 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IBjgltjbService.java
  30. 19 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IEarlywarningmainService.java
  31. 16 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IEquipmentmodelService.java
  32. 19 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IFailurestatisticsmainService.java
  33. 16 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IPartsService.java
  34. 28 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/BjgltjbServiceImpl.java
  35. 28 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/EarlywarningmainServiceImpl.java
  36. 20 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/EquipmentmodelServiceImpl.java
  37. 28 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/FailurestatisticsmainServiceImpl.java
  38. 20 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/PartsServiceImpl.java
  39. 92 0
      web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/reliability/ReliabilityService.java
  40. 204 0
      web/knowledge-hb/src/main/java/com/gyee/knowledge/controller/knowledge/KnowledgeController.java
  41. 2 1
      web/knowledge-hb/src/main/java/com/gyee/knowledge/model/auto/Alertrule2.java
  42. 2 1
      web/knowledge-hb/src/main/java/com/gyee/knowledge/model/auto/Alertrulefailure.java
  43. 2 1
      web/knowledge-hb/src/main/java/com/gyee/knowledge/model/auto/P3DeviceFault.java
  44. 74 0
      web/knowledge-hb/src/main/java/com/gyee/knowledge/service/knowledge/KnowledgeService.java
  45. 1 1
      web/knowledge-hb/src/main/resources/application-dev.yml

+ 74 - 0
common/src/main/java/com/gyee/common/model/Alertrule2.java

@@ -0,0 +1,74 @@
+package com.gyee.common.model;/*
+@author   谢生杰
+@date   2022/9/19-11:46
+*/
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class Alertrule2 {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value="ID",type = IdType.INPUT)
+    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;
+
+    @TableField("CREATETIME")
+    private Date createtime;
+
+}

+ 39 - 0
common/src/main/java/com/gyee/common/model/Alertrulefailure.java

@@ -0,0 +1,39 @@
+package com.gyee.common.model;/*
+@author   谢生杰
+@date   2022/9/19-11:47
+*/
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+@Data
+public class Alertrulefailure {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "ID",type = IdType.INPUT)
+    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 Integer xqsc;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("MODEL")
+    private String model;
+
+}

+ 57 - 0
common/src/main/java/com/gyee/common/model/P3DeviceFault.java

@@ -0,0 +1,57 @@
+package com.gyee.common.model;/*
+@author   谢生杰
+@date   2022/9/19-11:44
+*/
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.sql.Blob;
+import java.util.Date;
+
+@Data
+public class P3DeviceFault {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value="ID",type = IdType.INPUT)
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("FAULTID")
+    private String faultid;
+
+    @TableField("HALTTYPE")
+    private String halttype;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("CATEGORY")
+    private String category;
+
+    @TableField("FAULTLEVEL")
+    private Integer faultlevel;
+
+    @TableField("CAUSE")
+    private Blob cause;
+
+    @TableField("TREATMENTMEASURE")
+    private Blob treatmentmeasure;
+
+    @TableField("DEVICEMODEL")
+    private String devicemodel;
+
+    @TableField("DEVICETREEID")
+    private Double devicetreeid;
+
+    @TableField("CREATETOR")
+    private String createtor;
+
+    @TableField("CREATETIME")
+    private Date createtime;
+
+}

+ 70 - 0
common/src/main/java/com/gyee/common/model/P3DeviceFeatures.java

@@ -0,0 +1,70 @@
+package com.gyee.common.model;/*
+@author   谢生杰
+@date   2022/9/19-11:47
+*/
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class P3DeviceFeatures {
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private Long id;
+
+    @TableField("MODELID")
+    private String modelid;
+
+    @TableField("STRUCTUREID")
+    private Integer structureid;
+
+    @TableField("COMPONENTID")
+    private Integer componentid;
+
+    @TableField("UNIFORMCODE")
+    private String uniformcode;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("DESCRIPTION")
+    private String description;
+
+    @TableField("MINVALUE")
+    private Integer minvalue;
+
+    @TableField("MAXVALUE")
+    private Integer maxvalue;
+
+    @TableField("NORMALMIN")
+    private Integer normalmin;
+
+    @TableField("NORMALMAX")
+    private Integer normalmax;
+
+    @TableField("PREALERTVALUE")
+    private Integer prealertvalue;
+
+    @TableField("ALERTVALUE")
+    private Integer alertvalue;
+
+    @TableField("ENABLED")
+    private Integer enabled;
+
+    @TableField("CREATOR")
+    private String creator;
+
+    @TableField("CREATETIME")
+    private Date createtime;
+
+    @TableField("LASTUPDATEPERSON")
+    private String lastupdateperson;
+
+    @TableField("LASTUPDATETIME")
+    private Date lastupdatetime;
+
+}

+ 49 - 0
common/src/main/java/com/gyee/common/model/Risktype.java

@@ -0,0 +1,49 @@
+package com.gyee.common.model;/*
+@author   谢生杰
+@date   2022/9/19-11:48
+*/
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class Risktype {
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private Long id;
+
+    @TableField("RSNUM")
+    private String rsnum;
+
+    @TableField("SERIALNUM")
+    private Long serialnum;
+
+    @TableField("STATION")
+    private String station;
+
+    @TableField("LOCATION")
+    private String location;
+
+    @TableField("CONTENT")
+    private String content;
+
+    @TableField("DESCRIBE")
+    private String describe;
+
+    @TableField("PRINCIPAL")
+    private String principal;
+
+    @TableField("ADDTIME")
+    private Date addtime;
+
+    @TableField("ENDTIME")
+    private Date endtime;
+
+    @TableField("STATE")
+    private String state;
+
+}

+ 41 - 0
common/src/main/java/com/gyee/common/model/Safeprecstard.java

@@ -0,0 +1,41 @@
+package com.gyee.common.model;/*
+@author   谢生杰
+@date   2022/9/19-11:48
+*/
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class Safeprecstard {
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private Long id;
+
+    @TableField("SERIALNUM")
+    private Long serialnum;
+
+    @TableField("SAFECONTENT")
+    private String safecontent;
+
+    @TableField("DESCRIBE")
+    private String describe;
+
+    @TableField("PRINCIPAL")
+    private String principal;
+
+    @TableField("ADDTIME")
+    private Date addtime;
+
+    @TableField("TYPE")
+    private String type;
+
+    @TableField("OTHER")
+    private String other;
+
+
+}

+ 36 - 36
histroy/healthmanagement-histroy-hb/src/main/java/com/gyee/healthmanagementhistroy/task/HealthreportTask.java

@@ -77,41 +77,41 @@ public class HealthreportTask {
     }
 
 
-    /**
-     * 健康报告
-     */
-    @Scheduled(cron = "0 30 9 * * ?")
-    //或直接指定时间间隔,例如:5秒
-    //@Scheduled(fixedRate=5000)
-    private void configureTasks4() throws UnsupportedEncodingException, JsonProcessingException {
-        Date yestday = DateUtils.getYestday(new Date());
-        String date = DateUtils.toDate1(yestday);
-        reportService.saveHealthReport(date,date,"CL_FDC");
-    }
-
-    /**
-     * 健康报告
-     */
-    @Scheduled(cron = "0 31 9 * * ?")
-    //或直接指定时间间隔,例如:5秒
-    //@Scheduled(fixedRate=5000)
-    private void configureTasks5() throws UnsupportedEncodingException, JsonProcessingException {
-        Date yestday = DateUtils.getYestday(new Date());
-        String date = DateUtils.toDate1(yestday);
-        reportService.saveHealthReport(date,date,"KB_FDC");
-    }
-
-    /**
-     * 健康报告
-     */
-    @Scheduled(cron = "0 32 9 * * ?")
-    //或直接指定时间间隔,例如:5秒
-    //@Scheduled(fixedRate=5000)
-    private void configureTasks6() throws UnsupportedEncodingException, JsonProcessingException {
-        Date yestday = DateUtils.getYestday(new Date());
-        String date = DateUtils.toDate1(yestday);
-        reportService.saveHealthReport(date,date,"DX_FDC");
-    }
+//    /**
+//     * 健康报告
+//     */
+//    @Scheduled(cron = "0 30 9 * * ?")
+//    //或直接指定时间间隔,例如:5秒
+//    //@Scheduled(fixedRate=5000)
+//    private void configureTasks4() throws UnsupportedEncodingException, JsonProcessingException {
+//        Date yestday = DateUtils.getYestday(new Date());
+//        String date = DateUtils.toDate1(yestday);
+//        reportService.saveHealthReport(date,date,"CL_FDC");
+//    }
+//
+//    /**
+//     * 健康报告
+//     */
+//    @Scheduled(cron = "0 31 9 * * ?")
+//    //或直接指定时间间隔,例如:5秒
+//    //@Scheduled(fixedRate=5000)
+//    private void configureTasks5() throws UnsupportedEncodingException, JsonProcessingException {
+//        Date yestday = DateUtils.getYestday(new Date());
+//        String date = DateUtils.toDate1(yestday);
+//        reportService.saveHealthReport(date,date,"KB_FDC");
+//    }
+//
+//    /**
+//     * 健康报告
+//     */
+//    @Scheduled(cron = "0 32 9 * * ?")
+//    //或直接指定时间间隔,例如:5秒
+//    //@Scheduled(fixedRate=5000)
+//    private void configureTasks6() throws UnsupportedEncodingException, JsonProcessingException {
+//        Date yestday = DateUtils.getYestday(new Date());
+//        String date = DateUtils.toDate1(yestday);
+//        reportService.saveHealthReport(date,date,"DX_FDC");
+//    }
 
     /**
      * 健康报告
@@ -122,7 +122,7 @@ public class HealthreportTask {
     private void configureTasks7() throws UnsupportedEncodingException, JsonProcessingException {
         Date yestday = DateUtils.getYestday(new Date());
         String date = DateUtils.toDate1(yestday);
-        reportService.saveHealthReport(date,date,"SY_FDC");
+        reportService.saveHealthReport(date,date,"FS_FDC");
     }
 
 }

+ 1 - 0
web/consumer/pom.xml

@@ -38,6 +38,7 @@
             <groupId>org.postgresql</groupId>
             <artifactId>postgresql</artifactId>
         </dependency>
+
     </dependencies>
     <build>
         <plugins>

+ 87 - 3
web/consumer/src/main/java/com/gyee/consumer/api/knowleage/KnowledgeApi.java

@@ -1,10 +1,9 @@
 package com.gyee.consumer.api.knowleage;
 
 import com.gyee.common.config.R;
+import com.gyee.common.model.*;
 import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.*;
 
 @FeignClient("knowledge-provider")
 @RequestMapping("//knowledge")
@@ -18,6 +17,20 @@ public interface KnowledgeApi {
     );
 
     /**
+     * 故障知识列表编辑
+     * @return
+     */
+    @PostMapping("/faultKnowledgeedit")
+    public R faultKnowledgeedit(@RequestBody P3DeviceFault p3DeviceFault);
+
+    /**
+     * 故障知识列表删除
+     * @return
+     */
+    @DeleteMapping("/faultKnowledgeremove")
+    public R faultKnowledgeremove(@RequestBody P3DeviceFault p3DeviceFault);
+
+    /**
      * 预警知识
      * @param gzjb
      * @param bjlx
@@ -35,6 +48,20 @@ public interface KnowledgeApi {
     );
 
     /**
+     * 预警知识列表编辑
+     * @return
+     */
+    @PostMapping("/earlyKnowledgeedit")
+    public R earlyKnowledgeedit(@RequestBody Alertrule2 alertrule2);
+
+    /**
+     * 预警知识列表删除
+     * @return
+     */
+    @DeleteMapping("/earlyKnowledgeremove")
+    public R earlyKnowledgeremove(@RequestBody Alertrule2 alertrule2);
+
+    /**
      * 检查修理方案
      * @param model
      * @param pageNum
@@ -47,6 +74,20 @@ public interface KnowledgeApi {
                                   @RequestParam(value = "pageSize",required = true) String pageSize
     );
 
+    /**
+     * 检查修理方案编辑
+     * @return
+     */
+    @PostMapping("/checkRepairProgrammeedit")
+    public R checkRepairProgrammeedit(@RequestBody Alertrulefailure alertrulefailure);
+
+    /**
+     * 检查修理方案删除
+     * @return
+     */
+    @DeleteMapping("/checkRepairProgrammeremove")
+    public R checkRepairProgrammeremove(@RequestBody Alertrulefailure alertrulefailure);
+
 
     /**
      * 检查修理方案型号list
@@ -69,6 +110,21 @@ public interface KnowledgeApi {
     );
 
     /**
+     * 特征参数编辑
+     * @return
+     */
+    @PostMapping("/featureParameteredit")
+    public R featureParameteredit(@RequestBody P3DeviceFeatures p3DeviceFeatures);
+
+    /**
+     * 特征参数删除
+     * @return
+     */
+    @DeleteMapping("/featureParameterremove")
+    public R featureParameterremove(@RequestBody P3DeviceFeatures p3DeviceFeatures);
+
+
+    /**
      * 安全措施知识
      * @param name
      * @param pageNum
@@ -82,6 +138,20 @@ public interface KnowledgeApi {
     );
 
     /**
+     * 安全措施知识编辑
+     * @return
+     */
+    @PostMapping("/safeMeasureKnowledgeedit")
+    public R safeMeasureKnowledgeedit(@RequestBody Safeprecstard safeprecstard);
+
+    /**
+     * 安全措施知识删除
+     * @return
+     */
+    @DeleteMapping("/safeMeasureKnowledgeremove")
+    public R safeMeasureKnowledgeremove(@RequestBody Safeprecstard safeprecstard);
+
+    /**
      * 作业指导知识
      * @param name
      * @param pageNum
@@ -96,6 +166,20 @@ public interface KnowledgeApi {
     );
 
     /**
+     * 作业指导知识编辑
+     * @return
+     */
+    @PostMapping("/workGuideKnowledgeedit")
+    public R workGuideKnowledgeedit(@RequestBody Risktype risktype);
+
+    /**
+     * 作业指导知识删除
+     * @return
+     */
+    @DeleteMapping("/workGuideKnowledgeremove")
+    public R workGuideKnowledgeremove(@RequestBody Risktype risktype);
+
+    /**
      *作业指导知识->安措内容
      * @param rsnum
      * @param pageNum

+ 109 - 0
web/consumer/src/main/java/com/gyee/consumer/controller/knowleage/KnowleageController.java

@@ -1,6 +1,7 @@
 package com.gyee.consumer.controller.knowleage;
 
 import com.gyee.common.config.R;
+import com.gyee.common.model.*;
 import com.gyee.consumer.api.knowleage.KnowledgeApi;
 import org.springframework.web.bind.annotation.*;
 
@@ -37,6 +38,24 @@ public class KnowleageController {
         return knowledgeApi.faultKnowledge(gzjb,tjlx,cxnr,pageNum,pageSize);
     }
 
+    /**
+     * 故障知识列表编辑
+     * @return
+     */
+    @PostMapping("/consumer/knowledge/faultKnowledgeedit")
+    public R faultKnowledgeedit(@RequestBody P3DeviceFault p3DeviceFault){
+        return knowledgeApi.faultKnowledgeedit(p3DeviceFault);
+    }
+
+    /**
+     * 故障知识列表删除
+     * @return
+     */
+    @DeleteMapping("/consumer/knowledge/faultKnowledgeremove")
+    public R faultKnowledgeremove(@RequestBody P3DeviceFault p3DeviceFault){
+        return knowledgeApi.faultKnowledgeremove(p3DeviceFault);
+    }
+
 
     /**
      * 预警知识
@@ -56,6 +75,23 @@ public class KnowleageController {
     )  {
         return knowledgeApi.earlyKnowledge(gzjb,bjlx,cxnr,pageNum,pageSize);
     }
+    /**
+     * 预警知识列表编辑
+     * @return
+     */
+    @PostMapping("/consumer/knowledge/earlyKnowledgeedit")
+    public R earlyKnowledgeedit(@RequestBody Alertrule2 alertrule2){
+        return knowledgeApi.earlyKnowledgeedit(alertrule2);
+    }
+
+    /**
+     * 预警知识列表删除
+     * @return
+     */
+    @DeleteMapping("/consumer/knowledge/earlyKnowledgeremove")
+    public R earlyKnowledgeremove(@RequestBody Alertrule2 alertrule2){
+        return knowledgeApi.earlyKnowledgeremove(alertrule2);
+    }
 
 
     /**
@@ -75,6 +111,24 @@ public class KnowleageController {
 
     }
 
+    /**
+     * 检查修理方案编辑
+     * @return
+     */
+    @PostMapping("/consumer/knowledge/checkRepairProgrammeedit")
+    public R checkRepairProgrammeedit(@RequestBody Alertrulefailure alertrulefailure){
+        return knowledgeApi.checkRepairProgrammeedit(alertrulefailure);
+    }
+
+    /**
+     * 检查修理方案删除
+     * @return
+     */
+    @DeleteMapping("/consumer/knowledge/checkRepairProgrammeremove")
+    public R checkRepairProgrammeremove(@RequestBody Alertrulefailure alertrulefailure){
+        return knowledgeApi.checkRepairProgrammeremove(alertrulefailure);
+    }
+
 
     /**
      * 检查修理方案型号list
@@ -107,6 +161,24 @@ public class KnowleageController {
     }
 
     /**
+     * 特征参数编辑
+     * @return
+     */
+    @PostMapping("/consumer/knowledge/featureParameteredit")
+    public R featureParameteredit(@RequestBody P3DeviceFeatures p3DeviceFeatures){
+        return knowledgeApi.featureParameteredit(p3DeviceFeatures);
+    }
+
+    /**
+     * 特征参数删除
+     * @return
+     */
+    @DeleteMapping("/consumer/knowledge/featureParameterremove")
+    public R featureParameterremove(@RequestBody P3DeviceFeatures p3DeviceFeatures){
+        return knowledgeApi.featureParameterremove(p3DeviceFeatures);
+    }
+
+    /**
      * 安全措施知识
      * @param name
      * @param pageNum
@@ -124,6 +196,24 @@ public class KnowleageController {
 
     }
 
+    /**
+     * 安全措施知识编辑
+     * @return
+     */
+    @PostMapping("/consumer/knowledge/safeMeasureKnowledgeedit")
+    public R safeMeasureKnowledgeedit(@RequestBody Safeprecstard safeprecstard){
+        return knowledgeApi.safeMeasureKnowledgeedit(safeprecstard);
+    }
+
+    /**
+     * 安全措施知识删除
+     * @return
+     */
+    @DeleteMapping("/consumer/knowledge/safeMeasureKnowledgeremove")
+    public R safeMeasureKnowledgeremove(@RequestBody Safeprecstard safeprecstard){
+        return knowledgeApi.safeMeasureKnowledgeremove(safeprecstard);
+    }
+
 
     /**
      * 作业指导知识
@@ -141,6 +231,25 @@ public class KnowleageController {
         return knowledgeApi.workGuideKnowledge(name,pageNum,pageSize);
     }
 
+
+    /**
+     * 作业指导知识编辑
+     * @return
+     */
+    @PostMapping("/consumer/knowledge/workGuideKnowledgeedit")
+    public R workGuideKnowledgeedit(@RequestBody Risktype risktype){
+        return knowledgeApi.workGuideKnowledgeedit(risktype);
+    }
+
+    /**
+     * 作业指导知识删除
+     * @return
+     */
+    @DeleteMapping("/consumer/knowledge/workGuideKnowledgeremove")
+    public R workGuideKnowledgeremove(@RequestBody Risktype risktype){
+        return knowledgeApi.workGuideKnowledgeremove(risktype);
+    }
+
     /**
      *作业指导知识->安措内容
      * @param rsnum

+ 2 - 2
web/consumer/src/main/resources/application.yml

@@ -1,5 +1,5 @@
 spring:
   profiles:
-#    active: hf
+    active: dev
 #    active: jn
-    active: dev
+#    active: dev

+ 11 - 11
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/config/GeneratorCodeConfig.java

@@ -55,21 +55,21 @@ public class GeneratorCodeConfig {
 //        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("org.postgresql.Driver");
+        dsc.setDriverName("oracle.jdbc.driver.OracleDriver");
         dsc.setUsername("gdprod");
         dsc.setPassword("gd123");
-        dsc.setUrl("jdbc:postgresql://10.81.3.151:5432/wisdom");
+//        dsc.setUrl("jdbc:oracle:thin:@49.4.50.80:1521:gdnxfd");
+        dsc.setUrl("jdbc:oracle:thin:@192.168.2.215:1521:gdsj");
         mpg.setDataSource(dsc);
 
+
+
+//        dsc.setDriverName("org.postgresql.Driver");
+//        dsc.setUsername("gdprod");
+//        dsc.setPassword("gd123");
+//        dsc.setUrl("jdbc:postgresql://10.81.3.151:5432/wisdom");
+//        mpg.setDataSource(dsc);
+
 //        dsc.setDriverName("com.cloudera.impala.jdbc41.Driver");
 //        dsc.setUrl("jdbc:impala://192.168.1.67:21050/gyee_test");
 //        mpg.setDataSource(dsc);

+ 20 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/BjgltjbController.java

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

+ 20 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/EarlywarningmainController.java

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

+ 20 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/EquipmentmodelController.java

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

+ 20 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/FailurestatisticsmainController.java

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

+ 20 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/auto/PartsController.java

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

+ 142 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/controller/reliability/ReliabilityController.java

@@ -0,0 +1,142 @@
+package com.gyee.healthmanagement.controller.reliability;
+
+
+import com.gyee.common.model.StringUtils;
+import com.gyee.healthmanagement.config.R;
+import com.gyee.healthmanagement.model.auto.*;
+import com.gyee.healthmanagement.service.reliability.ReliabilityService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * baseURL: 10.155.32.4:8034
+ * @ClassName : ReliabilityController
+ * @Author : xieshengjie
+ * @Date: 2021/7/8 14:01
+ * @Description : 可靠性分析controller
+ */
+@RestController
+@RequestMapping("//reliability")
+public class ReliabilityController {
+    @Autowired
+    private ReliabilityService reliabilityService;
+
+    /**
+     * 预警评判分析
+     * @param wpid
+     * @param date
+     * @return
+     */
+    @GetMapping("/earlyWarn")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R earlyWarn(@RequestParam(value = "wpid",required = true)String wpid,
+                       @RequestParam(value = "date",required = true)String date)  {
+        List<Earlywarningmain> resultlist = reliabilityService.earlyWarn(wpid,date);
+        if (StringUtils.isNotNull(resultlist)) {
+            return R.ok().data(resultlist);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 故障统计
+     * @param wpid
+     * @param date
+     * @return
+     */
+    @GetMapping("/failurestatistics")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R failurestatistics(@RequestParam(value = "wpid",required = true)String wpid,
+                           @RequestParam(value = "date",required = true)String date)  {
+        List<Failurestatisticsmain> resultlist = reliabilityService.failurestatistics(wpid, date);
+        if (StringUtils.isNotNull(resultlist)) {
+            return R.ok().data(resultlist);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 获取部件列表
+     * @return
+     */
+    @GetMapping("/partlist")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R partlist()  {
+        List<Parts> resultlist = reliabilityService.partlist();
+        if (StringUtils.isNotNull(resultlist)) {
+            return R.ok().data(resultlist);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 获取型号list
+     * @return
+     */
+    @GetMapping("/modellist")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R modellist()  {
+        List<Equipmentmodel> resultlist = reliabilityService.modellist();
+        if (StringUtils.isNotNull(resultlist)) {
+            return R.ok().data(resultlist);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 部件功率
+     * @param wpid
+     * @param date
+     * @param model
+     * @param part
+     * @return
+     */
+    @GetMapping("/poweranalysis")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R poweranalysis(@RequestParam(value = "wpid",required = true)String wpid,
+                               @RequestParam(value = "date",required = true)String date,
+                           @RequestParam(value = "model",required = true)String model,
+                           @RequestParam(value = "part",required = true)String part
+    )  {
+        List<Bjgltjb> resultlist = reliabilityService.poweranalysis(wpid, date,model,part);
+//        Map<String,Map<String,List<Bjgltjb>>> dataMap = new HashMap<>();
+//        resultlist.stream().forEach(i->{
+//            String wtid = i.getWtid();
+//            String power = i.getPower();
+//            if (dataMap.containsKey(wtid)){
+//                Map<String, List<Bjgltjb>> map = dataMap.get(wtid);
+//                if (map.containsKey(power)){
+//                    map.get(power).add(i);
+//                }else{
+//                    List<Bjgltjb> list = new ArrayList<>();
+//                    list.add(i);
+//                    map.put(i.getPower(),list);
+//                }
+//            }else {
+//                Map<String,List<Bjgltjb>> map = new HashMap<>();
+//                List<Bjgltjb> list = new ArrayList<>();
+//                list.add(i);
+//                map.put(i.getPower(),list);
+//                dataMap.put(wtid,map);
+//            }
+//        });
+        if (StringUtils.isNotNull(resultlist)) {
+            return R.ok().data(resultlist);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+
+}

+ 22 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/BjgltjbMapper.java

@@ -0,0 +1,22 @@
+package com.gyee.healthmanagement.mapper.auto;
+
+import com.gyee.healthmanagement.model.auto.Bjgltjb;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface BjgltjbMapper extends BaseMapper<Bjgltjb> {
+
+    @Select("select * from bjgltjb where wpid=#{wpid} and to_char(recodedate,'yyyy-MM-dd')=#{date} and model=#{model} and partid=#{part}")
+    List<Bjgltjb> list(@Param("wpid") String wpid, @Param("date") String date, @Param("model") String model, @Param("part") String part);
+}

+ 21 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/EarlywarningmainMapper.java

@@ -0,0 +1,21 @@
+package com.gyee.healthmanagement.mapper.auto;
+
+import com.gyee.healthmanagement.model.auto.Earlywarningmain;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface EarlywarningmainMapper extends BaseMapper<Earlywarningmain> {
+    @Select("select * from earlywarningmain where wpid=#{wpid} and recodedate=to_date(#{date},'yyyy-MM-dd')")
+    List<Earlywarningmain> listEarly(@Param("wpid") String wpid, @Param("date") String date);
+}

+ 16 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/EquipmentmodelMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagement.mapper.auto;
+
+import com.gyee.healthmanagement.model.auto.Equipmentmodel;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface EquipmentmodelMapper extends BaseMapper<Equipmentmodel> {
+
+}

+ 21 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/FailurestatisticsmainMapper.java

@@ -0,0 +1,21 @@
+package com.gyee.healthmanagement.mapper.auto;
+
+import com.gyee.healthmanagement.model.auto.Failurestatisticsmain;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface FailurestatisticsmainMapper extends BaseMapper<Failurestatisticsmain> {
+    @Select("select * from failurestatisticsmain where wpid=#{wpid} and recodedate = to_date(#{date},'yyyy-MM-dd') ")
+    List<Failurestatisticsmain> listFailure(@Param("wpid") String wpid, @Param("date") String date);
+}

+ 16 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/mapper/auto/PartsMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagement.mapper.auto;
+
+import com.gyee.healthmanagement.model.auto.Parts;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface PartsMapper extends BaseMapper<Parts> {
+
+}

+ 71 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Bjgltjb.java

@@ -0,0 +1,71 @@
+package com.gyee.healthmanagement.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("BJGLTJB")
+public class Bjgltjb extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("WPID")
+    private String wpid;
+
+    @TableField("WPNAME")
+    private String wpname;
+
+    @TableField("WTID")
+    private String wtid;
+
+    @TableField("WTNAME")
+    private String wtname;
+
+    @TableField("MODEL")
+    private String model;
+
+    @TableField("ID")
+    private String id;
+
+    @TableField("TID")
+    private String tid;
+
+    @TableField("RECODEDATE")
+    private Date recodedate;
+
+    @TableField("PARTID")
+    private String partid;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("DATAVALUE")
+    private Double datavalue;
+
+    @TableField("POWER")
+    private String power;
+
+    @TableField("EARLYWARNINGVALUE")
+    private Double earlywarningvalue;
+
+    @TableField("CRITICALVALUE")
+    private Double criticalvalue;
+
+
+}

+ 154 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Earlywarningmain.java

@@ -0,0 +1,154 @@
+package com.gyee.healthmanagement.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("EARLYWARNINGMAIN")
+public class Earlywarningmain extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("RECODEDATE")
+    private Date recodedate;
+
+    @TableField("WPID")
+    private String wpid;
+
+    @TableField("WPNAME")
+    private String wpname;
+
+    @TableField("WTID")
+    private String wtid;
+
+    @TableField("WTNAME")
+    private String wtname;
+
+    @TableField("DAY3TOP1")
+    private Double day3top1;
+
+    @TableField("DAY3TOP2")
+    private Double day3top2;
+
+    @TableField("DAY3TOP3")
+    private Double day3top3;
+
+    @TableField("DAY7TOP1")
+    private Double day7top1;
+
+    @TableField("DAY7TOP2")
+    private Double day7top2;
+
+    @TableField("DAY7TOP3")
+    private Double day7top3;
+
+    @TableField("DAY15TOP1")
+    private Double day15top1;
+
+    @TableField("DAY15TOP2")
+    private Double day15top2;
+
+    @TableField("DAY15TOP3")
+    private Double day15top3;
+
+    @TableField("MONTH1TOP1")
+    private Double month1top1;
+
+    @TableField("MONTH1TOP2")
+    private Double month1top2;
+
+    @TableField("MONTH1TOP3")
+    private Double month1top3;
+
+    @TableField("DAY3TOP1NAME")
+    private String day3top1name;
+
+    @TableField("DAY3TOP2NAME")
+    private String day3top2name;
+
+    @TableField("DAY3TOP3NAME")
+    private String day3top3name;
+
+    @TableField("DAY7TOP1NAME")
+    private String day7top1name;
+
+    @TableField("DAY7TOP2NAME")
+    private String day7top2name;
+
+    @TableField("DAY7TOP3NAME")
+    private String day7top3name;
+
+    @TableField("DAY15TOP1NAME")
+    private String day15top1name;
+
+    @TableField("DAY15TOP2NAME")
+    private String day15top2name;
+
+    @TableField("DAY15TOP3NAME")
+    private String day15top3name;
+
+    @TableField("MONTH1TOP1NAME")
+    private String month1top1name;
+
+    @TableField("MONTH1TOP2NAME")
+    private String month1top2name;
+
+    @TableField("MONTH1TOP3NAME")
+    private String month1top3name;
+
+    @TableField("MONTH1TOPNUM")
+    private Double month1topnum;
+
+    @TableField("DAY7TOPNUM")
+    private Double day7topnum;
+
+    @TableField("DAY15TOPNUM")
+    private Double day15topnum;
+
+    @TableField("DAY3TOPNUM")
+    private Double day3topnum;
+
+    @TableField("SYNTHESISTOPNUM")
+    private Double synthesistopnum;
+
+    @TableField("DAY1TOP1")
+    private Double day1top1;
+
+    @TableField("DAY1TOP2")
+    private Double day1top2;
+
+    @TableField("DAY1TOP3")
+    private Double day1top3;
+
+    @TableField("DAY1TOP1NAME")
+    private String day1top1name;
+
+    @TableField("DAY1TOP2NAME")
+    private String day1top2name;
+
+    @TableField("DAY1TOP3NAME")
+    private String day1top3name;
+
+    @TableField("DAY1TOPNUM")
+    private Double day1topnum;
+
+
+}

+ 65 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Equipmentmodel.java

@@ -0,0 +1,65 @@
+package com.gyee.healthmanagement.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("EQUIPMENTMODEL")
+public class Equipmentmodel extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("CODE")
+    private String code;
+
+    @TableField("NAME")
+    private String name;
+
+    @TableField("DESCRIPTION")
+    private String description;
+
+    @TableField("POWERPRODUCTION")
+    private Double powerproduction;
+
+    @TableField("CUTINWINDSPEED")
+    private Double cutinwindspeed;
+
+    @TableField("RATEDWINDSPEED")
+    private Double ratedwindspeed;
+
+    @TableField("CUTOUTWINDSPEED")
+    private String cutoutwindspeed;
+
+    @TableField("WINDTURBINEMANUFACTURERID")
+    private String windturbinemanufacturerid;
+
+    @TableField("PHOTO")
+    private String photo;
+
+    @TableField("UNIT")
+    private String unit;
+
+    @TableField("SWEPTAREA")
+    private Double sweptarea;
+
+    @TableField("EQUIPMENTCATEGORY")
+    private Double equipmentcategory;
+
+
+}

+ 154 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Failurestatisticsmain.java

@@ -0,0 +1,154 @@
+package com.gyee.healthmanagement.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("FAILURESTATISTICSMAIN")
+public class Failurestatisticsmain extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId("ID")
+    private String id;
+
+    @TableField("RECODEDATE")
+    private Date recodedate;
+
+    @TableField("WPID")
+    private String wpid;
+
+    @TableField("WPNAME")
+    private String wpname;
+
+    @TableField("WTID")
+    private String wtid;
+
+    @TableField("WTNAME")
+    private String wtname;
+
+    @TableField("DAY3TOP1")
+    private Double day3top1;
+
+    @TableField("DAY3TOP2")
+    private Double day3top2;
+
+    @TableField("DAY3TOP3")
+    private Double day3top3;
+
+    @TableField("DAY7TOP1")
+    private Double day7top1;
+
+    @TableField("DAY7TOP2")
+    private Double day7top2;
+
+    @TableField("DAY7TOP3")
+    private Double day7top3;
+
+    @TableField("DAY15TOP1")
+    private Double day15top1;
+
+    @TableField("DAY15TOP2")
+    private Double day15top2;
+
+    @TableField("DAY15TOP3")
+    private Double day15top3;
+
+    @TableField("MONTH1TOP1")
+    private Double month1top1;
+
+    @TableField("MONTH1TOP2")
+    private Double month1top2;
+
+    @TableField("MONTH1TOP3")
+    private Double month1top3;
+
+    @TableField("DAY3TOP1NAME")
+    private String day3top1name;
+
+    @TableField("DAY3TOP2NAME")
+    private String day3top2name;
+
+    @TableField("DAY3TOP3NAME")
+    private String day3top3name;
+
+    @TableField("DAY7TOP1NAME")
+    private String day7top1name;
+
+    @TableField("DAY7TOP2NAME")
+    private String day7top2name;
+
+    @TableField("DAY7TOP3NAME")
+    private String day7top3name;
+
+    @TableField("DAY15TOP1NAME")
+    private String day15top1name;
+
+    @TableField("DAY15TOP2NAME")
+    private String day15top2name;
+
+    @TableField("DAY15TOP3NAME")
+    private String day15top3name;
+
+    @TableField("MONTH1TOP1NAME")
+    private String month1top1name;
+
+    @TableField("MONTH1TOP2NAME")
+    private String month1top2name;
+
+    @TableField("MONTH1TOP3NAME")
+    private String month1top3name;
+
+    @TableField("MONTH1TOPNUM")
+    private Double month1topnum;
+
+    @TableField("DAY7TOPNUM")
+    private Double day7topnum;
+
+    @TableField("DAY15TOPNUM")
+    private Double day15topnum;
+
+    @TableField("DAY3TOPNUM")
+    private Double day3topnum;
+
+    @TableField("SYNTHESISTOPNUM")
+    private Double synthesistopnum;
+
+    @TableField("DAY1TOP1")
+    private Double day1top1;
+
+    @TableField("DAY1TOP2")
+    private Double day1top2;
+
+    @TableField("DAY1TOP3")
+    private Double day1top3;
+
+    @TableField("DAY1TOP1NAME")
+    private String day1top1name;
+
+    @TableField("DAY1TOP2NAME")
+    private String day1top2name;
+
+    @TableField("DAY1TOP3NAME")
+    private String day1top3name;
+
+    @TableField("DAY1TOPNUM")
+    private Double day1topnum;
+
+
+}

+ 31 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/model/auto/Parts.java

@@ -0,0 +1,31 @@
+package com.gyee.healthmanagement.model.auto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("PARTS")
+public class Parts extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableField("ID")
+    private String id;
+
+    @TableField("NAME")
+    private String name;
+
+
+}

+ 19 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IBjgltjbService.java

@@ -0,0 +1,19 @@
+package com.gyee.healthmanagement.service.auto;
+
+import com.gyee.healthmanagement.model.auto.Bjgltjb;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface IBjgltjbService extends IService<Bjgltjb> {
+
+    List<Bjgltjb> list(String wpid, String date, String model, String part);
+}

+ 19 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IEarlywarningmainService.java

@@ -0,0 +1,19 @@
+package com.gyee.healthmanagement.service.auto;
+
+import com.gyee.healthmanagement.model.auto.Earlywarningmain;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface IEarlywarningmainService extends IService<Earlywarningmain> {
+
+    List<Earlywarningmain> listEarly(String wpid, String date);
+}

+ 16 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IEquipmentmodelService.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagement.service.auto;
+
+import com.gyee.healthmanagement.model.auto.Equipmentmodel;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface IEquipmentmodelService extends IService<Equipmentmodel> {
+
+}

+ 19 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IFailurestatisticsmainService.java

@@ -0,0 +1,19 @@
+package com.gyee.healthmanagement.service.auto;
+
+import com.gyee.healthmanagement.model.auto.Failurestatisticsmain;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface IFailurestatisticsmainService extends IService<Failurestatisticsmain> {
+
+    List<Failurestatisticsmain> listFailure(String wpid, String date);
+}

+ 16 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/IPartsService.java

@@ -0,0 +1,16 @@
+package com.gyee.healthmanagement.service.auto;
+
+import com.gyee.healthmanagement.model.auto.Parts;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+public interface IPartsService extends IService<Parts> {
+
+}

+ 28 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/BjgltjbServiceImpl.java

@@ -0,0 +1,28 @@
+package com.gyee.healthmanagement.service.auto.impl;
+
+import com.gyee.healthmanagement.model.auto.Bjgltjb;
+import com.gyee.healthmanagement.mapper.auto.BjgltjbMapper;
+import com.gyee.healthmanagement.service.auto.IBjgltjbService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Service
+public class BjgltjbServiceImpl extends ServiceImpl<BjgltjbMapper, Bjgltjb> implements IBjgltjbService {
+    @Resource
+    private BjgltjbMapper bjgltjbMapper;
+    @Override
+    public List<Bjgltjb> list(String wpid, String date, String model, String part) {
+        return bjgltjbMapper.list(wpid,date,model,part);
+    }
+}

+ 28 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/EarlywarningmainServiceImpl.java

@@ -0,0 +1,28 @@
+package com.gyee.healthmanagement.service.auto.impl;
+
+import com.gyee.healthmanagement.model.auto.Earlywarningmain;
+import com.gyee.healthmanagement.mapper.auto.EarlywarningmainMapper;
+import com.gyee.healthmanagement.service.auto.IEarlywarningmainService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Service
+public class EarlywarningmainServiceImpl extends ServiceImpl<EarlywarningmainMapper, Earlywarningmain> implements IEarlywarningmainService {
+    @Resource
+    private EarlywarningmainMapper earlywarningmainMapper;
+    @Override
+    public List<Earlywarningmain> listEarly(String wpid, String date) {
+        return earlywarningmainMapper.listEarly(wpid,date);
+    }
+}

+ 20 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/EquipmentmodelServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagement.service.auto.impl;
+
+import com.gyee.healthmanagement.model.auto.Equipmentmodel;
+import com.gyee.healthmanagement.mapper.auto.EquipmentmodelMapper;
+import com.gyee.healthmanagement.service.auto.IEquipmentmodelService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Service
+public class EquipmentmodelServiceImpl extends ServiceImpl<EquipmentmodelMapper, Equipmentmodel> implements IEquipmentmodelService {
+
+}

+ 28 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/FailurestatisticsmainServiceImpl.java

@@ -0,0 +1,28 @@
+package com.gyee.healthmanagement.service.auto.impl;
+
+import com.gyee.healthmanagement.model.auto.Failurestatisticsmain;
+import com.gyee.healthmanagement.mapper.auto.FailurestatisticsmainMapper;
+import com.gyee.healthmanagement.service.auto.IFailurestatisticsmainService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Service
+public class FailurestatisticsmainServiceImpl extends ServiceImpl<FailurestatisticsmainMapper, Failurestatisticsmain> implements IFailurestatisticsmainService {
+    @Resource
+    private FailurestatisticsmainMapper failurestatisticsmainMapper;
+    @Override
+    public List<Failurestatisticsmain> listFailure(String wpid, String date) {
+        return failurestatisticsmainMapper.listFailure(wpid,date);
+    }
+}

+ 20 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/auto/impl/PartsServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.healthmanagement.service.auto.impl;
+
+import com.gyee.healthmanagement.model.auto.Parts;
+import com.gyee.healthmanagement.mapper.auto.PartsMapper;
+import com.gyee.healthmanagement.service.auto.IPartsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-09-18
+ */
+@Service
+public class PartsServiceImpl extends ServiceImpl<PartsMapper, Parts> implements IPartsService {
+
+}

+ 92 - 0
web/healthmanagement-web-hb/src/main/java/com/gyee/healthmanagement/service/reliability/ReliabilityService.java

@@ -0,0 +1,92 @@
+package com.gyee.healthmanagement.service.reliability;
+
+
+import com.gyee.healthmanagement.model.auto.*;
+import com.gyee.healthmanagement.service.auto.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @ClassName : ReliabilityService
+ * @Author : xieshengjie
+ * @Date: 2021/7/8 14:02
+ * @Description : 可靠性分析service
+ */
+@Service
+public class ReliabilityService {
+    @Autowired
+    private IEarlywarningmainService earlywarningmainService;
+    @Autowired
+    private IFailurestatisticsmainService failurestatisticsmainService;
+    @Autowired
+    private IPartsService partsService;
+    @Autowired
+    private IEquipmentmodelService equipmentmodelService;
+    @Autowired
+    private IBjgltjbService bjgltjbService;
+    /**
+     * 预警评判分析
+     * @param wpid
+     * @param date
+     * @return
+     */
+    public List<Earlywarningmain> earlyWarn(String wpid, String date) {
+//        QueryWrapper<Earlywarningmain> qw = new QueryWrapper<>();
+//        qw.eq("wpid",wpid);
+//        qw.eq("recodedate", DateUtils.parseDate(date));
+        List<Earlywarningmain> list = earlywarningmainService.listEarly(wpid,date);
+        return list;
+    }
+
+    /**
+     * 故障统计
+     * @param wpid
+     * @param date
+     * @returnFAILURESTATISTICSMAIN
+     */
+    public List<Failurestatisticsmain> failurestatistics(String wpid, String date) {
+//        QueryWrapper<Failurestatisticsmain> qw = new QueryWrapper<>();
+//        qw.eq("wpid",wpid);
+//        qw.eq("recodedate", DateUtils.parseDate(date));
+        List<Failurestatisticsmain> list = failurestatisticsmainService.listFailure(wpid,date);
+        return list;
+    }
+
+    /**
+     * 部件列表
+     * @return
+     */
+    public List<Parts> partlist() {
+        List<Parts> list = partsService.list();
+        return list;
+    }
+
+    /**
+     * 型号列表
+     * @return
+     */
+    public List<Equipmentmodel> modellist() {
+        List<Equipmentmodel> list = equipmentmodelService.list();
+        return list;
+    }
+
+    /**
+     * 获取部件功率
+     * @param wpid
+     * @param date
+     * @param model
+     * @param part
+     * @return
+     */
+    public List<Bjgltjb> poweranalysis(String wpid, String date, String model, String part) {
+//        QueryWrapper<Bjgltjb> qw = new QueryWrapper<>();
+//        qw.eq("wpid",wpid);
+//        qw.eq("recodedate",DateUtils.parseDate(date));
+//        qw.eq("model",model);
+//        qw.eq("partid",part);
+        List<Bjgltjb> list = bjgltjbService.list(wpid,date,model,part);
+        return list;
+    }
+}

+ 204 - 0
web/knowledge-hb/src/main/java/com/gyee/knowledge/controller/knowledge/KnowledgeController.java

@@ -47,10 +47,46 @@ public class KnowledgeController {
         }else{
             return R.error().message("访问失败");
         }
+    }
+
 
+    /**
+     * 故障知识列表编辑
+     * @return
+     */
+    @PostMapping("/faultKnowledgeedit")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R faultKnowledgeedit(@RequestBody P3DeviceFault p3DeviceFault)  {
+
+        Boolean result = knowledgeService.faultKnowledgeedit(p3DeviceFault);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
     }
 
     /**
+     * 故障知识列表删除
+     * @return
+     */
+    @DeleteMapping("/faultKnowledgeremove")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R faultKnowledgeremove(@RequestBody P3DeviceFault p3DeviceFault)  {
+
+        Boolean result = knowledgeService.faultKnowledgeremove(p3DeviceFault);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+
+
+    /**
      * 预警知识
      * @param gzjb
      * @param bjlx
@@ -79,6 +115,40 @@ public class KnowledgeController {
     }
 
     /**
+     * 预警知识列表编辑
+     * @return
+     */
+    @PostMapping("/earlyKnowledgeedit")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R earlyKnowledgeedit(@RequestBody Alertrule2 alertrule2)  {
+
+        Boolean result = knowledgeService.earlyKnowledgeedit(alertrule2);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 预警知识列表删除
+     * @return
+     */
+    @DeleteMapping("/earlyKnowledgeremove")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R earlyKnowledgeremove(@RequestBody Alertrule2 alertrule2)  {
+
+        Boolean result = knowledgeService.earlyKnowledgeremove(alertrule2);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
      * 检查修理方案
      * @param model
      * @param pageNum
@@ -102,6 +172,40 @@ public class KnowledgeController {
 
     }
 
+    /**
+     * 检查修理方案编辑
+     * @return
+     */
+    @PostMapping("/checkRepairProgrammeedit")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R checkRepairProgrammeedit(@RequestBody Alertrulefailure alertrulefailure)  {
+
+        Boolean result = knowledgeService.checkRepairProgrammeedit(alertrulefailure);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 检查修理方案删除
+     * @return
+     */
+    @DeleteMapping("/checkRepairProgrammeremove")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R checkRepairProgrammeremove(@RequestBody Alertrulefailure alertrulefailure)  {
+
+        Boolean result = knowledgeService.checkRepairProgrammeremove(alertrulefailure);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
 
     /**
      * 检查修理方案型号list
@@ -146,6 +250,41 @@ public class KnowledgeController {
     }
 
     /**
+     * 特征参数编辑
+     * @return
+     */
+    @PostMapping("/featureParameteredit")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R featureParameteredit(@RequestBody P3DeviceFeatures p3DeviceFeatures)  {
+
+        Boolean result = knowledgeService.featureParameteredit(p3DeviceFeatures);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 特征参数删除
+     * @return
+     */
+    @DeleteMapping("/featureParameterremove")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R featureParameterremove(@RequestBody P3DeviceFeatures p3DeviceFeatures)  {
+
+        Boolean result = knowledgeService.featureParameterremove(p3DeviceFeatures);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+
+    /**
      * 安全措施知识
      * @param name
      * @param pageNum
@@ -166,7 +305,39 @@ public class KnowledgeController {
         }else{
             return R.error().message("访问失败");
         }
+    }
+    /**
+     * 安全措施知识编辑
+     * @return
+     */
+    @PostMapping("/safeMeasureKnowledgeedit")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R safeMeasureKnowledgeedit(@RequestBody Safeprecstard safeprecstard)  {
+
+        Boolean result = knowledgeService.safeMeasureKnowledgeedit(safeprecstard);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 安全措施知识删除
+     * @return
+     */
+    @DeleteMapping("/safeMeasureKnowledgeremove")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R safeMeasureKnowledgeremove(@RequestBody Safeprecstard safeprecstard)  {
 
+        Boolean result = knowledgeService.safeMeasureKnowledgeremove(safeprecstard);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
     }
 
     /**
@@ -191,9 +362,42 @@ public class KnowledgeController {
         }else{
             return R.error().message("访问失败");
         }
+    }
+    /**
+     * 作业指导知识编辑
+     * @return
+     */
+    @PostMapping("/workGuideKnowledgeedit")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R workGuideKnowledgeedit(@RequestBody Risktype risktype)  {
+
+        Boolean result = knowledgeService.workGuideKnowledgeedit(risktype);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 作业指导知识删除
+     * @return
+     */
+    @DeleteMapping("/workGuideKnowledgeremove")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R workGuideKnowledgeremove(@RequestBody Risktype risktype)  {
 
+        Boolean result = knowledgeService.workGuideKnowledgeremove(risktype);
+        if (StringUtils.isNotNull(result)) {
+            return R.ok().data(result);
+        }else{
+            return R.error().message("访问失败");
+        }
     }
 
+
     /**
      *作业指导知识->安措内容
      * @param rsnum

+ 2 - 1
web/knowledge-hb/src/main/java/com/gyee/knowledge/model/auto/Alertrule2.java

@@ -1,5 +1,6 @@
 package com.gyee.knowledge.model.auto;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -25,7 +26,7 @@ public class Alertrule2 extends Model {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId("ID")
+    @TableId(value="ID",type = IdType.INPUT)
     private String id;
 
     @TableField("NAME")

+ 2 - 1
web/knowledge-hb/src/main/java/com/gyee/knowledge/model/auto/Alertrulefailure.java

@@ -2,6 +2,7 @@ package com.gyee.knowledge.model.auto;
 
 import java.math.BigDecimal;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
@@ -24,7 +25,7 @@ public class Alertrulefailure extends Model {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId
+    @TableId(value = "ID",type = IdType.INPUT)
     private String id;
 
     @TableField("TID")

+ 2 - 1
web/knowledge-hb/src/main/java/com/gyee/knowledge/model/auto/P3DeviceFault.java

@@ -2,6 +2,7 @@ package com.gyee.knowledge.model.auto;
 
 import java.math.BigDecimal;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
@@ -28,7 +29,7 @@ public class P3DeviceFault extends Model {
 
     private static final long serialVersionUID = 1L;
 
-    @TableId("ID")
+    @TableId(value="ID",type = IdType.INPUT)
     private String id;
 
     @TableField("CODE")

+ 74 - 0
web/knowledge-hb/src/main/java/com/gyee/knowledge/service/knowledge/KnowledgeService.java

@@ -3,6 +3,7 @@ package com.gyee.knowledge.service.knowledge;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.CommonUtils;
 import com.gyee.knowledge.model.auto.*;
 import com.gyee.knowledge.service.auto.*;
 import org.springframework.stereotype.Service;
@@ -44,6 +45,19 @@ public class KnowledgeService {
         return list;
     }
 
+    public boolean faultKnowledgeedit(P3DeviceFault p3DeviceFault) {
+        if (StringUtils.isEmpty(p3DeviceFault.getId())){
+            p3DeviceFault.setId(CommonUtils.getUUID());
+        }
+        boolean b = ip3DeviceFaultService.saveOrUpdate(p3DeviceFault);
+        return b;
+    }
+
+    public boolean faultKnowledgeremove(P3DeviceFault p3DeviceFault) {
+        boolean b = ip3DeviceFaultService.removeById(p3DeviceFault.getId());
+        return b;
+    }
+
     public List<Alertrule2> earlyKnowledge(String gzjb, String bjlx, String cxnr, String pageNum, String pageSize) {
         QueryWrapper<Alertrule2> qw = new QueryWrapper<>();
         qw.eq("rank",Integer.parseInt(gzjb));
@@ -57,6 +71,19 @@ public class KnowledgeService {
         return list;
     }
 
+    public boolean earlyKnowledgeedit(Alertrule2 alertrule2) {
+        if (StringUtils.isEmpty(alertrule2.getId())){
+            alertrule2.setId(CommonUtils.getUUID());
+        }
+        boolean b = iAlertrule2Service.saveOrUpdate(alertrule2);
+        return b;
+    }
+
+    public boolean earlyKnowledgeremove(Alertrule2 alertrule2) {
+        boolean b = iAlertrule2Service.removeById(alertrule2.getId());
+        return b;
+    }
+
     public List<Alertrulefailure> checkRepairProgramme(String model, String pageNum, String pageSize) {
         QueryWrapper<Alertrulefailure> qw = new QueryWrapper<>();
         qw.eq("model",model);
@@ -66,6 +93,19 @@ public class KnowledgeService {
         return list;
     }
 
+    public boolean checkRepairProgrammeedit(Alertrulefailure alertrulefailure) {
+        if (StringUtils.isEmpty(alertrulefailure.getId())){
+            alertrulefailure.setId(CommonUtils.getUUID());
+        }
+        boolean b = iAlertrulefailureService.saveOrUpdate(alertrulefailure);
+        return b;
+    }
+
+    public boolean checkRepairProgrammeremove(Alertrulefailure alertrulefailure) {
+        boolean b = iAlertrulefailureService.removeById(alertrulefailure.getId());
+        return b;
+    }
+
     public List<String> modelList() {
         return iAlertrulefailureService.list().stream().map(i->i.getModel()).distinct().collect(Collectors.toList());
     }
@@ -81,6 +121,17 @@ public class KnowledgeService {
         return list;
     }
 
+    public boolean featureParameteredit(P3DeviceFeatures p3DeviceFeatures) {
+
+        boolean b = ip3DeviceFeaturesService.saveOrUpdate(p3DeviceFeatures);
+        return b;
+    }
+
+    public boolean featureParameterremove(P3DeviceFeatures p3DeviceFeatures) {
+        boolean b = ip3DeviceFeaturesService.removeById(p3DeviceFeatures.getId());
+        return b;
+    }
+
     public List<Safeprecstard> safeMeasureKnowledge(String name, String pageNum, String pageSize) {
         QueryWrapper<Safeprecstard> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(name)){
@@ -92,6 +143,18 @@ public class KnowledgeService {
         return list;
     }
 
+    public boolean safeMeasureKnowledgeedit(Safeprecstard safeprecstard) {
+
+        boolean b = iSafeprecstardService.saveOrUpdate(safeprecstard);
+        return b;
+    }
+
+    public boolean safeMeasureKnowledgeremove(Safeprecstard safeprecstard) {
+        boolean b = iSafeprecstardService.removeById(safeprecstard.getId());
+        return b;
+    }
+
+
     public List<Risktype> workGuideKnowledge(String name, String pageNum, String pageSize) {
         QueryWrapper<Risktype> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(name)){
@@ -103,6 +166,17 @@ public class KnowledgeService {
         return list;
     }
 
+    public boolean workGuideKnowledgeedit(Risktype risktype) {
+
+        boolean b = iRisktypeService.saveOrUpdate(risktype);
+        return b;
+    }
+
+    public boolean workGuideKnowledgeremove(Risktype risktype) {
+        boolean b = iRisktypeService.removeById(risktype.getId());
+        return b;
+    }
+
     public List<Safeprec> safetyMeasure(String rsnum, String content,String pageNum, String pageSize) {
         QueryWrapper<Safeprec> qw = new QueryWrapper<>();
         if (StringUtils.isNotEmpty(rsnum)){

+ 1 - 1
web/knowledge-hb/src/main/resources/application-dev.yml

@@ -12,7 +12,7 @@ spring:
   cloud:
     nacos:
       discovery:
-        server-addr: 192.168.2.216:8848
+        server-addr: 192.168.2.198:8848
         #指定yaml格式的配置
         file-extension: yaml
         cluster-name: master