Bladeren bron

通讯管理增删改查,故障管理增删改

caowencheng 6 maanden geleden
bovenliggende
commit
6b90966616

+ 22 - 0
als-modules/agile-assurance/pom.xml

@@ -22,5 +22,27 @@
             <groupId>cn.hutool</groupId>
             <artifactId>hutool-all</artifactId>
         </dependency>
+
+
+        <!--es配置-->
+        <dependency>
+            <groupId>org.elasticsearch.client</groupId>
+            <artifactId>elasticsearch-rest-high-level-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.elasticsearch.client</groupId>
+            <artifactId>elasticsearch-rest-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.elasticsearch</groupId>
+            <artifactId>elasticsearch</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.dromara.easy-es</groupId>
+            <artifactId>easy-es-boot-starter</artifactId>
+        </dependency>
     </dependencies>
 </project>

+ 1 - 1
als-modules/agile-assurance/src/main/java/org/eco/als/controller/FaultCaseController.java

@@ -29,7 +29,7 @@ import java.util.ArrayList;
  * 故障案例Controller
  *
  * @author wgk
- * @date 2024-11-14
+ * @date 2024-12-13
  */
 @Validated
 @RequiredArgsConstructor

+ 66 - 50
als-modules/agile-assurance/src/main/java/org/eco/als/domain/FaultCase.java

@@ -1,13 +1,21 @@
 package org.eco.als.domain;
 
-import com.mybatisflex.annotation.Column;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.mybatisflex.annotation.Id;
 import com.mybatisflex.annotation.Table;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-
 import java.io.Serial;
-
+import java.util.Date;
+import org.dromara.easyes.annotation.HighLight;
+import org.dromara.easyes.annotation.IndexField;
+import org.dromara.easyes.annotation.IndexId;
+import org.dromara.easyes.annotation.IndexName;
+import org.dromara.easyes.annotation.rely.Analyzer;
+import org.dromara.easyes.annotation.rely.FieldStrategy;
+import org.dromara.easyes.annotation.rely.FieldType;
+import org.dromara.easyes.annotation.rely.IdType;
 import org.eco.common.orm.core.domain.BaseEntity;
 
 /**
@@ -19,6 +27,7 @@ import org.eco.common.orm.core.domain.BaseEntity;
 @Data
 @EqualsAndHashCode(callSuper = true)
 @Table(value = "als_fault_case_t")
+@IndexName("fault_case_index")
 public class FaultCase extends BaseEntity {
     @Serial
     private static final long serialVersionUID = 1L;
@@ -27,88 +36,95 @@ public class FaultCase extends BaseEntity {
      * 编号
      */
     @Id
+    @IndexId(type = IdType.CUSTOMIZE)
     private Long id;
 
-    /**
-     * 飞机编号
-     */
-    private String aircraftCode;
-
     /**
      * 机型
      */
-    private String aircraftType;
 
-    /**
-     * 故障代码
-     */
-    private String faultCode;
+    @IndexField(fieldType = FieldType.LONG, strategy = FieldStrategy.NOT_EMPTY)
+    private Long aircraftTypeId;
 
-    /**
-     * 故障名称
-     */
-    private String faultName;
+    @ExcelProperty(value = "机型")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY)
+    private String aircraftTypeName;
 
     /**
-     * 故障文件
+     * 系统
      */
-    private String ossId;
+    @IndexField(fieldType = FieldType.LONG, strategy = FieldStrategy.NOT_EMPTY)
+    private Long aircraftSystemId;
 
-    /**
-     * 日期
-     */
-    private String faultDate;
+    @ExcelProperty(value = "系统")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY)
+    private String aircraftSystemName;
 
     /**
-     * 所属系统
+     * 系统
      */
-    private String systemItem;
+    @IndexField(fieldType = FieldType.LONG, strategy = FieldStrategy.NOT_EMPTY)
+    private Long aircraftSubsystemId;
 
-    /**
-     * 专业
-     */
-    private String specialty;
+    @ExcelProperty(value = "分系统")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY)
+    private String aircraftSubsystemName;
 
-    /**
-     * 故障部位
-     */
-    private String location;
-
-    /**
-     * 故障性质
-     */
-    private String level;
+    @ExcelProperty(value = "作者")
+    private String author;
 
     /**
      * 故障现象
      */
-    private String symptoms;
+    @ExcelProperty(value = "故障现象")
+    @IndexField(value = "pContent", fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY,
+        analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_MAX_WORD)
+    @HighLight( preTag = "<font color=\"red\" >", postTag = "</font>")
+    private String faultPhenomenon;
 
     /**
-     * 排除方法
+     * 故障原因
      */
-    private String methodRectification;
+    @ExcelProperty(value = "故障原因")
+    @IndexField(value = "fContent", fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY,
+        analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_MAX_WORD)
+    @HighLight(preTag = "<font color=\"red\" >", postTag = "</font>")
+    private String faultCause;
 
     /**
-     * 故障原因分类
+     * 故障
      */
-    private String faultCauseType;
+    @ExcelProperty(value = "故障树")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY, analyzer = Analyzer.IK_MAX_WORD,
+        searchAnalyzer = Analyzer.IK_MAX_WORD)
+    private String faultTreePath;
 
     /**
-     * 故障原因
+     * 故障
      */
