<?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="cn.gistack.alerts.alarmRule.mapper.FsRAtmtnFrcstInfMapper">
|
|
<select id="getAtmtnInfo" resultType="cn.gistack.alerts.alarmRule.vo.FsRAtmtnFrcstInfVO">
|
SELECT
|
inf.FRCST_CD as frcstCd,
|
inf.STCD,
|
inf.FRCST_TM as frcstTm,
|
inf.PBLSH_TM as pblshTm,
|
inf.CNDTN ,
|
inf.FRCST_USR_NM as frcstUsrNm,
|
inf.PBLSH_UNT as pblshUnt,
|
inf.PBLSH_TYP as pblshTyp,
|
dt.TM,
|
NVL( dt.Z, 0 ) AS TZ,
|
NVL( dt.Q, 0 ) AS TQ
|
FROM
|
FRCST_SYS.FS_R_ATMTN_FRCST_DT dt
|
LEFT JOIN FRCST_SYS.FS_R_ATMTN_FRCST_INF inf ON dt.FRCST_CD = inf.FRCST_CD
|
WHERE
|
dt.TM BETWEEN SYSDATE
|
AND SYSDATE + 3
|
<if test="stcds != null and stcds.size()>0">
|
AND inf.STCD in
|
<foreach collection="stcds" index="index" item="item" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
ORDER BY
|
dt.TM DESC
|
</select>
|
<select id="getAtmtnInfo1" resultType="cn.gistack.alerts.alarmRule.vo.FsRAtmtnFrcstInfVO">
|
SELECT
|
inf.FRCST_CD,
|
inf.STCD,
|
inf.FRCST_TM,
|
inf.PBLSH_TM,
|
inf.CNDTN,
|
inf.FRCST_USR_NM,
|
inf.PBLSH_UNT,
|
inf.PBLSH_TYP,
|
dt.TM,
|
NVL( dt.Z, 0 ) AS TZ,
|
NVL( dt.Q, 0 ) AS TQ,
|
fl.FZ,
|
fl.FZTM,
|
fl.FQ,
|
fl.FQTM,
|
fl.RUNOFF,
|
fl.CTM,
|
fl.RF
|
FROM
|
FRCST_SYS.FS_R_ATMTN_FRCST_FLOODDT dt
|
LEFT JOIN FRCST_SYS.FS_R_ATMTN_FRCST_INF inf ON dt.FRCST_CD = inf.FRCST_CD
|
LEFT JOIN FRCST_SYS.FS_R_ATMTN_FRCST_FLOOD fl ON dt.FRCST_CD = fl.FRCST_CD
|
WHERE
|
dt.TM BETWEEN SYSDATE
|
AND SYSDATE + 3
|
<if test="stcds != null and stcds.size()>0">
|
AND inf.STCD in
|
<foreach collection="stcds" index="index" item="item" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
ORDER BY
|
dt.TM DESC
|
</select>
|
|
<resultMap id="resultMap" type="cn.gistack.alerts.alarmRule.vo.FsRAtmtnFrcstInfVO">
|
<id column="FRCST_CD" property="FRCST_CD"/>
|
<result column="FRCST_CD" property="FRCST_CD"/>
|
<result column="STCD" property="STCD"/>
|
<result column="FRCST_USR_ID" property="FRCST_USR_ID"/>
|
<result column="FRCST_USR_NM" property="FRCST_USR_NM"/>
|
<result column="PBLSH_UNT" property="PBLSH_UNT"/>
|
<result column="PBLSH_TYP" property="PBLSH_TYP"/>
|
<result column="CNDTN" property="CNDTN"/>
|
<result column="FRCST_TM" property="FRCST_TM"/>
|
<result column="PBLSH_TM" property="PBLSH_TM"/>
|
<result column="PBLSH_ID" property="PBLSH_ID"/>
|
|
<result column="FZ" property="FZ"/>
|
<result column="FZTM" property="FZTM"/>
|
<result column="FQ" property="FQ"/>
|
<result column="FQTM" property="FQTM"/>
|
<result column="RUNOFF" property="RUNOFF"/>
|
<result column="CTM" property="CTM"/>
|
<result column="RF" property="RF"/>
|
<!-- <collection property="frcstDtVOS" ofType="cn.gistack.alerts.alarmRule.vo.FsRAtmtnFrcstDtVO" >-->
|
<!-- <id property="FRCST_CD" column="FRCST_CD"/>-->
|
<!-- <result column="TM" property="TM"/>-->
|
<!-- <result column="TZ" property="TZ"/>-->
|
<!-- <result column="TQ" property="TQ"/>-->
|
<!-- </collection>-->
|
<collection property="frcstDtVOS" ofType="cn.gistack.alerts.alarmRule.vo.FsRAtmtnFrcstDtVO" column="FRCST_CD" select="getFsRAtmtnFrcstDtVOs"/>
|
</resultMap>
|
|
<select id="getFsRAtmtnFrcstDtVOs" resultType="cn.gistack.alerts.alarmRule.vo.FsRAtmtnFrcstDtVO">
|
select dt.TM, NVL(dt.Z,0) AS TZ, NVL(dt.Q,0) AS TQ from FRCST_SYS.FS_R_ATMTN_FRCST_FLOODDT dt where dt.FRCST_CD = #{FRCST_CD}
|
</select>
|
<select id="getStationInfo" resultType="cn.gistack.alerts.alarmRule.vo.StStbprpBVO">
|
SELECT
|
b.STCD,
|
b.STNM,
|
b.RVNM,
|
NVL( rb.WRZ, 0 ) AS WRZ,
|
NVL( rb.GRZ, 0 ) AS GRZ,
|
NVL( srb.FSLTDZ, 0 )AS FSLTDZ ,
|
NVL( chb.DSFLZ, 0 ) AS SFLZ
|
FROM
|
RWDBSYSDBA.ST_STBPRP_B b
|
LEFT JOIN RWDBSYSDBA.ST_RVFCCH_B rb ON b.STCD = rb.STCD
|
LEFT JOIN RWDBSYSDBA.ST_RSVRFSR_B srb ON b.STCD = srb.STCD
|
LEFT JOIN RWDBSYSDBA.ST_RSVRFCCH_B chb ON b.STCD = chb.STCD
|
where 1=1
|
<if test="stcds != null and stcds.size()>0">
|
AND b.STCD in
|
<foreach collection="stcds" index="index" item="item" open="(" separator="," close=")">
|
#{item}
|
</foreach>
|
</if>
|
</select>
|
<select id="getStcdS" resultType="java.lang.String">
|
SELECT
|
b.STCD
|
FROM
|
RWDBSYSDBA.ST_STBPRP_B b where 1=1
|
<if test="STCM != null and STCM != ''">
|
and b.STNM LIKE '%${STCM}%' ;
|
</if>
|
</select>
|
</mapper>
|