Gaokun Wang 5 달 전
부모
커밋
8460d273d0

+ 5 - 0
als-modules/agile-assurance/src/main/java/org/eco/als/domain/PartReplacement.java

@@ -29,6 +29,11 @@ public class PartReplacement extends BaseEntity {
     @Id
     private Long id;
 
+    /**
+     * 飞机机型
+     */
+    private String aircraftType;
+
     /**
      * 飞机编码
      */

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

@@ -21,6 +21,11 @@ public class PartReplacementBo extends BaseEntity {
      */
     private Long id;
 
+    /**
+     * 飞机机型
+     */
+    private String aircraftType;
+
     /**
      * 飞机编码
      */

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

@@ -24,6 +24,11 @@ public class PartReplacementImportVo implements Serializable {
     @Serial
     private static final long serialVersionUID = 1L;
 
+    /**
+     * 飞机机型
+     */
+    @ExcelProperty(value = "飞机机型")
+    private String aircraftType;
 
     /**
      * 飞机编码

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

@@ -35,6 +35,12 @@ public class PartReplacementVo extends BaseEntity implements Serializable {
     @ExcelProperty(value = "编号")
     private Long id;
 
+    /**
+     * 飞机机型
+     */
+    @ExcelProperty(value = "飞机机型")
+    private String aircraftType;
+
     /**
      * 飞机编码
      */

+ 10 - 2
als-modules/agile-assurance/src/main/java/org/eco/als/service/impl/PartReplacementServiceImpl.java

@@ -8,6 +8,7 @@ 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.core.utils.StringUtils;
 import org.eco.common.excel.entity.ExcelResultRes;
 import org.eco.common.excel.service.IExcelService;
 import org.eco.common.core.utils.MapstructUtils;
@@ -30,6 +31,7 @@ import org.eco.als.domain.vo.PartReplacementImportVo;
 import org.eco.als.listener.PartReplacementImportListener;
 import org.eco.als.service.IPartReplacementService;
 
+import static org.eco.als.domain.table.AirConfigurationTableDef.AIR_CONFIGURATION;
 import static org.eco.als.domain.table.PartReplacementTableDef.PART_REPLACEMENT;
 
 /**
@@ -57,8 +59,14 @@ public class PartReplacementServiceImpl extends BaseServiceImpl<PartReplacementM
 
     private QueryWrapper buildQueryWrapper(PartReplacementBo partReplacementBo) {
         QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
-        queryWrapper.and(PART_REPLACEMENT.AIRCRAFT_CODE.in
-            (partReplacementBo.getAircraftCode().split(",")));
+        if (StringUtils.isNotBlank(partReplacementBo.getAircraftType())) {
+            String[] airTypeIds = partReplacementBo.getAircraftType().split(",");
+            queryWrapper.and(PART_REPLACEMENT.AIRCRAFT_TYPE.in(airTypeIds));
+        }
+        if (StringUtils.isNotBlank(partReplacementBo.getAircraftCode())) {
+            String[] airTypeIds = partReplacementBo.getAircraftCode().split(",");
+            queryWrapper.and(PART_REPLACEMENT.AIRCRAFT_CODE.in(airTypeIds));
+        }
         queryWrapper.and(PART_REPLACEMENT.BEFORE_EQUIPMENT_CODE.eq
             (partReplacementBo.getBeforeEquipmentCode()));
         queryWrapper.and(PART_REPLACEMENT.BEFORE_EQUIPMENT_NAME.like