-    private String faultCause;
+    @ExcelProperty(value = "故障图")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY, analyzer = Analyzer.IK_MAX_WORD,
+        searchAnalyzer = Analyzer.IK_MAX_WORD)
+    private String faultPicturePath;
 
     /**
-     * 备注
+     * 排故方法
      */
-    private String remarks;
+    @ExcelProperty(value = "排故方法")
+    @IndexField(fieldType = FieldType.TEXT, strategy = FieldStrategy.NOT_EMPTY, analyzer = Analyzer.IK_MAX_WORD,
+        searchAnalyzer = Analyzer.IK_MAX_WORD)
+    private String troubleshootingMethodPath;
+
+
 
     /**
-     * 删除标识(1删除 0未删除)
+     * 浏览次数
      */
-    @Column(isLogicDelete = true)
-    private Integer delFlag;
+    @ExcelProperty(value = "浏览次数")
+    @IndexField(fieldType = FieldType.LONG, strategy = FieldStrategy.NOT_EMPTY)
+    private Long viewCount;
+
+    private String orderBy;
 
 
 }

+ 45 - 44
als-modules/agile-assurance/src/main/java/org/eco/als/domain/bo/FaultCaseBo.java

@@ -1,110 +1,111 @@
 package org.eco.als.domain.bo;
 
+import org.eco.als.domain.FaultCase;
 import io.github.linpeilie.annotations.AutoMapper;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.eco.als.domain.FaultCase;
+import jakarta.validation.constraints.*;
 import org.eco.common.orm.core.domain.BaseEntity;
 
-import java.util.List;
-
 /**
  * 故障案例业务对象 als_fault_case_t
  *
  * @author wgk
- * @date 2024-11-14
+ * @date 2024-12-13
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
 @AutoMapper(target = FaultCase.class, reverseConvertGenerate = false)
-public class FaultCaseBo extends BaseEntity {
+public class FaultCaseBo extends BaseEntity{
     /**
      * 编号
      */
+    @NotNull(message = "编号不能为空")
     private Long id;
 
     /**
      * 飞机编号
      */
-    private String aircraftCode;
-    /**
-     * 飞机编号s
-     */
-    private List<String> aircraftCodes;
+    @NotBlank(message = "飞机编号不能为空")
+    private String aircraftTypeId;
 
     /**
      * 机型
      */
-    private String aircraftType;
-    /**
-     * 机型s
-     */
-    private List<String> aircraftTypes;
-
-    /**
-     * 故障代码
-     */
-    private String faultCode;
+    @NotBlank(message = "机型不能为空")
+    private String aircraftTypeName;
 
     /**
-     * 故障名称
+     * 系统编号
      */
-    private String faultName;
+    @NotBlank(message = "系统编号不能为空")
+    private String aircraftSystemId;
 
     /**
-     * 故障文件
+     * 系统
      */
-    private String ossId;
+    @NotBlank(message = "系统不能为空")
+    private String aircraftSystemName;
 
     /**
-     * 日期
+     * 分系统编号
      */
-    private String faultDate;
+    @NotBlank(message = "分系统编号不能为空")
+    private String aircraftSubsystemId;
 
     /**
-     * 所属系统
+     * 系统
      */
-    private String systemItem;
+    @NotBlank(message = "分系统不能为空")
+    private String aircraftSubsystemName;
 
     /**
-     * 专业
+     * 作者
      */
-    private String specialty;
+    @NotBlank(message = "作者不能为空")
+    private String author;
 
     /**
-     * 故障部位
+     * 故障现象
      */
-    private String location;
+    @NotBlank(message = "故障现象不能为空")
+    private String faultPhenomenon;
 
     /**
-     * 故障性质
+     * 故障原因
      */
-    private String level;
+    @NotBlank(message = "故障原因不能为空")
+    private String faultCause;
 
     /**
-     * 故障现象
+     * 故障
      */
-    private String symptoms;
+    @NotBlank(message = "故障树不能为空")
+    private String faultTreePath;
 
     /**
-     * 排除方法
+     * 故障图
      */
-    private String methodRectification;
+    @NotBlank(message = "故障图不能为空")
+    private String faultPicturePath;
 
     /**
-     * 故障原因分类
+     * 排故方法
      */
-    private String faultCauseType;
+    @NotBlank(message = "排故方法不能为空")
+    private String troubleshootingMethodPath;
 
     /**
-     * 故障原因
+     * 查看次数
      */
-    private String faultCause;
+    @NotBlank(message = "查看次数不能为空")
+    private String viewCount;
 
     /**
-     * 备注
+     * 排序
      */
-    private String remarks;
+    @NotBlank(message = "排序不能为空")
+    private String orderBy;
 
 
 }

+ 73 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/domain/vo/CommunicationImportVo.java

