From 698f8f0f22af4c66581ce284407e986ca036aec6 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 23 一月 2025 17:10:26 +0800
Subject: [PATCH] 1. 网格细分逻辑(编写中)

---
 src/main/kotlin/com/flightfeather/uav/domain/entity/GridCell.java |  132 ++++++++++++++++++++++++++++++--------------
 1 files changed, 90 insertions(+), 42 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/domain/entity/GridCell.java b/src/main/kotlin/com/flightfeather/uav/domain/entity/GridCell.java
index 8375cd2..16e1d75 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/entity/GridCell.java
+++ b/src/main/kotlin/com/flightfeather/uav/domain/entity/GridCell.java
@@ -9,15 +9,22 @@
     private Integer id;
 
     /**
+     * 缃戞牸绱㈠紩
+     */
+    @Column(name = "cell_index")
+    private Integer cellIndex;
+
+    /**
      * 鎵�灞炵綉鏍煎垎缁刬d
      */
     @Column(name = "group_id")
     private Integer groupId;
 
     /**
-     * 绾害
+     * 鎵�灞炰笂绾х綉鏍肩殑绱㈠紩id,濡傛灉娌℃湁鍒欎负null
      */
-    private BigDecimal latitude;
+    @Column(name = "father_cell_index")
+    private Integer fatherCellIndex;
 
     /**
      * 缁忓害
@@ -25,52 +32,57 @@
     private BigDecimal longitude;
 
     /**
+     * 绾害
+     */
+    private BigDecimal latitude;
+
+    /**
      * 鐭╁舰缃戞牸椤剁偣缁忓害
      */
     @Column(name = "point1_lon")
-    private String point1Lon;
+    private BigDecimal point1Lon;
 
     /**
      * 鐭╁舰缃戞牸椤剁偣绾害
      */
     @Column(name = "point1_lat")
-    private String point1Lat;
+    private BigDecimal point1Lat;
 
     /**
      * 鐭╁舰缃戞牸椤剁偣缁忓害
      */
     @Column(name = "point2_lon")
-    private String point2Lon;
+    private BigDecimal point2Lon;
 
     /**
      * 鐭╁舰缃戞牸椤剁偣绾害
      */
     @Column(name = "point2_lat")
-    private String point2Lat;
+    private BigDecimal point2Lat;
 
     /**
      * 鐭╁舰缃戞牸椤剁偣缁忓害
      */
     @Column(name = "point3_lon")
-    private String point3Lon;
+    private BigDecimal point3Lon;
 
     /**
      * 鐭╁舰缃戞牸椤剁偣绾害
      */
     @Column(name = "point3_lat")
-    private String point3Lat;
+    private BigDecimal point3Lat;
 
     /**
      * 鐭╁舰缃戞牸椤剁偣缁忓害
      */
     @Column(name = "point4_lon")
-    private String point4Lon;
+    private BigDecimal point4Lon;
 
     /**
      * 鐭╁舰缃戞牸椤剁偣绾害
      */
     @Column(name = "point4_lat")
-    private String point4Lat;
+    private BigDecimal point4Lat;
 
     /**
      * @return id
@@ -84,6 +96,24 @@
      */
     public void setId(Integer id) {
         this.id = id;
+    }
+
+    /**
+     * 鑾峰彇缃戞牸绱㈠紩
+     *
+     * @return cell_index - 缃戞牸绱㈠紩
+     */
+    public Integer getCellIndex() {
+        return cellIndex;
+    }
+
+    /**
+     * 璁剧疆缃戞牸绱㈠紩
+     *
+     * @param cellIndex 缃戞牸绱㈠紩
+     */
+    public void setCellIndex(Integer cellIndex) {
+        this.cellIndex = cellIndex;
     }
 
     /**
@@ -105,21 +135,21 @@
     }
 
     /**
-     * 鑾峰彇绾害
+     * 鑾峰彇鎵�灞炰笂绾х綉鏍肩殑绱㈠紩id,濡傛灉娌℃湁鍒欎负null
      *
-     * @return latitude - 绾害
+     * @return father_cell_index - 鎵�灞炰笂绾х綉鏍肩殑绱㈠紩id,濡傛灉娌℃湁鍒欎负null
      */
