allen 2 жил өмнө
parent
commit
796076461d
25 өөрчлөгдсөн 927 нэмэгдсэн , 13 устгасан
  1. 9 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/AirModelInfoController.java
  2. 104 0
      kgraph-admin/src/main/java/com/kgraph/web/controller/AirStatusInfoController.java
  3. 14 1
      kgraph-admin/src/main/java/com/kgraph/web/domain/AirPartInfo.java
  4. 200 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/AirStatusInfo.java
  5. 15 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/AirSubsystemInfo.java
  6. 14 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/AirSystemInfo.java
  7. 5 0
      kgraph-admin/src/main/java/com/kgraph/web/domain/ModelComponent.java
  8. 2 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/AirModelInfoMapper.java
  9. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/mapper/AirStatusInfoMapper.java
  10. 2 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IAirModelInfoService.java
  11. 61 0
      kgraph-admin/src/main/java/com/kgraph/web/service/IAirStatusInfoService.java
  12. 5 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/AirModelInfoServiceImpl.java
  13. 96 0
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/AirStatusInfoServiceImpl.java
  14. 24 2
      kgraph-admin/src/main/java/com/kgraph/web/service/impl/ModelComponentServiceImpl.java
  15. 4 0
      kgraph-admin/src/main/resources/mapper/ledger/AirModelInfoMapper.xml
  16. 23 1
      kgraph-admin/src/main/resources/mapper/ledger/AirPartInfoMapper.xml
  17. 122 0
      kgraph-admin/src/main/resources/mapper/ledger/AirStatusInfoMapper.xml
  18. 23 1
      kgraph-admin/src/main/resources/mapper/ledger/AirSubsystemInfoMapper.xml
  19. 23 1
      kgraph-admin/src/main/resources/mapper/ledger/AirSystemInfoMapper.xml
  20. 0 3
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/KgController.java
  21. 3 1
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/mapper/RelationRepository.java
  22. 1 1
      kgraph-graph/src/main/java/com/kgraph/graph/neo4j/seavice/impl/KgServiceImpl.java
  23. 54 2
      sql/system.sql
  24. 0 0
      sql/update20230503.sql
  25. 62 0
      sql/update20230504.sql

+ 9 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/AirModelInfoController.java

@@ -101,4 +101,13 @@ public class AirModelInfoController extends BaseController
     {
         return toAjax(airModelInfoService.deleteAirModelInfoByIds(ids));
     }
+
+    /**
+     * 获取option
+     */
+    @GetMapping("/getOption")
+    public AjaxResult getOption()
+    {
+        return success(airModelInfoService.getOption());
+    }
 }

+ 104 - 0
kgraph-admin/src/main/java/com/kgraph/web/controller/AirStatusInfoController.java

@@ -0,0 +1,104 @@
+package com.kgraph.web.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.kgraph.common.annotation.Log;;
+import com.kgraph.common.core.controller.BaseController;;
+import com.kgraph.common.core.domain.AjaxResult;;
+import com.kgraph.common.enums.BusinessType;;
+import com.kgraph.web.domain.AirStatusInfo;
+import com.kgraph.web.service.IAirStatusInfoService;
+import com.kgraph.common.utils.poi.ExcelUtil;;
+import com.kgraph.common.core.page.TableDataInfo;;
+
+/**
+ * 飞机履历Controller
+ * 
+ * @author Allen
+ * @date 2023-05-04
+ */
+@RestController
+@RequestMapping("/ledger/airRecord")
+public class AirStatusInfoController extends BaseController
+{
+    @Autowired
+    private IAirStatusInfoService airStatusInfoService;
+
+    /**
+     * 查询飞机履历列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:airRecord:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(AirStatusInfo airStatusInfo)
+    {
+        startPage();
+        List<AirStatusInfo> list = airStatusInfoService.selectAirStatusInfoList(airStatusInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出飞机履历列表
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:airRecord:export')")
+    @Log(title = "飞机履历", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, AirStatusInfo airStatusInfo)
+    {
+        List<AirStatusInfo> list = airStatusInfoService.selectAirStatusInfoList(airStatusInfo);
+        ExcelUtil<AirStatusInfo> util = new ExcelUtil<AirStatusInfo>(AirStatusInfo.class);
+        util.exportExcel(response, list, "飞机履历数据");
+    }
+
+    /**
+     * 获取飞机履历详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:airRecord:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(airStatusInfoService.selectAirStatusInfoById(id));
+    }
+
+    /**
+     * 新增飞机履历
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:airRecord:add')")
+    @Log(title = "飞机履历", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody AirStatusInfo airStatusInfo)
+    {
+        return toAjax(airStatusInfoService.insertAirStatusInfo(airStatusInfo));
+    }
+
+    /**
+     * 修改飞机履历
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:airRecord:edit')")
+    @Log(title = "飞机履历", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody AirStatusInfo airStatusInfo)
+    {
+        return toAjax(airStatusInfoService.updateAirStatusInfo(airStatusInfo));
+    }
+
+    /**
+     * 删除飞机履历
+     */
+    @PreAuthorize("@ss.hasPermi('ledger:airRecord:remove')")
+    @Log(title = "飞机履历", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(airStatusInfoService.deleteAirStatusInfoByIds(ids));
+    }
+}

+ 14 - 1
kgraph-admin/src/main/java/com/kgraph/web/domain/AirPartInfo.java