@@ -0,0 +1,73 @@
+package org.eco.als.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import org.eco.common.excel.annotation.ExcelDictFormat;
+import org.eco.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.NoArgsConstructor;
+
+/**
+ * 通讯管理导入视图对象 als_communication_t
+ *
+ * @author wgk
+ * @date 2024-12-14
+ */
+
+@Data
+@NoArgsConstructor
+@ExcelIgnoreUnannotated
+public class CommunicationImportVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+
+                /** 名称 */
+                    @ExcelProperty(value = "名称")
+                private String name;
+
+                /** IP地址 */
+                    @ExcelProperty(value = "IP地址")
+                private String ipAddress;
+
+                /** 网段 */
+                    @ExcelProperty(value = "网段")
+                private String networkSegment;
+
+                /** 子网掩码 */
+                    @ExcelProperty(value = "子网掩码")
+                private String subnetMask;
+
+                /** DNS */
+                    @ExcelProperty(value = "DNS")
+                private String dns;
+
+                /** 网关 */
+                    @ExcelProperty(value = "网关")
+                private String gateway;
+
+                /** http */
+                    @ExcelProperty(value = "http")
+                private String http;
+
+                /** 端口号 */
+                    @ExcelProperty(value = "端口号")
+                private String port;
+
+                /** 用户名 */
+                    @ExcelProperty(value = "用户名")
+                private String userName;
+
+                /** 密码 */
+                    @ExcelProperty(value = "密码")
+                private String password;
+
+                /** 删除标识(1删除 0未删除) */
+                    @ExcelProperty(value = "删除标识(1删除 0未删除)")
+                    private Integer delFlag;
+
+
+}

+ 93 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/domain/vo/CommunicationVo.java

@@ -0,0 +1,93 @@
+package org.eco.als.domain.vo;
+
+import org.eco.als.domain.Communication;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import org.eco.common.excel.annotation.ExcelDictFormat;
+import org.eco.common.excel.convert.ExcelDictConvert;
+import com.eco.common.mapper.constant.MapperConstant;
+import com.eco.common.mapper.annotation.FieldMapper;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import java.io.Serial;
+import java.io.Serializable;
+import org.eco.common.orm.core.domain.BaseEntity;
+
+/**
+ * 通讯管理视图对象 als_communication_t
+ *
+ * @author wgk
+ * @date 2024-12-14
+ */
+@Data
+@ExcelIgnoreUnannotated
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = Communication.class)
+public class CommunicationVo extends BaseEntity implements Serializable {
+
+@Serial
+private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    @ExcelProperty(value = "编号")
+    private Long id;
+
+    /** 名称 */
+    @ExcelProperty(value = "名称")
+    private String name;
+
+    /** IP地址 */
+    @ExcelProperty(value = "IP地址")
+    private String ipAddress;
+
+    /** 网段 */
+    @ExcelProperty(value = "网段")
+    private String networkSegment;
+
+    /** 子网掩码 */
+    @ExcelProperty(value = "子网掩码")
+    private String subnetMask;
+
+    /** DNS */
+    @ExcelProperty(value = "DNS")
+    private String dns;
+
+    /** 网关 */
+    @ExcelProperty(value = "网关")
+    private String gateway;
+
+    /** http */
+    @ExcelProperty(value = "http")
+    private String http;
+
+    /** 端口号 */
+    @ExcelProperty(value = "端口号")
+    private String port;
+
+    /** 用户名 */
+    @ExcelProperty(value = "用户名")
+    private String userName;
+
+    /** 密码 */
+    @ExcelProperty(value = "密码")
+    private String password;
+
+    /** 删除标识(1删除 0未删除) */
+    @ExcelProperty(value = "删除标识(1删除 0未删除)")
+    private Integer delFlag;
+
+
+    /**
+     * 创建人名称
+     */
+    @FieldMapper(type = MapperConstant.USER_ID_TO_NAME, mapper = "createBy")
+    private String createByName;
+
+    /**
+     * 创建人名称
+     */
+    @FieldMapper(type = MapperConstant.USER_ID_TO_NAME, mapper = "updateBy")
+    private String updateByName;
+
+}

+ 60 - 98
als-modules/agile-assurance/src/main/java/org/eco/als/domain/vo/FaultCaseImportVo.java

@@ -5,17 +5,15 @@ import com.alibaba.excel.annotation.ExcelProperty;
 import org.eco.common.excel.annotation.ExcelDictFormat;
 import org.eco.common.excel.convert.ExcelDictConvert;
 import lombok.Data;
-
 import java.io.Serial;
 import java.io.Serializable;
-
 import lombok.NoArgsConstructor;
 
 /**
  * 故障案例导入视图对象 als_fault_case_t
  *
  * @author wgk
- * @date 2024-11-14
+ * @date 2024-12-13
  */
 
 @Data
