shuishen
2021-09-07 d012d12ca32309ce3867511efc3b33a5790e9753
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?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>
    <!-- &lt;!&ndash;站点列表&ndash;&gt;
    <select id="selectStbprpBPage" resultMap="stbprpBResultMap">
        select * from dbo.ST_STBPRP_B ORDER BY BGFRYM DESC LIMIT #{startIndex},#{pageSize}
    </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="selectInfo" resultMap="stbprpBResultMap">
       select * from dbo.ST_STBPRP_B where STCD =#{code} 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>