ai报警企业版
This commit is contained in:
parent
856a176426
commit
3a40fe8f36
@ -19,7 +19,10 @@
|
||||
left join worker_info_to_ai_analyse_hard_ware_alarm_record witaahwar on a.id =
|
||||
witaahwar.ai_analyse_hard_ware_alarm_record_id
|
||||
left join worker_info wi on wi.id = witaahwar.worker_info_id
|
||||
WHERE a.project_sn = #{param.projectSn}
|
||||
WHERE 1=1
|
||||
<if test="param.projectSn != null and param.projectSn != ''">
|
||||
and a.project_sn = #{param.projectSn}
|
||||
</if>
|
||||
<if test="param.handleResult != null">
|
||||
and a.handle_result = #{param.handleResult}
|
||||
</if>
|
||||
@ -110,7 +113,10 @@
|
||||
IFNULL(SUM((CASE WHEN a.alarm_type = 6 THEN 1 ELSE 0 END)), 0) alarmTypeNum6,
|
||||
IFNULL(SUM((CASE WHEN a.alarm_type = 7 THEN 1 ELSE 0 END)), 0) alarmTypeNum7
|
||||
FROM ai_analyse_hard_ware_alarm_record a
|
||||
where a.project_sn = #{projectSn}
|
||||
where 1=1
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and a.project_sn = #{projectSn}
|
||||
</if>
|
||||
<include refid="queryAlarmTime">
|
||||
</include>
|
||||
<if test="selectType == '1'.toString() or selectType == '2'.toString()">
|
||||
@ -161,7 +167,9 @@
|
||||
where 1=1
|
||||
<include refid="queryAlarmTime">
|
||||
</include>
|
||||
and a.project_sn = #{projectSn}
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and a.project_sn = #{projectSn}
|
||||
</if>
|
||||
group by a.alarm_type
|
||||
order by count desc
|
||||
</select>
|
||||
@ -176,7 +184,9 @@
|
||||
ifnull(sum(if(a.create_time >= DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00'),1,0)),0) as todayAlarmNum
|
||||
FROM ai_analyse_hard_ware_alarm_record a
|
||||
where 1=1
|
||||
and a.project_sn = #{projectSn}
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and a.project_sn = #{projectSn}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectAiAnalyseHardWareAlarmTypeCount"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user