确保查询的点都在行政区内
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -37,8 +37,10 @@
|
||||
disaster_type IN('滑坡', '泥石流')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
AND is_delete = 0
|
||||
<!-- 确定落在西安境内 -->
|
||||
AND ST_Within(geom, (SELECT geom FROM xian_district WHERE id = 1))
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据id获取隐患点详情 -->
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
SELECT id, lon, lat FROM xian_hospitals
|
||||
<where>
|
||||
is_delete = 0
|
||||
<!-- 确定落在西安境内 -->
|
||||
AND ST_Within(point, (SELECT geom FROM xian_district WHERE id = 1))
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
SELECT id, lon, lat FROM xian_risk_spots
|
||||
<where>
|
||||
is_delete = 0
|
||||
<!-- 确定落在西安境内 -->
|
||||
AND ST_Within(geom, (SELECT geom FROM xian_district WHERE id = 1))
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user