Эх сурвалжийг харах

Merge branch 'dev-cwc' of www/als into master

caowencheng 4 сар өмнө
parent
commit
19e9585b37
25 өөрчлөгдсөн 1411 нэмэгдсэн , 327 устгасан
  1. 22 0
      als-modules/agile-assurance/pom.xml
  2. 143 0
      als-modules/agile-assurance/src/main/java/org/eco/als/controller/CommunicationController.java
  3. 1 1
      als-modules/agile-assurance/src/main/java/org/eco/als/controller/FaultCaseController.java
  4. 64 0
      als-modules/agile-assurance/src/main/java/org/eco/als/domain/Communication.java
  5. 66 50
      als-modules/agile-assurance/src/main/java/org/eco/als/domain/FaultCase.java
  6. 87 0
      als-modules/agile-assurance/src/main/java/org/eco/als/domain/bo/CommunicationBo.java
  7. 45 44
      als-modules/agile-assurance/src/main/java/org/eco/als/domain/bo/FaultCaseBo.java
  8. 73 0
      als-modules/agile-assurance/src/main/java/org/eco/als/domain/vo/CommunicationImportVo.java
  9. 93 0
      als-modules/agile-assurance/src/main/java/org/eco/als/domain/vo/CommunicationVo.java
  10. 60 98
      als-modules/agile-assurance/src/main/java/org/eco/als/domain/vo/FaultCaseImportVo.java
  11. 61 84
      als-modules/agile-assurance/src/main/java/org/eco/als/domain/vo/FaultCaseVo.java
  12. 11 0
      als-modules/agile-assurance/src/main/java/org/eco/als/es/mapper/EsFaultCaseMapper.java
  13. 128 0
      als-modules/agile-assurance/src/main/java/org/eco/als/listener/CommunicationImportListener.java
  14. 0 1
      als-modules/agile-assurance/src/main/java/org/eco/als/listener/FaultCaseImportListener.java
  15. 19 0
      als-modules/agile-assurance/src/main/java/org/eco/als/mapper/CommunicationMapper.java
  16. 1 1
      als-modules/agile-assurance/src/main/java/org/eco/als/mapper/FaultCaseMapper.java
  17. 95 0
      als-modules/agile-assurance/src/main/java/org/eco/als/service/ICommunicationService.java
  18. 2 4
      als-modules/agile-assurance/src/main/java/org/eco/als/service/IFaultCaseService.java
  19. 202 0
      als-modules/agile-assurance/src/main/java/org/eco/als/service/impl/CommunicationServiceImpl.java
  20. 57 42
      als-modules/agile-assurance/src/main/java/org/eco/als/service/impl/FaultCaseServiceImpl.java
  21. 15 0
      als-modules/agile-assurance/src/main/resources/mapper/als/CommunicationMapper.xml
  22. 8 2
      als-start/src/main/resources/application-dev.yml
  23. 74 0
      als-start/src/main/resources/db/dm/V1_0_0_5_1214__als-ddl.sql
  24. 60 0
      als-start/src/main/resources/db/dm/V1_0_0_6_1215__als-ddl.sql
  25. 24 0
      pom.xml

+ 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>

+ 143 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/controller/CommunicationController.java

