河道水情监测详细数据修改

master
wany 2024-09-24 15:23:38 +08:00
parent f9b5d33247
commit 65e68706e6
4 changed files with 14 additions and 12 deletions

View File

@ -99,10 +99,10 @@ public interface AttResBaseMapper extends BaseMapper<AttResBase> {
@Select(""" @Select("""
<script> <script>
select select
<if test="obj.type == 1 "> <if test="type == 1 ">
t.z from public.st_river_r t t.z from public.st_river_r t
</if> </if>
<if test="obj.type == 2"> <if test="type == 2">
t.rz from public.st_rsvr_r t t.rz from public.st_rsvr_r t
</if> </if>
where t.stcd = #{stcd} and t.tm = #{dateTime} where t.stcd = #{stcd} and t.tm = #{dateTime}
@ -182,17 +182,11 @@ public interface AttResBaseMapper extends BaseMapper<AttResBase> {
@Select(""" @Select("""
<script> <script>
select t.tm, select t.tm,t.z from public.st_river_r_real t
<if test="type == 1">
t.z from public.st_river_r_real t
</if>
<if test="type == 2">
t.rz as z from public.st_rsvr_r_real t
</if>
where t.stcd = #{stcd} where t.stcd = #{stcd}
order by t.TM desc limit 1 order by t.TM desc limit 1
</script> </script>
""") """)
AttRvMonitorVo latestRz(@Param("stcd") String stcd, @Param("type") Integer type); AttRvMonitorVo newRz(@Param("stcd") String stcd);
} }

View File

@ -76,4 +76,12 @@ public interface StStbprpBMapper extends BaseMapper<StStbprpB> {
</script> </script>
""") """)
List<StStatusVo> imgList(); List<StStatusVo> imgList();
@Select("""
<script>
SELECT st.stcd,st.stnm FROM st_stbprp_b st
WHERE st.stcd in (select distinct(stcd) from st_stbprp_b_elem where elem ='drp')
</script>
""")
List<StStatusVo> rainList();
} }

View File

@ -120,7 +120,7 @@ public class RiverWaterService {
BeanUtils.copyProperties(stPptnDetailsVo,vo,AttRvMonitorDetailVo.class); BeanUtils.copyProperties(stPptnDetailsVo,vo,AttRvMonitorDetailVo.class);
//最新水位 //最新水位
AttRvMonitorVo monitorVo = attRvBaseMapper.latestRz(stcd,2); AttRvMonitorVo monitorVo = attRvBaseMapper.newRz(stcd);
if(monitorVo == null){ if(monitorVo == null){
return vo; return vo;
} }

View File

@ -111,7 +111,7 @@ public class StStbprpBService extends ServiceImpl<StStbprpBMapper, StStbprpB>
} }
public List<StStatusVo> rainList() { public List<StStatusVo> rainList() {
return this.baseMapper.realRainList(); return this.baseMapper.rainList();
} }
} }