소스 검색

//可靠性管理团级软件同步接口

wyj0522 1 주 전
부모
커밋
09d6a66251

+ 9 - 2
eco-common/com-core/pom.xml

@@ -55,7 +55,11 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-validation</artifactId>
         </dependency>
-
+        <!-- WebClient -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-webflux</artifactId>
+        </dependency>
         <dependency>
             <groupId>jakarta.servlet</groupId>
             <artifactId>jakarta.servlet-api</artifactId>
@@ -66,7 +70,10 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+        </dependency>
         <dependency>
             <groupId>io.github.linpeilie</groupId>
             <artifactId>mapstruct-plus-spring-boot-starter</artifactId>

+ 278 - 0
eco-common/com-core/src/main/java/org/eco/vip/core/utils/HttpUtils.java

@@ -0,0 +1,278 @@
+package org.eco.vip.core.utils;
+
+import cn.hutool.json.JSONUtil;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import io.netty.channel.ChannelOption;
+import io.netty.handler.timeout.ReadTimeoutHandler;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.MediaType;
+import org.springframework.http.client.reactive.ClientHttpConnector;
+import org.springframework.http.client.reactive.ReactorClientHttpConnector;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.reactive.function.BodyInserters;
+import org.springframework.web.reactive.function.client.ClientResponse;
+import org.springframework.web.reactive.function.client.ExchangeStrategies;
+import org.springframework.web.reactive.function.client.WebClient;
+import reactor.netty.http.client.HttpClient;
+import reactor.core.publisher.Mono;
+import java.time.Duration;
+import java.util.Map;
+import java.util.Objects;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @Description: HttpUtils
+ * @Author: GaoKun Wang
+ * @Date: 2024/7/30
+ */
+@Slf4j
+public class HttpUtils {
+    private static final Integer DEFAULT_CONNECT_TIMEOUT = 3000;
+
+    private static final Integer DEFAULT_REQUEST_TIMEOUT = 50000;
+
+    private static final Integer MAX_IN_MEMORY_SIZE = 100 * 1024 * 1024;
+
+    /**
+     * get请求解析成字符串
+     *
+     * @param url url
+     * @return java.lang.String
+     */
+    public static ClientResponse getResponse(String url) {
+        reactor.core.publisher.Mono<ClientResponse> resp = createWebClientWithConnectAndReadTimeOuts().get().uri(url).exchangeToMono(Mono::just);
+        return resp.block();
+    }
+
+    /**
+     * get请求,解析成对象
+     *
+     * @param url     url
+     * @param tClass  class
+     * @param headers 请求头
+     * @return T
+     */
+    public static <T> T get(String url, Class<T> tClass, Map<String, String> headers) {
+        reactor.core.publisher.Mono<T> resp = createWebClientWithConnectAndReadTimeOuts().get().uri(url).headers(t -> t.setAll(headers))
+            .retrieve().bodyToMono(tClass).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * get请求,解析成对象
+     *
+     * @param url     url
+     * @param headers 请求头
+     * @return T
+     */
+    public static String get(String url, Map<String, String> headers) {
+        reactor.core.publisher.Mono<String> resp = createWebClientWithConnectAndReadTimeOuts().get().uri(url).headers(t -> t.setAll(headers))
+            .retrieve().bodyToMono(String.class).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * get请求,解析成对象
+     *
+     * @param scheme  协议 http/https
+     * @param host    host
+     * @param obj     query params
+     * @param headers 请求头
+     * @return T
+     */
+    public static String get(String scheme, String host, String path, Object obj, Map<String, String> headers) {
+        reactor.core.publisher.Mono<String> resp = createWebClientWithConnectAndReadTimeOuts().get()
+            .uri(uriBuilder -> uriBuilder.scheme(scheme).host(host).path(path).queryParams(getRequestParamMapByObj(obj))
+                .build())
+            .headers(t -> t.setAll(headers)).retrieve().bodyToMono(String.class)
+            .timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * get请求,解析成对象
+     *
+     * @param url    url
+     * @param tClass class
+     * @return T
+     */
+    public static <T> T get(String url, Object obj, Class<T> tClass) {
+        reactor.core.publisher.Mono<T> resp = createWebClientWithConnectAndReadTimeOuts().get()
+            .uri(uriBuilder -> uriBuilder.path(url).queryParams(getRequestParamMapByObj(obj)).build()).retrieve()
+            .bodyToMono(tClass).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * get请求,解析成对象
+     *
+     * @param url    url
+     * @param tClass class
+     * @return T
+     */
+    public static <T> T get(String url, Class<T> tClass) {
+        Mono<T> resp = createWebClientWithConnectAndReadTimeOuts().get().uri(url).retrieve().bodyToMono(tClass)
+            .timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * get请求解析成字符串
+     *
+     * @param url url
+     * @return java.lang.String
+     */
+    public static String get(String url) {
+        Mono<String> resp = createWebClientWithConnectAndReadTimeOuts().get().uri(url).retrieve()
+            .bodyToMono(String.class).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * post表单请求返回对象
+     *
+     * @param url    url
+     * @param params 请求参数
+     * @param tClass 返回对象
+     * @return T
+     */
+    public static <T> T post(String url, Map<String, String> params, Class<T> tClass) {
+        MultiValueMap<String, String> formData = getRequestParamMap(params);
+        Mono<T> resp = createWebClientWithConnectAndReadTimeOuts().post().uri(url)
+            .contentType(MediaType.APPLICATION_FORM_URLENCODED).body(BodyInserters.fromFormData(formData)).retrieve()
+            .bodyToMono(tClass).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * post表单请求返回字符串
+     *
+     * @param url    url
+     * @param params 请求参数
+     * @return java.lang.String
+     */
+    public static String post(String url, Map<String, String> params) {
+        MultiValueMap<String, String> formData = getRequestParamMap(params);
+        Mono<String> resp = createWebClientWithConnectAndReadTimeOuts().post().uri(url)
+            .contentType(MediaType.APPLICATION_FORM_URLENCODED).body(BodyInserters.fromFormData(formData)).retrieve()
+            .bodyToMono(String.class).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * post json请求结果解析成对象
+     *
+     * @param url      url
+     * @param jsonBody 请求body,可以是对象或者是map
+     * @param tClass   解析对象
+     * @return T
+     */
+    public static <T> T postJson(String url, Object jsonBody, Class<T> tClass) {
+        Mono<T> resp = createWebClientWithConnectAndReadTimeOuts().post().uri(url)
+            .contentType(MediaType.APPLICATION_JSON).body(Mono.just(jsonBody), Object.class).retrieve()
+            .bodyToMono(tClass).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * post json请求结果解析成对象
+     *
+     * @param url      url
+     * @param jsonBody 请求body,可以是对象或者是map
+     * @param tClass   解析对象
+     * @return T
+     */
+    public static <T> T postJson(String url, Map<String, String> headers, Object jsonBody, Class<T> tClass) {
+        Mono<T> resp =
+            createWebClientWithConnectAndReadTimeOuts().post().uri(url).contentType(MediaType.APPLICATION_JSON)
+                .headers(t -> t.setAll(headers)).body(Mono.just(jsonBody), Object.class).retrieve().bodyToMono(tClass)
+                .timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * post json请求结果解析成字符串
+     *
+     * @param url      url
+     * @param jsonBody 请求body,可以是对象或者是map
+     * @return java.lang.String
+     */
+    public static String postJson(String url, Object jsonBody) {
+        log.info("请求参数:{}", JSONUtil.parseObj(jsonBody));
+        Mono<String> resp = createWebClientWithConnectAndReadTimeOuts().post().uri(url)
+            .contentType(MediaType.APPLICATION_JSON).body(Mono.just(jsonBody), Object.class).retrieve()
+            .bodyToMono(String.class).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    /**
+     * post json请求结果解析成字符串
+     *
+     * @param url      url
+     * @param jsonBody 请求body,可以是对象或者是map
+     * @return java.lang.String
+     */
+    public static String postJson(String url, Map<String, String> headers, Object jsonBody) {
+        Mono<String> resp =
+            createWebClientWithConnectAndReadTimeOuts().post().uri(url).contentType(MediaType.APPLICATION_JSON)
+                .headers(t -> t.setAll(headers)).body(Mono.just(jsonBody), Object.class).retrieve()
+                .bodyToMono(String.class).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+        return resp.block();
+    }
+
+    public static <T> T postRawJson(String url, String jsonBody, Class<T> tClass) {
+        Mono<T> resp = createWebClientWithConnectAndReadTimeOuts().post().uri(url)
+            .contentType(MediaType.APPLICATION_JSON).body(BodyInserters.fromValue(jsonBody)).retrieve()
+            .bodyToMono(tClass).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+
+        return resp.block();
+    }
+
+    public static String postRawJson(String url, String jsonBody) {
+        reactor.core.publisher.Mono<String> resp = createWebClientWithConnectAndReadTimeOuts().post().uri(url)
+            .contentType(MediaType.APPLICATION_JSON).body(BodyInserters.fromValue(jsonBody)).retrieve()
+            .bodyToMono(String.class).timeout(Duration.ofMillis(DEFAULT_REQUEST_TIMEOUT));
+
+        return resp.block();
+    }
+
+    private static WebClient createWebClientWithConnectAndReadTimeOuts() {
+        // 创建 reactor netty HTTP client
+        HttpClient httpClient = HttpClient.create().option(ChannelOption.CONNECT_TIMEOUT_MILLIS, DEFAULT_CONNECT_TIMEOUT).doOnConnected(connection ->
+            connection.addHandlerLast(new ReadTimeoutHandler(DEFAULT_REQUEST_TIMEOUT, TimeUnit.MILLISECONDS))
+        );
+        // 使用上述 HTTP 客户端创建客户端 HTTP 连接器
+        ClientHttpConnector connector = new ReactorClientHttpConnector(httpClient);
+        // 使用此配置的 HTTP 连接器构建 Web 客户端
+        return WebClient.builder()
+            .exchangeStrategies(ExchangeStrategies.builder()
+                .codecs(
+                    clientCodecConfigurer -> clientCodecConfigurer.defaultCodecs().maxInMemorySize(MAX_IN_MEMORY_SIZE))
+                .build())
+            .clientConnector(connector).build();
+    }
+
+    private static MultiValueMap<String, String> getRequestParamMap(Map<String, String> params) {
+        MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
+        for (Map.Entry<String, String> entry : params.entrySet()) {
+            queryParams.add(entry.getKey(), entry.getValue());
+        }
+        return queryParams;
+    }
+
+    private static MultiValueMap<String, String> getRequestParamMapByObj(Object obj) {
+        ObjectMapper objectMapper = new ObjectMapper();
+        Map<String, Object> map = objectMapper.convertValue(obj, new TypeReference<>() {
+        });
+        MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
+        for (Map.Entry<String, Object> entry : map.entrySet()) {
+            if (Objects.isNull(entry.getValue())) {
+                continue;
+            }
+            queryParams.add(entry.getKey(), String.valueOf(entry.getValue()));
+        }
+        return queryParams;
+    }
+}

+ 1 - 1
eco-reliability/pom.xml

@@ -12,8 +12,8 @@
     <artifactId>eco-reliability</artifactId>
     <packaging>pom</packaging>
     <modules>
-        <module>reliability-service</module>
         <module>reliability-api</module>
+        <module>reliability-service</module>
     </modules>
 
     <properties>

+ 3 - 7
eco-reliability/reliability-api/pom.xml

@@ -9,11 +9,10 @@
         <version>1.0.0</version>
     </parent>
 
+    <name>${project.artifactId}</name>
+    <packaging>jar</packaging>
     <groupId>org.eco.vip.reliability.api</groupId>
     <artifactId>reliability-api</artifactId>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-
 
     <properties>
         <maven.compiler.source>23</maven.compiler.source>
@@ -41,9 +40,6 @@
             <groupId>com.github.oshi</groupId>
             <artifactId>oshi-core</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.eco.vip</groupId>
-            <artifactId>com-core</artifactId>
-        </dependency>
+
     </dependencies>
 </project>

+ 3 - 2
eco-reliability/reliability-service/pom.xml

@@ -9,9 +9,9 @@
         <version>1.0.0</version>
     </parent>
 
-    <groupId>org.eco.vip.reliability</groupId>
+    <groupId>org.eco.vip.reliability.ser</groupId>
     <artifactId>reliability-service</artifactId>
-    <name>${project.artifactId}</name>
+
     <properties>
         <maven.compiler.source>23</maven.compiler.source>
         <maven.compiler.target>23</maven.compiler.target>
@@ -24,4 +24,5 @@
             <version>${revision}</version>
         </dependency>
     </dependencies>
+
 </project>

+ 15 - 6
eco-reliability/reliability-service/src/main/java/org/eco/vip/reliability/ser/controller/configuration/ConfigController.java

@@ -1,14 +1,20 @@
 package org.eco.vip.reliability.ser.controller.configuration;
 
+
+
 import jakarta.annotation.Resource;
 import lombok.RequiredArgsConstructor;
-
+import org.eco.vip.core.pojo.CommonResult;
+import org.eco.vip.reliability.ser.domain.configuration.pojo.ConfigVO;
 import org.eco.vip.reliability.ser.service.config.IConfigService;
 import org.eco.vip.web.config.core.BaseController;
 import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+
 
 /**
  * @Author: wyj
@@ -25,9 +31,12 @@ public class ConfigController extends BaseController {
     private IConfigService iConfigService;
 
 
-//    public CommonResult<List<ConfigVO>> list(ConfigBO bo){
-//        QueryWrapper wrapper = new QueryWrapper();
-//        wrapper.where()
-//        return CommonResult.success(iConfigService.list())
-//    }
+    /**
+     * 查询故障统计数量,同步
+     */
+    @GetMapping("/extra/statistics")
+    public CommonResult<List<ConfigVO>> getExtraStatistics() {
+        iConfigService.getExtraStatistics();
+        return CommonResult.success();
+    }
 }

+ 211 - 2
eco-reliability/reliability-service/src/main/java/org/eco/vip/reliability/ser/domain/configuration/Config.java

@@ -1,7 +1,216 @@
-package org.eco.vip.reliability.ser.domain.configuration;/**
+package org.eco.vip.reliability.ser.domain.configuration;
+
+import com.mybatisflex.annotation.Id;
+import com.mybatisflex.annotation.Table;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.eco.vip.orm.domain.BaseEntity;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
  * @Author: wyj
  * @CreateTime: 2025-07-28
  * @Belongpackage org.eco.vip.reliability.ser.domain.configuration.pojo
  */
-public class Config {
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Table(value = "als_fault_statistics_t")
+public class Config extends BaseEntity implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    @Id
+    private Long id;
+
+    /** 日期 */
+    private Date statisticsDate;
+
+    /** 战区 */
+    private String warZone;
+
+    /** 军 */
+    private String army;
+
+    /** 师 */
+    private String division;
+
+    /** 团 */
+    private String groups;
+
+    /** 中队 */
+    private String squadron;
+
+    /** 飞机号 */
+    private String aircraftNum;
+
+    /** 机型 */
+    private String aircraftModel;
+
+    /** 出厂号码 */
+    private String factoryNum;
+
+    /** 机件类型 */
+    private String machineType;
+
+    /** 机件号 */
+    private String machineNum;
+
+    /** 机件型别 */
+    private String machineModel;
+
+    /** 机件名称 */
+    private String machineName;
+
+    /** 起落 */
+    private String landingGear;
+
+    /** 专业 */
+    private String major;
+
+    /** 故障件名称 */
+    private String faultyPartsName;
+
+    /** 故障件型别 */
+    private String faultyPartsModel;
+
+    /** 故障件号码 */
+    private String faultyPartsNum;
+
+    /** 故障件所属发动机型别 */
+    private String engineModel;
+
+    /** 故障件所属发动机号码 */
+    private String engineNum;
+
+    /** 故障件所属发动机号码 */
+    private String engineSerialNum;
+
+    /** 故障件位置 */
+    private String faultyPartsPosition;
+
+    /** 故障现象 */
+    private String faultyPhenomenon;
+
+    /** 故障发生地点 */
+    private String faultyPlace;
+
+    /** 发现时机 */
+    private String findOpportunity;
+
+    /** 系统 */
+    private String systems;
+
+    /** 计时类型 */
+    private String timingType;
+
+    /** 故障件制造厂 */
+    private String faultyPartsManufacturer;
+
+    /** 故障件翻修厂 */
+    private String faultyPartsRenovate;
+
+    /** 故障件装本机工作时次 */
+    private String installationTime;
+
+    /** 故障件总工作时次 */
+    private String totalWorkTime;
+
+    /** 故障件修后时次 */
+    private String repairTime;
+
+    /** 故换件型别 */
+    private String replacementPartsModel;
+
+    /** 故换件号码 */
+    private String replacementPartsNum;
+
+    /** 故换件制造厂 */
+    private String replacementPartsManufacturer;
+
+    /** 故换件总工作时次 */
+    private String replacementTotalWorkTime;
+
+    /** 故换件翻修厂 */
+    private String replacementPartsRenovate;
+
+    /** 故换件修后时次 */
+    private String replacementRepairTime;
+
+    /** 故障失常码 */
+    private String faultyAbnormalCode;
+
+    /** 故障件装机日期 */
+    private Date faultyPartsInstallDate;
+
+    /** 故障原因 */
+    private String faultyReason;
+
+    /** 故障性质 */
+    private String faultyNature;
+
+    /** 故障责任 */
+    private String faultyResponsibility;
+
+    /** 故障后果 */
+    private String faultyConsequence;
+
+    /** 处理意见 */
+    private String handlingSuggestions;
+
+    /** 影响次数 */
+    private String influenceFrequency;
+
+    /** 误飞次数 */
+    private String errorFlyFrequency;
+
+    /** 判明方法 */
+    private String identificationMethod;
+
+    /** 发现人 */
+    private String discoveredPeople;
+
+    /** 排除方法 */
+    private String exclusionMethod;
+
+    /** 排故人 */
+    private String exclusionPeople;
+
+    /** 审核人 */
+    private String examinePeople;
+
+    /** 审核时间 */
+    private Date examineTime;
+
+    /** 排除日期 */
+    private Date exclusionDate;
+
+    /** 排故工时 */
+    private String exclusionWorkTime;
+
+    /** 排故人数 */
+    private String exclusionPeopleNum;
+
+    /** 排故时间 */
+    private String exclusionTime;
+
+    /** 是否立功 */
+    private String isAchievement;
+
+    /** 需要试飞 */
+    private String needTestFly;
+
+    /** 维修状态 */
+    private String repairStatus;
+
+    /** 备注 */
+    private String remarks;
+
+    /** 删除标识(1删除 0未删除) */
+//    private Integer delFlag;
+
 }

+ 346 - 0
eco-reliability/reliability-service/src/main/java/org/eco/vip/reliability/ser/domain/configuration/pojo/ConfigBO.java

@@ -1,7 +1,15 @@
 package org.eco.vip.reliability.ser.domain.configuration.pojo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.github.linpeilie.annotations.AutoMapper;
+import jakarta.validation.constraints.NotBlank;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
 import org.eco.vip.orm.domain.BaseBO;
+import org.eco.vip.reliability.ser.domain.configuration.Config;
+
+import java.util.Date;
 
 /**
  * @Author: wyj
@@ -9,5 +17,343 @@ import org.eco.vip.orm.domain.BaseBO;
  * @Belongpackage org.eco.vip.reliability.ser.domain.configuration.pojo
  */
 @Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = Config.class, reverseConvertGenerate = false)
+@Accessors(chain = true)
 public class ConfigBO extends BaseBO {
+
+    /**
+     * 编号
+     */
+//    @NotNull(message = "编号不能为空")
+    private Long id;
+
+    /**
+     * 日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date statisticsDate;
+
+    /**
+     * 开始日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date startStatisticsDate;
+
+    /**
+     * 结束日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date endStatisticsDate;
+
+    /**
+     * 战区
+     */
+    private String warZone;
+
+    /**
+     * 军
+     */
+    private String army;
+
+    /**
+     * 师
+     */
+    private String division;
+
+    /**
+     * 团
+     */
+    private String groups;
+
+    /**
+     * 中队
+     */
+    private String squadron;
+
+    /**
+     * 飞机号
+     */
+    private String aircraftNum;
+
+    /**
+     * 机型
+     */
+    private String aircraftModel;
+
+    /**
+     * 出厂号码
+     */
+    private String factoryNum;
+
+    /**
+     * 机件类型
+     */
+    private String machineType;
+
+    /**
+     * 机件号
+     */
+    private String machineNum;
+
+    /**
+     * 机件型别
+     */
+    private String machineModel;
+
+    /**
+     * 机件名称
+     */
+    private String machineName;
+
+    /**
+     * 起落
+     */
+    private String landingGear;
+
+    /**
+     * 专业
+     */
+    private String major;
+
+    /**
+     * 故障件名称
+     */
+    private String faultyPartsName;
+
+    /**
+     * 故障件型别
+     */
+    private String faultyPartsModel;
+
+    /**
+     * 故障件号码
+     */
+    private String faultyPartsNum;
+
+    /**
+     * 故障件所属发动机型别
+     */
+    private String engineModel;
+
+    /**
+     * 故障件所属发动机号码
+     */
+    private String engineNum;
+
+    /**
+     * 故障件所属发动机序号
+     */
+    private String engineSerialNum;
+
+    /**
+     * 故障件位置
+     */
+    private String faultyPartsPosition;
+
+    /**
+     * 故障现象
+     */
+    private String faultyPhenomenon;
+
+    /**
+     * 故障发生地点
+     */
+    private String faultyPlace;
+
+    /**
+     * 发现时机
+     */
+    private String findOpportunity;
+
+    /**
+     * 系统
+     */
+    private String systems;
+
+    /**
+     * 计时类型
+     */
+    private String timingType;
+
+    /**
+     * 故障件制造厂
+     */
+    private String faultyPartsManufacturer;
+
+    /**
+     * 故障件翻修厂
+     */
+    private String faultyPartsRenovate;
+
+    /**
+     * 故障件装本机工作时次
+     */
+    @NotBlank(message = "故障件装本机工作时次不能为空")
+    private String installationTime;
+
+    /**
+     * 故障件总工作时次
+     */
+    @NotBlank(message = "故障件总工作时次不能为空")
+    private String totalWorkTime;
+
+    /**
+     * 故障件修后时次
+     */
+    private String repairTime;
+
+    /**
+     * 故换件型别
+     */
+    private String replacementPartsModel;
+
+    /**
+     * 故换件号码
+     */
+    private String replacementPartsNum;
+
+    /**
+     * 故换件制造厂
+     */
+    private String replacementPartsManufacturer;
+
+    /**
+     * 故换件总工作时次
+     */
+    private String replacementTotalWorkTime;
+
+    /**
+     * 故换件翻修厂
+     */
+    private String replacementPartsRenovate;
+
+    /**
+     * 故换件修后时次
+     */
+    private String replacementRepairTime;
+
+    /**
+     * 故障失常码
+     */
+    private String faultyAbnormalCode;
+
+    /**
+     * 故障件装机日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date faultyPartsInstallDate;
+
+    /**
+     * 故障原因
+     */
+    private String faultyReason;
+
+    /**
+     * 故障性质
+     */
+    private String faultyNature;
+
+    /**
+     * 故障责任
+     */
+    private String faultyResponsibility;
+
+    /**
+     * 故障后果
+     */
+    private String faultyConsequence;
+
+    /**
+     * 处理意见
+     */
+    private String handlingSuggestions;
+
+    /**
+     * 影响次数
+     */
+    private String influenceFrequency;
+
+    /**
+     * 误飞次数
+     */
+    private String errorFlyFrequency;
+
+    /**
+     * 判明方法
+     */
+    private String identificationMethod;
+
+    /**
+     * 发现人
+     */
+    private String discoveredPeople;
+
+    /**
+     * 排除方法
+     */
+    private String exclusionMethod;
+
+    /**
+     * 排故人
+     */
+    private String exclusionPeople;
+
+    /**
+     * 审核人
+     */
+    private String examinePeople;
+
+    /**
+     * 审核时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date examineTime;
+
+    /**
+     * 排除日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date exclusionDate;
+
+    /**
+     * 排故工时
+     */
+    private String exclusionWorkTime;
+
+    /**
+     * 排故人数
+     */
+    private String exclusionPeopleNum;
+
+    /**
+     * 排故时间
+     */
+    private String exclusionTime;
+
+    /**
+     * 是否立功
+     */
+    private String isAchievement;
+
+    /**
+     * 需要试飞
+     */
+    private String needTestFly;
+
+    /**
+     * 维修状态
+     */
+    private String repairStatus;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+
+    /**
+     * 去重字段
+     */
+    private String distinctField;
 }

+ 290 - 1
eco-reliability/reliability-service/src/main/java/org/eco/vip/reliability/ser/domain/configuration/pojo/ConfigVO.java

@@ -1,7 +1,17 @@
 package org.eco.vip.reliability.ser.domain.configuration.pojo;
 
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.github.linpeilie.annotations.AutoMapper;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 import org.eco.vip.orm.domain.BaseEntity;
+import org.eco.vip.reliability.ser.domain.configuration.Config;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
 
 /**
  * @Author: wyj
@@ -9,5 +19,284 @@ import org.eco.vip.orm.domain.BaseEntity;
  * @Belongpackage org.eco.vip.reliability.ser.domain.configuration.pojo
  */
 @Data
-public class ConfigVO extends BaseEntity {
+@ExcelIgnoreUnannotated
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = Config.class)
+public class ConfigVO extends BaseEntity implements Serializable {
+
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+//    @ExcelProperty(value = "编号")
+    private Long id;
+
+    /** 日期 */
+    @ExcelProperty(value = "日期")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date statisticsDate;
+
+    /** 战区 */
+    @ExcelProperty(value = "战区")
+    private String warZone;
+
+    /** 军 */
+    @ExcelProperty(value = "军")
+    private String army;
+
+    /** 师 */
+    @ExcelProperty(value = "师")
+    private String division;
+
+    /** 团 */
+    @ExcelProperty(value = "团")
+    private String groups;
+
+    /** 中队 */
+    @ExcelProperty(value = "中队")
+    private String squadron;
+
+    /** 飞机号 */
+    @ExcelProperty(value = "飞机号")
+    private String aircraftNum;
+
+    /** 机型 */
+    @ExcelProperty(value = "机型")
+    private String aircraftModel;
+
+    /** 出厂号码 */
+    @ExcelProperty(value = "出厂号码")
+    private String factoryNum;
+
+    /** 机件类型 */
+    @ExcelProperty(value = "机件类型")
+    private String machineType;
+
+    /** 机件号 */
+    @ExcelProperty(value = "机件号")
+    private String machineNum;
+
+    /** 机件型别 */
+    @ExcelProperty(value = "机件型别")
+    private String machineModel;
+
+    /** 机件名称 */
+    @ExcelProperty(value = "机件名称")
+    private String machineName;
+
+    /** 起落 */
+    @ExcelProperty(value = "起落")
+    private String landingGear;
+
+    /** 专业 */
+    @ExcelProperty(value = "专业")
+    private String major;
+
+    /** 故障件名称 */
+    @ExcelProperty(value = "故障件名称")
+    private String faultyPartsName;
+
+    /** 故障件型别 */
+    @ExcelProperty(value = "故障件型别")
+    private String faultyPartsModel;
+
+    /** 故障件号码 */
+    @ExcelProperty(value = "故障件号码")
+    private String faultyPartsNum;
+
+    /** 故障件所属发动机型别 */
+    @ExcelProperty(value = "故障件所属发动机型别")
+    private String engineModel;
+
+    /** 故障件所属发动机号码 */
+    @ExcelProperty(value = "故障件所属发动机号码")
+    private String engineNum;
+
+    /** 故障件所属发动机序号 */
+    @ExcelProperty(value = "故障件所属发动机序号")
+    private String engineSerialNum;
+
+    /** 故障件位置 */
+    @ExcelProperty(value = "故障件位置")
+    private String faultyPartsPosition;
+
+    /** 故障现象 */
+    @ExcelProperty(value = "故障现象")
+    private String faultyPhenomenon;
+
+    /** 故障发生地点 */
+    @ExcelProperty(value = "故障发生地点")
+    private String faultyPlace;
+
+    /** 发现时机 */
+    @ExcelProperty(value = "发现时机")
+    private String findOpportunity;
+
+    /** 系统 */
+    @ExcelProperty(value = "系统")
+    private String systems;
+
+    /** 计时类型 */
+    @ExcelProperty(value = "计时类型")
+    private String timingType;
+
+    /** 故障件制造厂 */
+    @ExcelProperty(value = "故障件制造厂")
+    private String faultyPartsManufacturer;
+
+    /** 故障件翻修厂 */
+    @ExcelProperty(value = "故障件翻修厂")
+    private String faultyPartsRenovate;
+
+    /** 故障件装本机工作时次 */
+    @ExcelProperty(value = "故障件装本机工作时次")
+    private String installationTime;
+
+    /** 故障件总工作时次 */
+    @ExcelProperty(value = "故障件总工作时次")
+    private String totalWorkTime;
+
+    /** 故障件修后时次 */
+    @ExcelProperty(value = "故障件修后时次")
+    private String repairTime;
+
+    /** 故换件型别 */
+    @ExcelProperty(value = "故换件型别")
+    private String replacementPartsModel;
+
+    /** 故换件号码 */
+    @ExcelProperty(value = "故换件号码")
+    private String replacementPartsNum;
+
+    /** 故换件制造厂 */
+    @ExcelProperty(value = "故换件制造厂")
+    private String replacementPartsManufacturer;
+
+    /** 故换件总工作时次 */
+    @ExcelProperty(value = "故换件总工作时次")
+    private String replacementTotalWorkTime;
+
+    /** 故换件翻修厂 */
+    @ExcelProperty(value = "故换件翻修厂")
+    private String replacementPartsRenovate;
+
+    /** 故换件修后时次 */
+    @ExcelProperty(value = "故换件修后时次")
+    private String replacementRepairTime;
+
+    /** 故障失常码 */
+    @ExcelProperty(value = "故障失常码")
+    private String faultyAbnormalCode;
+
+    /** 故障件装机日期 */
+    @ExcelProperty(value = "故障件装机日期")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String faultyPartsInstallDate;
+
+    /** 故障原因 */
+    @ExcelProperty(value = "故障原因")
+    private String faultyReason;
+
+    /** 故障性质 */
+    @ExcelProperty(value = "故障性质")
+    private String faultyNature;
+
+    /** 故障责任 */
+    @ExcelProperty(value = "故障责任")
+    private String faultyResponsibility;
+
+    /** 故障后果 */
+    @ExcelProperty(value = "故障后果")
+    private String faultyConsequence;
+
+    /** 处理意见 */
+    @ExcelProperty(value = "处理意见")
+    private String handlingSuggestions;
+
+    /** 影响次数 */
+    @ExcelProperty(value = "影响次数")
+    private String influenceFrequency;
+
+    /** 误飞次数 */
+    @ExcelProperty(value = "误飞次数")
+    private String errorFlyFrequency;
+
+    /** 判明方法 */
+    @ExcelProperty(value = "判明方法")
+    private String identificationMethod;
+
+    /** 发现人 */
+    @ExcelProperty(value = "发现人")
+    private String discoveredPeople;
+
+    /** 排除方法 */
+    @ExcelProperty(value = "排除方法")
+    private String exclusionMethod;
+
+    /** 排故人 */
+    @ExcelProperty(value = "排故人")
+    private String exclusionPeople;
+
+    /** 审核人 */
+    @ExcelProperty(value = "审核人")
+    private String examinePeople;
+
+    /** 审核时间 */
+    @ExcelProperty(value = "审核时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date examineTime;
+
+    /** 排除日期 */
+    @ExcelProperty(value = "排除日期")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date exclusionDate;
+
+    /** 排故工时 */
+    @ExcelProperty(value = "排故工时")
+    private String exclusionWorkTime;
+
+    /** 排故人数 */
+    @ExcelProperty(value = "排故人数")
+    private String exclusionPeopleNum;
+
+    /** 排故时间 */
+    @ExcelProperty(value = "排故时间")
+    private String exclusionTime;
+
+    /** 是否立功 */
+    @ExcelProperty(value = "是否立功")
+    private String isAchievement;
+
+    /** 需要试飞 */
+    @ExcelProperty(value = "需要试飞")
+    private String needTestFly;
+
+    /** 维修状态 */
+    @ExcelProperty(value = "维修状态")
+    private String repairStatus;
+
+    /** 备注 */
+    @ExcelProperty(value = "备注")
+    private String remarks;
+
+    /** 删除标识(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;
+
+    /** 统计数量 */
+    private Integer nameCount;
 }

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 78 - 0
eco-reliability/reliability-service/src/main/java/org/eco/vip/reliability/ser/service/config/ConfigServiceImpl.java


+ 10 - 0
eco-reliability/reliability-service/src/main/java/org/eco/vip/reliability/ser/service/config/IConfigService.java

@@ -2,9 +2,19 @@ package org.eco.vip.reliability.ser.service.config;
 
 import org.eco.vip.orm.service.IBaseService;
 import org.eco.vip.reliability.ser.domain.configuration.Config;
+import org.eco.vip.reliability.ser.domain.configuration.pojo.ConfigBO;
+
+import java.util.List;
 
 /**
  * wyj
  */
 public interface IConfigService extends IBaseService<Config> {
+
+    boolean saveBatch(List<ConfigBO> configBos);
+
+    /**
+     * 查询故障统计数量,同步
+     */
+    void getExtraStatistics();
 }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.