@@ -27,101 +25,65 @@ public class FaultCaseImportVo implements Serializable {
     private static final long serialVersionUID = 1L;
 
 
-    /**
-     * 飞机编号
-     */
-    @ExcelProperty(value = "飞机编号")
-    private String aircraftCode;
-
-    /**
-     * 机型
-     */
-    @ExcelProperty(value = "机型")
-    private String aircraftType;
-
-    /**
-     * 故障代码
-     */
-    @ExcelProperty(value = "故障代码")
-    private String faultCode;
-
-    /**
-     * 故障名称
-     */
-    @ExcelProperty(value = "故障名称")
-    private String faultName;
-
-    /**
-     * 故障文件
-     */
-    @ExcelProperty(value = "故障文件")
-    private String ossId;
-
-    /**
-     * 日期
-     */
-    @ExcelProperty(value = "日期")
-    private String faultDate;
-
-    /**
-     * 所属系统
-     */
-    @ExcelProperty(value = "所属系统")
-    private String systemItem;
-
-    /**
-     * 专业
-     */
-    @ExcelProperty(value = "专业")
-    private String specialty;
-
-    /**
-     * 故障部位
-     */
-    @ExcelProperty(value = "故障部位")
-    private String location;
-
-    /**
-     * 故障性质
-     */
-    @ExcelProperty(value = "故障性质")
-    private String level;
-
-    /**
-     * 故障现象
-     */
-    @ExcelProperty(value = "故障现象")
-    private String symptoms;
-
-    /**
-     * 排除方法
-     */
-    @ExcelProperty(value = "排除方法")
-    private String methodRectification;
-
-    /**
-     * 故障原因分类
-     */
-    @ExcelProperty(value = "故障原因分类")
-    private String faultCauseType;
-
-    /**
-     * 故障原因
-     */
-    @ExcelProperty(value = "故障原因")
-    private String faultCause;
-
-    /**
-     * 备注
-     */
-    @ExcelProperty(value = "备注")
-    private String remarks;
-
-    /**
-     * 删除标识(1删除 0未删除)
-     */
-    @ExcelProperty(value = "删除标识(1删除 0未删除)")
-    private Integer delFlag;
+                /** 飞机编号 */
+                    @ExcelProperty(value = "飞机编号")
+                private String aircraftTypeId;
+
+                /** 机型 */
+                    @ExcelProperty(value = "机型")
+                private String aircraftTypeName;
+
+                /** 系统编号 */
+                    @ExcelProperty(value = "系统编号")
+                private String aircraftSystemId;
+
+                /** 系统 */
+                    @ExcelProperty(value = "系统")
+                private String aircraftSystemName;
+
+                /** 分系统编号 */
+                    @ExcelProperty(value = "分系统编号")
+                private String aircraftSubsystemId;
+
+                /** 分系统 */
+                    @ExcelProperty(value = "分系统")
+                private String aircraftSubsystemName;
+
+                /** 作者 */
+                    @ExcelProperty(value = "作者")
+                private String author;
+
+                /** 故障现象 */
+                    @ExcelProperty(value = "故障现象")
+                private String faultPhenomenon;
+
+                /** 故障原因 */
+                    @ExcelProperty(value = "故障原因")
+                private String faultCause;
+
+                /** 故障树 */
+                    @ExcelProperty(value = "故障树")
+                private String faultTreePath;
+
+                /** 故障图 */
+                    @ExcelProperty(value = "故障图")
+                private String faultPicturePath;
+
+                /** 排故方法 */
+                    @ExcelProperty(value = "排故方法")
+                private String troubleshootingMethodPath;
+
+                /** 查看次数 */
+                    @ExcelProperty(value = "查看次数")
+                private String viewCount;
+
+                /** 排序 */
+                    @ExcelProperty(value = "排序")
+                private String orderBy;
+
+                /** 删除标识(1删除 0未删除) */
+                    @ExcelProperty(value = "删除标识(1删除 0未删除)")
+                    private Integer delFlag;
 
 
 }

+ 61 - 84
als-modules/agile-assurance/src/main/java/org/eco/als/domain/vo/FaultCaseVo.java

@@ -1,21 +1,24 @@
 package org.eco.als.domain.vo;
 
+import org.eco.als.domain.FaultCase;
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
+import org.eco.common.excel.annotation.ExcelDictFormat;
+import org.eco.common.excel.convert.ExcelDictConvert;
+import com.eco.common.mapper.constant.MapperConstant;
+import com.eco.common.mapper.annotation.FieldMapper;
 import io.github.linpeilie.annotations.AutoMapper;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.eco.als.domain.FaultCase;
-import org.eco.common.orm.core.domain.BaseEntity;
-
 import java.io.Serial;
 import java.io.Serializable;
+import org.eco.common.orm.core.domain.BaseEntity;
 
 /**
  * 故障案例视图对象 als_fault_case_t
  *
  * @author wgk
- * @date 2024-11-14
+ * @date 2024-12-13
  */
 @Data
 @ExcelIgnoreUnannotated
