| | |
| | | <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> |