79 lines
2.6 KiB
Java
79 lines
2.6 KiB
Java
package com.gunshi.project.xyt.mapper;
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.gunshi.project.xyt.entity.so.HomeStStbprpBSo;
|
|
import com.gunshi.project.xyt.entity.vo.HomeStStbprpBVo;
|
|
import com.gunshi.project.xyt.entity.vo.StStatusVo;
|
|
import com.gunshi.project.xyt.model.StStbprpB;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 描述: sttp 以水利标准来
|
|
* author: xusan
|
|
* date: 2024-07-08 15:44:08
|
|
*/
|
|
@Mapper
|
|
public interface StStbprpBMapper extends BaseMapper<StStbprpB> {
|
|
|
|
@Select("""
|
|
<script>
|
|
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
|
|
WHERE st.sttp = 'PP'
|
|
GROUP BY st.stcd
|
|
</script>
|
|
""")
|
|
List<HomeStStbprpBVo> rainfallStationDetailsList(@Param("dto") HomeStStbprpBSo dto);
|
|
|
|
@Select("""
|
|
<script>
|
|
SELECT st.*,COALESCE (r.rz, 0 ) v FROM st_stbprp_b st
|
|
LEFT JOIN st_rsvr_r_real r ON st.stcd = r.stcd
|
|
WHERE st.sttp = 'RR'
|
|
</script>
|
|
""")
|
|
List<HomeStStbprpBVo> reservoirStationDetailsList();
|
|
|
|
@Select("""
|
|
<script>
|
|
SELECT st.*,COALESCE (r.q, 0 ) v FROM st_stbprp_b st
|
|
LEFT JOIN st_water_r_real r ON st.stcd = r.stcd
|
|
WHERE st.sttp = 'PQ' OR st.sttp = 'QQ'
|
|
</script>
|
|
""")
|
|
List<HomeStStbprpBVo> flowStationDetailsList();
|
|
|
|
@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();
|
|
|
|
@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();
|
|
} |