@@ -23,110 +26,84 @@ import java.io.Serializable;
 @AutoMapper(target = FaultCase.class)
 public class FaultCaseVo extends BaseEntity implements Serializable {
 
-    @Serial
-    private static final long serialVersionUID = 1L;
+@Serial
+private static final long serialVersionUID = 1L;
 
-    /**
-     * 编号
-     */
+    /** 编号 */
     @ExcelProperty(value = "编号")
     private Long id;
 
-    /**
-     * 飞机编号
-     */
+    /** 飞机编号 */
     @ExcelProperty(value = "飞机编号")
-    private String aircraftCode;
+    private String aircraftTypeId;
 
-    /**
-     * 机型
-     */
+    /** 机型 */
     @ExcelProperty(value = "机型")
-    private String aircraftType;
+    private String aircraftTypeName;
 
-    /**
-     * 故障代码
-     */
-    @ExcelProperty(value = "故障代码")
-    private String faultCode;
+    /** 系统编号 */
+    @ExcelProperty(value = "系统编号")
+    private String aircraftSystemId;
 
-    /**
-     * 故障名称
-     */
-    @ExcelProperty(value = "故障名称")
-    private String faultName;
+    /** 系统 */
+    @ExcelProperty(value = "系统")
+    private String aircraftSystemName;
 
-    /**
-     * 故障文件
-     */
-    @ExcelProperty(value = "故障文件")
-    private String ossId;
+    /** 分系统编号 */
+    @ExcelProperty(value = "分系统编号")
+    private String aircraftSubsystemId;
 
-    /**
-     * 日期
-     */
-    @ExcelProperty(value = "日期")
-    private String faultDate;
+    /** 分系统 */
+    @ExcelProperty(value = "分系统")
+    private String aircraftSubsystemName;
 
-    /**
-     * 所属系统
-     */
-    @ExcelProperty(value = "所属系统")
-    private String systemItem;
+    /** 作者 */
+    @ExcelProperty(value = "作者")
+    private String author;
 
-    /**
-     * 专业
-     */
-    @ExcelProperty(value = "专业")
-    private String specialty;
+    /** 故障现象 */
+    @ExcelProperty(value = "故障现象")
+    private String faultPhenomenon;
 
-    /**
-     * 故障部位
-     */
-    @ExcelProperty(value = "故障部位")
-    private String location;
+    /** 故障原因 */
+    @ExcelProperty(value = "故障原因")
+    private String faultCause;
 
-    /**
-     * 故障性质
-     */
-    @ExcelProperty(value = "故障性质")
-    private String level;
+    /** 故障树 */
+    @ExcelProperty(value = "故障树")
+    private String faultTreePath;
 
-    /**
-     * 故障现象
-     */
-    @ExcelProperty(value = "故障现象")
-    private String symptoms;
+    /** 故障图 */
+    @ExcelProperty(value = "故障图")
+    private String faultPicturePath;
 
-    /**
-     * 排除方法
-     */
-    @ExcelProperty(value = "排除方法")
-    private String methodRectification;
+    /** 排故方法 */
+    @ExcelProperty(value = "排故方法")
+    private String troubleshootingMethodPath;
 
-    /**
-     * 故障原因分类
-     */
-    @ExcelProperty(value = "故障原因分类")
-    private String faultCauseType;
+    /** 查看次数 */
+    @ExcelProperty(value = "查看次数")
+    private String viewCount;
+
+    /** 排序 */
+    @ExcelProperty(value = "排序")
+    private String orderBy;
+
+    /** 删除标识(1删除 0未删除) */
+    @ExcelProperty(value = "删除标识(1删除 0未删除)")
+    private Integer delFlag;
 
-    /**
-     * 故障原因
-     */
-    @ExcelProperty(value = "故障原因")
-    private String faultCause;
 
     /**
-     * 备注
+     * 创建人名称
      */
-    @ExcelProperty(value = "备注")
-    private String remarks;
+    @FieldMapper(type = MapperConstant.USER_ID_TO_NAME, mapper = "createBy")
+    private String createByName;
 
     /**
-     * 删除标识(1删除 0未删除)
+     * 创建人名称
      */
-    @ExcelProperty(value = "删除标识(1删除 0未删除)")
-    private Integer delFlag;
-
+    @FieldMapper(type = MapperConstant.USER_ID_TO_NAME, mapper = "updateBy")
+    private String updateByName;
 
 }

+ 0 - 1
als-modules/agile-assurance/src/main/java/org/eco/als/listener/FaultCaseImportListener.java

@@ -84,7 +84,6 @@ public class FaultCaseImportListener extends AnalysisEventListener<FaultCaseImpo
             log.error(msg, e);
         }
     }
