避难所
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?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.gis.xian.mapper.XianEmergencyShelterMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.gis.xian.entity.XianEmergencyShelter">
|
||||
<id property="id" column="id" />
|
||||
<result property="year" column="year" />
|
||||
<result property="district" column="district" />
|
||||
<result property="name" column="name" />
|
||||
<result property="address" column="address" />
|
||||
<result property="type" column="type" />
|
||||
<result property="constructionCategory" column="construction_category" />
|
||||
<result property="coverArea" column="cover_area" />
|
||||
<result property="effectiveRefugeArea" column="effective_refuge_area" />
|
||||
<result property="effectiveNumberOfRefugees" column="effective_number_of_refugees" />
|
||||
<result property="lon" column="lon" />
|
||||
<result property="lat" column="lat" />
|
||||
<result property="point" column="point" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 获取所有应急避难所基础点 -->
|
||||
<select id="getBasePoints" resultMap="BaseResultMap">
|
||||
SELECT id, lon, lat FROM xian_emergency_shelter
|
||||
<where>
|
||||
is_delete = 0
|
||||
<!-- 确定落在西安境内 -->
|
||||
AND ST_Within(point, (SELECT geom FROM xian_district WHERE id = 1))
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 根据id获取应急避难所详情 -->
|
||||
<select id="getPointDetailById" resultMap="BaseResultMap">
|
||||
SELECT id, name, type, address, lon, lat, effective_number_of_refugees FROM xian_emergency_shelter
|
||||
<where>
|
||||
id = #{id} AND is_delete = 0
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -15,4 +15,5 @@ init:
|
||||
earthquake: 'xian:init:data:base-points:hidden-danger:earthquake'
|
||||
risk: 'xian:init:data:base-points:risk'
|
||||
hospitals: 'xian:init:data:base-points:hospitals'
|
||||
dangerous-source: 'xian:init:data:base-points:dangerous-source'
|
||||
dangerous-source: 'xian:init:data:base-points:dangerous-source'
|
||||
emergency-shelter: 'xian:init:data:base-points:emergency-shelter'
|
||||
Reference in New Issue
Block a user