-    public BigDecimal getLatitude() {
-        return latitude;
+    public Integer getFatherCellIndex() {
+        return fatherCellIndex;
     }
 
     /**
-     * 璁剧疆绾害
+     * 璁剧疆鎵�灞炰笂绾х綉鏍肩殑绱㈠紩id,濡傛灉娌℃湁鍒欎负null
      *
-     * @param latitude 绾害
+     * @param fatherCellIndex 鎵�灞炰笂绾х綉鏍肩殑绱㈠紩id,濡傛灉娌℃湁鍒欎负null
      */
-    public void setLatitude(BigDecimal latitude) {
-        this.latitude = latitude;
+    public void setFatherCellIndex(Integer fatherCellIndex) {
+        this.fatherCellIndex = fatherCellIndex;
     }
 
     /**
@@ -141,11 +171,29 @@
     }
 
     /**
+     * 鑾峰彇绾害
+     *
+     * @return latitude - 绾害
+     */
+    public BigDecimal getLatitude() {
+        return latitude;
+    }
+
+    /**
+     * 璁剧疆绾害
+     *
+     * @param latitude 绾害
+     */
+    public void setLatitude(BigDecimal latitude) {
+        this.latitude = latitude;
+    }
+
+    /**
      * 鑾峰彇鐭╁舰缃戞牸椤剁偣缁忓害
      *
      * @return point1_lon - 鐭╁舰缃戞牸椤剁偣缁忓害
      */
-    public String getPoint1Lon() {
+    public BigDecimal getPoint1Lon() {
         return point1Lon;
     }
 
@@ -154,8 +202,8 @@
      *
      * @param point1Lon 鐭╁舰缃戞牸椤剁偣缁忓害
      */
-    public void setPoint1Lon(String point1Lon) {
-        this.point1Lon = point1Lon == null ? null : point1Lon.trim();
+    public void setPoint1Lon(BigDecimal point1Lon) {
+        this.point1Lon = point1Lon;
     }
 
     /**
@@ -163,7 +211,7 @@
      *
      * @return point1_lat - 鐭╁舰缃戞牸椤剁偣绾害
      */
-    public String getPoint1Lat() {
+    public BigDecimal getPoint1Lat() {
         return point1Lat;
     }
 
@@ -172,8 +220,8 @@
      *
      * @param point1Lat 鐭╁舰缃戞牸椤剁偣绾害
      */
-    public void setPoint1Lat(String point1Lat) {
-        this.point1Lat = point1Lat == null ? null : point1Lat.trim();
+    public void setPoint1Lat(BigDecimal point1Lat) {
+        this.point1Lat = point1Lat;
     }
 
     /**
@@ -181,7 +229,7 @@
      *
      * @return point2_lon - 鐭╁舰缃戞牸椤剁偣缁忓害
      */
-    public String getPoint2Lon() {
+    public BigDecimal getPoint2Lon() {
         return point2Lon;
     }
 
@@ -190,8 +238,8 @@
      *
      * @param point2Lon 鐭╁舰缃戞牸椤剁偣缁忓害
      */
-    public void setPoint2Lon(String point2Lon) {
-        this.point2Lon = point2Lon == null ? null : point2Lon.trim();
+    public void setPoint2Lon(BigDecimal point2Lon) {
+        this.point2Lon = point2Lon;
     }
 
     /**
@@ -199,7 +247,7 @@
      *
      * @return point2_lat - 鐭╁舰缃戞牸椤剁偣绾害
      */
-    public String getPoint2Lat() {
+    public BigDecimal getPoint2Lat() {
         return point2Lat;
     }
 
@@ -208,8 +256,8 @@
      *
      * @param point2Lat 鐭╁舰缃戞牸椤剁偣绾害
      */
-    public void setPoint2Lat(String point2Lat) {
-        this.point2Lat = point2Lat == null ? null : point2Lat.trim();
+    public void setPoint2Lat(BigDecimal point2Lat) {
+        this.point2Lat = point2Lat;
     }
 
     /**
@@ -217,7 +265,7 @@
      *
      * @return point3_lon - 鐭╁舰缃戞牸椤剁偣缁忓害
      */
-    public String getPoint3Lon() {
+    public BigDecimal getPoint3Lon() {
         return point3Lon;
     }
 
@@ -226,8 +274,8 @@
      *
      * @param point3Lon 鐭╁舰缃戞牸椤剁偣缁忓害
      */
-    public void setPoint3Lon(String point3Lon) {
-        this.point3Lon = point3Lon == null ? null : point3Lon.trim();
+    public void setPoint3Lon(BigDecimal point3Lon) {
+        this.point3Lon = point3Lon;
     }
 
     /**
@@ -235,7 +283,7 @@
      *
      * @return point3_lat - 鐭╁舰缃戞牸椤剁偣绾害
      */
-    public String getPoint3Lat() {
+    public BigDecimal getPoint3Lat() {
         return point3Lat;
     }
 
@@ -244,8 +292,8 @@
      *
      * @param point3Lat 鐭╁舰缃戞牸椤剁偣绾害
      */
-    public void setPoint3Lat(String point3Lat) {
-        this.point3Lat = point3Lat == null ? null : point3Lat.trim();
+    public void setPoint3Lat(BigDecimal point3Lat) {
+        this.point3Lat = point3Lat;
     }
 
     /**
@@ -253,7 +301,7 @@
      *
      * @return point4_lon - 鐭╁舰缃戞牸椤剁偣缁忓害
      */
-    public String getPoint4Lon() {
+    public BigDecimal getPoint4Lon() {
         return point4Lon;
     }
 
@@ -262,8 +310,8 @@
      *
      * @param point4Lon 鐭╁舰缃戞牸椤剁偣缁忓害
      */
-    public void setPoint4Lon(String point4Lon) {
-        this.point4Lon = point4Lon == null ? null : point4Lon.trim();
+    public void setPoint4Lon(BigDecimal point4Lon) {
+        this.point4Lon = point4Lon;
     }
 
     /**
@@ -271,7 +319,7 @@
      *
      * @return point4_lat - 鐭╁舰缃戞牸椤剁偣绾害
      */
-    public String getPoint4Lat() {
+    public BigDecimal getPoint4Lat() {
         return point4Lat;
     }
 
@@ -280,7 +328,7 @@
      *
      * @param point4Lat 鐭╁舰缃戞牸椤剁偣绾害
      */
-    public void setPoint4Lat(String point4Lat) {
-        this.point4Lat = point4Lat == null ? null : point4Lat.trim();
+    public void setPoint4Lat(BigDecimal point4Lat) {
+        this.point4Lat = point4Lat;
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3