<?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.Stbprp.mapper.StbprpBMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="stbprpBResultMap" type="org.springblade.modules.Stbprp.entity.StbprpB">
|
<result column="STCD" property="stcd"/>
|
<result column="STNM" property="stnm"/>
|
<result column="RVNM" property="rvnm"/>
|
<result column="HNNM" property="hnnm"/>
|
<result column="BSNM" property="bsnm"/>
|
<result column="LGTD" property="lgtd"/>
|
<result column="LTTD" property="lttd"/>
|
<result column="STLC" property="stlc"/>
|
<result column="ADDVCD" property="addvcd"/>
|
<result column="ADDVCD5" property="addvcd5"/>
|
<result column="DTMNM" property="dtmnm"/>
|
<result column="DTMEL" property="dtmel"/>
|
<result column="DTPR" property="dtpr"/>
|
<result column="STTP" property="sttp"/>
|
<result column="FRGRD" property="frgrd"/>
|
<result column="ESSTYM" property="esstym"/>
|
<result column="BGFRYM" property="bgfrym"/>
|
<result column="ATCUNIT" property="atcunit"/>
|
<result column="ADMAUTH" property="admauth"/>
|
<result column="LOCALITY" property="locality"/>
|
<result column="STBK" property="stbk"/>
|
<result column="STAZT" property="stazt"/>
|
<result column="DSTRVM" property="dstrvm"/>
|
<result column="DRNA" property="drna"/>
|
<result column="PHCD" property="phcd"/>
|
<result column="USFL" property="usfl"/>
|
<result column="COMMENTS" property="comments"/>
|
<result column="MODITIME" property="moditime"/>
|
</resultMap>
|
|
|
<resultMap id="stbprpBResultMaps" type="org.springblade.modules.Stbprp.entity.StbprpB">
|
<result column="stnm" property="stnm"/>
|
</resultMap>
|
|
<!--通过站点名称,返回基础站信息-->
|
<resultMap id="stbprpBNameResultMap" type="org.springblade.modules.Stbprp.vo.StbprpBSnameVO">
|
<result column="stnm" property="stnm"/>
|
<result column="stcd" property="stcd"/>
|
<result column="lgtd" property="lgtd"/>
|
<result column="lttd" property="lttd"/>
|
<result column="sttp" property="sttp"/>
|
<result column="addvcd" property="addvcd"/>
|
<result column="county" property="county"/>
|
|
</resultMap>
|
<!-- <!–站点列表–>
|
<select id="selectStbprpBPage" resultMap="stbprpBResultMap">
|
select * from dbo.ST_STBPRP_B ORDER BY BGFRYM DESC LIMIT #{startIndex},#{pageSize}
|
</select>-->
|
|
|
<!--站点详情-->
|
<select id="selectInfo" resultMap="stbprpBResultMap">
|
select st.STCD,
|
st.STNM,
|
st.RVNM,
|
st.HNNM,
|
st.BSNM,
|
st.LGTD,
|
st.LTTD,
|
st.STLC,
|
st.ADDVCD,
|
ad.ADDVNM as ADDVCD5,
|
st.DTMNM,
|
st.DTMEL,
|
st.DTPR,
|
st.STTP,
|
st.FRGRD,
|
st.ESSTYM,
|
st.BGFRYM,
|
st.ATCUNIT,
|
st.ADMAUTH,
|
st.LOCALITY,
|
st.STBK,
|
st.STAZT,
|
st.DSTRVM,
|
st.DRNA,
|
st.PHCD,
|
st.USFL,
|
st.COMMENTS,
|
st.MODITIME
|
from dbo.ST_STBPRP_B st
|
INNER JOIN dbo.ST_ADDVCD_D ad ON ad.ADDVCD = st.ADDVCD
|
where st.STCD = #{code}
|
ORDER BY st.MODITIME DESC
|
</select>
|
|
|
<!-- 模糊查询-->
|
<select id="selectList" resultMap="stbprpBResultMap">
|
select * from dbo.ST_STBPRP_B where 1=1
|
<if test="addvcd !=null and addvcd!=''">
|
and ADDVCD=#{addvcd}
|
</if>
|
|
<if test="name !=null and name!=''">
|
and STNM like '%${name}%'
|
</if>
|
order by MODITIME desc
|
</select>
|
|
<!--查询全部-->
|
<select id="selectAllList" resultMap="stbprpBResultMap">
|
select *
|
from dbo.ST_STBPRP_B
|
ORDER BY MODITIME DESC
|
</select>
|
|
|
<select id="selectInfos" resultType="java.util.Map">
|
select LGTD, LTTD, STNM
|
from dbo.ST_STBPRP_B
|
where STCD = #{code}
|
</select>
|
|
<!--河道-->
|
<select id="selectRiverCode" resultType="java.lang.String">
|
SELECT STCD
|
from dbo.ST_STBPRP_B
|
where STTP = 'ZZ'
|
</select>
|
|
|
<!--水库-->
|
<select id="selectRsvrCode" resultType="java.lang.String">
|
SELECT STCD
|
from dbo.ST_STBPRP_B
|
where STTP = 'RR'
|
</select>
|
|
<select id="selectInfoCode" resultType="java.util.HashMap">
|
select stcd from dbo.ST_STBPRP_B where 1=1
|
<if test="addvcd!=null and addvcd!=''">
|
and ADDVCD=#{addvcd}
|
</if>
|
<if test="name!=null and name!=''">
|
and STNM like '%${name}%'
|
</if>
|
and STTP=#{sttp}
|
</select>
|
|
<!--降水-->
|
<select id="selectPptnCode" resultType="java.util.HashMap">
|
select STCD
|
from dbo.ST_STBPRP_B
|
WHERE STTP = 'PP'
|
ORDER BY ADDVCD5
|
</select>
|
|
<!--东江源数据查询-->
|
<select id="selectDjList" resultMap="stbprpBResultMap">
|
SELECT * from dbo.ST_STBPRP_B WHERE HNNM='东江'
|
<if test="code!=null and code!=''">
|
and STCD=#{code}
|
</if>
|
</select>
|
|
<!--查询全部站点名称-->
|
<select id="selectSname" resultType="java.util.HashMap">
|
select STNM
|
from dbo.ST_STBPRP_B
|
</select>
|
|
|
<select id="selectSnameInfo" resultMap="stbprpBNameResultMap">
|
select STCD, STNM as siteName, LGTD, LTTD, STTP, ADDVCD as city, STLC as county
|
from dbo.ST_STBPRP_B
|
where STNM = #{STNM}
|
</select>
|
|
<select id="selectSnames" resultType="java.util.HashMap">
|
select STNM, STCD as pid
|
from dbo.ST_STBPRP_B
|
</select>
|
|
</mapper>
|