1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?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.bizmatics.mhfire.persistence.mapper.FireStatisticsMapper">
- <select id="selectCount" resultType="java.lang.Integer">
- select count(1)
- from `hzdc-hztjb`
- <where>
- <if test="startTime != null">
- and `起火时间_日期型` >= #{startTime}
- </if>
- <if test="endTime != null">
- and `起火时间_日期型` <= #{endTime}
- </if>
- <if test="fireAddress != null and fireAddress != ''">
- and `起火地点` LIKE CONCAT(CONCAT('%', #{fireAddress}), '%')
- </if>
- <if test="level != null and level != ''">
- and `火灾原因分类(一级)` = #{level}
- </if>
- <if test="unitId != null and unitId != ''">
- and `单位代码` = #{unitId}
- </if>
- </where>
- </select>
- <select id="page" resultType="java.util.Map">
- select *
- from `hzdc-hztjb`
- <where>
- <if test="startTime != null">
- and `起火时间_日期型` >= #{startTime}
- </if>
- <if test="endTime !=null">
- and `起火时间_日期型` <= #{endTime}
- </if>
- <if test="address !=null and address !=''">
- and `起火地点` LIKE CONCAT(CONCAT('%', #{address}), '%')
- </if>
- </where>
- </select>
- <select id="getOne" resultType="java.util.Map">
- select * from `hzdc-hztjb` where `火灾序号` = #{id};
- </select>
- <select id="groupByCause" resultType="java.lang.String">
- select `火灾原因分类(一级)` from `hzdc-hztjb` group by `火灾原因分类(一级)`
- </select>
- <select id="getAddress" resultType="java.lang.String">
- select `行政区域` from `hzdc-hztjb` group by `行政区域`
- </select>
- </mapper>
|