|
@@ -39,7 +39,7 @@ public class MachAlarmRecordsServiceImpl extends BaseServiceImpl<MachAlarmRecord
|
|
|
"\tc.device_name AS 'device_name',\n" +
|
|
|
"\tb.data_img_url AS 'img_url'\n" +
|
|
|
"from x521_1.rt_device_alarm a, x521_1.rt_device_data_inf b, x521_1.rt_device c\n" +
|
|
|
- "where a.task_id = b.task_id and a.device_tag = b.device_tag \n" +
|
|
|
+ "where a.alarm_date > '2022-12-31 23:59:59' and a.task_id = b.task_id and a.device_tag = b.device_tag \n" +
|
|
|
"and a.alarm_date = b.data_date and a.device_tag = c.device_tag\n" +
|
|
|
"union all\n" +
|
|
|
"select \n" +
|
|
@@ -57,7 +57,7 @@ public class MachAlarmRecordsServiceImpl extends BaseServiceImpl<MachAlarmRecord
|
|
|
"\tc.device_name AS 'device_name',\n" +
|
|
|
"\tb.data_img_url AS 'img_url'\n" +
|
|
|
"from x521_1.rt_device_alarm a, x521_1.rt_device_data_ins b, x521_1.rt_device c\n" +
|
|
|
- "where a.task_id = b.task_id and a.device_tag = b.device_tag \n" +
|
|
|
+ "where a.alarm_date > '2022-12-31 23:59:59' and a.task_id = b.task_id and a.device_tag = b.device_tag \n" +
|
|
|
"and a.alarm_date = b.data_date and a.device_tag = c.device_tag) AS temp\n" +
|
|
|
"where temp.alarm_id > " + latestAlarmId);
|
|
|
|
|
@@ -98,7 +98,7 @@ public class MachAlarmRecordsServiceImpl extends BaseServiceImpl<MachAlarmRecord
|
|
|
"\tc.device_name AS 'device_name',\n" +
|
|
|
"\tb.data_img_url AS 'img_url'\n" +
|
|
|
"from x521_2.rt_device_alarm a, x521_2.rt_device_data_inf b, x521_2.rt_device c\n" +
|
|
|
- "where a.task_id = b.task_id and a.device_tag = b.device_tag \n" +
|
|
|
+ "where a.alarm_date > '2022-12-31 23:59:59' and a.task_id = b.task_id and a.device_tag = b.device_tag \n" +
|
|
|
"and a.alarm_date = b.data_date and a.device_tag = c.device_tag\n" +
|
|
|
"union all\n" +
|
|
|
"select \n" +
|
|
@@ -116,7 +116,7 @@ public class MachAlarmRecordsServiceImpl extends BaseServiceImpl<MachAlarmRecord
|
|
|
"\tc.device_name AS 'device_name',\n" +
|
|
|
"\tb.data_img_url AS 'img_url'\n" +
|
|
|
"from x521_2.rt_device_alarm a, x521_2.rt_device_data_ins b, x521_2.rt_device c\n" +
|
|
|
- "where a.task_id = b.task_id and a.device_tag = b.device_tag \n" +
|
|
|
+ "where a.alarm_date > '2022-12-31 23:59:59' and a.task_id = b.task_id and a.device_tag = b.device_tag \n" +
|
|
|
"and a.alarm_date = b.data_date and a.device_tag = c.device_tag) AS temp\n" +
|
|
|
"where temp.alarm_id > " + latestAlarmId);
|
|
|
|