2024-07-08 17:47:02 +08:00
|
|
|
package com.gunshi.project.xyt.mapper;
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
2024-07-22 11:31:08 +08:00
|
|
|
import com.gunshi.project.xyt.entity.vo.GateStautsVo;
|
2024-07-08 17:47:02 +08:00
|
|
|
import com.gunshi.project.xyt.model.GateValveReal;
|
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
2024-07-22 15:44:35 +08:00
|
|
|
import org.apache.ibatis.annotations.Param;
|
2024-07-22 11:31:08 +08:00
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
2024-07-22 15:44:35 +08:00
|
|
|
import java.math.BigDecimal;
|
2024-07-22 11:31:08 +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 GateValveRealMapper extends BaseMapper<GateValveReal> {
|
|
|
|
|
|
2024-07-22 11:31:08 +08:00
|
|
|
@Select("""
|
|
|
|
|
<script>
|
|
|
|
|
SELECT t.valve_code,t.valve_name,t.manual_operation,case when s.status = '100%' then '全开' when s.status = '0%' then '关' else s.status end as status,s.tm
|
|
|
|
|
FROM public.att_gate_valve t
|
|
|
|
|
LEFT JOIN public.gate_valve_real s ON t.valve_code = s.valve_code
|
|
|
|
|
order by s.tm desc nulls last
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
List<GateStautsVo> gateStatusList();
|
2024-07-22 15:44:35 +08:00
|
|
|
|
|
|
|
|
@Select("""
|
|
|
|
|
<script>
|
|
|
|
|
SELECT t.q FROM public.st_water_r_real t
|
|
|
|
|
where stcd = (select stcd from public.gate_valve_stbprp_rel where valve_code = #{valveCode})
|
|
|
|
|
</script>
|
|
|
|
|
""")
|
|
|
|
|
BigDecimal realQ(@Param("valveCode") String valveCode);
|
2024-07-08 17:47:02 +08:00
|
|
|
}
|