2024-07-08 17:47:02 +08:00
|
|
|
package com.gunshi.project.xyt.mapper;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
2024-07-10 09:27:20 +08:00
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.gunshi.project.xyt.entity.so.OsmoticQueryPageSo;
|
2024-07-10 16:28:20 +08:00
|
|
|
import com.gunshi.project.xyt.entity.so.OsmoticQuerySo;
|
|
|
|
|
import com.gunshi.project.xyt.entity.vo.OsmoticValueVo;
|
|
|
|
|
import com.gunshi.project.xyt.entity.vo.StRzVo;
|
2024-07-08 17:47:02 +08:00
|
|
|
import com.gunshi.project.xyt.model.OsmoticPressR;
|
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
2024-07-10 09:27:20 +08:00
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
import org.apache.ibatis.annotations.Select;
|
2024-07-08 17:47:02 +08:00
|
|
|
|
2024-07-10 16:28:20 +08:00
|
|
|
import java.util.List;
|
|
|
|
|
|
2024-07-08 17:47:02 +08:00
|
|
|
/**
|
|
|
|
|
* 描述: 渗压监测记录表
|
|
|
|
|
* author: xusan
|
|
|
|
|
* date: 2024-07-08 15:44:07
|
|
|
|
|
*/
|
|
|
|
|
@Mapper
|
|
|
|
|
public interface OsmoticPressRMapper extends BaseMapper<OsmoticPressR> {
|
|
|
|
|
|
2024-07-10 09:27:20 +08:00
|
|
|
@Select("""
|
|
|
|
|
<script>
|
2024-07-10 13:16:22 +08:00
|
|
|
select t.*,m.profile_name
|
2024-07-10 09:27:20 +08:00
|
|
|
from public.osmotic_press_r t
|
2024-07-10 13:16:22 +08:00
|
|
|
left join public.osmotic_press_device s on t.station_code = s.station_code
|
|
|
|
|
left join public.att_dam_profile m on s.profile_code = m.profile_code
|
2024-07-10 09:27:20 +08:00
|
|
|
<where>
|
|
|
|
|
<if test="obj.stationCode != null and obj.stationCode !=''">
|
|
|
|
|
t.station_code =#{obj.stationCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="obj.profileCode != null and obj.profileCode !=''">
|
2024-07-10 13:16:22 +08:00
|
|
|
s.profile_code =#{obj.profileCode}
|
2024-07-10 09:27:20 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
|
|
|
|
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
|
|
|
|
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by t.tm,t.station_code desc
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
Page<OsmoticPressR> queryPage(Page<OsmoticPressR> page,@Param("obj") OsmoticQueryPageSo osmoticQueryPageSo);
|
2024-07-10 16:28:20 +08:00
|
|
|
|
|
|
|
|
@Select("""
|
|
|
|
|
<script>
|
|
|
|
|
select to_char(t.tm,'YYYY-MM-DD') as tm,t.rz
|
|
|
|
|
from public.st_rsvr_r t
|
|
|
|
|
where to_char(t.tm, 'HH24:MI:SS') = '08:00:00'
|
|
|
|
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
|
|
|
|
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
|
|
|
|
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
|
|
|
|
</if>
|
|
|
|
|
order by t.tm desc
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
List<StRzVo> queryRz(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
|
|
|
|
|
|
|
|
|
@Select("""
|
|
|
|
|
<script>
|
|
|
|
|
select t.station_code as stationCode,to_char(t.tm,'YYYY-MM-DD') as tm,t.value
|
|
|
|
|
from public.osmotic_press_r t
|
|
|
|
|
where to_char(t.tm, 'HH24:MI:SS') = '08:00:00' and station_code in
|
|
|
|
|
<foreach collection="obj.stationCodes" item="code" separator="," open="(" close=")">
|
|
|
|
|
#{code}
|
|
|
|
|
</foreach>
|
|
|
|
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.start != null">
|
|
|
|
|
and t.tm <![CDATA[>=]]> #{obj.dateTimeRangeSo.start}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="obj.dateTimeRangeSo != null and obj.dateTimeRangeSo.end != null">
|
|
|
|
|
and t.tm <![CDATA[<=]]> #{obj.dateTimeRangeSo.end}
|
|
|
|
|
</if>
|
|
|
|
|
order by t.tm desc
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
List<OsmoticValueVo> queryValue(@Param("obj") OsmoticQuerySo osmoticQuerySo);
|
|
|
|
|
|
2024-07-08 17:47:02 +08:00
|
|
|
}
|