-
     private void setBo(FaultCaseBo faultCaseBo) {
         faultCaseBo.setVersion(0);
         faultCaseBo.setCreateBy(loginUser.getUserId());

+ 1 - 1
als-modules/agile-assurance/src/main/java/org/eco/als/mapper/FaultCaseMapper.java

@@ -8,7 +8,7 @@ import org.eco.als.domain.FaultCase;
  * 故障案例Mapper接口
  *
  * @author wgk
- * @date 2024-11-14
+ * @date 2024-12-13
  */
 @Mapper
 public interface FaultCaseMapper extends BaseMapper<FaultCase> {

+ 2 - 4
als-modules/agile-assurance/src/main/java/org/eco/als/service/IFaultCaseService.java

@@ -1,7 +1,6 @@
 package org.eco.als.service;
 
 import java.util.List;
-
 import org.eco.common.core.core.domain.model.LoginUser;
 import org.eco.als.domain.FaultCase;
 import org.eco.als.domain.vo.FaultCaseVo;
@@ -15,7 +14,7 @@ import org.eco.common.core.core.page.PageResult;
  * 故障案例Service接口
  *
  * @author wgk
- * @date 2024-11-14
+ * @date 2024-12-13
  */
 public interface IFaultCaseService extends IBaseService<FaultCase> {
     /**
@@ -24,8 +23,7 @@ public interface IFaultCaseService extends IBaseService<FaultCase> {
      * @param id 故障案例主键
      * @return 故障案例
      */
-    FaultCaseVo selectById(Long id);
-
+        FaultCaseVo selectById(Long id);
     /**
      * 查询故障案例列表
      *

+ 57 - 42
als-modules/agile-assurance/src/main/java/org/eco/als/service/impl/FaultCaseServiceImpl.java

@@ -1,40 +1,42 @@
 package org.eco.als.service.impl;
 
+import java.util.Arrays;
+import java.util.List;
+
 import cn.hutool.core.util.ObjectUtil;
 import com.mybatisflex.core.paginate.Page;
 import com.mybatisflex.core.query.QueryWrapper;
-import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
-import org.eco.als.domain.FaultCase;
-import org.eco.als.domain.bo.FaultCaseBo;
-import org.eco.als.domain.vo.FaultCaseImportVo;
-import org.eco.als.domain.vo.FaultCaseVo;
-import org.eco.als.listener.FaultCaseImportListener;
-import org.eco.als.mapper.FaultCaseMapper;
-import org.eco.als.service.IFaultCaseService;
 import org.eco.common.core.core.domain.model.LoginUser;
-import org.eco.common.core.core.page.PageResult;
-import org.eco.common.core.utils.MapstructUtils;
 import org.eco.common.excel.entity.ExcelResultRes;
 import org.eco.common.excel.service.IExcelService;
+import org.eco.common.core.utils.bean.BeanUtils;
+import org.eco.common.core.utils.MapstructUtils;
+import org.eco.system.service.IImportExportService;
+import org.eco.common.core.utils.StringUtils;
+import org.eco.system.domain.bo.ImportExportBo;
 import org.eco.common.orm.core.page.PageQuery;
+import org.eco.common.core.core.page.PageResult;
 import org.eco.common.orm.core.service.impl.BaseServiceImpl;
-import org.eco.system.service.IImportExportService;
+import jakarta.annotation.Resource;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
-
 import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-
+import org.eco.als.mapper.FaultCaseMapper;
+import org.eco.als.domain.FaultCase;
+import org.eco.als.domain.bo.FaultCaseBo;
+import org.eco.als.domain.vo.FaultCaseVo;
+import org.eco.als.domain.vo.FaultCaseImportVo;
+import org.eco.als.listener.FaultCaseImportListener;
+import org.eco.als.service.IFaultCaseService;
 import static org.eco.als.domain.table.FaultCaseTableDef.FAULT_CASE;
 
 /**
  * 故障案例Service业务层处理
  *
  * @author wgk
- * @date 2024-11-14
+ * @date 2024-12-13
  */
 @Service
 @Slf4j
@@ -55,23 +57,34 @@ public class FaultCaseServiceImpl extends BaseServiceImpl<FaultCaseMapper, Fault
 
     private QueryWrapper buildQueryWrapper(FaultCaseBo faultCaseBo) {
         QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
-        queryWrapper.and(FAULT_CASE.AIRCRAFT_CODE.eq(faultCaseBo.getAircraftCode()));
-        queryWrapper.and(FAULT_CASE.AIRCRAFT_TYPE.eq(faultCaseBo.getAircraftType()));
-        queryWrapper.and(FAULT_CASE.AIRCRAFT_CODE.in(faultCaseBo.getAircraftCodes()));
-        queryWrapper.and(FAULT_CASE.AIRCRAFT_TYPE.in(faultCaseBo.getAircraftTypes()));
-        queryWrapper.and(FAULT_CASE.FAULT_CODE.eq(faultCaseBo.getFaultCode()));
-        queryWrapper.and(FAULT_CASE.FAULT_NAME.like(faultCaseBo.getFaultName()));
-        queryWrapper.and(FAULT_CASE.OSS_ID.eq(faultCaseBo.getOssId()));
-        queryWrapper.and(FAULT_CASE.FAULT_DATE.eq(faultCaseBo.getFaultDate()));
-        queryWrapper.and(FAULT_CASE.SYSTEM_ITEM.eq(faultCaseBo.getSystemItem()));
-        queryWrapper.and(FAULT_CASE.SPECIALTY.eq(faultCaseBo.getSpecialty()));
-        queryWrapper.and(FAULT_CASE.LOCATION.eq(faultCaseBo.getLocation()));
-        queryWrapper.and(FAULT_CASE.LEVEL.eq(faultCaseBo.getLevel()));
-        queryWrapper.and(FAULT_CASE.SYMPTOMS.eq(faultCaseBo.getSymptoms()));
-        queryWrapper.and(FAULT_CASE.METHOD_RECTIFICATION.eq(faultCaseBo.getMethodRectification()));
-        queryWrapper.and(FAULT_CASE.FAULT_CAUSE_TYPE.eq(faultCaseBo.getFaultCauseType()));
-        queryWrapper.and(FAULT_CASE.FAULT_CAUSE.eq(faultCaseBo.getFaultCause()));
-        queryWrapper.and(FAULT_CASE.REMARKS.eq(faultCaseBo.getRemarks()));
+        queryWrapper.and(FAULT_CASE.AIRCRAFT_TYPE_ID.eq
+        (faultCaseBo.getAircraftTypeId()));
+        queryWrapper.and(FAULT_CASE.AIRCRAFT_TYPE_NAME.like
+        (faultCaseBo.getAircraftTypeName()));
+        queryWrapper.and(FAULT_CASE.AIRCRAFT_SYSTEM_ID.eq
+        (faultCaseBo.getAircraftSystemId()));
+        queryWrapper.and(FAULT_CASE.AIRCRAFT_SYSTEM_NAME.like
+        (faultCaseBo.getAircraftSystemName()));
+        queryWrapper.and(FAULT_CASE.AIRCRAFT_SUBSYSTEM_ID.eq
+        (faultCaseBo.getAircraftSubsystemId()));
+        queryWrapper.and(FAULT_CASE.AIRCRAFT_SUBSYSTEM_NAME.like
+        (faultCaseBo.getAircraftSubsystemName()));
+        queryWrapper.and(FAULT_CASE.AUTHOR.eq
+        (faultCaseBo.getAuthor()));
+        queryWrapper.and(FAULT_CASE.FAULT_PHENOMENON.eq
+        (faultCaseBo.getFaultPhenomenon()));
+        queryWrapper.and(FAULT_CASE.FAULT_CAUSE.eq
+        (faultCaseBo.getFaultCause()));
+        queryWrapper.and(FAULT_CASE.FAULT_TREE_PATH.eq
+        (faultCaseBo.getFaultTreePath()));
+        queryWrapper.and(FAULT_CASE.FAULT_PICTURE_PATH.eq
+        (faultCaseBo.getFaultPicturePath()));
+        queryWrapper.and(FAULT_CASE.TROUBLESHOOTING_METHOD_PATH.eq
+        (faultCaseBo.getTroubleshootingMethodPath()));
+        queryWrapper.and(FAULT_CASE.VIEW_COUNT.eq
+        (faultCaseBo.getViewCount()));
+        queryWrapper.and(FAULT_CASE.ORDER_BY.eq
+        (faultCaseBo.getOrderBy()));
 
         return queryWrapper;
     }
@@ -84,7 +97,7 @@ public class FaultCaseServiceImpl extends BaseServiceImpl<FaultCaseMapper, Fault
      */
     @Override
     public FaultCaseVo selectById(Long id) {
-        return this.getOneAs(query().where(FAULT_CASE.ID.eq(id)), FaultCaseVo.class);
+            return this.getOneAs(query().where(FAULT_CASE.ID.eq(id)), FaultCaseVo.class);
 
     }
 
@@ -98,7 +111,7 @@ public class FaultCaseServiceImpl extends BaseServiceImpl<FaultCaseMapper, Fault
     @Override
     public List<FaultCaseVo> selectList(FaultCaseBo faultCaseBo) {
         QueryWrapper queryWrapper = buildQueryWrapper(faultCaseBo);
-        return this.listAs(queryWrapper, FaultCaseVo.class);
+            return this.listAs(queryWrapper, FaultCaseVo.class);
     }
 
     /**
@@ -110,7 +123,7 @@ public class FaultCaseServiceImpl extends BaseServiceImpl<FaultCaseMapper, Fault
     @Override
     public PageResult<FaultCaseVo> selectPage(FaultCaseBo faultCaseBo) {
         QueryWrapper queryWrapper = buildQueryWrapper(faultCaseBo);
-        Page<FaultCaseVo> page = this.pageAs(PageQuery.build(), queryWrapper, FaultCaseVo.class);
+            Page<FaultCaseVo> page = this.pageAs(PageQuery.build(), queryWrapper, FaultCaseVo.class);
         return PageResult.build(page);
     }
 
@@ -122,7 +135,7 @@ public class FaultCaseServiceImpl extends BaseServiceImpl<FaultCaseMapper, Fault
      */
     @Override
     public boolean insert(FaultCaseBo faultCaseBo) {
-        FaultCase faultCase = MapstructUtils.convert(faultCaseBo, FaultCase.class);
+    FaultCase faultCase =MapstructUtils.convert(faultCaseBo, FaultCase. class);
 
         return this.save(faultCase);//使用全局配置的雪花算法主键生成器生成ID值
     }
@@ -134,11 +147,12 @@ public class FaultCaseServiceImpl extends BaseServiceImpl<FaultCaseMapper, Fault
      * @return 结果:true 操作成功,false 操作失败
      */
     @Override
-    public boolean insertWithPk(FaultCaseBo faultCaseBo) {
+    public boolean insertWithPk(FaultCaseBo faultCaseBo)
+    {
         FaultCase faultCase = MapstructUtils.convert(faultCaseBo, FaultCase.class);
 
 
-        return faultCaseMapper.insertWithPk(faultCase) > 0;//前台传来主键值
+            return faultCaseMapper.insertWithPk(faultCase) > 0;//前台传来主键值
     }
 
     /**
@@ -149,9 +163,10 @@ public class FaultCaseServiceImpl extends BaseServiceImpl<FaultCaseMapper, Fault
      */
     @Override
     public boolean update(FaultCaseBo faultCaseBo) {
-        FaultCase faultCase = MapstructUtils.convert(faultCaseBo, FaultCase.class);
-        if (ObjectUtil.isNotNull(faultCase) && ObjectUtil.isNotNull(faultCase.getId())) {
-            return this.updateById(faultCase);
+        FaultCase faultCase =MapstructUtils.convert(faultCaseBo, FaultCase. class);
+        if (ObjectUtil.isNotNull(faultCase) && ObjectUtil.isNotNull(faultCase.getId())){
+            boolean updated = this.updateById(faultCase);
+                return updated;
         }
         return false;
     }

+ 8 - 2
als-start/src/main/resources/application-dev.yml

@@ -18,7 +18,7 @@ spring:
       # 多久检查一次连接的活性
       keepaliveTime: 30000
   flyway:
-    enabled: true
+    enabled: false
     baseline-on-migrate: true
     clean-on-validation-error: false
     sql-migration-prefix: V
@@ -40,7 +40,7 @@ mybatis-flex:
       #DM8数据库
       driver-class-name: dm.jdbc.driver.DmDriver
 #      url: jdbc:dm://192.168.0.103:5236?schema=lqbz&useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
-      url: jdbc:dm://101.126.133.7:11000?schema=lqbz&useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
+      url: jdbc:dm://101.126.133.7:11000?schema=als&useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
 #      url: jdbc:dm://127.0.0.1:5236?schema=als&useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
 #      url: jdbc:dm://127.0.0.1:5236?schema=lqbz&useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
       username: SYSDBA
@@ -165,3 +165,9 @@ sms:
       template-id: xxxxxxxx
       #您的sdkAppId
       sdk-app-id: 您的sdkAppId
+
+easy-es:
+  address: 127.0.0.1:9200
+  banner: false # 默认为true 打印banner 若您不期望打印banner,可配置为false
+  username: #es用户名,若无则删去此行配置
+  password: #es密码,若无则删去此行配置

+ 60 - 0
als-start/src/main/resources/db/dm/V1_0_0_6_1215__als-ddl.sql

@@ -0,0 +1,60 @@
+DROP TABLE "als"."als_communication_t";
+CREATE TABLE "als"."als_communication_t"
+(
+"id" BIGINT NOT NULL,
+"name" VARCHAR(255),
+"ip_address" VARCHAR(255),
+"network_segment" VARCHAR(255),
+"subnet_mask" VARCHAR(255),
+"dns" VARCHAR(255),
+"gateway" VARCHAR(255),
+"http" VARCHAR(255),
+"port" VARCHAR(255),
+"user_name" VARCHAR(255),
+"password" VARCHAR(255),
+"tenant_id" BIGINT,
+"version" INTEGER,
+"del_flag" BIT DEFAULT 0,
+"create_by" BIGINT,
+"create_time" TIMESTAMP(6),
+"update_by" BIGINT,
+"update_time" TIMESTAMP(6),
+NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "MAIN", CLUSTERBTR);
+
+COMMENT ON TABLE "als"."als_communication_t" IS '通讯管理';
+
+COMMENT ON COLUMN "als"."als_communication_t"."id" IS '编号';
+
+COMMENT ON COLUMN "als"."als_communication_t"."name" IS '名称';
+
+COMMENT ON COLUMN "als"."als_communication_t"."ip_address" IS 'IP地址';
+
+COMMENT ON COLUMN "als"."als_communication_t"."network_segment" IS '网段';
+
+COMMENT ON COLUMN "als"."als_communication_t"."subnet_mask" IS '子网掩码';
+
+COMMENT ON COLUMN "als"."als_communication_t"."dns" IS 'DNS';
+
+COMMENT ON COLUMN "als"."als_communication_t"."gateway" IS '网关';
+
+COMMENT ON COLUMN "als"."als_communication_t"."http" IS 'http';
+
+COMMENT ON COLUMN "als"."als_communication_t"."port" IS '端口号';
+
+COMMENT ON COLUMN "als"."als_communication_t"."user_name" IS '用户名';
+
+COMMENT ON COLUMN "als"."als_communication_t"."password" IS '密码';
+
+COMMENT ON COLUMN "als"."als_communication_t"."tenant_id" IS '租户号';
+
+COMMENT ON COLUMN "als"."als_communication_t"."version" IS '乐观锁';
+
+COMMENT ON COLUMN "als"."als_communication_t"."del_flag" IS '删除标识(1删除 0未删除)';
+
+COMMENT ON COLUMN "als"."als_communication_t"."create_by" IS '创建人';
+
+COMMENT ON COLUMN "als"."als_communication_t"."create_time" IS '创建时间';
+
+COMMENT ON COLUMN "als"."als_communication_t"."update_by" IS '更新人';
+
+COMMENT ON COLUMN "als"."als_communication_t"."update_time" IS '更新时间';

+ 24 - 0
pom.xml

@@ -63,6 +63,8 @@
         <maven-compiler-plugin.verison>3.11.0</maven-compiler-plugin.verison>
         <maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
         <flatten-maven-plugin.version>1.3.0</flatten-maven-plugin.version>
+        <easy-es.version>2.0.0-beta4</easy-es.version>
+        <es.version>7.12.1</es.version>
     </properties>
 
     <profiles>
@@ -421,6 +423,28 @@
                 <version>${revision}</version>
             </dependency>
 
+            <!-- es配置-->
+            <dependency>
+                <groupId>org.elasticsearch.client</groupId>
+                <artifactId>elasticsearch-rest-high-level-client</artifactId>
+                <version>${es.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.elasticsearch.client</groupId>
+                <artifactId>elasticsearch-rest-client</artifactId>
+                <version>${es.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.elasticsearch</groupId>
+                <artifactId>elasticsearch</artifactId>
+                <version>${es.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.dromara.easy-es</groupId>
+                <artifactId>easy-es-boot-starter</artifactId>
+                <version>${easy-es.version}</version>
+            </dependency>
+
         </dependencies>
     </dependencyManagement>