皮带秤实时数据问题修复

This commit is contained in:
2024-04-27 10:44:06 +08:00
parent 05475484c7
commit 8515d5cd75

View File

@@ -15,7 +15,7 @@ public interface PdcDeviceRealTimeDataRepository
@Query(
value =
"select dd.id from t_pdc_device_real_time_data dd inner join t_pdc_device d on dd.device_id = d.id where d.id in :deviceIds and (extract(epoch from (now() - dd.last_save_time)) / 60) >= d.data_save_interval ",
"select dd.id from t_pdc_device_real_time_data dd inner join t_pdc_device d on dd.device_id = d.id where d.id in :deviceIds and (extract(epoch from (now() - dd.last_save_time)) / 60) >= d.data_save_interval and (extract(epoch from (now() - dd.time)) / 60) <= 3 * d.data_save_interval",
nativeQuery = true)
List<String> findNeedToSaveData(List<String> deviceIds);