|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.ruoyi.code.camera.mapper.WaterPhotoInfoMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<select id="queryPhotoList" resultType="com.ruoyi.code.camera.domain.WaterPhotoInfo" >
|
|
|
|
|
|
|
|
select w.stnm_id,s.stnm,c.ip,w.value,w.tm,w.img_name
|
|
|
|
from sc_station_info s
|
|
|
|
left join camera c on s.camera_sn = c.devsn
|
|
|
|
left join sc_water_data w on s.id = w.stnm_id
|
|
|
|
|
|
|
|
<where>
|
|
|
|
<if test="params.stnm !=null and params.stnm !=''">and s.stnm like concat('%',#{params.stnm},'%')</if>
|
|
|
|
<if test="params.stcd !=null and params.stcd !=''">and c.name like concat('%',#{params.stcd},'%')</if>
|
|
|
|
<if test="params.startTime != null and params.startTime !=''"> and w.tm >= #{params.startTime }</if>
|
|
|
|
<if test="params.endTime != null and params.endTime !=''"> and w.tm <= #{params.endTime}</if>
|
|
|
|
</where>
|
|
|
|
order by w.tm desc
|
|
|
|
</select>
|
|
|
|
<select id="selectWaterCurrentDataList" resultType="com.ruoyi.code.camera.domain.WaterPhotoInfo">
|
|
|
|
select
|
|
|
|
w.stnm_id id,
|
|
|
|
s.stnm,
|
|
|
|
c.name stcd,
|
|
|
|
w.tm,
|
|
|
|
w.value
|
|
|
|
from
|
|
|
|
sc_station_info s
|
|
|
|
left join sc_water_current_data w on w.stnm_id = s.id
|
|
|
|
left join camera c on c.devsn = s.camera_sn
|
|
|
|
|
|
|
|
<where>
|
|
|
|
<if test="params.stnm !=null and params.stnm !=''">and s.stnm like concat('%',#{params.stnm},'%')</if>
|
|
|
|
<if test="params.stcd !=null and params.stcd !=''">and c.name like concat('%',#{params.name},'%')</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
<select id="selectWaterData" resultType="com.ruoyi.code.camera.domain.YcData">
|
|
|
|
select
|
|
|
|
s.id stnmId,
|
|
|
|
s.stnm,
|
|
|
|
w.tm,
|
|
|
|
unix_timestamp(w.tm) clock,
|
|
|
|
w.value
|
|
|
|
from
|
|
|
|
sc_station_info s
|
|
|
|
left join sc_water_data w on w.stnm_id = s.id
|
|
|
|
<where>
|
|
|
|
w.stnm_id = #{params.stnmId}
|
|
|
|
<if test="params.startTime != null">
|
|
|
|
and w.tm>=#{params.startTime}
|
|
|
|
</if>
|
|
|
|
<if test="params.endTime != null">
|
|
|
|
and w.tm <=#{params.endTime}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
order by w.tm
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|