2024-07-08 17:47:02 +08:00
|
|
|
package com.gunshi.project.xyt.mapper;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
2024-07-10 16:08:13 +08:00
|
|
|
import com.gunshi.project.xyt.entity.so.HomeStStbprpBSo;
|
|
|
|
|
import com.gunshi.project.xyt.entity.vo.HomeStStbprpBVo;
|
2024-07-17 11:49:48 +08:00
|
|
|
import com.gunshi.project.xyt.entity.vo.StStatusVo;
|
2024-07-08 17:47:02 +08:00
|
|
|
import com.gunshi.project.xyt.model.StStbprpB;
|
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
2024-07-10 16:08:13 +08:00
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
2024-07-08 17:47:02 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 描述: sttp 以水利标准来
|
|
|
|
|
* author: xusan
|
|
|
|
|
* date: 2024-07-08 15:44:08
|
|
|
|
|
*/
|
|
|
|
|
@Mapper
|
|
|
|
|
public interface StStbprpBMapper extends BaseMapper<StStbprpB> {
|
|
|
|
|
|
2024-07-10 16:08:13 +08:00
|
|
|
@Select("""
|
|
|
|
|
<script>
|
2024-07-17 10:41:03 +08:00
|
|
|
SELECT st.stcd,
|
|
|
|
|
st.stnm,
|
|
|
|
|
st.lgtd,
|
|
|
|
|
st.lttd,COALESCE ( SUM ( r.drp ), 0 ) v FROM st_stbprp_b st
|
|
|
|
|
LEFT JOIN ( SELECT stcd, drp FROM st_pptn_r WHERE tm BETWEEN #{dto.stm} AND #{dto.etm} ) r ON st.stcd = r.stcd
|
2024-07-10 16:08:13 +08:00
|
|
|
WHERE st.sttp = 'PP'
|
|
|
|
|
GROUP BY st.stcd
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
List<HomeStStbprpBVo> rainfallStationDetailsList(@Param("dto") HomeStStbprpBSo dto);
|
|
|
|
|
|
|
|
|
|
@Select("""
|
|
|
|
|
<script>
|
2024-07-22 10:26:52 +08:00
|
|
|
SELECT st.*,COALESCE (r.rz, 0 ) v,arb.res_code FROM st_stbprp_b st
|
|
|
|
|
LEFT JOIN att_res_base arb ON arb.stcd = st.stcd
|
2024-07-10 16:08:13 +08:00
|
|
|
LEFT JOIN st_rsvr_r_real r ON st.stcd = r.stcd
|
|
|
|
|
WHERE st.sttp = 'RR'
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
List<HomeStStbprpBVo> reservoirStationDetailsList();
|
|
|
|
|
|
|
|
|
|
@Select("""
|
|
|
|
|
<script>
|
2024-07-17 10:41:03 +08:00
|
|
|
SELECT st.*,COALESCE (r.q, 0 ) v FROM st_stbprp_b st
|
2024-07-10 16:08:13 +08:00
|
|
|
LEFT JOIN st_water_r_real r ON st.stcd = r.stcd
|
|
|
|
|
WHERE st.sttp = 'ZQ'
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
List<HomeStStbprpBVo> flowStationDetailsList();
|
|
|
|
|
|
2024-07-17 11:49:48 +08:00
|
|
|
@Select("""
|
|
|
|
|
<script>
|
|
|
|
|
SELECT st.stcd,st.stnm,r.tm FROM st_stbprp_b st
|
|
|
|
|
LEFT JOIN st_pptn_r_real r ON st.stcd = r.stcd
|
|
|
|
|
WHERE st.stcd in (select distinct(stcd) from st_stbprp_b_elem where elem ='drp')
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
List<StStatusVo> realRainList();
|
|
|
|
|
|
|
|
|
|
@Select("""
|
|
|
|
|
<script>
|
|
|
|
|
SELECT st.stcd,st.stnm,r.tm FROM st_stbprp_b st
|
|
|
|
|
LEFT JOIN st_rsvr_r_real r ON st.stcd = r.stcd
|
|
|
|
|
WHERE st.stcd in (select distinct(stcd) from st_stbprp_b_elem where elem ='z')
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
List<StStatusVo> rzList();
|
|
|
|
|
|
2024-07-18 10:24:37 +08:00
|
|
|
@Select("""
|
|
|
|
|
<script>
|
|
|
|
|
SELECT st.stcd,st.stnm,r.tm FROM st_stbprp_b st
|
|
|
|
|
LEFT JOIN st_img_r_real r ON st.stcd = r.stcd
|
|
|
|
|
WHERE st.stcd in (select distinct(stcd) from st_stbprp_b_elem where elem ='img')
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
List<StStatusVo> imgList();
|
2024-07-08 17:47:02 +08:00
|
|
|
}
|