|
|
|
@ -79,7 +79,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="pm10 != null "> and twtd.pm10 = #{pm10}</if>
|
|
|
|
<if test="pm10 != null "> and twtd.pm10 = #{pm10}</if>
|
|
|
|
<if test="standby != null "> and twtd.standby = #{standby}</if>
|
|
|
|
<if test="standby != null "> and twtd.standby = #{standby}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
order by twtd.recodeTime desc
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectTWTempertureDataByObjid" parameterType="Long" resultMap="TWTempertureDataResult">
|
|
|
|
<select id="selectTWTempertureDataByObjid" parameterType="Long" resultMap="TWTempertureDataResult">
|
|
|
|
@ -184,10 +183,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectLastTWTempertureDataList" parameterType="TWTempertureData" resultMap="TWTempertureDataResult">
|
|
|
|
<select id="selectLastTWTempertureDataList" parameterType="TWTempertureData" resultMap="TWTempertureDataResult">
|
|
|
|
|
|
|
|
|
|
|
|
SELECT twtd.*,ebmi.monitor_name
|
|
|
|
SELECT twtd.objid,
|
|
|
|
|
|
|
|
twtd.monitorId,
|
|
|
|
|
|
|
|
twtd.collectTime,
|
|
|
|
|
|
|
|
twtd.tempreture,
|
|
|
|
|
|
|
|
twtd.humidity,
|
|
|
|
|
|
|
|
twtd.illuminance,
|
|
|
|
|
|
|
|
twtd.noise,
|
|
|
|
|
|
|
|
twtd.concentration,
|
|
|
|
|
|
|
|
twtd.recodeTime,
|
|
|
|
|
|
|
|
twtd.alarmType,
|
|
|
|
|
|
|
|
twtd.pm1,
|
|
|
|
|
|
|
|
twtd.pm2,
|
|
|
|
|
|
|
|
twtd.pm10,
|
|
|
|
|
|
|
|
twtd.standby,
|
|
|
|
|
|
|
|
ebmi.monitor_name
|
|
|
|
FROM (
|
|
|
|
FROM (
|
|
|
|
select *,
|
|
|
|
select objid,
|
|
|
|
row_number() over(partition by monitorId order by recodeTime desc) as rownum
|
|
|
|
monitorId,
|
|
|
|
|
|
|
|
collectTime,
|
|
|
|
|
|
|
|
tempreture,
|
|
|
|
|
|
|
|
humidity,
|
|
|
|
|
|
|
|
illuminance,
|
|
|
|
|
|
|
|
noise,
|
|
|
|
|
|
|
|
concentration,
|
|
|
|
|
|
|
|
recodeTime,
|
|
|
|
|
|
|
|
alarmType,
|
|
|
|
|
|
|
|
pm1,
|
|
|
|
|
|
|
|
pm2,
|
|
|
|
|
|
|
|
pm10,
|
|
|
|
|
|
|
|
standby
|
|
|
|
|
|
|
|
row_number() over(partition by monitorId order by objid desc) as rownum
|
|
|
|
from T_W_TempertureData
|
|
|
|
from T_W_TempertureData
|
|
|
|
) twtd
|
|
|
|
) twtd
|
|
|
|
left join ems_base_monitor_info ebmi on twtd.monitorId = ebmi.monitor_code
|
|
|
|
left join ems_base_monitor_info ebmi on twtd.monitorId = ebmi.monitor_code
|
|
|
|
@ -219,5 +245,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectLastTWTempertureData" parameterType="TWTempertureData" resultMap="TWTempertureDataResult">
|
|
|
|
|
|
|
|
select *
|
|
|
|
|
|
|
|
from T_W_TempertureData
|
|
|
|
|
|
|
|
ORDER BY objid DESC
|
|
|
|
|
|
|
|
LIMIT 1000
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|
|