|
|
@ -226,7 +226,7 @@ |
|
|
|
UNION ALL select 5 control_cause,'' cause_type,'警备任务' controlCauseName,'' causeTypeName |
|
|
|
UNION ALL select 6 control_cause,'' cause_type,'其他' controlCauseName,'' causeTypeName) t3 |
|
|
|
LEFT JOIN |
|
|
|
(select t2.control_type,t2.control_cause,t2.cause_type,count(*) num,sum( |
|
|
|
(select t2.control_type,t2.control_cause,ifnull(t2.cause_type,'') cause_type,count(*) num,sum( |
|
|
|
case when date_format(#{startTime},'%Y-%m-%d %H:%i:%s') >= date_format(t1.start_time,'%Y-%m-%d %H:%i:%s') |
|
|
|
and (DATE_FORMAT(t1.end_time,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(#{endTime},'%Y-%m-%d %H:%i:%s') or ISNULL(t1.end_time)) |
|
|
|
then TIMESTAMPDIFF(MINUTE,t1.start_time,now()) |
|
|
|