From ac60d1b54177f621cfbe576322bd21abb91820db Mon Sep 17 00:00:00 2001
From: wzy-warehouse <18135009705@163.com>
Date: Sat, 18 Apr 2026 18:10:55 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E6=9F=A5=E8=AF=A2=E7=9A=84?=
=?UTF-8?q?=E7=82=B9=E9=83=BD=E5=9C=A8=E8=A1=8C=E6=94=BF=E5=8C=BA=E5=86=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../xian/entity/XianHiddenDangerSpots.java | 62 ++++++++++++++-----
.../mapper/XianHiddenDangerSpotsMapper.java | 10 +--
.../mapper/XianHiddenDangerSpotsMapper.xml | 4 +-
.../gis/xian/mapper/XianHospitalsMapper.xml | 2 +
.../gis/xian/mapper/XianRiskSpotsMapper.xml | 2 +
5 files changed, 57 insertions(+), 23 deletions(-)
diff --git a/src/main/java/com/gis/xian/entity/XianHiddenDangerSpots.java b/src/main/java/com/gis/xian/entity/XianHiddenDangerSpots.java
index 2c816f4..15afd9e 100644
--- a/src/main/java/com/gis/xian/entity/XianHiddenDangerSpots.java
+++ b/src/main/java/com/gis/xian/entity/XianHiddenDangerSpots.java
@@ -111,23 +111,23 @@ public class XianHiddenDangerSpots {
}
XianHiddenDangerSpots other = (XianHiddenDangerSpots) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
- && (this.getFieldCode() == null ? other.getFieldCode() == null : this.getFieldCode().equals(other.getFieldCode()))
- && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
- && (this.getProvinceId() == null ? other.getProvinceId() == null : this.getProvinceId().equals(other.getProvinceId()))
- && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
- && (this.getCityId() == null ? other.getCityId() == null : this.getCityId().equals(other.getCityId()))
- && (this.getCounty() == null ? other.getCounty() == null : this.getCounty().equals(other.getCounty()))
- && (this.getCountyId() == null ? other.getCountyId() == null : this.getCountyId().equals(other.getCountyId()))
- && (this.getVillage() == null ? other.getVillage() == null : this.getVillage().equals(other.getVillage()))
- && (this.getDisasterName() == null ? other.getDisasterName() == null : this.getDisasterName().equals(other.getDisasterName()))
- && (this.getLon() == null ? other.getLon() == null : this.getLon().equals(other.getLon()))
- && (this.getLat() == null ? other.getLat() == null : this.getLat().equals(other.getLat()))
- && (this.getGeom() == null ? other.getGeom() == null : this.getGeom().equals(other.getGeom()))
- && (this.getPosition() == null ? other.getPosition() == null : this.getPosition().equals(other.getPosition()))
- && (this.getDisasterType() == null ? other.getDisasterType() == null : this.getDisasterType().equals(other.getDisasterType()))
- && (this.getScaleGrade() == null ? other.getScaleGrade() == null : this.getScaleGrade().equals(other.getScaleGrade()))
- && (this.getRiskGrade() == null ? other.getRiskGrade() == null : this.getRiskGrade().equals(other.getRiskGrade()))
- && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
+ && (this.getFieldCode() == null ? other.getFieldCode() == null : this.getFieldCode().equals(other.getFieldCode()))
+ && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
+ && (this.getProvinceId() == null ? other.getProvinceId() == null : this.getProvinceId().equals(other.getProvinceId()))
+ && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
+ && (this.getCityId() == null ? other.getCityId() == null : this.getCityId().equals(other.getCityId()))
+ && (this.getCounty() == null ? other.getCounty() == null : this.getCounty().equals(other.getCounty()))
+ && (this.getCountyId() == null ? other.getCountyId() == null : this.getCountyId().equals(other.getCountyId()))
+ && (this.getVillage() == null ? other.getVillage() == null : this.getVillage().equals(other.getVillage()))
+ && (this.getDisasterName() == null ? other.getDisasterName() == null : this.getDisasterName().equals(other.getDisasterName()))
+ && (this.getLon() == null ? other.getLon() == null : this.getLon().equals(other.getLon()))
+ && (this.getLat() == null ? other.getLat() == null : this.getLat().equals(other.getLat()))
+ && (this.getGeom() == null ? other.getGeom() == null : this.getGeom().equals(other.getGeom()))
+ && (this.getPosition() == null ? other.getPosition() == null : this.getPosition().equals(other.getPosition()))
+ && (this.getDisasterType() == null ? other.getDisasterType() == null : this.getDisasterType().equals(other.getDisasterType()))
+ && (this.getScaleGrade() == null ? other.getScaleGrade() == null : this.getScaleGrade().equals(other.getScaleGrade()))
+ && (this.getRiskGrade() == null ? other.getRiskGrade() == null : this.getRiskGrade().equals(other.getRiskGrade()))
+ && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
}
@Override
@@ -154,4 +154,32 @@ public class XianHiddenDangerSpots {
result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
return result;
}
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", fieldCode=").append(fieldCode);
+ sb.append(", province=").append(province);
+ sb.append(", provinceId=").append(provinceId);
+ sb.append(", city=").append(city);
+ sb.append(", cityId=").append(cityId);
+ sb.append(", county=").append(county);
+ sb.append(", countyId=").append(countyId);
+ sb.append(", village=").append(village);
+ sb.append(", disasterName=").append(disasterName);
+ sb.append(", lon=").append(lon);
+ sb.append(", lat=").append(lat);
+ sb.append(", geom=").append(geom);
+ sb.append(", position=").append(position);
+ sb.append(", disasterType=").append(disasterType);
+ sb.append(", scaleGrade=").append(scaleGrade);
+ sb.append(", riskGrade=").append(riskGrade);
+ sb.append(", isDelete=").append(isDelete);
+ sb.append("]");
+ return sb.toString();
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/gis/xian/mapper/XianHiddenDangerSpotsMapper.java b/src/main/java/com/gis/xian/mapper/XianHiddenDangerSpotsMapper.java
index 2a27c3a..3ecc29c 100644
--- a/src/main/java/com/gis/xian/mapper/XianHiddenDangerSpotsMapper.java
+++ b/src/main/java/com/gis/xian/mapper/XianHiddenDangerSpotsMapper.java
@@ -5,11 +5,11 @@ import com.gis.xian.entity.XianHiddenDangerSpots;
import java.util.List;
/**
-* @author wzy
-* @description 针对表【xian_hidden_danger_spots(地质灾害隐患点)】的数据库操作Mapper
-* @createDate 2026-04-09 16:18:17
-* @Entity com.gis.xian.entity.XianHiddenDangerSpots
-*/
+ * @author wzy
+ * @description 针对表【xian_hidden_danger_spots(地质灾害隐患点)】的数据库操作Mapper
+ * @createDate 2026-04-09 16:18:17
+ * @Entity com.gis.xian.entity.XianHiddenDangerSpots
+ */
public interface XianHiddenDangerSpotsMapper {
/**
* 获取所有基础点:滑坡、泥石流、山洪、内涝
diff --git a/src/main/resources/com/gis/xian/mapper/XianHiddenDangerSpotsMapper.xml b/src/main/resources/com/gis/xian/mapper/XianHiddenDangerSpotsMapper.xml
index b867910..cc501f9 100644
--- a/src/main/resources/com/gis/xian/mapper/XianHiddenDangerSpotsMapper.xml
+++ b/src/main/resources/com/gis/xian/mapper/XianHiddenDangerSpotsMapper.xml
@@ -37,8 +37,10 @@
disaster_type IN('滑坡', '泥石流')
+ AND is_delete = 0
+
+ AND ST_Within(geom, (SELECT geom FROM xian_district WHERE id = 1))
- AND is_delete = 0
diff --git a/src/main/resources/com/gis/xian/mapper/XianHospitalsMapper.xml b/src/main/resources/com/gis/xian/mapper/XianHospitalsMapper.xml
index eb9a782..b2a49fe 100644
--- a/src/main/resources/com/gis/xian/mapper/XianHospitalsMapper.xml
+++ b/src/main/resources/com/gis/xian/mapper/XianHospitalsMapper.xml
@@ -75,6 +75,8 @@
SELECT id, lon, lat FROM xian_hospitals
is_delete = 0
+
+ AND ST_Within(point, (SELECT geom FROM xian_district WHERE id = 1))
diff --git a/src/main/resources/com/gis/xian/mapper/XianRiskSpotsMapper.xml b/src/main/resources/com/gis/xian/mapper/XianRiskSpotsMapper.xml
index 5e663a1..d8b4f6b 100644
--- a/src/main/resources/com/gis/xian/mapper/XianRiskSpotsMapper.xml
+++ b/src/main/resources/com/gis/xian/mapper/XianRiskSpotsMapper.xml
@@ -34,6 +34,8 @@
SELECT id, lon, lat FROM xian_risk_spots
is_delete = 0
+
+ AND ST_Within(geom, (SELECT geom FROM xian_district WHERE id = 1))