change - 振动数据曲线优化

master
yinq 2 months ago
parent 38268e4a62
commit 09b28c6b69

@ -148,7 +148,7 @@ public class TVibrationsensorDataController extends BaseController {
@PostMapping("/sensorList")
@ResponseBody
public AjaxResult sensorList(TVibrationsensorData tVibrationsensorData) {
List<TVibrationsensorData> list = tVibrationsensorDataService.selectTVibrationsensorDataList(tVibrationsensorData);
List<TVibrationsensorData> list = tVibrationsensorDataService.selectTVibrationsensorDataListCurve(tVibrationsensorData);
return AjaxResult.success(list);
}

@ -61,4 +61,10 @@ public interface TVibrationsensorDataMapper {
List<TVibrationsensorData> selectRealTimeMonitor(TVibrationsensorData tVibrationsensorData);
/**
*
* @param tVibrationsensorData
* @return
*/
List<TVibrationsensorData> selectTVibrationsensorDataListCurve(TVibrationsensorData tVibrationsensorData);
}

@ -66,4 +66,11 @@ public interface ITVibrationsensorDataService
*/
public List<TVibrationsensorData> selectRealTimeMonitor(TVibrationsensorData tVibrationsensorData);
/**
* 线
* @param tVibrationsensorData
* @return
*/
List<TVibrationsensorData> selectTVibrationsensorDataListCurve(TVibrationsensorData tVibrationsensorData);
}

@ -90,4 +90,14 @@ public class TVibrationsensorDataServiceImpl implements ITVibrationsensorDataSer
public List<TVibrationsensorData> selectRealTimeMonitor(TVibrationsensorData tVibrationsensorData) {
return tVibrationsensorDataMapper.selectRealTimeMonitor(tVibrationsensorData);
}
/**
*
* @param tVibrationsensorData
* @return
*/
@Override
public List<TVibrationsensorData> selectTVibrationsensorDataListCurve(TVibrationsensorData tVibrationsensorData) {
return tVibrationsensorDataMapper.selectTVibrationsensorDataListCurve(tVibrationsensorData);
}
}

@ -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>

@ -123,5 +123,17 @@
AND m.monitorId IS NOT NULL
ORDER BY sensor_id
</select>
<select id="selectTVibrationsensorDataListCurve" parameterType="TVibrationsensorData"
resultMap="TVibrationsensorDataResult">
<include refid="selectTVibrationsensorDataVo"/>
<where>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
and collectTime between #{params.beginCollectTime} and #{params.endCollectTime}
</if>
<if test="sensorId != null ">and sensor_id = #{sensorId}</if>
<if test="recodeTime != null ">and recodeTime = #{recodeTime}</if>
</where>
order by collectTime asc
</select>
</mapper>

Loading…
Cancel
Save