@@ -0,0 +1,143 @@
+package org.eco.als.controller;
+
+import jakarta.servlet.http.HttpServletRequest;
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import cn.hutool.core.collection.CollUtil;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.eco.common.core.core.domain.CommonResult;
+import org.eco.common.log.annotation.Log;
+import org.eco.common.log.enums.BusinessType;
+import org.eco.common.security.utils.LoginHelper;
+import org.eco.common.core.core.domain.model.LoginUser;
+import org.eco.common.web.annotation.RepeatSubmit;
+import org.eco.common.excel.utils.ExcelUtil;
+import org.eco.common.web.core.BaseController;
+import jakarta.annotation.Resource;
+import org.eco.als.domain.vo.CommunicationImportVo;
+import org.eco.als.domain.vo.CommunicationVo;
+import org.eco.als.domain.bo.CommunicationBo;
+import org.eco.als.service.ICommunicationService;
+import org.springframework.web.multipart.MultipartFile;
+import org.eco.common.core.core.page.PageResult;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * 通讯管理Controller
+ *
+ * @author wgk
+ * @date 2024-12-14
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/als/communication")
+public class CommunicationController extends BaseController {
+    @Resource
+    private ICommunicationService communicationService;
+
+/**
+ * 查询通讯管理列表
+ */
+@SaCheckPermission("als:communication:list")
+@GetMapping("/list")
+    public CommonResult<PageResult<CommunicationVo>> list(CommunicationBo communicationBo, HttpServletRequest request) {
+    String param = request.getParameter("queryParam");
+    if (param!=null && !param.isEmpty() ){
+        communicationBo.setName(param);
+        communicationBo.setId((long) Integer.parseInt(param));
+    }
+        return CommonResult.success(communicationService.selectPage(communicationBo));
+    }
+
+    /**
+     * 导出通讯管理列表
+     */
+    @SaCheckPermission("als:communication:export")
+    @Log(title = "通讯管理", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public CommonResult<Void> export(CommunicationBo communicationBo) {
+        LoginUser loginUser = LoginHelper.getLoginUser();
+        List<CommunicationVo> list = communicationService.selectList(communicationBo);
+        if (CollUtil.isEmpty(list)) {
+            return CommonResult.fail("导出列表为空");
+        }
+            communicationService.asyncExport(list, "通讯管理", loginUser);
+        return CommonResult.success();
+    }
+
+    @SaCheckPermission("als:communication:import")
+    @PostMapping("/importTemplate")
+    public void importTemplate(HttpServletResponse response) {
+        ExcelUtil.exportExcel(new ArrayList<>(), "通讯管理", CommunicationImportVo.class, response);
+    }
+
+    /**
+     * 导入通讯管理列表
+     */
+    @Log(title = "通讯管理", businessType = BusinessType.IMPORT)
+    @SaCheckPermission("als:communication:import")
+    @PostMapping("/importData")
+    public CommonResult<Void> importData(MultipartFile file, boolean updateSupport) {
+        LoginUser loginUser = LoginHelper.getLoginUser();
+            communicationService.asyncImportData(file, updateSupport, loginUser);
+        return CommonResult.success();
+    }
+
+    /**
+     * 获取通讯管理详细信息
+     */
+    @SaCheckPermission("als:communication:query")
+    @GetMapping(value = "/{id}")
+    public CommonResult<CommunicationVo> getInfo(@PathVariable Long id) {
+        return CommonResult.success(communicationService.selectById(id));
+    }
+
+    /**
+     * 新增通讯管理
+     */
+    @SaCheckPermission("als:communication:add")
+    @Log(title = "通讯管理", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping
+    public CommonResult<Void> add(@Validated @RequestBody CommunicationBo communicationBo) {
+        boolean inserted = communicationService.insert(communicationBo);
+        if (!inserted) {
+            return CommonResult.fail("新增通讯管理记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 修改通讯管理
+     */
+    @SaCheckPermission("als:communication:edit")
+    @Log(title = "通讯管理", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping
+    public CommonResult<Void> edit(@Validated @RequestBody CommunicationBo communicationBo) {
+        boolean updated = communicationService.update(communicationBo);
+        if (!updated) {
+            return CommonResult.fail("修改通讯管理记录失败!");
+        }
+        return CommonResult.success();
+    }
+
+    /**
+     * 删除通讯管理
+     */
+    @SaCheckPermission("als:communication:remove")
+    @Log(title = "通讯管理", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public CommonResult<Void> remove(@PathVariable Long[] ids) {
+        boolean deleted = communicationService.deleteByIds(ids);
+        if (!deleted) {
+            return CommonResult.fail("删除通讯管理记录失败!");
+        }
+        return CommonResult.success();
+    }
+}

+ 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

+ 64 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/domain/Communication.java

@@ -0,0 +1,64 @@
+package org.eco.als.domain;
+
+import com.mybatisflex.annotation.Column;
+import com.mybatisflex.annotation.Id;
+import com.mybatisflex.annotation.Table;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import org.eco.common.orm.core.domain.BaseEntity;
+
+/**
+ * 通讯管理对象 als_communication_t
+ *
+ * @author wgk
+ * @date 2024-12-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table(value = "als_communication_t")
+public class Communication extends BaseEntity {
+@Serial
+private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    @Id
+    private Long id;
+
+    /** 名称 */
+    private String name;
+
+    /** IP地址 */
+    private String ipAddress;
+
+    /** 网段 */
+    private String networkSegment;
+
+    /** 子网掩码 */
+    private String subnetMask;
+
+    /** DNS */
+    private String dns;
+
+    /** 网关 */
+    private String gateway;
+
+    /** http */
+    private String http;
+
+    /** 端口号 */
+    private String port;
+
+    /** 用户名 */
+    private String userName;
+
+    /** 密码 */
+    private String password;
+
+    /** 删除标识(1删除 0未删除) */
+    @Column(isLogicDelete = true)
+    private Integer delFlag;
+
+
+}

+ 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;
 
 
 }

+ 87 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/domain/bo/CommunicationBo.java

@@ -0,0 +1,87 @@
+package org.eco.als.domain.bo;
+
+import org.eco.als.domain.Communication;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+import org.eco.common.orm.core.domain.BaseEntity;
+
+/**
+ * 通讯管理业务对象 als_communication_t
+ *
+ * @author wgk
+ * @date 2024-12-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = Communication.class, reverseConvertGenerate = false)
+public class CommunicationBo extends BaseEntity{
+    /**
+     * 编号
+     */
+    @NotNull(message = "编号不能为空")
+    private Long id;
+
+    /**
+     * 名称
+     */
+    @NotBlank(message = "名称不能为空")
+    private String name;
+
+    /**
+     * IP地址
+     */
+    @NotBlank(message = "IP地址不能为空")
+    private String ipAddress;
+
+    /**
+     * 网段
+     */
+    @NotBlank(message = "网段不能为空")
+    private String networkSegment;
+
+    /**
+     * 子网掩码
+     */
+    @NotBlank(message = "子网掩码不能为空")
+    private String subnetMask;
+
+    /**
+     * DNS
+     */
+    @NotBlank(message = "DNS不能为空")
+    private String dns;
+
+    /**
+     * 网关
+     */
+    @NotBlank(message = "网关不能为空")
+    private String gateway;
+
+    /**
+     * http
+     */
+    @NotBlank(message = "http不能为空")
+    private String http;
+
+    /**
+     * 端口号
+     */
+    @NotBlank(message = "端口号不能为空")
+    private String port;
+
+    /**
+     * 用户名
+     */
+    @NotBlank(message = "用户名不能为空")
+    private String userName;
+
+    /**
+     * 密码
+     */
+    @NotBlank(message = "密码不能为空")
+    private String password;
+
+
+}

+ 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;
 
 }

+ 11 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/es/mapper/EsFaultCaseMapper.java

@@ -0,0 +1,11 @@
+package org.eco.als.es.mapper;
+
+
+import org.dromara.easyes.core.core.BaseEsMapper;
+import org.eco.als.domain.FaultCase;
+
+/**
+ * es 故障案例
+ */
+public interface EsFaultCaseMapper extends BaseEsMapper<FaultCase> {
+}

+ 128 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/listener/CommunicationImportListener.java

@@ -0,0 +1,128 @@
+package org.eco.als.listener;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import org.eco.common.core.exception.BusinessException;
+import org.eco.common.core.utils.SpringUtils;
+import org.eco.common.core.utils.ValidatorUtils;
+import org.eco.common.excel.core.ExcelListener;
+import org.eco.common.excel.core.ExcelResult;
+import org.eco.common.excel.entity.ExcelResultRes;
+import org.eco.common.core.core.domain.model.LoginUser;
+import org.eco.als.domain.bo.CommunicationBo;
+import org.eco.als.domain.vo.CommunicationImportVo;
+import org.eco.als.domain.vo.CommunicationVo;
+import org.eco.als.service.ICommunicationService;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.List;
+
+/**
+ * 通讯管理自定义导入
+ *
+ * @author wgk
+ */
+@Slf4j
+public class CommunicationImportListener extends AnalysisEventListener<CommunicationImportVo> implements ExcelListener<CommunicationImportVo> {
+    private final ICommunicationService communicationService;
+
+    private final Boolean isUpdateSupport;
+    private final LoginUser loginUser;
+    private int successNum = 0;
+    private int failureNum = 0;
+    private final StringBuilder successMsg = new StringBuilder();
+    private final StringBuilder failureMsg = new StringBuilder();
+
+    public CommunicationImportListener(Boolean isUpdateSupport, LoginUser loginUser) {
+        this.communicationService = SpringUtils.getBean(ICommunicationService.class);
+        this.isUpdateSupport = isUpdateSupport;
+        this.loginUser = loginUser;
+    }
+
+    @Override
+    public void invoke(CommunicationImportVo communicationVo, AnalysisContext context) {
+        try {
+
+            CommunicationBo communicationBo = BeanUtil.toBean(communicationVo, CommunicationBo.class);
+
+            //TODO:根据某个字段,查询数据库表中是否存在记录,不存在就新增,存在就更新
+            CommunicationVo communicationVo1 = null;
+
+            //communicationVo1 = communicationService.selectBySomefield(communicationVo.getSomefield());
+            if (ObjectUtil.isNull(communicationVo1)) {
+                //不存在就新增
+                setBo(communicationBo);
+                ValidatorUtils.validate(communicationBo);
+                boolean inserted = communicationService.insert(communicationBo);
+
+                if (inserted) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、通讯管理 记录导入成功");
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、通讯管理 记录导入失败");
+                }
+            } else if (isUpdateSupport) {
+                //存在就更新
+                communicationBo.setId(communicationVo1.getId());//主键
+                communicationBo.setVersion(communicationVo1.getVersion());
+                boolean updated = communicationService.update(communicationBo);
+                if (updated) {
+                    successNum++;
+                    successMsg.append("<br/>").append(successNum).append("、通讯管理 记录更新成功");
+                } else {
+                    failureNum++;
+                    failureMsg.append("<br/>").append(failureNum).append("、通讯管理 记录更新失败");
+                }
+            }
+        } catch (Exception e) {
+            failureNum++;
+            String msg = "<br/>" + failureNum + "、通讯管理 记录导入失败:";
+            failureMsg.append(msg).append(e.getMessage());
+            log.error(msg, e);
+        }
+    }
+    private void setBo(CommunicationBo communicationBo) {
+        communicationBo.setVersion(0);
+        communicationBo.setCreateBy(loginUser.getUserId());
+        communicationBo.setUpdateBy(loginUser.getUserId());
+        communicationBo.setTenantId(loginUser.getTenantId());
+    }
+
+    @Override
+    public void doAfterAllAnalysed(AnalysisContext context) {
+        log.info("解析完成");
+    }
+
+    @Override
+    public ExcelResult<CommunicationImportVo> getExcelResult() {
+        return new ExcelResult<>() {
+
+            @Override
+            public ExcelResultRes getAnalysis() {
+                if (failureNum > 0 && successNum == 0) {
+                    failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据没有成功导入,错误如下:");
+                    return ExcelResultRes.builder().logInfo(failureMsg.toString()).status("0").build();
+                } else if (failureNum > 0 && successNum > 0) {
+                    failureMsg.insert(0, "很抱歉,部分导入失败!共 " + failureNum + " 条数据没有成功导入,错误如下:");
+                    return ExcelResultRes.builder().logInfo(failureMsg.toString()).status("2").build();
+                } else {
+                    successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+                    return ExcelResultRes.builder().logInfo(successMsg.toString()).status("1").build();
+                }
+            }
+
+            @Override
+            public List<CommunicationImportVo> getList() {
+                return null;
+            }
+
+            @Override
+            public List<String> getErrorList() {
+                return null;
+            }
+        };
+    }
+}

+ 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());

+ 19 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/mapper/CommunicationMapper.java

@@ -0,0 +1,19 @@
+package org.eco.als.mapper;
+
+import com.mybatisflex.core.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.eco.als.domain.Communication;
+
+import java.util.List;
+
+/**
+ * 通讯管理Mapper接口
+ *
+ * @author wgk
+ * @date 2024-12-14
+ */
+@Mapper
+public interface CommunicationMapper extends BaseMapper<Communication> {
+
+    int del(List<Long> ids);
+}

+ 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> {

+ 95 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/service/ICommunicationService.java

@@ -0,0 +1,95 @@
+package org.eco.als.service;
+
+import java.util.List;
+import org.eco.common.core.core.domain.model.LoginUser;
+import org.eco.als.domain.Communication;
+import org.eco.als.domain.vo.CommunicationVo;
+import org.eco.als.domain.bo.CommunicationBo;
+import org.eco.common.orm.core.service.IBaseService;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.web.multipart.MultipartFile;
+import org.eco.common.core.core.page.PageResult;
+
+/**
+ * 通讯管理Service接口
+ *
+ * @author wgk
+ * @date 2024-12-14
+ */
+public interface ICommunicationService extends IBaseService<Communication> {
+    /**
+     * 查询通讯管理
+     *
+     * @param id 通讯管理主键
+     * @return 通讯管理
+     */
+        CommunicationVo selectById(Long id);
+    /**
+     * 查询通讯管理列表
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 通讯管理集合
+     */
+    List<CommunicationVo> selectList(CommunicationBo communicationBo);
+
+    /**
+     * 分页查询通讯管理列表
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 分页通讯管理集合
+     */
+    PageResult<CommunicationVo> selectPage(CommunicationBo communicationBo);
+
+    /**
+     * 新增通讯管理
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    boolean insert(CommunicationBo communicationBo);
+
+    /**
+     * 新增通讯管理,前台提供主键值,一般用于导入的场合
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    boolean insertWithPk(CommunicationBo communicationBo);
+
+    /**
+     * 修改通讯管理
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    boolean update(CommunicationBo communicationBo);
+
+    /**
+     * 批量删除通讯管理
+     *
+     * @param ids 需要删除的通讯管理主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    boolean deleteByIds(Long[] ids);
+
+    /**
+     * 异步导入
+     *
+     * @param file          导入的文件
+     * @param updateSupport 是否覆盖
+     * @param user          用户上下文信息
+     */
+    @Async
+    void asyncImportData(MultipartFile file, boolean updateSupport, LoginUser user);
+
+    /**
+     * asyncExport 异步导出
+     *
+     * @param listVo    数据列表
+     * @param sheetName 文件名称
+     * @param user      上下文
+     */
+    @Async
+    void asyncExport(List<CommunicationVo> listVo, String sheetName, LoginUser user);
+
+}

+ 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);
     /**
      * 查询故障案例列表
      *

+ 202 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/service/impl/CommunicationServiceImpl.java

@@ -0,0 +1,202 @@
+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 lombok.extern.slf4j.Slf4j;
+import org.eco.common.core.core.domain.model.LoginUser;
+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 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 org.eco.als.mapper.CommunicationMapper;
+import org.eco.als.domain.Communication;
+import org.eco.als.domain.bo.CommunicationBo;
+import org.eco.als.domain.vo.CommunicationVo;
+import org.eco.als.domain.vo.CommunicationImportVo;
+import org.eco.als.listener.CommunicationImportListener;
+import org.eco.als.service.ICommunicationService;
+import static org.eco.als.domain.table.CommunicationTableDef.COMMUNICATION;
+
+/**
+ * 通讯管理Service业务层处理
+ *
+ * @author wgk
+ * @date 2024-12-14
+ */
+@Service
+@Slf4j
+public class CommunicationServiceImpl extends BaseServiceImpl<CommunicationMapper, Communication> implements ICommunicationService {
+    @Resource
+    private CommunicationMapper communicationMapper;
+
+    @Resource
+    private IExcelService excelService;
+
+    @Resource
+    private IImportExportService importExportService;
+
+    @Override
+    public QueryWrapper query() {
+        return super.query().from(COMMUNICATION);
+    }
+
+    private QueryWrapper buildQueryWrapper(CommunicationBo communicationBo) {
+        QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
+        queryWrapper.and(COMMUNICATION.NAME.like
+        (communicationBo.getName()));
+        queryWrapper.and(COMMUNICATION.IP_ADDRESS.eq
+        (communicationBo.getIpAddress()));
+        queryWrapper.and(COMMUNICATION.NETWORK_SEGMENT.eq
+        (communicationBo.getNetworkSegment()));
+        queryWrapper.and(COMMUNICATION.SUBNET_MASK.eq
+        (communicationBo.getSubnetMask()));
+        queryWrapper.and(COMMUNICATION.DNS.eq
+        (communicationBo.getDns()));
+        queryWrapper.and(COMMUNICATION.GATEWAY.eq
+        (communicationBo.getGateway()));
+        queryWrapper.and(COMMUNICATION.HTTP.eq
+        (communicationBo.getHttp()));
+        queryWrapper.and(COMMUNICATION.PORT.eq
+        (communicationBo.getPort()));
+        queryWrapper.and(COMMUNICATION.USER_NAME.like
+        (communicationBo.getUserName()));
+        queryWrapper.and(COMMUNICATION.PASSWORD.eq
+        (communicationBo.getPassword()));
+
+        return queryWrapper;
+    }
+
+    /**
+     * 查询通讯管理
+     *
+     * @param id 通讯管理主键
+     * @return 通讯管理
+     */
+    @Override
+    public CommunicationVo selectById(Long id) {
+            return this.getOneAs(query().where(COMMUNICATION.ID.eq(id)), CommunicationVo.class);
+
+    }
+
+
+    /**
+     * 查询通讯管理列表
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 通讯管理集合
+     */
+    @Override
+    public List<CommunicationVo> selectList(CommunicationBo communicationBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(communicationBo);
+            return this.listAs(queryWrapper, CommunicationVo.class);
+    }
+
+    /**
+     * 分页查询通讯管理列表
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 分页通讯管理集合
+     */
+    @Override
+    public PageResult<CommunicationVo> selectPage(CommunicationBo communicationBo) {
+        QueryWrapper queryWrapper = buildQueryWrapper(communicationBo);
+            Page<CommunicationVo> page = this.pageAs(PageQuery.build(), queryWrapper, CommunicationVo.class);
+        return PageResult.build(page);
+    }
+
+    /**
+     * 新增通讯管理
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    @Override
+    public boolean insert(CommunicationBo communicationBo) {
+    Communication communication =MapstructUtils.convert(communicationBo, Communication. class);
+
+        return this.save(communication);//使用全局配置的雪花算法主键生成器生成ID值
+    }
+
+    /**
+     * 新增通讯管理,前台提供主键值,一般用于导入的场合
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 结果:true 操作成功,false 操作失败
+     */
+    @Override
+    public boolean insertWithPk(CommunicationBo communicationBo)
+    {
+        Communication communication = MapstructUtils.convert(communicationBo, Communication.class);
+
+
+            return communicationMapper.insertWithPk(communication) > 0;//前台传来主键值
+    }
+
+    /**
+     * 修改通讯管理
+     *
+     * @param communicationBo 通讯管理Bo
+     * @return 结果:true 更新成功,false 更新失败
+     */
+    @Override
+    public boolean update(CommunicationBo communicationBo) {
+        Communication communication =MapstructUtils.convert(communicationBo, Communication. class);
+        if (ObjectUtil.isNotNull(communication) && ObjectUtil.isNotNull(communication.getId())){
+            boolean updated = this.updateById(communication);
+                return updated;
+        }
+        return false;
+    }
+
+    @Override
+    public void asyncImportData(MultipartFile file, boolean updateSupport, LoginUser loginUser) {
+        ExcelResultRes result;
+        try {
+            String name = file.getOriginalFilename();
+            result = excelService.importExcel(file.getInputStream(), name, CommunicationImportVo.class, new CommunicationImportListener(updateSupport, loginUser));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        boolean flag = importExportService.saveInfo(result, loginUser, "0");
+        if (flag) {
+            log.info("异步导入日志写入成功");
+        }
+    }
+
+    @Override
+    public void asyncExport(List<CommunicationVo> listVo, String sheetName, LoginUser loginUser) {
+        ExcelResultRes result = excelService.exportExcel(listVo, sheetName, CommunicationVo.class);
+        boolean flag = importExportService.saveInfo(result, loginUser, "1");
+        if (flag) {
+            log.info("异步导出日志写入成功");
+        }
+    }
+
+    /**
+     * 批量删除通讯管理
+     *
+     * @param ids 需要删除的通讯管理主键集合
+     * @return 结果:true 删除成功,false 删除失败
+     */
+    @Transactional
+    @Override
+    public boolean deleteByIds(Long[] ids) {
+        return this.removeByIds(Arrays.asList(ids));
+    }
+
+}

+ 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;
     }

+ 15 - 0
als-modules/agile-assurance/src/main/resources/mapper/als/CommunicationMapper.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.eco.als.mapper.CommunicationMapper">
+
+    <delete id="del" parameterType="java.util.List">
+        UPDATE 'als_communication_t'
+        SET del_flag = 1
+        WHERE id IN
+        <foreach collection="list" item="id" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 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,5 +165,11 @@ 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密码,若无则删去此行配置
 kgqa:
   ask-url: http://192.168.0.103:8000/kgqa/ask/

+ 74 - 0
als-start/src/main/resources/db/dm/V1_0_0_5_1214__als-ddl.sql

@@ -0,0 +1,74 @@
+DROP TABLE "lqbz"."als_fault_case_t";
+CREATE TABLE "lqbz"."als_fault_case_t"
+(
+"id" BIGINT NOT NULL,
+"aircraft_type_id" varchar(255),
+"aircraft_type_name" varchar(255),
+"aircraft_system_id" varchar(255),
+"aircraft_system_name" varchar(255),
+"aircraft_subsystem_id" varchar(255),
+"aircraft_subsystem_name" varchar(255),
+"author" varchar(255),
+"fault_phenomenon" varchar(255),
+"fault_cause" varchar(255),
+"fault_tree_path" varchar(255),
+"fault_picture_path" varchar(255),
+"troubleshooting_method_path" varchar(255),
+"view_count" varchar(255),
+"order_by" 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 "lqbz"."als_fault_case_t" IS '故障案例';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."id" IS '编号';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."aircraft_type_id" IS '飞机编号';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."aircraft_type_name" IS '机型';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."aircraft_system_id" IS '系统编号';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."aircraft_system_name" IS '系统';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."aircraft_subsystem_id" IS '分系统编号';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."aircraft_subsystem_name" IS '分系统';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."author" IS '作者';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."fault_phenomenon" IS '故障现象';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."fault_cause" IS '故障原因';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."fault_tree_path" IS '故障树';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."fault_picture_path" IS '故障图';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."troubleshooting_method_path" IS '排故方法';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."view_count" IS '查看次数';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."order_by" IS '排序';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."fault_cause" IS '故障原因';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."tenant_id" IS '租户号';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."version" IS '乐观锁';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."del_flag" IS '删除标识(1删除 0未删除)';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."create_by" IS '创建人';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."create_time" IS '创建时间';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."update_by" IS '更新人';
+
+COMMENT ON COLUMN "lqbz"."als_fault_case_t"."update_time" IS '更新时间';

+ 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>