@@ -20,8 +20,11 @@ public class AirPartInfo extends BaseEntity
     /** 序号 */
     private Long id;
 
+    /** 分系统名称 */
+    @Excel(name = "部件名称")
+    private String name;
+
     /** 型号id */
-    @Excel(name = "型号id")
     private Long modelComponentId;
 
     /** 型号 */
@@ -61,6 +64,15 @@ public class AirPartInfo extends BaseEntity
     {
         return id;
     }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
     public void setModelComponentId(Long modelComponentId) 
     {
         this.modelComponentId = modelComponentId;
@@ -138,6 +150,7 @@ public class AirPartInfo extends BaseEntity
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
+            .append("name", getName())
             .append("modelComponentId", getModelComponentId())
             .append("modelNumber", getModelNumber())
             .append("airModelId", getAirModelId())

+ 200 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/AirStatusInfo.java

@@ -0,0 +1,200 @@
+package com.kgraph.web.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.kgraph.common.annotation.Excel;
+import com.kgraph.common.core.domain.BaseEntity;;
+
+/**
+ * 飞机履历对象 t_air_status_info
+ * 
+ * @author Allen
+ * @date 2023-05-04
+ */
+public class AirStatusInfo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 序号 */
+    private Long id;
+
+    /** 飞机id */
+    @Excel(name = "飞机id")
+    private Long airModelId;
+
+    /** 型号 */
+    @Excel(name = "型号")
+    private String modelNumber;
+
+    /** 机号id */
+    @Excel(name = "机号id")
+    private Long airId;
+
+    /** 机号 */
+    @Excel(name = "机号")
+    private String airNumber;
+
+    /** 飞机编号 */
+    @Excel(name = "飞机编号")
+    private String serial;
+
+    /** 出厂日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date productionDate;
+
+    /** 厂家信息 */
+    @Excel(name = "厂家信息")
+    private String productionInfo;
+
+    /** 版本号 */
+    @Excel(name = "版本号")
+    private String version;
+
+    /** 版本升级日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "版本升级日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date versionUpdateDate;
+
+    /** 维修次数 */
+    @Excel(name = "维修次数")
+    private Long repairTimes;
+
+    /** 维修时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "维修时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date repairDate;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setAirModelId(Long airModelId) 
+    {
+        this.airModelId = airModelId;
+    }
+
+    public Long getAirModelId() 
+    {
+        return airModelId;
+    }
+    public void setModelNumber(String modelNumber) 
+    {
+        this.modelNumber = modelNumber;
+    }
+
+    public String getModelNumber() 
+    {
+        return modelNumber;
+    }
+    public void setAirId(Long airId) 
+    {
+        this.airId = airId;
+    }
+
+    public Long getAirId() 
+    {
+        return airId;
+    }
+    public void setAirNumber(String airNumber) 
+    {
+        this.airNumber = airNumber;
+    }
+
+    public String getAirNumber() 
+    {
+        return airNumber;
+    }
+    public void setSerial(String serial) 
+    {
+        this.serial = serial;
+    }
+
+    public String getSerial() 
+    {
+        return serial;
+    }
+    public void setProductionDate(Date productionDate) 
+    {
+        this.productionDate = productionDate;
+    }
+
+    public Date getProductionDate() 
+    {
+        return productionDate;
+    }
+    public void setProductionInfo(String productionInfo) 
+    {
+        this.productionInfo = productionInfo;
+    }
+
+    public String getProductionInfo() 
+    {
+        return productionInfo;
+    }
+    public void setVersion(String version) 
+    {
+        this.version = version;
+    }
+
+    public String getVersion() 
+    {
+        return version;
+    }
+    public void setVersionUpdateDate(Date versionUpdateDate) 
+    {
+        this.versionUpdateDate = versionUpdateDate;
+    }
+
+    public Date getVersionUpdateDate() 
+    {
+        return versionUpdateDate;
+    }
+    public void setRepairTimes(Long repairTimes) 
+    {
+        this.repairTimes = repairTimes;
+    }
+
+    public Long getRepairTimes() 
+    {
+        return repairTimes;
+    }
+    public void setRepairDate(Date repairDate) 
+    {
+        this.repairDate = repairDate;
+    }
+
+    public Date getRepairDate() 
+    {
+        return repairDate;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("airModelId", getAirModelId())
+            .append("modelNumber", getModelNumber())
+            .append("airId", getAirId())
+            .append("airNumber", getAirNumber())
+            .append("serial", getSerial())
+            .append("productionDate", getProductionDate())
+            .append("productionInfo", getProductionInfo())
+            .append("version", getVersion())
+            .append("versionUpdateDate", getVersionUpdateDate())
+            .append("repairTimes", getRepairTimes())
+            .append("repairDate", getRepairDate())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 15 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/AirSubsystemInfo.java

@@ -20,6 +20,10 @@ public class AirSubsystemInfo extends BaseEntity
     /** 序号 */
     private Long id;
 
+    /** 分系统名称 */
+    @Excel(name = "分系统名称")
+    private String name;
+
     /** 型号id */
     @Excel(name = "型号id")
     private Long modelComponentId;
@@ -29,6 +33,7 @@ public class AirSubsystemInfo extends BaseEntity
     private String modelNumber;
 
     /** 机号id */
+    @Excel(name = "机号id")
     private Long airModelId;
 
     /** 机号 */
@@ -61,6 +66,15 @@ public class AirSubsystemInfo extends BaseEntity
     {
         return id;
     }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
     public void setModelComponentId(Long modelComponentId) 
     {
         this.modelComponentId = modelComponentId;
@@ -138,6 +152,7 @@ public class AirSubsystemInfo extends BaseEntity
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
+            .append("name", getName())
             .append("modelComponentId", getModelComponentId())
             .append("modelNumber", getModelNumber())
             .append("airModelId", getAirModelId())

+ 14 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/AirSystemInfo.java

@@ -20,6 +20,10 @@ public class AirSystemInfo extends BaseEntity
     /** 序号 */
     private Long id;
 
+    /** 系统名称 */
+    @Excel(name = "系统名称")
+    private String name;
+
     /** 型号id */
     private Long modelComponentId;
 
@@ -60,6 +64,15 @@ public class AirSystemInfo extends BaseEntity
     {
         return id;
     }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
     public void setModelComponentId(Long modelComponentId) 
     {
         this.modelComponentId = modelComponentId;
@@ -137,6 +150,7 @@ public class AirSystemInfo extends BaseEntity
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
+            .append("name", getName())
             .append("modelComponentId", getModelComponentId())
             .append("modelNumber", getModelNumber())
             .append("airModelId", getAirModelId())

+ 5 - 0
kgraph-admin/src/main/java/com/kgraph/web/domain/ModelComponent.java

@@ -15,6 +15,11 @@ public class ModelComponent extends TreeEntity
 {
     private static final long serialVersionUID = 1L;
 
+    public static final String TYPE_AIR = "1";
+    public static final String TYPE_SYSTEM = "2";
+    public static final String TYPE_SUBSYSTEM = "3";
+    public static final String TYPE_PART = "4";
+
     /** 序号 */
     private Long id;
 

+ 2 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/AirModelInfoMapper.java

@@ -58,4 +58,6 @@ public interface AirModelInfoMapper
      * @return 结果
      */
     public int deleteAirModelInfoByIds(Long[] ids);
+
+    List<AirModelInfo> getOption();
 }

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/mapper/AirStatusInfoMapper.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.mapper;
+
+import java.util.List;
+import com.kgraph.web.domain.AirStatusInfo;
+
+/**
+ * 飞机履历Mapper接口
+ * 
+ * @author Allen
+ * @date 2023-05-04
+ */
+public interface AirStatusInfoMapper 
+{
+    /**
+     * 查询飞机履历
+     * 
+     * @param id 飞机履历主键
+     * @return 飞机履历
+     */
+    public AirStatusInfo selectAirStatusInfoById(Long id);
+
+    /**
+     * 查询飞机履历列表
+     * 
+     * @param airStatusInfo 飞机履历
+     * @return 飞机履历集合
+     */
+    public List<AirStatusInfo> selectAirStatusInfoList(AirStatusInfo airStatusInfo);
+
+    /**
+     * 新增飞机履历
+     * 
+     * @param airStatusInfo 飞机履历
+     * @return 结果
+     */
+    public int insertAirStatusInfo(AirStatusInfo airStatusInfo);
+
+    /**
+     * 修改飞机履历
+     * 
+     * @param airStatusInfo 飞机履历
+     * @return 结果
+     */
+    public int updateAirStatusInfo(AirStatusInfo airStatusInfo);
+
+    /**
+     * 删除飞机履历
+     * 
+     * @param id 飞机履历主键
+     * @return 结果
+     */
+    public int deleteAirStatusInfoById(Long id);
+
+    /**
+     * 批量删除飞机履历
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteAirStatusInfoByIds(Long[] ids);
+}

+ 2 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IAirModelInfoService.java

@@ -58,4 +58,6 @@ public interface IAirModelInfoService
      * @return 结果
      */
     public int deleteAirModelInfoById(Long id);
+
+    List<AirModelInfo> getOption();
 }

+ 61 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/IAirStatusInfoService.java

@@ -0,0 +1,61 @@
+package com.kgraph.web.service;
+
+import java.util.List;
+import com.kgraph.web.domain.AirStatusInfo;
+
+/**
+ * 飞机履历Service接口
+ * 
+ * @author Allen
+ * @date 2023-05-04
+ */
+public interface IAirStatusInfoService 
+{
+    /**
+     * 查询飞机履历
+     * 
+     * @param id 飞机履历主键
+     * @return 飞机履历
+     */
+    public AirStatusInfo selectAirStatusInfoById(Long id);
+
+    /**
+     * 查询飞机履历列表
+     * 
+     * @param airStatusInfo 飞机履历
+     * @return 飞机履历集合
+     */
+    public List<AirStatusInfo> selectAirStatusInfoList(AirStatusInfo airStatusInfo);
+
+    /**
+     * 新增飞机履历
+     * 
+     * @param airStatusInfo 飞机履历
+     * @return 结果
+     */
+    public int insertAirStatusInfo(AirStatusInfo airStatusInfo);
+
+    /**
+     * 修改飞机履历
+     * 
+     * @param airStatusInfo 飞机履历
+     * @return 结果
+     */
+    public int updateAirStatusInfo(AirStatusInfo airStatusInfo);
+
+    /**
+     * 批量删除飞机履历
+     * 
+     * @param ids 需要删除的飞机履历主键集合
+     * @return 结果
+     */
+    public int deleteAirStatusInfoByIds(Long[] ids);
+
+    /**
+     * 删除飞机履历信息
+     * 
+     * @param id 飞机履历主键
+     * @return 结果
+     */
+    public int deleteAirStatusInfoById(Long id);
+}

+ 5 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/AirModelInfoServiceImpl.java

@@ -93,4 +93,9 @@ public class AirModelInfoServiceImpl implements IAirModelInfoService
     {
         return airModelInfoMapper.deleteAirModelInfoById(id);
     }
+
+    @Override
+    public List<AirModelInfo> getOption() {
+        return airModelInfoMapper.getOption();
+    }
 }

+ 96 - 0
kgraph-admin/src/main/java/com/kgraph/web/service/impl/AirStatusInfoServiceImpl.java

@@ -0,0 +1,96 @@
+package com.kgraph.web.service.impl;
+
+import java.util.List;
+import com.kgraph.common.utils.DateUtils;;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.kgraph.web.mapper.AirStatusInfoMapper;
+import com.kgraph.web.domain.AirStatusInfo;
+import com.kgraph.web.service.IAirStatusInfoService;
+
+/**
+ * 飞机履历Service业务层处理
+ * 
+ * @author Allen
+ * @date 2023-05-04
+ */
+@Service
+public class AirStatusInfoServiceImpl implements IAirStatusInfoService 
+{
+    @Autowired
+    private AirStatusInfoMapper airStatusInfoMapper;
+
+    /**
+     * 查询飞机履历
+     * 
+     * @param id 飞机履历主键
+     * @return 飞机履历
+     */
+    @Override
+    public AirStatusInfo selectAirStatusInfoById(Long id)
+    {
+        return airStatusInfoMapper.selectAirStatusInfoById(id);
+    }
+
+    /**
+     * 查询飞机履历列表
+     * 
+     * @param airStatusInfo 飞机履历
+     * @return 飞机履历
+     */
+    @Override
+    public List<AirStatusInfo> selectAirStatusInfoList(AirStatusInfo airStatusInfo)
+    {
+        return airStatusInfoMapper.selectAirStatusInfoList(airStatusInfo);
+    }
+
+    /**
+     * 新增飞机履历
+     * 
+     * @param airStatusInfo 飞机履历
+     * @return 结果
+     */
+    @Override
+    public int insertAirStatusInfo(AirStatusInfo airStatusInfo)
+    {
+        airStatusInfo.setCreateTime(DateUtils.getNowDate());
+        return airStatusInfoMapper.insertAirStatusInfo(airStatusInfo);
+    }
+
+    /**
+     * 修改飞机履历
+     * 
+     * @param airStatusInfo 飞机履历
+     * @return 结果
+     */
+    @Override
+    public int updateAirStatusInfo(AirStatusInfo airStatusInfo)
+    {
+        airStatusInfo.setUpdateTime(DateUtils.getNowDate());
+        return airStatusInfoMapper.updateAirStatusInfo(airStatusInfo);
+    }
+
+    /**
+     * 批量删除飞机履历
+     * 
+     * @param ids 需要删除的飞机履历主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAirStatusInfoByIds(Long[] ids)
+    {
+        return airStatusInfoMapper.deleteAirStatusInfoByIds(ids);
+    }
+
+    /**
+     * 删除飞机履历信息
+     * 
+     * @param id 飞机履历主键
+     * @return 结果
+     */
+    @Override
+    public int deleteAirStatusInfoById(Long id)
+    {
+        return airStatusInfoMapper.deleteAirStatusInfoById(id);
+    }
+}

+ 24 - 2
kgraph-admin/src/main/java/com/kgraph/web/service/impl/ModelComponentServiceImpl.java

@@ -51,12 +51,33 @@ public class ModelComponentServiceImpl implements IModelComponentService
      * @return 结果
      */
     @Override
-    public int insertModelComponent(ModelComponent modelComponent)
-    {
+    public int insertModelComponent(ModelComponent modelComponent) {
+        setType(modelComponent);
         modelComponent.setCreateTime(DateUtils.getNowDate());
         return modelComponentMapper.insertModelComponent(modelComponent);
     }
 
+    private void setType(ModelComponent modelComponent) {
+        if (modelComponent.getParentId() == null || modelComponent.getParentId() == 0L) {
+            modelComponent.setType(ModelComponent.TYPE_AIR);
+        } else {
+            ModelComponent parent = modelComponentMapper.selectModelComponentById(modelComponent.getParentId());
+            switch (parent.getType()) {
+                case ModelComponent.TYPE_AIR:
+                    modelComponent.setType(ModelComponent.TYPE_SYSTEM);
+                    break;
+                case ModelComponent.TYPE_SYSTEM:
+                    modelComponent.setType(ModelComponent.TYPE_SUBSYSTEM);
+                    break;
+                case ModelComponent.TYPE_SUBSYSTEM:
+                    modelComponent.setType(ModelComponent.TYPE_PART);
+                    break;
+                default:
+                    modelComponent.setType(ModelComponent.TYPE_AIR);
+            }
+        }
+    }
+
     /**
      * 修改型号构型信息
      * 
@@ -66,6 +87,7 @@ public class ModelComponentServiceImpl implements IModelComponentService
     @Override
     public int updateModelComponent(ModelComponent modelComponent)
     {
+        setType(modelComponent);
         modelComponent.setUpdateTime(DateUtils.getNowDate());
         return modelComponentMapper.updateModelComponent(modelComponent);
     }

+ 4 - 0
kgraph-admin/src/main/resources/mapper/ledger/AirModelInfoMapper.xml

@@ -94,4 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+    <select id="getOption" resultType="Map">
+        select id,air_number airNumber from t_air_model_info
+    </select>
 </mapper>

+ 23 - 1
kgraph-admin/src/main/resources/mapper/ledger/AirPartInfoMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="AirPartInfo" id="AirPartInfoResult">
         <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
         <result property="modelComponentId"    column="model_component_id"    />
         <result property="modelNumber"    column="model_number"    />
         <result property="airModelId"    column="air_model_id"    />
@@ -21,12 +22,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectAirPartInfoVo">
-        select id, model_component_id, model_number, air_model_id, air_number, serial, production_date, manufacturer_info, version, create_by, create_time, update_by, update_time from t_air_part_info
+        SELECT
+            api.id,
+            api.`name`,
+            api.model_component_id,
+            api.model_number,
+            api.air_model_id,
+            ami.air_number,
+            api.serial,
+            api.production_date,
+            api.manufacturer_info,
+            api.version,
+            api.create_by,
+            api.create_time,
+            api.update_by,
+            api.update_time
+        FROM
+            t_air_part_info api
+            LEFT JOIN t_air_model_info ami ON api.air_model_id = ami.id
     </sql>
 
     <select id="selectAirPartInfoList" parameterType="AirPartInfo" resultMap="AirPartInfoResult">
         <include refid="selectAirPartInfoVo"/>
         <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="modelComponentId != null "> and model_component_id = #{modelComponentId}</if>
             <if test="modelNumber != null  and modelNumber != ''"> and model_number = #{modelNumber}</if>
             <if test="airModelId != null "> and air_model_id = #{airModelId}</if>
@@ -46,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertAirPartInfo" parameterType="AirPartInfo" useGeneratedKeys="true" keyProperty="id">
         insert into t_air_part_info
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
             <if test="modelComponentId != null">model_component_id,</if>
             <if test="modelNumber != null">model_number,</if>
             <if test="airModelId != null">air_model_id,</if>
@@ -60,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
             <if test="modelComponentId != null">#{modelComponentId},</if>
             <if test="modelNumber != null">#{modelNumber},</if>
             <if test="airModelId != null">#{airModelId},</if>
@@ -78,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateAirPartInfo" parameterType="AirPartInfo">
         update t_air_part_info
         <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
             <if test="modelComponentId != null">model_component_id = #{modelComponentId},</if>
             <if test="modelNumber != null">model_number = #{modelNumber},</if>
             <if test="airModelId != null">air_model_id = #{airModelId},</if>

+ 122 - 0
kgraph-admin/src/main/resources/mapper/ledger/AirStatusInfoMapper.xml

@@ -0,0 +1,122 @@
+<?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="com.kgraph.web.mapper.AirStatusInfoMapper">
+    
+    <resultMap type="AirStatusInfo" id="AirStatusInfoResult">
+        <result property="id"    column="id"    />
+        <result property="airModelId"    column="air_model_id"    />
+        <result property="modelNumber"    column="model_number"    />
+        <result property="airId"    column="air_id"    />
+        <result property="airNumber"    column="air_number"    />
+        <result property="serial"    column="serial"    />
+        <result property="productionDate"    column="production_date"    />
+        <result property="productionInfo"    column="production_info"    />
+        <result property="version"    column="version"    />
+        <result property="versionUpdateDate"    column="version_update_date"    />
+        <result property="repairTimes"    column="repair_times"    />
+        <result property="repairDate"    column="repair_date"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectAirStatusInfoVo">
+        select id, air_model_id, model_number, air_id, air_number, serial, production_date, production_info, version, version_update_date, repair_times, repair_date, create_by, create_time, update_by, update_time from t_air_status_info
+    </sql>
+
+    <select id="selectAirStatusInfoList" parameterType="AirStatusInfo" resultMap="AirStatusInfoResult">
+        <include refid="selectAirStatusInfoVo"/>
+        <where>  
+            <if test="airModelId != null "> and air_model_id = #{airModelId}</if>
+            <if test="modelNumber != null  and modelNumber != ''"> and model_number = #{modelNumber}</if>
+            <if test="airId != null "> and air_id = #{airId}</if>
+            <if test="airNumber != null  and airNumber != ''"> and air_number = #{airNumber}</if>
+            <if test="serial != null  and serial != ''"> and serial = #{serial}</if>
+            <if test="productionDate != null "> and production_date = #{productionDate}</if>
+            <if test="productionInfo != null  and productionInfo != ''"> and production_info = #{productionInfo}</if>
+            <if test="version != null  and version != ''"> and version = #{version}</if>
+            <if test="versionUpdateDate != null "> and version_update_date = #{versionUpdateDate}</if>
+            <if test="repairTimes != null "> and repair_times = #{repairTimes}</if>
+            <if test="repairDate != null "> and repair_date = #{repairDate}</if>
+        </where>
+    </select>
+    
+    <select id="selectAirStatusInfoById" parameterType="Long" resultMap="AirStatusInfoResult">
+        <include refid="selectAirStatusInfoVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertAirStatusInfo" parameterType="AirStatusInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into t_air_status_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="airModelId != null">air_model_id,</if>
+            <if test="modelNumber != null">model_number,</if>
+            <if test="airId != null">air_id,</if>
+            <if test="airNumber != null">air_number,</if>
+            <if test="serial != null">serial,</if>
+            <if test="productionDate != null">production_date,</if>
+            <if test="productionInfo != null">production_info,</if>
+            <if test="version != null">version,</if>
+            <if test="versionUpdateDate != null">version_update_date,</if>
+            <if test="repairTimes != null">repair_times,</if>
+            <if test="repairDate != null">repair_date,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="airModelId != null">#{airModelId},</if>
+            <if test="modelNumber != null">#{modelNumber},</if>
+            <if test="airId != null">#{airId},</if>
+            <if test="airNumber != null">#{airNumber},</if>
+            <if test="serial != null">#{serial},</if>
+            <if test="productionDate != null">#{productionDate},</if>
+            <if test="productionInfo != null">#{productionInfo},</if>
+            <if test="version != null">#{version},</if>
+            <if test="versionUpdateDate != null">#{versionUpdateDate},</if>
+            <if test="repairTimes != null">#{repairTimes},</if>
+            <if test="repairDate != null">#{repairDate},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAirStatusInfo" parameterType="AirStatusInfo">
+        update t_air_status_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="airModelId != null">air_model_id = #{airModelId},</if>
+            <if test="modelNumber != null">model_number = #{modelNumber},</if>
+            <if test="airId != null">air_id = #{airId},</if>
+            <if test="airNumber != null">air_number = #{airNumber},</if>
+            <if test="serial != null">serial = #{serial},</if>
+            <if test="productionDate != null">production_date = #{productionDate},</if>
+            <if test="productionInfo != null">production_info = #{productionInfo},</if>
+            <if test="version != null">version = #{version},</if>
+            <if test="versionUpdateDate != null">version_update_date = #{versionUpdateDate},</if>
+            <if test="repairTimes != null">repair_times = #{repairTimes},</if>
+            <if test="repairDate != null">repair_date = #{repairDate},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteAirStatusInfoById" parameterType="Long">
+        delete from t_air_status_info where id = #{id}
+    </delete>
+
+    <delete id="deleteAirStatusInfoByIds" parameterType="String">
+        delete from t_air_status_info where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 23 - 1
kgraph-admin/src/main/resources/mapper/ledger/AirSubsystemInfoMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="AirSubsystemInfo" id="AirSubsystemInfoResult">
         <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
         <result property="modelComponentId"    column="model_component_id"    />
         <result property="modelNumber"    column="model_number"    />
         <result property="airModelId"    column="air_model_id"    />
@@ -21,12 +22,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectAirSubsystemInfoVo">
-        select id, model_component_id, model_number, air_model_id, air_number, serial, production_date, manufacturer_info, version, create_by, create_time, update_by, update_time from t_air_subsystem_info
+        SELECT
+            asi.id,
+            asi.`name`,
+            asi.model_component_id,
+            asi.model_number,
+            asi.air_model_id,
+            ami.air_number,
+            asi.serial,
+            asi.production_date,
+            asi.manufacturer_info,
+            asi.version,
+            asi.create_by,
+            asi.create_time,
+            asi.update_by,
+            asi.update_time
+        FROM
+            t_air_subsystem_info asi
+            LEFT JOIN t_air_model_info ami ON asi.air_model_id = ami.id
     </sql>
 
     <select id="selectAirSubsystemInfoList" parameterType="AirSubsystemInfo" resultMap="AirSubsystemInfoResult">
         <include refid="selectAirSubsystemInfoVo"/>
         <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="modelComponentId != null "> and model_component_id = #{modelComponentId}</if>
             <if test="modelNumber != null  and modelNumber != ''"> and model_number = #{modelNumber}</if>
             <if test="airModelId != null "> and air_model_id = #{airModelId}</if>
@@ -46,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertAirSubsystemInfo" parameterType="AirSubsystemInfo" useGeneratedKeys="true" keyProperty="id">
         insert into t_air_subsystem_info
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
             <if test="modelComponentId != null">model_component_id,</if>
             <if test="modelNumber != null">model_number,</if>
             <if test="airModelId != null">air_model_id,</if>
@@ -60,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
             <if test="modelComponentId != null">#{modelComponentId},</if>
             <if test="modelNumber != null">#{modelNumber},</if>
             <if test="airModelId != null">#{airModelId},</if>
@@ -78,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateAirSubsystemInfo" parameterType="AirSubsystemInfo">
         update t_air_subsystem_info
         <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
             <if test="modelComponentId != null">model_component_id = #{modelComponentId},</if>
             <if test="modelNumber != null">model_number = #{modelNumber},</if>
             <if test="airModelId != null">air_model_id = #{airModelId},</if>

+ 23 - 1
kgraph-admin/src/main/resources/mapper/ledger/AirSystemInfoMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="AirSystemInfo" id="AirSystemInfoResult">
         <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
         <result property="modelComponentId"    column="model_component_id"    />
         <result property="modelNumber"    column="model_number"    />
         <result property="airModelId"    column="air_model_id"    />
@@ -21,12 +22,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectAirSystemInfoVo">
-        select id, model_component_id, model_number, air_model_id, air_number, serial, production_date, manufacturer_info, version, create_by, create_time, update_by, update_time from t_air_system_info
+        SELECT
+            asi.id,
+            asi.`name`,
+            asi.model_component_id,
+            asi.model_number,
+            asi.air_model_id,
+            ami.air_number,
+            asi.serial,
+            asi.production_date,
+            asi.manufacturer_info,
+            asi.version,
+            asi.create_by,
+            asi.create_time,
+            asi.update_by,
+            asi.update_time
+        FROM
+            t_air_system_info asi
+            LEFT JOIN t_air_model_info ami ON asi.air_model_id = ami.id
     </sql>
 
     <select id="selectAirSystemInfoList" parameterType="AirSystemInfo" resultMap="AirSystemInfoResult">
         <include refid="selectAirSystemInfoVo"/>
         <where>  
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="modelComponentId != null "> and model_component_id = #{modelComponentId}</if>
             <if test="modelNumber != null  and modelNumber != ''"> and model_number = #{modelNumber}</if>
             <if test="airModelId != null "> and air_model_id = #{airModelId}</if>
@@ -46,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertAirSystemInfo" parameterType="AirSystemInfo" useGeneratedKeys="true" keyProperty="id">
         insert into t_air_system_info
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null">name,</if>
             <if test="modelComponentId != null">model_component_id,</if>
             <if test="modelNumber != null">model_number,</if>
             <if test="airModelId != null">air_model_id,</if>
@@ -60,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateTime != null">update_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null">#{name},</if>
             <if test="modelComponentId != null">#{modelComponentId},</if>
             <if test="modelNumber != null">#{modelNumber},</if>
             <if test="airModelId != null">#{airModelId},</if>
@@ -78,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateAirSystemInfo" parameterType="AirSystemInfo">
         update t_air_system_info
         <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null">name = #{name},</if>
             <if test="modelComponentId != null">model_component_id = #{modelComponentId},</if>
             <if test="modelNumber != null">model_number = #{modelNumber},</if>
             <if test="airModelId != null">air_model_id = #{airModelId},</if>

+ 0 - 3
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/controller/KgController.java

@@ -68,9 +68,6 @@ public class KgController extends BaseController {
     @GetMapping("/getRelationByName")
     public AjaxResult getRelationByName(String firstName, String secondName, int length) {
         // TODO length 的最大最小值,从数据字典获取
-        if (length < 0 || length > 5) {
-            throw new RuntimeException("步长不能小于0或大于5");
-        }
         GraphVO graphVO;
         if (length == 0) {
             graphVO = Neo4j2VOUtils.relation2GraphVO(kgService.getShortestRelationByName(firstName, secondName));

+ 3 - 1
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/mapper/RelationRepository.java

@@ -24,8 +24,10 @@ public interface RelationRepository extends Neo4jRepository<Neo4jRelation, Long>
     List<Neo4jRelation> getRelationByNameLength4(@Param("firstName") String firstName, @Param("secondName") String secondName);
     @Query("match data=(e1:Entity{name: $firstName})-[*..5]-(e2:Entity{name: $secondName}) return data")
     List<Neo4jRelation> getRelationByNameLength5(@Param("firstName") String firstName, @Param("secondName") String secondName);
+    @Query("match data=(e1:Entity{name: $firstName})-[*..5]-(e2:Entity{name: $secondName})  where ALL( n1 in nodes(data) where size([n2 in nodes(data) where id(n1) = id(n2)])=1 ) return data")
+    List<Neo4jRelation> getAllRelationByName(@Param("firstName") String firstName, @Param("secondName") String secondName);
 
-    @Query("match data=shortestPath((e1:Entity{name: $firstName})-[*]-(e2:Entity{name: $secondName})) return data")
+    @Query("match data=allshortestpaths((e1:Entity{name: $firstName})-[*]-(e2:Entity{name: $secondName})) return data")
     List<Neo4jRelation> getShortestRelationByName(@Param("firstName") String firstName, @Param("secondName") String secondName);
 
     @Query("MATCH data=(es:Entity)-[r]->(ee:Entity) WHERE id(es)= $startId AND id(ee)= $endId AND r.name = $name RETURN data")

+ 1 - 1
kgraph-graph/src/main/java/com/kgraph/graph/neo4j/seavice/impl/KgServiceImpl.java

@@ -129,7 +129,7 @@ public class KgServiceImpl implements IKgService {
                 relationList = relationRepository.getRelationByNameLength5(firstName, secondName);
                 break;
             default:
-                relationList = null;
+                relationList = relationRepository.getAllRelationByName(firstName, secondName);
         }
         return relationList;
     }

+ 54 - 2
sql/system.sql

@@ -1643,7 +1643,29 @@ CREATE TABLE t_air_part_info (
 	update_by VARCHAR ( 64 ) DEFAULT '' COMMENT '更新者',
 	update_time datetime COMMENT '更新时间',
 	PRIMARY KEY ( id )
-) ENGINE = INNODB COMMENT = '部件基本信息';-- -------------------------
+) ENGINE = INNODB COMMENT = '部件基本信息';
+DROP TABLE
+IF
+	EXISTS t_air_status_info;
+CREATE TABLE t_air_status_info (
+	id BIGINT ( 20 ) NOT NULL auto_increment COMMENT '序号',
+	air_model_id BIGINT ( 20 ) COMMENT '飞机id',
+	model_number VARCHAR ( 64 ) COMMENT '型号',
+	air_id BIGINT ( 20 ) COMMENT '机号id',
+	air_number VARCHAR ( 64 ) COMMENT '机号',
+	serial VARCHAR ( 64 ) COMMENT '飞机编号',
+	production_date datetime COMMENT '出厂日期',
+	production_info VARCHAR ( 255 ) COMMENT '厂家信息',
+	version VARCHAR ( 64 ) COMMENT '版本号',
+	version_update_date datetime COMMENT '版本升级日期',
+	repair_times INT COMMENT '维修次数',
+	repair_date datetime COMMENT '维修时间',
+	create_by VARCHAR ( 64 ) DEFAULT '' COMMENT '创建者',
+	create_time datetime COMMENT '创建时间',
+	update_by VARCHAR ( 64 ) DEFAULT '' COMMENT '更新者',
+	update_time datetime COMMENT '更新时间',
+PRIMARY KEY ( id )
+) ENGINE = INNODB COMMENT = '飞机履历';
 DROP TABLE
 IF
 	EXISTS t_air_system_status_info;
@@ -1909,4 +1931,34 @@ CREATE TABLE t_extract_result (
 PRIMARY KEY ( id )
 ) ENGINE = INNODB auto_increment = 1 COMMENT = '抽取结果信息';
 
--- 添加数据字典kg_algorithm
+-- 添加数据字典kg_algorithm
+
+-- 菜单 飞机履历 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历', '2317', '1', 'airRecord', 'ledger/airRecord/index', 1, 0, 'C', '0', '0', 'ledger:airRecord:list', '#', 'admin', sysdate(), '', null, '飞机履历菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:query',        '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:add',          '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:edit',         '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:remove',       '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:export',       '#', 'admin', sysdate(), '', null, '');
+
+ALTER TABLE `kgraph2`.`t_air_system_info`
+ADD COLUMN `name` varchar(64) NULL COMMENT '系统名称' AFTER `id`;
+ALTER TABLE `kgraph2`.`t_air_subsystem_info`
+ADD COLUMN `name` varchar(64) NULL COMMENT '分系统名称' AFTER `id`;
+ALTER TABLE `kgraph2`.`t_air_part_info`
+ADD COLUMN `name` varchar(64) NULL COMMENT '分系统名称' AFTER `id`;

+ 0 - 0
sql/updatesql20230503.sql → sql/update20230503.sql


+ 62 - 0
sql/update20230504.sql

@@ -0,0 +1,62 @@
+use kgraph;
+
+DROP TABLE
+IF
+	EXISTS t_air_status_info;
+CREATE TABLE t_air_status_info (
+	id BIGINT ( 20 ) NOT NULL auto_increment COMMENT '序号',
+	air_model_id BIGINT ( 20 ) COMMENT '飞机id',
+	model_number VARCHAR ( 64 ) COMMENT '型号',
+	air_id BIGINT ( 20 ) COMMENT '机号id',
+	air_number VARCHAR ( 64 ) COMMENT '机号',
+	serial VARCHAR ( 64 ) COMMENT '飞机编号',
+	production_date datetime COMMENT '出厂日期',
+	production_info VARCHAR ( 255 ) COMMENT '厂家信息',
+	version VARCHAR ( 64 ) COMMENT '版本号',
+	version_update_date datetime COMMENT '版本升级日期',
+	repair_times INT COMMENT '维修次数',
+	repair_date datetime COMMENT '维修时间',
+	create_by VARCHAR ( 64 ) DEFAULT '' COMMENT '创建者',
+	create_time datetime COMMENT '创建时间',
+	update_by VARCHAR ( 64 ) DEFAULT '' COMMENT '更新者',
+	update_time datetime COMMENT '更新时间',
+PRIMARY KEY ( id )
+) ENGINE = INNODB COMMENT = '飞机履历';
+
+-- 菜单 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历', '2317', '1', 'airRecord', 'ledger/airRecord/index', 1, 0, 'C', '0', '0', 'ledger:airRecord:list', '#', 'admin', sysdate(), '', null, '飞机履历菜单');
+
+-- 按钮父菜单ID
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 按钮 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:query',        '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:add',          '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:edit',         '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:remove',       '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('飞机履历导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'ledger:airRecord:export',       '#', 'admin', sysdate(), '', null, '');
+
+ALTER TABLE `kgraph2`.`t_air_system_info`
+ADD COLUMN `name` varchar(64) NULL COMMENT '系统名称' AFTER `id`;
+ALTER TABLE `kgraph2`.`t_air_subsystem_info`
+ADD COLUMN `name` varchar(64) NULL COMMENT '分系统名称' AFTER `id`;
+ALTER TABLE `kgraph2`.`t_air_part_info`
+ADD COLUMN `name` varchar(64) NULL COMMENT '部件名称' AFTER `id`;
+ALTER TABLE `kgraph2`.`t_air_system_status_info`
+ADD COLUMN `name` varchar(64) NULL COMMENT '系统名称' AFTER `id`;
+ALTER TABLE `kgraph2`.`t_air_subsystem_status_info`
+ADD COLUMN `name` varchar(64) NULL COMMENT '分系统名称' AFTER `id`;
+ALTER TABLE `kgraph2`.`t_air_part_status_info`
+ADD COLUMN `name` varchar(64) NULL COMMENT '部件名称' AFTER `id`;
+
+commit;