|
|
|
@ -1592,7 +1592,7 @@
|
|
|
|
|
ROW_NUMBER() OVER (PARTITION BY monitorId ORDER BY collectTime DESC) AS rn
|
|
|
|
|
FROM T_ArrayTemperatureData
|
|
|
|
|
WHERE collectTime > (GETDATE() - 1)
|
|
|
|
|
<if test="monitorId != null and monitorId != ''"> and monitorId like concat(#{monitorId}, '%') </if>
|
|
|
|
|
<if test="monitorId != null and monitorId != ''">and monitorId like concat(#{monitorId}, '%')</if>
|
|
|
|
|
)
|
|
|
|
|
SELECT m.monitorName,t.*
|
|
|
|
|
FROM RankedData t
|
|
|
|
@ -3955,11 +3955,24 @@
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteTArraytemperaturedataBycollectTime">
|
|
|
|
|
delete from T_ArrayTemperatureData where DATEADD(DAY, #{objId}, GETDATE()) > collectTime
|
|
|
|
|
delete
|
|
|
|
|
from T_ArrayTemperatureData
|
|
|
|
|
where DATEADD(DAY, #{objId}, GETDATE()) > collectTime
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<select id="getHighestPointTemperature" parameterType="TArraytemperaturedata" resultType="java.util.HashMap">
|
|
|
|
|
SELECT monitorId, collectTime, MAX(SiteValue) AS tempreture
|
|
|
|
|
SELECT monitorId, collectTime, maxTemperature tempreture
|
|
|
|
|
FROM T_ArrayTemperatureData
|
|
|
|
|
<where>
|
|
|
|
|
<if test="monitorId != null and monitorId != ''">and monitorId = #{monitorId}</if>
|
|
|
|
|
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
|
|
|
|
|
and collectTime between #{params.beginCollectTime} and #{params.endCollectTime}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by monitorId, collectTime
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- SELECT monitorId, collectTime, MAX(SiteValue) AS tempreture
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT monitorId, collectTime, SiteValue
|
|
|
|
|
FROM T_ArrayTemperatureData
|
|
|
|
@ -4050,6 +4063,5 @@
|
|
|
|
|
and collectTime between #{params.beginCollectTime} and #{params.endCollectTime}</if>
|
|
|
|
|
</where>
|
|
|
|
|
) AS Data
|
|
|
|
|
GROUP BY monitorId, collectTime
|
|
|
|
|
</select>
|
|
|
|
|
GROUP BY monitorId, collectTime-->
|
|
|
|
|
</mapper>
|
|
|
|
|