change - 振动数据曲线优化

master
yinq 2 months ago
parent 38268e4a62
commit 09b28c6b69

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

@ -61,4 +61,10 @@ public interface TVibrationsensorDataMapper {
List<TVibrationsensorData> selectRealTimeMonitor(TVibrationsensorData tVibrationsensorData); 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); 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) { public List<TVibrationsensorData> selectRealTimeMonitor(TVibrationsensorData tVibrationsensorData) {
return tVibrationsensorDataMapper.selectRealTimeMonitor(tVibrationsensorData); return tVibrationsensorDataMapper.selectRealTimeMonitor(tVibrationsensorData);
} }
/**
*
* @param tVibrationsensorData
* @return
*/
@Override
public List<TVibrationsensorData> selectTVibrationsensorDataListCurve(TVibrationsensorData tVibrationsensorData) {
return tVibrationsensorDataMapper.selectTVibrationsensorDataListCurve(tVibrationsensorData);
}
} }

@ -3955,11 +3955,24 @@
</delete> </delete>
<delete id="deleteTArraytemperaturedataBycollectTime"> <delete id="deleteTArraytemperaturedataBycollectTime">
delete from T_ArrayTemperatureData where DATEADD(DAY, #{objId}, GETDATE()) > collectTime delete
from T_ArrayTemperatureData
where DATEADD(DAY, #{objId}, GETDATE()) > collectTime
</delete> </delete>
<select id="getHighestPointTemperature" parameterType="TArraytemperaturedata" resultType="java.util.HashMap"> <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 ( FROM (
SELECT monitorId, collectTime, SiteValue SELECT monitorId, collectTime, SiteValue
FROM T_ArrayTemperatureData FROM T_ArrayTemperatureData
@ -4050,6 +4063,5 @@
and collectTime between #{params.beginCollectTime} and #{params.endCollectTime}</if> and collectTime between #{params.beginCollectTime} and #{params.endCollectTime}</if>
</where> </where>
) AS Data ) AS Data
GROUP BY monitorId, collectTime GROUP BY monitorId, collectTime-->
</select>
</mapper> </mapper>

@ -123,5 +123,17 @@
AND m.monitorId IS NOT NULL AND m.monitorId IS NOT NULL
ORDER BY sensor_id ORDER BY sensor_id
</select> </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> </mapper>

Loading…
Cancel
Save