Commit 8ea04341 by 杨林龙

修改围栏报警统计BUG

1 parent bb5a455a
...@@ -59,9 +59,9 @@ ...@@ -59,9 +59,9 @@
tef.start_time startTime, tef.start_time startTime,
tef.end_time endTime, tef.end_time endTime,
count(tefs.sn) linkDeviceCnt, count(tefs.sn) linkDeviceCnt,
(select count(DISTINCT sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id) as alarmDeviceCnt, (select count(DISTINCT sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id and f1.del_flag = 0) as alarmDeviceCnt,
(select count(sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id) as alarmCnt, (select count(sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id and f1.del_flag = 0) as alarmCnt,
(select alarm_time from t_alarm_electric_fence f1 where f1.fence_id = tef.id order by alarm_time desc limit 1) as lastAlarmDate, (select alarm_time from t_alarm_electric_fence f1 where f1.fence_id = tef.id and f1.del_flag = 0 order by alarm_time desc limit 1) as lastAlarmDate,
tef.enable_status enableStatus, tef.enable_status enableStatus,
IF(tef.enable_status = 1, '已开启', '已关闭') as enableStatusDesc, IF(tef.enable_status = 1, '已开启', '已关闭') as enableStatusDesc,
tef.created_date createdDate, tef.created_date createdDate,
...@@ -109,9 +109,9 @@ ...@@ -109,9 +109,9 @@
concat(date_format(tef.start_time,'%Y-%m-%d'),'----',date_format(tef.end_time,'%Y-%m-%d')) monitorTime, concat(date_format(tef.start_time,'%Y-%m-%d'),'----',date_format(tef.end_time,'%Y-%m-%d')) monitorTime,
tef.analysis_address monitorArea, tef.analysis_address monitorArea,
count(tefs.sn) linkDeviceCnt, count(tefs.sn) linkDeviceCnt,
(select count(DISTINCT sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id) as alarmDeviceCnt, (select count(DISTINCT sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id and f1.del_flag = 0) as alarmDeviceCnt,
(select count(sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id) as alarmCnt, (select count(sn) from t_alarm_electric_fence f1 where f1.fence_id = tef.id and f1.del_flag = 0) as alarmCnt,
(select alarm_time from t_alarm_electric_fence f1 where f1.fence_id = tef.id order by alarm_time desc limit 1) as lastAlarmDate, (select alarm_time from t_alarm_electric_fence f1 where f1.fence_id = tef.id and f1.del_flag = 0 order by alarm_time desc limit 1) as lastAlarmDate,
tef.enable_status enableStatus, tef.enable_status enableStatus,
IF(tef.enable_status = 1, '已开启', '已关闭') as enableStatusDesc, IF(tef.enable_status = 1, '已开启', '已关闭') as enableStatusDesc,
tef.created_date createdDate, tef.created_date createdDate,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!