<?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.water.mapper.WaterMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="stbprpBResultMap" type="org.springblade.modules.water.entity.water">
|
<result column="id" property="id"/>
|
<result column="parent_id" property="parentId"/>
|
<result column="location" property="location"/>
|
<result column="origin" property="origin"/>
|
<result column="lng" property="lng"/>
|
<result column="lat" property="lat"/>
|
<result column="water" property="water"/>
|
<result column="xh" property="xh"/>
|
</resultMap>
|
|
<!-- 模糊查询-->
|
<select id="queryList" resultMap="stbprpBResultMap">
|
select * from coordinates where 1=1
|
<if test="pid !=null and pid!=''">
|
and parent_id=#{pid}
|
</if>
|
|
<if test="loc !=null and loc!=''">
|
and location like '%${loc}%'
|
</if>
|
order by origin asc
|
</select>
|
|
<select id="selectInfo" resultType="int">
|
SELECT COUNT(*) as number FROM coordinates WHERE parent_id=#{pid} and xh=#{num}
|
</select>
|
|
<delete id="deleteInfo">
|
delete from coordinates WHERE parent_id=#{pid} and xh=#{num}
|
</delete>
|
|
|
<select id="selectInfoh" resultType="java.util.Map">
|
SELECT * FROM sys_watersection WHERE stcd=#{stcd}
|
</select>
|
|
<!--查询河道实时水位-->
|
<select id="selectZ" resultType="java.util.HashMap">
|
SELECT top 1 Z FROM dbo.river where stcd=#{stcd} ORDER BY TM DESC
|
</select>
|
|
<!--查询河道警戒水位-->
|
<select id="selectJ" resultType="java.util.HashMap">
|
SELECT ISNULL(WRZ,0) as WRZ,ISNULL(OBHTZ,0) as OBHTZ,ISNULL(HLZ,0) as HLZ FROM dbo.rvfcc where STCD=#{code}
|
</select>
|
</mapper>
|