<?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="org.springblade.modules.yw.mapper.EmergencySpaceMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="emergencySpaceResultMap" type="org.springblade.modules.yw.entity.EmergencySpaceEntity">
|
<result column="id" property="id"/>
|
<result column="name" property="name"/>
|
<result column="type" property="type"/>
|
<result column="main_func" property="mainFunc"/>
|
<result column="lng" property="lng"/>
|
<result column="lat" property="lat"/>
|
<result column="pre_level" property="preLevel"/>
|
<result column="capacity" property="capacity"/>
|
<result column="remark" property="remark"/>
|
<result column="firm_id" property="firmId"/>
|
<result column="create_user" property="createUser"/>
|
<result column="create_time" property="createTime"/>
|
<result column="update_user" property="updateUser"/>
|
<result column="update_time" property="updateTime"/>
|
<result column="is_deleted" property="isDeleted"/>
|
</resultMap>
|
|
<!--自定义分页查询-->
|
<select id="selectEmergencySpacePage" resultMap="emergencySpaceResultMap">
|
select * from yw_emergency_space where is_deleted = 0
|
</select>
|
|
<!--获取应急空间统计数据-->
|
<select id="getStatisticData" resultType="java.util.Map">
|
SELECT
|
case when type=1 then '应急池'
|
when type =2 then '阀门'
|
when type =3 then '公共管网'
|
when type =4 then '污水提升泵站'
|
when type =5 then '水库'
|
when type =6 then '应急泵'
|
when type =7 then '消防沙'
|
end as type,
|
count(*) as num
|
FROM
|
yw_emergency_space
|
WHERE
|
is_deleted = 0
|
AND type IS NOT NULL
|
AND firm_id IS NOT NULL
|
GROUP BY type
|
</select>
|
|
</mapper>
|